Browse Source

Remove unused ivar.

Herbert Vojčík 7 years ago
parent
commit
785ddc14c7
2 changed files with 4 additions and 51 deletions
  1. 3 41
      src/Compiler-Core.js
  2. 1 10
      src/Compiler-Core.st

+ 3 - 41
src/Compiler-Core.js

@@ -388,7 +388,7 @@ $globals.CodeGenerator);
 
 
 
-$core.addClass("Compiler", $globals.Object, ["currentClass", "currentPackage", "source", "unknownVariables", "codeGeneratorClass"], "Compiler-Core");
+$core.addClass("Compiler", $globals.Object, ["currentClass", "currentPackage", "source", "codeGeneratorClass"], "Compiler-Core");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Compiler.comment="I provide the public interface for compiling Amber source code into JavaScript.\x0a\x0aThe code generator used to produce JavaScript can be plugged with `#codeGeneratorClass`.\x0aThe default code generator is an instance of `InlinedCodeGenerator`";
 //>>excludeEnd("ide");
@@ -509,7 +509,6 @@ $recv($1)._source_(self._source());
 $recv($1)._currentClass_(self._currentClass());
 $recv($1)._currentPackage_(self._currentPackage());
 result=$recv(generator)._compileNode_(aNode);
-self._unknownVariables_([]);
 return result;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"compileNode:",{aNode:aNode,generator:generator,result:result},$globals.Compiler)});
@@ -517,10 +516,10 @@ return result;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aNode"],
-source: "compileNode: aNode\x0a\x09| generator result |\x0a\x09generator := self codeGeneratorClass new.\x0a\x09generator\x0a\x09\x09source: self source;\x0a\x09\x09currentClass: self currentClass;\x0a\x09\x09currentPackage: self currentPackage.\x0a\x09result := generator compileNode: aNode.\x0a\x09self unknownVariables: #().\x0a\x09^ result",
+source: "compileNode: aNode\x0a\x09| generator result |\x0a\x09generator := self codeGeneratorClass new.\x0a\x09generator\x0a\x09\x09source: self source;\x0a\x09\x09currentClass: self currentClass;\x0a\x09\x09currentPackage: self currentPackage.\x0a\x09result := generator compileNode: aNode.\x0a\x09^ result",
 referencedClasses: [],
 //>>excludeEnd("ide");
-messageSends: ["new", "codeGeneratorClass", "source:", "source", "currentClass:", "currentClass", "currentPackage:", "currentPackage", "compileNode:", "unknownVariables:"]
+messageSends: ["new", "codeGeneratorClass", "source:", "source", "currentClass:", "currentClass", "currentPackage:", "currentPackage", "compileNode:"]
 }),
 $globals.Compiler);
 
@@ -936,43 +935,6 @@ messageSends: []
 }),
 $globals.Compiler);
 
-$core.addMethod(
-$core.method({
-selector: "unknownVariables",
-protocol: "accessing",
-fn: function (){
-var self=this;
-return self["@unknownVariables"];
-
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "unknownVariables\x0a\x09^ unknownVariables",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: []
-}),
-$globals.Compiler);
-
-$core.addMethod(
-$core.method({
-selector: "unknownVariables:",
-protocol: "accessing",
-fn: function (aCollection){
-var self=this;
-self["@unknownVariables"]=aCollection;
-return self;
-
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aCollection"],
-source: "unknownVariables: aCollection\x0a\x09unknownVariables := aCollection",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: []
-}),
-$globals.Compiler);
-
 
 $core.addMethod(
 $core.method({

+ 1 - 10
src/Compiler-Core.st

@@ -94,7 +94,7 @@ translator
 ! !
 
 Object subclass: #Compiler
-	instanceVariableNames: 'currentClass currentPackage source unknownVariables codeGeneratorClass'
+	instanceVariableNames: 'currentClass currentPackage source codeGeneratorClass'
 	package: 'Compiler-Core'!
 !Compiler commentStamp!
 I provide the public interface for compiling Amber source code into JavaScript.
@@ -134,14 +134,6 @@ source
 
 source: aString
 	source := aString
-!
-
-unknownVariables
-	^ unknownVariables
-!
-
-unknownVariables: aCollection
-	unknownVariables := aCollection
 ! !
 
 !Compiler methodsFor: 'compiling'!
@@ -169,7 +161,6 @@ compileNode: aNode
 		currentClass: self currentClass;
 		currentPackage: self currentPackage.
 	result := generator compileNode: aNode.
-	self unknownVariables: #().
 	^ result
 !