Fix in codegen: fixed compilation of unknown node: do not hardcode return variable name
authorJan Vrany <jan.vrany@fit.cvut.cz>
Mon, 15 Jun 2015 18:00:44 +0100
changeset 487 602215b19135
parent 486 0dd7eb52b5a1
child 488 19a9c25960ef
Fix in codegen: fixed compilation of unknown node: do not hardcode return variable name ...use `self retvalVar` instead
compiler/PPCCodeGenerator.st
--- a/compiler/PPCCodeGenerator.st	Mon Jun 15 17:47:38 2015 +0100
+++ b/compiler/PPCCodeGenerator.st	Mon Jun 15 18:00:44 2015 +0100
@@ -934,10 +934,12 @@
     compiler codeClearError.
     compiler add: '(', self retvalVar, ' := ', id, ' parseOn: context) isPetitFailure'.
     compiler indent.
-    compiler add: ' ifTrue: [self error: retval message at: ', self retvalVar, ' position ].'.
+    compiler add: ' ifTrue: [self error: ', self retvalVar, ' message at: ', self retvalVar, ' position ].'.
     compiler dedent.
     compiler add: 'error := ', self retvalVar, ' isPetitFailure.'.
     compiler codeReturn.
+
+    "Modified: / 15-06-2015 / 17:59:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !PPCCodeGenerator class methodsFor:'documentation'!