# HG changeset patch # User Jan Vrany # Date 1434694447 -3600 # Node ID cf3cbf3933f12704a445d5a19d1374dfd09cad39 # Parent 835999517f15a527d75c92519d72e90216b97e4a Use RBVariableNode>>name: to change variable's name. The old way - `node token value:` is working in Pharo - there's no token in RBVariableNode. Sigh. diff -r 835999517f15 -r cf3cbf3933f1 compiler/PPCCodeGenerator.st --- a/compiler/PPCCodeGenerator.st Fri Jun 19 06:53:06 2015 +0100 +++ b/compiler/PPCCodeGenerator.st Fri Jun 19 07:14:07 2015 +0100 @@ -285,16 +285,16 @@ blockNeedsCollection ifTrue:[ "Bad, we have to use the collection. Replace all references to blockNodeVar to retvalVar..." - blockBody variableNodesDo:[:variableNode| + self withAllVariableNodesOf: blockBody do:[:variableNode| variableNode name = blockNodesVar name ifTrue:[ - variableNode token value: self retvalVar. + variableNode name: self retvalVar. ]. ]. ] ifFalse:[ "Good, can avoid intermediate collection. Replace references to collection with corresponding temporary variable" - blockMatches keysAndValuesDo:[:node :childValueVar | - node parent replaceNode: node withNode: (RBVariableNode named: childValueVar). + blockMatches keysAndValuesDo:[:matchingNode :childValueVar | + matchingNode parent replaceNode: matchingNode withNode: (RBVariableNode named: childValueVar). ]. node child returnParsedObjectsAsCollection: false. ]. @@ -323,7 +323,7 @@ compiler code: blockBody. ] - "Modified: / 18-06-2015 / 22:03:17 / Jan Vrany " + "Modified: / 19-06-2015 / 07:05:35 / Jan Vrany " ! visitAndNode: node @@ -533,7 +533,7 @@ blockArg := blockNode arguments first. self withAllVariableNodesOf: blockBody do:[:variableNode| variableNode name = blockArg name ifTrue:[ - variableNode token value: self retvalVar. + variableNode name: self retvalVar. ]. ]. ]. @@ -557,7 +557,7 @@ ] "Created: / 02-06-2015 / 17:28:55 / Jan Vrany " - "Modified: / 18-06-2015 / 22:03:36 / Jan Vrany " + "Modified: / 19-06-2015 / 07:06:19 / Jan Vrany " ! visitMessagePredicateNode: node