# HG changeset patch # User Jan Vrany # Date 1432880731 -3600 # Node ID c45383095de4eb5de7741968b620544fd1d897bf # Parent d47fac0db40b1575e77c455ebce2c4b05f26f7dd Fixed choice inlining. diff -r d47fac0db40b -r c45383095de4 compiler/PPCCodeGenerator.st --- a/compiler/PPCCodeGenerator.st Wed May 27 08:37:09 2015 +0100 +++ b/compiler/PPCCodeGenerator.st Fri May 29 07:25:31 2015 +0100 @@ -308,13 +308,16 @@ compiler add: 'error ifFalse: [ '. compiler codeReturn: elementVar. compiler add: ' ].'. - ] ifFalse:[ - index < children size ifTrue:[ - coding value: children value: index + 1. - ] ifFalse:[ - compiler codeError: 'no choice suitable'. - ]. - ] + ] ifFalse:[ + compiler add: 'error := true.'. + ]. + compiler add: 'error ifTrue:[ '. + index < children size ifTrue:[ + coding value: children value: index + 1. + ] ifFalse:[ + compiler codeError: 'no choice suitable'. + ]. + compiler add: '] '. ] ] ifFalse:[ coding := @@ -334,7 +337,7 @@ coding value: node children value: 1. - "Modified: / 26-05-2015 / 19:02:04 / Jan Vrany " + "Modified: / 29-05-2015 / 07:17:36 / Jan Vrany " ! visitEndOfFileNode: node diff -r d47fac0db40b -r c45383095de4 compiler/PPCCompiler.st --- a/compiler/PPCCompiler.st Wed May 27 08:37:09 2015 +0100 +++ b/compiler/PPCCompiler.st Fri May 29 07:25:31 2015 +0100 @@ -119,14 +119,14 @@ addConstant: value as: name (constants includesKey: name) ifTrue:[ - (constants at: name) ~~ value ifTrue:[ + (constants at: name) ~= value ifTrue:[ self error:'Duplicate constant!!'. ]. ^ self. ]. constants at: name put: value - "Modified: / 26-05-2015 / 17:07:04 / Jan Vrany " + "Modified: / 29-05-2015 / 07:22:39 / Jan Vrany " ! addOnLine: string