]> git.tdb.fi Git - libs/gl.git/commitdiff
Process MemberAccess nodes in FunctionInliner
authorMikko Rasa <tdb@tdb.fi>
Fri, 24 May 2019 22:32:17 +0000 (01:32 +0300)
committerMikko Rasa <tdb@tdb.fi>
Fri, 24 May 2019 22:32:17 +0000 (01:32 +0300)
source/programcompiler.cpp
source/programcompiler.h

index c2ebb4b96ad3e474b2f636578e404601282b82ad..a1be91ca4f575228fe2f48ccb374fb0097c6dccb 100644 (file)
@@ -1175,6 +1175,12 @@ void ProgramCompiler::FunctionInliner::visit(BinaryExpression &binary)
        inline_result = 0;
 }
 
+void ProgramCompiler::FunctionInliner::visit(MemberAccess &memacc)
+{
+       visit_and_inline(memacc.left);
+       inline_result = 0;
+}
+
 void ProgramCompiler::FunctionInliner::visit(FunctionCall &call)
 {
        for(vector<RefPtr<Expression> >::iterator i=call.arguments.begin(); i!=call.arguments.end(); ++i)
index d8b2608afe9b885a5e5b376761b80f1bed0d02c7..2c8b33b6f905b726ed6eea6aa5a0230dee27f970 100644 (file)
@@ -216,6 +216,7 @@ private:
                virtual void visit(ProgramSyntax::Block &);
                virtual void visit(ProgramSyntax::UnaryExpression &);
                virtual void visit(ProgramSyntax::BinaryExpression &);
+               virtual void visit(ProgramSyntax::MemberAccess &);
                virtual void visit(ProgramSyntax::FunctionCall &);
                virtual void visit(ProgramSyntax::Return &);
        };