1
0
Ver Fonte

Compiler: VariableNode changes.

Not subclass of ValueNode any more.
Uses #identifier(:), not #value(:).
Herby Vojčík há 4 anos atrás
pai
commit
1f96af67dd

+ 4 - 0
lang/API-CHANGES.txt

@@ -2,6 +2,7 @@
 
 * Deprecate Behavior >> javascriptConstructor(:)
 * Deprecate IRInstruction >> needsBoxingAsReceiver
+* Deprecate VariableNode >> value(:)
 * UnknownVar => ExternallyKnownVar
 * Added Teachable class.
 
@@ -48,6 +49,9 @@
 + SmalltalkImage >>
   + isError:
   + try:ifTrue:catch:
++ VariableNode >>
+  + identifier
+  + identifier:
 + amber/boot api >>
   + detachClass(klass)
 + amber/helpers exports >>

+ 1 - 1
lang/base/parser.js

@@ -225,7 +225,7 @@ define(["./boot"], function(__boot) {
         peg$c69 = peg$literalExpectation("nil", false),
         peg$c70 = function() {return null;},
         peg$c71 = function(identifier) {
-        	return newNode($globals.VariableNode)._value_(identifier);
+        	return newNode($globals.VariableNode)._identifier_(identifier);
         },
         peg$c72 = /^[\\+*\/=><,@%~|&\-]/,
         peg$c73 = peg$classExpectation(["\\", "+", "*", "/", "=", ">", "<", ",", "@", "%", "~", "|", "&", "-"], false, false),

+ 1 - 1
lang/base/parser.pegjs

@@ -97,7 +97,7 @@ runtimeLiteral = dynamicDictionary / dynamicArray / block
 literal = runtimeLiteral / parseTimeLiteral
 
 variable = identifier:identifier {
-	return newNode($globals.VariableNode)._value_(identifier);
+	return newNode($globals.VariableNode)._identifier_(identifier);
 }
 
 reference = variable

+ 95 - 8
lang/src/Compiler-AST.js

@@ -1389,7 +1389,7 @@ $globals.ValueNode);
 
 
 
-$core.addClass("VariableNode", $globals.ValueNode, ["assigned", "binding"], "Compiler-AST");
+$core.addClass("VariableNode", $globals.ExpressionNode, ["identifier", "assigned", "binding"], "Compiler-AST");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.VariableNode.comment="I represent an variable node.";
 //>>excludeEnd("ide");
@@ -1524,6 +1524,43 @@ return self;
 }; }),
 $globals.VariableNode);
 
+$core.addMethod(
+$core.method({
+selector: "identifier",
+protocol: "accessing",
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "identifier\x0a\x09^ identifier",
+referencedClasses: [],
+//>>excludeEnd("ide");
+pragmas: [],
+messageSends: []
+}, function ($methodClass){ return function (){
+var self=this,$self=this;
+return $self.identifier;
+
+}; }),
+$globals.VariableNode);
+
+$core.addMethod(
+$core.method({
+selector: "identifier:",
+protocol: "accessing",
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["anObject"],
+source: "identifier: anObject\x0a\x09identifier := anObject",
+referencedClasses: [],
+//>>excludeEnd("ide");
+pragmas: [],
+messageSends: []
+}, function ($methodClass){ return function (anObject){
+var self=this,$self=this;
+$self.identifier=anObject;
+return self;
+
+}; }),
+$globals.VariableNode);
+
 $core.addMethod(
 $core.method({
 selector: "isImmutable",
@@ -1594,23 +1631,72 @@ selector: "navigationLink",
 protocol: "accessing",
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "navigationLink\x0a\x09^ self value",
+source: "navigationLink\x0a\x09^ self identifier",
 referencedClasses: [],
 //>>excludeEnd("ide");
 pragmas: [],
-messageSends: ["value"]
+messageSends: ["identifier"]
 }, function ($methodClass){ return function (){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return $self._value();
+return $self._identifier();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"navigationLink",{})});
 //>>excludeEnd("ctx");
 }; }),
 $globals.VariableNode);
 
+$core.addMethod(
+$core.method({
+selector: "value",
+protocol: "accessing",
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "value\x0a\x09self deprecatedAPI: 'Use #identifier instead.'.\x0a\x09^ self identifier",
+referencedClasses: [],
+//>>excludeEnd("ide");
+pragmas: [],
+messageSends: ["deprecatedAPI:", "identifier"]
+}, function ($methodClass){ return function (){
+var self=this,$self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+$self._deprecatedAPI_("Use #identifier instead.");
+return $self._identifier();
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"value",{})});
+//>>excludeEnd("ctx");
+}; }),
+$globals.VariableNode);
+
+$core.addMethod(
+$core.method({
+selector: "value:",
+protocol: "accessing",
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["anObject"],
+source: "value: anObject\x0a\x09self deprecatedAPI: 'Use #identifier: instead.'.\x0a\x09self identifier: anObject",
+referencedClasses: [],
+//>>excludeEnd("ide");
+pragmas: [],
+messageSends: ["deprecatedAPI:", "identifier:"]
+}, function ($methodClass){ return function (anObject){
+var self=this,$self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+$self._deprecatedAPI_("Use #identifier: instead.");
+$self._identifier_(anObject);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"value:",{anObject:anObject})});
+//>>excludeEnd("ctx");
+}; }),
+$globals.VariableNode);
+
 
 
 $core.addClass("JSStatementNode", $globals.ASTNode, [], "Compiler-AST");
@@ -2796,14 +2882,15 @@ return $self._visitDagNode_(aNode);
 $globals.NodeVisitor);
 
 
+$core.setTraitComposition([{trait: $globals.TDerivedDagChildren}], $globals.AssignmentNode);
+$core.setTraitComposition([{trait: $globals.TSingleDagChild}], $globals.BlockNode);
+$core.setTraitComposition([{trait: $globals.TDerivedDagChildren}], $globals.SendNode);
+$core.setTraitComposition([{trait: $globals.TDagSink}], $globals.ValueNode);
+$core.setTraitComposition([{trait: $globals.TDagSink}], $globals.VariableNode);
 $core.setTraitComposition([{trait: $globals.TDagSink}], $globals.JSStatementNode);
 $core.setTraitComposition([{trait: $globals.TSingleDagChild}], $globals.MethodNode);
 $core.setTraitComposition([{trait: $globals.TSingleDagChild}], $globals.ReturnNode);
 $core.setTraitComposition([{trait: $globals.TPragmator}], $globals.AstPragmator);
-$core.setTraitComposition([{trait: $globals.TDagSink}], $globals.ValueNode);
-$core.setTraitComposition([{trait: $globals.TDerivedDagChildren}], $globals.SendNode);
-$core.setTraitComposition([{trait: $globals.TSingleDagChild}], $globals.BlockNode);
-$core.setTraitComposition([{trait: $globals.TDerivedDagChildren}], $globals.AssignmentNode);
 
 $core.addMethod(
 $core.method({

+ 26 - 7
lang/src/Compiler-AST.st

@@ -352,8 +352,8 @@ acceptDagVisitor: aVisitor
 	^ aVisitor visitValueNode: self
 ! !
 
-ValueNode subclass: #VariableNode
-	slots: {#assigned. #binding}
+ExpressionNode subclass: #VariableNode
+	slots: {#identifier. #assigned. #binding}
 	package: 'Compiler-AST'!
 !VariableNode commentStamp!
 I represent an variable node.!
@@ -380,8 +380,26 @@ binding: aScopeVar
 	binding := aScopeVar
 !
 
+identifier
+	^ identifier
+!
+
+identifier: anObject
+	identifier := anObject
+!
+
 navigationLink
-	^ self value
+	^ self identifier
+!
+
+value
+	self deprecatedAPI: 'Use #identifier instead.'.
+	^ self identifier
+!
+
+value: anObject
+	self deprecatedAPI: 'Use #identifier: instead.'.
+	self identifier: anObject
 ! !
 
 !VariableNode methodsFor: 'testing'!
@@ -714,14 +732,15 @@ visitVariableNode: aNode
 	^ self visitDagNode: aNode
 ! !
 
+AssignmentNode setTraitComposition: {TDerivedDagChildren} asTraitComposition!
+BlockNode setTraitComposition: {TSingleDagChild} asTraitComposition!
+SendNode setTraitComposition: {TDerivedDagChildren} asTraitComposition!
+ValueNode setTraitComposition: {TDagSink} asTraitComposition!
+VariableNode setTraitComposition: {TDagSink} asTraitComposition!
 JSStatementNode setTraitComposition: {TDagSink} asTraitComposition!
 MethodNode setTraitComposition: {TSingleDagChild} asTraitComposition!
 ReturnNode setTraitComposition: {TSingleDagChild} asTraitComposition!
 AstPragmator setTraitComposition: {TPragmator} asTraitComposition!
-ValueNode setTraitComposition: {TDagSink} asTraitComposition!
-SendNode setTraitComposition: {TDerivedDagChildren} asTraitComposition!
-BlockNode setTraitComposition: {TSingleDagChild} asTraitComposition!
-AssignmentNode setTraitComposition: {TDerivedDagChildren} asTraitComposition!
 ! !
 
 !CompiledMethod methodsFor: '*Compiler-AST'!

+ 27 - 27
lang/src/Compiler-Interpreter.js

@@ -1547,11 +1547,11 @@ selector: "visitVariableNode:",
 protocol: "visiting",
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aNode"],
-source: "visitVariableNode: aNode\x0a\x09self context \x0a\x09\x09localAt: aNode value \x0a\x09\x09ifAbsent: [ ^ super visitVariableNode: aNode ].\x0a\x0a\x09aNode binding: ASTContextVar new",
+source: "visitVariableNode: aNode\x0a\x09self context \x0a\x09\x09localAt: aNode identifier \x0a\x09\x09ifAbsent: [ ^ super visitVariableNode: aNode ].\x0a\x0a\x09aNode binding: ASTContextVar new",
 referencedClasses: ["ASTContextVar"],
 //>>excludeEnd("ide");
 pragmas: [],
-messageSends: ["localAt:ifAbsent:", "context", "value", "visitVariableNode:", "binding:", "new"]
+messageSends: ["localAt:ifAbsent:", "context", "identifier", "visitVariableNode:", "binding:", "new"]
 }, function ($methodClass){ return function (aNode){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -1559,7 +1559,7 @@ return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $early={};
 try {
-$recv($self._context())._localAt_ifAbsent_($recv(aNode)._value(),(function(){
+$recv($self._context())._localAt_ifAbsent_($recv(aNode)._identifier(),(function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
@@ -2205,11 +2205,11 @@ selector: "assign:to:",
 protocol: "private",
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aNode", "anObject"],
-source: "assign: aNode to: anObject\x0a\x09aNode binding isInstanceVar\x0a\x09\x09ifTrue: [ self context receiver instVarAt: aNode value put: anObject ]\x0a\x09\x09ifFalse: [ self context localAt: aNode value put: anObject ]",
+source: "assign: aNode to: anObject\x0a\x09aNode binding isInstanceVar\x0a\x09\x09ifTrue: [ self context receiver instVarAt: aNode identifier put: anObject ]\x0a\x09\x09ifFalse: [ self context localAt: aNode identifier put: anObject ]",
 referencedClasses: [],
 //>>excludeEnd("ide");
 pragmas: [],
-messageSends: ["ifTrue:ifFalse:", "isInstanceVar", "binding", "instVarAt:put:", "receiver", "context", "value", "localAt:put:"]
+messageSends: ["ifTrue:ifFalse:", "isInstanceVar", "binding", "instVarAt:put:", "receiver", "context", "identifier", "localAt:put:"]
 }, function ($methodClass){ return function (aNode,anObject){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -2222,13 +2222,13 @@ $recv($recv([$self._context()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.sendIdx["context"]=1
 //>>excludeEnd("ctx");
-][0])._receiver())._instVarAt_put_([$recv(aNode)._value()
+][0])._receiver())._instVarAt_put_([$recv(aNode)._identifier()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx1.sendIdx["value"]=1
+,$ctx1.sendIdx["identifier"]=1
 //>>excludeEnd("ctx");
 ][0],anObject);
 } else {
-$recv($self._context())._localAt_put_($recv(aNode)._value(),anObject);
+$recv($self._context())._localAt_put_($recv(aNode)._identifier(),anObject);
 }
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -3405,11 +3405,11 @@ selector: "visitVariableNode:",
 protocol: "visiting",
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aNode"],
-source: "visitVariableNode: aNode\x0a\x09aNode binding isExternallyKnownVar ifTrue: [\x0a\x09\x09^ self push: (Platform globals at: aNode value ifAbsent: [ self error: 'Unknown variable' ]) ].\x0a\x09\x09\x0a\x09self push: (aNode binding isInstanceVar\x0a\x09\x09ifTrue: [ self context receiver instVarAt: aNode value ]\x0a\x09\x09ifFalse: [ self context \x0a\x09\x09\x09localAt: (aNode binding isSuper ifTrue: [ 'self' ] ifFalse: [ aNode value ])\x0a\x09\x09\x09ifAbsent: [\x0a\x09\x09\x09\x09aNode value = 'nil' ifTrue: [ nil ] ifFalse: [\x0a\x09\x09\x09\x09aNode value = 'true' ifTrue: [ true ] ifFalse: [\x0a\x09\x09\x09\x09aNode value = 'false' ifTrue: [ false ] ifFalse: [\x0a\x09\x09\x09\x09aNode value isCapitalized\x0a\x09\x09\x09\x09\x09ifTrue: [\x0a\x09\x09\x09\x09\x09\x09Smalltalk globals \x0a\x09\x09\x09\x09\x09\x09\x09at: aNode value \x0a\x09\x09\x09\x09\x09\x09\x09ifAbsent: [ Platform globals at: aNode value ] ] ] ] ] ] ])",
+source: "visitVariableNode: aNode\x0a\x09aNode binding isExternallyKnownVar ifTrue: [\x0a\x09\x09^ self push: (Platform globals at: aNode identifier ifAbsent: [ self error: 'Unknown variable' ]) ].\x0a\x09\x09\x0a\x09self push: (aNode binding isInstanceVar\x0a\x09\x09ifTrue: [ self context receiver instVarAt: aNode identifier ]\x0a\x09\x09ifFalse: [ self context \x0a\x09\x09\x09localAt: (aNode binding isSuper ifTrue: [ 'self' ] ifFalse: [ aNode identifier ])\x0a\x09\x09\x09ifAbsent: [\x0a\x09\x09\x09\x09aNode identifier = 'nil' ifTrue: [ nil ] ifFalse: [\x0a\x09\x09\x09\x09aNode identifier = 'true' ifTrue: [ true ] ifFalse: [\x0a\x09\x09\x09\x09aNode identifier = 'false' ifTrue: [ false ] ifFalse: [\x0a\x09\x09\x09\x09aNode identifier isCapitalized\x0a\x09\x09\x09\x09\x09ifTrue: [\x0a\x09\x09\x09\x09\x09\x09Smalltalk globals \x0a\x09\x09\x09\x09\x09\x09\x09at: aNode identifier \x0a\x09\x09\x09\x09\x09\x09\x09ifAbsent: [ Platform globals at: aNode identifier ] ] ] ] ] ] ])",
 referencedClasses: ["Platform", "Smalltalk"],
 //>>excludeEnd("ide");
 pragmas: [],
-messageSends: ["ifTrue:", "isExternallyKnownVar", "binding", "push:", "at:ifAbsent:", "globals", "value", "error:", "ifTrue:ifFalse:", "isInstanceVar", "instVarAt:", "receiver", "context", "localAt:ifAbsent:", "isSuper", "=", "isCapitalized", "at:"]
+messageSends: ["ifTrue:", "isExternallyKnownVar", "binding", "push:", "at:ifAbsent:", "globals", "identifier", "error:", "ifTrue:ifFalse:", "isInstanceVar", "instVarAt:", "receiver", "context", "localAt:ifAbsent:", "isSuper", "=", "isCapitalized", "at:"]
 }, function ($methodClass){ return function (aNode){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -3426,9 +3426,9 @@ return [$self._push_([$recv([$recv($globals.Platform)._globals()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.sendIdx["globals"]=1
 //>>excludeEnd("ctx");
-][0])._at_ifAbsent_([$recv(aNode)._value()
+][0])._at_ifAbsent_([$recv(aNode)._identifier()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx1.sendIdx["value"]=1
+,$ctx1.sendIdx["identifier"]=1
 //>>excludeEnd("ctx");
 ][0],(function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -3458,9 +3458,9 @@ $2=$recv($recv([$self._context()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.sendIdx["context"]=1
 //>>excludeEnd("ctx");
-][0])._receiver())._instVarAt_([$recv(aNode)._value()
+][0])._receiver())._instVarAt_([$recv(aNode)._identifier()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx1.sendIdx["value"]=2
+,$ctx1.sendIdx["identifier"]=2
 //>>excludeEnd("ctx");
 ][0]);
 } else {
@@ -3469,9 +3469,9 @@ $6=$recv($recv(aNode)._binding())._isSuper();
 if($core.assert($6)){
 $5="self";
 } else {
-$5=[$recv(aNode)._value()
+$5=[$recv(aNode)._identifier()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx1.sendIdx["value"]=3
+,$ctx1.sendIdx["identifier"]=3
 //>>excludeEnd("ctx");
 ][0];
 }
@@ -3479,9 +3479,9 @@ $2=$recv($4)._localAt_ifAbsent_($5,(function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-$7=[$recv([$recv(aNode)._value()
+$7=[$recv([$recv(aNode)._identifier()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx2.sendIdx["value"]=4
+,$ctx2.sendIdx["identifier"]=4
 //>>excludeEnd("ctx");
 ][0]).__eq("nil")
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -3491,9 +3491,9 @@ $7=[$recv([$recv(aNode)._value()
 if($core.assert($7)){
 return nil;
 } else {
-$8=[$recv([$recv(aNode)._value()
+$8=[$recv([$recv(aNode)._identifier()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx2.sendIdx["value"]=5
+,$ctx2.sendIdx["identifier"]=5
 //>>excludeEnd("ctx");
 ][0]).__eq("true")
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -3503,17 +3503,17 @@ $8=[$recv([$recv(aNode)._value()
 if($core.assert($8)){
 return true;
 } else {
-$9=$recv([$recv(aNode)._value()
+$9=$recv([$recv(aNode)._identifier()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx2.sendIdx["value"]=6
+,$ctx2.sendIdx["identifier"]=6
 //>>excludeEnd("ctx");
 ][0]).__eq("false");
 if($core.assert($9)){
 return false;
 } else {
-$10=$recv([$recv(aNode)._value()
+$10=$recv([$recv(aNode)._identifier()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx2.sendIdx["value"]=7
+,$ctx2.sendIdx["identifier"]=7
 //>>excludeEnd("ctx");
 ][0])._isCapitalized();
 if($core.assert($10)){
@@ -3521,15 +3521,15 @@ return $recv([$recv($globals.Smalltalk)._globals()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx2.sendIdx["globals"]=2
 //>>excludeEnd("ctx");
-][0])._at_ifAbsent_([$recv(aNode)._value()
+][0])._at_ifAbsent_([$recv(aNode)._identifier()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx2.sendIdx["value"]=8
+,$ctx2.sendIdx["identifier"]=8
 //>>excludeEnd("ctx");
 ][0],(function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx3) {
 //>>excludeEnd("ctx");
-return $recv($recv($globals.Platform)._globals())._at_($recv(aNode)._value());
+return $recv($recv($globals.Platform)._globals())._at_($recv(aNode)._identifier());
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,15)});
 //>>excludeEnd("ctx");

+ 12 - 12
lang/src/Compiler-Interpreter.st

@@ -409,7 +409,7 @@ context: anAIContext
 
 visitVariableNode: aNode
 	self context 
-		localAt: aNode value 
+		localAt: aNode identifier 
 		ifAbsent: [ ^ super visitVariableNode: aNode ].
 
 	aNode binding: ASTContextVar new
@@ -703,8 +703,8 @@ stepOver
 
 assign: aNode to: anObject
 	aNode binding isInstanceVar
-		ifTrue: [ self context receiver instVarAt: aNode value put: anObject ]
-		ifFalse: [ self context localAt: aNode value put: anObject ]
+		ifTrue: [ self context receiver instVarAt: aNode identifier put: anObject ]
+		ifFalse: [ self context localAt: aNode identifier put: anObject ]
 !
 
 eval: aString
@@ -887,21 +887,21 @@ visitValueNode: aNode
 
 visitVariableNode: aNode
 	aNode binding isExternallyKnownVar ifTrue: [
-		^ self push: (Platform globals at: aNode value ifAbsent: [ self error: 'Unknown variable' ]) ].
+		^ self push: (Platform globals at: aNode identifier ifAbsent: [ self error: 'Unknown variable' ]) ].
 		
 	self push: (aNode binding isInstanceVar
-		ifTrue: [ self context receiver instVarAt: aNode value ]
+		ifTrue: [ self context receiver instVarAt: aNode identifier ]
 		ifFalse: [ self context 
-			localAt: (aNode binding isSuper ifTrue: [ 'self' ] ifFalse: [ aNode value ])
+			localAt: (aNode binding isSuper ifTrue: [ 'self' ] ifFalse: [ aNode identifier ])
 			ifAbsent: [
-				aNode value = 'nil' ifTrue: [ nil ] ifFalse: [
-				aNode value = 'true' ifTrue: [ true ] ifFalse: [
-				aNode value = 'false' ifTrue: [ false ] ifFalse: [
-				aNode value isCapitalized
+				aNode identifier = 'nil' ifTrue: [ nil ] ifFalse: [
+				aNode identifier = 'true' ifTrue: [ true ] ifFalse: [
+				aNode identifier = 'false' ifTrue: [ false ] ifFalse: [
+				aNode identifier isCapitalized
 					ifTrue: [
 						Smalltalk globals 
-							at: aNode value 
-							ifAbsent: [ Platform globals at: aNode value ] ] ] ] ] ] ])
+							at: aNode identifier 
+							ifAbsent: [ Platform globals at: aNode identifier ] ] ] ] ] ] ])
 ! !
 
 Error subclass: #ASTInterpreterError

+ 32 - 30
lang/src/Compiler-Semantic.js

@@ -151,28 +151,26 @@ $core.method({
 selector: "bindingFor:",
 protocol: "accessing",
 //>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aNode"],
-source: "bindingFor: aNode\x0a\x09| identifier |\x0a\x09identifier := aNode value.\x0a\x09^ self pseudoVars at: identifier ifAbsent: [\x0a\x09\x09self args at: identifier ifAbsent: [\x0a\x09\x09\x09self temps at: identifier ifAbsent: [ nil ]]]",
+args: ["aString"],
+source: "bindingFor: aString\x0a\x09^ self pseudoVars at: aString ifAbsent: [\x0a\x09\x09self args at: aString ifAbsent: [\x0a\x09\x09\x09self temps at: aString ifAbsent: [ nil ]]]",
 referencedClasses: [],
 //>>excludeEnd("ide");
 pragmas: [],
-messageSends: ["value", "at:ifAbsent:", "pseudoVars", "args", "temps"]
-}, function ($methodClass){ return function (aNode){
+messageSends: ["at:ifAbsent:", "pseudoVars", "args", "temps"]
+}, function ($methodClass){ return function (aString){
 var self=this,$self=this;
-var identifier;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-identifier=$recv(aNode)._value();
-return [$recv($self._pseudoVars())._at_ifAbsent_(identifier,(function(){
+return [$recv($self._pseudoVars())._at_ifAbsent_(aString,(function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-return [$recv($self._args())._at_ifAbsent_(identifier,(function(){
+return [$recv($self._args())._at_ifAbsent_(aString,(function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx3) {
 //>>excludeEnd("ctx");
-return $recv($self._temps())._at_ifAbsent_(identifier,(function(){
+return $recv($self._temps())._at_ifAbsent_(aString,(function(){
 return nil;
 
 }));
@@ -193,7 +191,7 @@ return nil;
 //>>excludeEnd("ctx");
 ][0];
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"bindingFor:",{aNode:aNode,identifier:identifier})});
+}, function($ctx1) {$ctx1.fill(self,"bindingFor:",{aString:aString})});
 //>>excludeEnd("ctx");
 }; }),
 $globals.LexicalScope);
@@ -391,20 +389,20 @@ $core.method({
 selector: "lookupVariable:",
 protocol: "accessing",
 //>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aNode"],
-source: "lookupVariable: aNode\x0a\x09| lookup |\x0a\x09lookup := (self bindingFor: aNode).\x0a\x09lookup ifNil: [\x0a\x09\x09lookup := self outerScope ifNotNil: [\x0a\x09\x09\x09(self outerScope lookupVariable: aNode) ]].\x0a\x09^ lookup",
+args: ["aString"],
+source: "lookupVariable: aString\x0a\x09| lookup |\x0a\x09lookup := (self bindingFor: aString).\x0a\x09lookup ifNil: [\x0a\x09\x09lookup := self outerScope ifNotNil: [\x0a\x09\x09\x09(self outerScope lookupVariable: aString) ]].\x0a\x09^ lookup",
 referencedClasses: [],
 //>>excludeEnd("ide");
 pragmas: [],
 messageSends: ["bindingFor:", "ifNil:", "ifNotNil:", "outerScope", "lookupVariable:"]
-}, function ($methodClass){ return function (aNode){
+}, function ($methodClass){ return function (aString){
 var self=this,$self=this;
 var lookup;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $1,$2,$receiver;
-lookup=$self._bindingFor_(aNode);
+lookup=$self._bindingFor_(aString);
 $1=lookup;
 if(($receiver = $1) == null || $receiver.a$nil){
 $2=[$self._outerScope()
@@ -415,7 +413,7 @@ $2=[$self._outerScope()
 if(($receiver = $2) == null || $receiver.a$nil){
 lookup=$2;
 } else {
-lookup=$recv($self._outerScope())._lookupVariable_(aNode);
+lookup=$recv($self._outerScope())._lookupVariable_(aString);
 }
 lookup;
 } else {
@@ -423,7 +421,7 @@ $1;
 }
 return lookup;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"lookupVariable:",{aNode:aNode,lookup:lookup})});
+}, function($ctx1) {$ctx1.fill(self,"lookupVariable:",{aString:aString,lookup:lookup})});
 //>>excludeEnd("ctx");
 }; }),
 $globals.LexicalScope);
@@ -729,13 +727,13 @@ $core.method({
 selector: "bindingFor:",
 protocol: "accessing",
 //>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aNode"],
-source: "bindingFor: aNode\x0a\x09^ (super bindingFor: aNode) ifNil: [\x0a\x09\x09self iVars at: aNode value ifAbsent: [ nil ]]",
+args: ["aString"],
+source: "bindingFor: aString\x0a\x09^ (super bindingFor: aString) ifNil: [\x0a\x09\x09self iVars at: aString ifAbsent: [ nil ]]",
 referencedClasses: [],
 //>>excludeEnd("ide");
 pragmas: [],
-messageSends: ["ifNil:", "bindingFor:", "at:ifAbsent:", "iVars", "value"]
-}, function ($methodClass){ return function (aNode){
+messageSends: ["ifNil:", "bindingFor:", "at:ifAbsent:", "iVars"]
+}, function ($methodClass){ return function (aString){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -745,13 +743,13 @@ $1=[(
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.supercall = true,
 //>>excludeEnd("ctx");
-($methodClass.superclass||$boot.nilAsClass).fn.prototype._bindingFor_.call($self,aNode))
+($methodClass.superclass||$boot.nilAsClass).fn.prototype._bindingFor_.call($self,aString))
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.supercall = false
 //>>excludeEnd("ctx");
 ][0];
 if(($receiver = $1) == null || $receiver.a$nil){
-return $recv($self._iVars())._at_ifAbsent_($recv(aNode)._value(),(function(){
+return $recv($self._iVars())._at_ifAbsent_(aString,(function(){
 return nil;
 
 }));
@@ -759,7 +757,7 @@ return nil;
 return $1;
 }
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"bindingFor:",{aNode:aNode})});
+}, function($ctx1) {$ctx1.fill(self,"bindingFor:",{aString:aString})});
 //>>excludeEnd("ctx");
 }; }),
 $globals.MethodLexicalScope);
@@ -2245,11 +2243,11 @@ selector: "visitAssignmentNode:",
 protocol: "visiting",
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aNode"],
-source: "visitAssignmentNode: aNode\x0a\x09| lhs |\x0a\x09super visitAssignmentNode: aNode.\x0a\x09lhs := aNode left.\x0a\x09lhs isImmutable ifTrue: [ self errorInvalidAssignment: lhs value ].\x0a\x09lhs assigned: true",
+source: "visitAssignmentNode: aNode\x0a\x09| lhs |\x0a\x09super visitAssignmentNode: aNode.\x0a\x09lhs := aNode left.\x0a\x09lhs isImmutable ifTrue: [ self errorInvalidAssignment: lhs identifier ].\x0a\x09lhs assigned: true",
 referencedClasses: [],
 //>>excludeEnd("ide");
 pragmas: [],
-messageSends: ["visitAssignmentNode:", "left", "ifTrue:", "isImmutable", "errorInvalidAssignment:", "value", "assigned:"]
+messageSends: ["visitAssignmentNode:", "left", "ifTrue:", "isImmutable", "errorInvalidAssignment:", "identifier", "assigned:"]
 }, function ($methodClass){ return function (aNode){
 var self=this,$self=this;
 var lhs;
@@ -2269,7 +2267,7 @@ $ctx1.supercall = true,
 lhs=$recv(aNode)._left();
 $1=$recv(lhs)._isImmutable();
 if($core.assert($1)){
-$self._errorInvalidAssignment_($recv(lhs)._value());
+$self._errorInvalidAssignment_($recv(lhs)._identifier());
 }
 $recv(lhs)._assigned_(true);
 return self;
@@ -2565,20 +2563,24 @@ selector: "visitVariableNode:",
 protocol: "visiting",
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aNode"],
-source: "visitVariableNode: aNode\x0a\x09\x22Bind a ScopeVar to aNode by doing a lookup in the current scope.\x0a\x09If no var is found in scope, represent an externally known variable or throw an error.\x22\x0a\x0a\x09aNode binding:\x0a\x09\x09((currentScope lookupVariable: aNode) ifNil: [ self bindUnscopedVariable: aNode value ])",
+source: "visitVariableNode: aNode\x0a\x09\x22Bind a ScopeVar to aNode by doing a lookup in the current scope.\x0a\x09If no var is found in scope, represent an externally known variable or throw an error.\x22\x0a\x0a\x09aNode binding:\x0a\x09\x09((currentScope lookupVariable: aNode identifier) ifNil: [ self bindUnscopedVariable: aNode identifier ])",
 referencedClasses: [],
 //>>excludeEnd("ide");
 pragmas: [],
-messageSends: ["binding:", "ifNil:", "lookupVariable:", "bindUnscopedVariable:", "value"]
+messageSends: ["binding:", "ifNil:", "lookupVariable:", "identifier", "bindUnscopedVariable:"]
 }, function ($methodClass){ return function (aNode){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $2,$1,$receiver;
-$2=$recv($self.currentScope)._lookupVariable_(aNode);
+$2=$recv($self.currentScope)._lookupVariable_([$recv(aNode)._identifier()
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+,$ctx1.sendIdx["identifier"]=1
+//>>excludeEnd("ctx");
+][0]);
 if(($receiver = $2) == null || $receiver.a$nil){
-$1=$self._bindUnscopedVariable_($recv(aNode)._value());
+$1=$self._bindUnscopedVariable_($recv(aNode)._identifier());
 } else {
 $1=$2;
 }

+ 12 - 14
lang/src/Compiler-Semantic.st

@@ -23,12 +23,10 @@ args
 	^ args ifNil: [ args := Dictionary new ]
 !
 
-bindingFor: aNode
-	| identifier |
-	identifier := aNode value.
-	^ self pseudoVars at: identifier ifAbsent: [
-		self args at: identifier ifAbsent: [
-			self temps at: identifier ifAbsent: [ nil ]]]
+bindingFor: aString
+	^ self pseudoVars at: aString ifAbsent: [
+		self args at: aString ifAbsent: [
+			self temps at: aString ifAbsent: [ nil ]]]
 !
 
 blockIndex
@@ -47,12 +45,12 @@ instruction: anIRInstruction
 	instruction := anIRInstruction
 !
 
-lookupVariable: aNode
+lookupVariable: aString
 	| lookup |
-	lookup := (self bindingFor: aNode).
+	lookup := (self bindingFor: aString).
 	lookup ifNil: [
 		lookup := self outerScope ifNotNil: [
-			(self outerScope lookupVariable: aNode) ]].
+			(self outerScope lookupVariable: aString) ]].
 	^ lookup
 !
 
@@ -136,9 +134,9 @@ allVariableNames
 	^ super allVariableNames, self iVars keys
 !
 
-bindingFor: aNode
-	^ (super bindingFor: aNode) ifNil: [
-		self iVars at: aNode value ifAbsent: [ nil ]]
+bindingFor: aString
+	^ (super bindingFor: aString) ifNil: [
+		self iVars at: aString ifAbsent: [ nil ]]
 !
 
 iVars
@@ -564,7 +562,7 @@ visitAssignmentNode: aNode
 	| lhs |
 	super visitAssignmentNode: aNode.
 	lhs := aNode left.
-	lhs isImmutable ifTrue: [ self errorInvalidAssignment: lhs value ].
+	lhs isImmutable ifTrue: [ self errorInvalidAssignment: lhs identifier ].
 	lhs assigned: true
 !
 
@@ -640,7 +638,7 @@ visitVariableNode: aNode
 	If no var is found in scope, represent an externally known variable or throw an error."
 
 	aNode binding:
-		((currentScope lookupVariable: aNode) ifNil: [ self bindUnscopedVariable: aNode value ])
+		((currentScope lookupVariable: aNode identifier) ifNil: [ self bindUnscopedVariable: aNode identifier ])
 ! !
 
 !SemanticAnalyzer class methodsFor: 'instance creation'!

+ 20 - 53
lang/src/Compiler-Tests.js

@@ -2490,11 +2490,11 @@ selector: "testClassRefVar",
 protocol: "tests",
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "testClassRefVar\x0a\x09| node |\x0a\x09node := VariableNode new\x0a\x09\x09value: 'Object';\x0a\x09\x09yourself.\x0a\x09SemanticAnalyzer new \x0a\x09\x09pushScope: MethodLexicalScope new;\x0a\x09\x09visit: node.\x0a\x09self assert: node binding isClassRefVar",
+source: "testClassRefVar\x0a\x09| node |\x0a\x09node := VariableNode new\x0a\x09\x09identifier: 'Object';\x0a\x09\x09yourself.\x0a\x09SemanticAnalyzer new \x0a\x09\x09pushScope: MethodLexicalScope new;\x0a\x09\x09visit: node.\x0a\x09self assert: node binding isClassRefVar",
 referencedClasses: ["VariableNode", "SemanticAnalyzer", "MethodLexicalScope"],
 //>>excludeEnd("ide");
 pragmas: [],
-messageSends: ["value:", "new", "yourself", "pushScope:", "visit:", "assert:", "isClassRefVar", "binding"]
+messageSends: ["identifier:", "new", "yourself", "pushScope:", "visit:", "assert:", "isClassRefVar", "binding"]
 }, function ($methodClass){ return function (){
 var self=this,$self=this;
 var node;
@@ -2507,7 +2507,7 @@ $1=[$recv($globals.VariableNode)._new()
 ,$ctx1.sendIdx["new"]=1
 //>>excludeEnd("ctx");
 ][0];
-$recv($1)._value_("Object");
+$recv($1)._identifier_("Object");
 node=$recv($1)._yourself();
 $2=[$recv($globals.SemanticAnalyzer)._new()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -2530,28 +2530,20 @@ selector: "testInstanceVar",
 protocol: "tests",
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "testInstanceVar\x0a\x09| node scope |\x0a\x09node := VariableNode new\x0a\x09\x09value: 'bzzz';\x0a\x09\x09yourself.\x0a\x09scope := MethodLexicalScope new.\x0a\x09scope addIVar: 'bzzz'.\x0a\x09self assert: (scope bindingFor: node) isInstanceVar",
-referencedClasses: ["VariableNode", "MethodLexicalScope"],
+source: "testInstanceVar\x0a\x09| node scope |\x0a\x09scope := MethodLexicalScope new.\x0a\x09scope addIVar: 'bzzz'.\x0a\x09self assert: (scope bindingFor: 'bzzz') isInstanceVar",
+referencedClasses: ["MethodLexicalScope"],
 //>>excludeEnd("ide");
 pragmas: [],
-messageSends: ["value:", "new", "yourself", "addIVar:", "assert:", "isInstanceVar", "bindingFor:"]
+messageSends: ["new", "addIVar:", "assert:", "isInstanceVar", "bindingFor:"]
 }, function ($methodClass){ return function (){
 var self=this,$self=this;
 var node,scope;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-var $1;
-$1=[$recv($globals.VariableNode)._new()
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx1.sendIdx["new"]=1
-//>>excludeEnd("ctx");
-][0];
-$recv($1)._value_("bzzz");
-node=$recv($1)._yourself();
 scope=$recv($globals.MethodLexicalScope)._new();
 $recv(scope)._addIVar_("bzzz");
-$self._assert_($recv($recv(scope)._bindingFor_(node))._isInstanceVar());
+$self._assert_($recv($recv(scope)._bindingFor_("bzzz"))._isInstanceVar());
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"testInstanceVar",{node:node,scope:scope})});
@@ -2565,31 +2557,23 @@ selector: "testPseudoVar",
 protocol: "tests",
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "testPseudoVar\x0a\x09| node pseudoVars |\x0a\x09pseudoVars := #('self' 'super' 'true' 'false' 'nil').\x0a\x09pseudoVars do: [:each |\x0a\x09\x09node := VariableNode new\x0a\x09\x09value: each;\x0a\x09\x09yourself.\x0a\x09\x09self assert: (MethodLexicalScope new bindingFor: node) isPseudoVar]",
-referencedClasses: ["VariableNode", "MethodLexicalScope"],
+source: "testPseudoVar\x0a\x09| node pseudoVars |\x0a\x09pseudoVars := #('self' 'super' 'true' 'false' 'nil').\x0a\x09pseudoVars do: [:each |\x0a\x09\x09self assert: (MethodLexicalScope new bindingFor: each) isPseudoVar]",
+referencedClasses: ["MethodLexicalScope"],
 //>>excludeEnd("ide");
 pragmas: [],
-messageSends: ["do:", "value:", "new", "yourself", "assert:", "isPseudoVar", "bindingFor:"]
+messageSends: ["do:", "assert:", "isPseudoVar", "bindingFor:", "new"]
 }, function ($methodClass){ return function (){
 var self=this,$self=this;
 var node,pseudoVars;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-var $1;
 pseudoVars=["self", "super", "true", "false", "nil"];
 $recv(pseudoVars)._do_((function(each){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-$1=[$recv($globals.VariableNode)._new()
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx2.sendIdx["new"]=1
-//>>excludeEnd("ctx");
-][0];
-$recv($1)._value_(each);
-node=$recv($1)._yourself();
-return $self._assert_($recv($recv($recv($globals.MethodLexicalScope)._new())._bindingFor_(node))._isPseudoVar());
+return $self._assert_($recv($recv($recv($globals.MethodLexicalScope)._new())._bindingFor_(each))._isPseudoVar());
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
 //>>excludeEnd("ctx");
@@ -2607,28 +2591,20 @@ selector: "testTempVar",
 protocol: "tests",
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "testTempVar\x0a\x09| node scope |\x0a\x09node := VariableNode new\x0a\x09\x09value: 'bzzz';\x0a\x09\x09yourself.\x0a\x09scope := MethodLexicalScope new.\x0a\x09scope addTemp: 'bzzz'.\x0a\x09self assert: (scope bindingFor: node) isTempVar",
-referencedClasses: ["VariableNode", "MethodLexicalScope"],
+source: "testTempVar\x0a\x09| node scope |\x0a\x09scope := MethodLexicalScope new.\x0a\x09scope addTemp: 'bzzz'.\x0a\x09self assert: (scope bindingFor: 'bzzz') isTempVar",
+referencedClasses: ["MethodLexicalScope"],
 //>>excludeEnd("ide");
 pragmas: [],
-messageSends: ["value:", "new", "yourself", "addTemp:", "assert:", "isTempVar", "bindingFor:"]
+messageSends: ["new", "addTemp:", "assert:", "isTempVar", "bindingFor:"]
 }, function ($methodClass){ return function (){
 var self=this,$self=this;
 var node,scope;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-var $1;
-$1=[$recv($globals.VariableNode)._new()
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx1.sendIdx["new"]=1
-//>>excludeEnd("ctx");
-][0];
-$recv($1)._value_("bzzz");
-node=$recv($1)._yourself();
 scope=$recv($globals.MethodLexicalScope)._new();
 $recv(scope)._addTemp_("bzzz");
-$self._assert_($recv($recv(scope)._bindingFor_(node))._isTempVar());
+$self._assert_($recv($recv(scope)._bindingFor_("bzzz"))._isTempVar());
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"testTempVar",{node:node,scope:scope})});
@@ -2642,29 +2618,20 @@ selector: "testUnknownVar",
 protocol: "tests",
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "testUnknownVar\x0a\x09| node |\x0a\x09node := VariableNode new\x0a\x09\x09value: 'bzzz';\x0a\x09\x09yourself.\x0a\x09self assert: (MethodLexicalScope new bindingFor: node) isNil",
-referencedClasses: ["VariableNode", "MethodLexicalScope"],
+source: "testUnknownVar\x0a\x09self assert: (MethodLexicalScope new bindingFor: 'bzzz') isNil",
+referencedClasses: ["MethodLexicalScope"],
 //>>excludeEnd("ide");
 pragmas: [],
-messageSends: ["value:", "new", "yourself", "assert:", "isNil", "bindingFor:"]
+messageSends: ["assert:", "isNil", "bindingFor:", "new"]
 }, function ($methodClass){ return function (){
 var self=this,$self=this;
-var node;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-var $1;
-$1=[$recv($globals.VariableNode)._new()
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx1.sendIdx["new"]=1
-//>>excludeEnd("ctx");
-][0];
-$recv($1)._value_("bzzz");
-node=$recv($1)._yourself();
-$self._assert_($recv($recv($recv($globals.MethodLexicalScope)._new())._bindingFor_(node))._isNil());
+$self._assert_($recv($recv($recv($globals.MethodLexicalScope)._new())._bindingFor_("bzzz"))._isNil());
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"testUnknownVar",{node:node})});
+}, function($ctx1) {$ctx1.fill(self,"testUnknownVar",{})});
 //>>excludeEnd("ctx");
 }; }),
 $globals.ScopeVarTest);

+ 5 - 18
lang/src/Compiler-Tests.st

@@ -643,7 +643,7 @@ TestCase subclass: #ScopeVarTest
 testClassRefVar
 	| node |
 	node := VariableNode new
-		value: 'Object';
+		identifier: 'Object';
 		yourself.
 	SemanticAnalyzer new 
 		pushScope: MethodLexicalScope new;
@@ -653,40 +653,27 @@ testClassRefVar
 
 testInstanceVar
 	| node scope |
-	node := VariableNode new
-		value: 'bzzz';
-		yourself.
 	scope := MethodLexicalScope new.
 	scope addIVar: 'bzzz'.
-	self assert: (scope bindingFor: node) isInstanceVar
+	self assert: (scope bindingFor: 'bzzz') isInstanceVar
 !
 
 testPseudoVar
 	| node pseudoVars |
 	pseudoVars := #('self' 'super' 'true' 'false' 'nil').
 	pseudoVars do: [:each |
-		node := VariableNode new
-		value: each;
-		yourself.
-		self assert: (MethodLexicalScope new bindingFor: node) isPseudoVar]
+		self assert: (MethodLexicalScope new bindingFor: each) isPseudoVar]
 !
 
 testTempVar
 	| node scope |
-	node := VariableNode new
-		value: 'bzzz';
-		yourself.
 	scope := MethodLexicalScope new.
 	scope addTemp: 'bzzz'.
-	self assert: (scope bindingFor: node) isTempVar
+	self assert: (scope bindingFor: 'bzzz') isTempVar
 !
 
 testUnknownVar
-	| node |
-	node := VariableNode new
-		value: 'bzzz';
-		yourself.
-	self assert: (MethodLexicalScope new bindingFor: node) isNil
+	self assert: (MethodLexicalScope new bindingFor: 'bzzz') isNil
 ! !
 
 TestCase subclass: #SemanticAnalyzerTest