Browse Source

Evaluator is a subclass of InterfacingObject

Nicolas Petton 10 years ago
parent
commit
0fbbe58988
2 changed files with 3 additions and 29 deletions
  1. 2 23
      src/Compiler-Core.js
  2. 1 6
      src/Compiler-Core.st

+ 2 - 23
src/Compiler-Core.js

@@ -1,4 +1,4 @@
-define("amber_core/Compiler-Core", ["amber_vm/smalltalk", "amber_vm/nil", "amber_vm/_st", "amber_vm/globals", "amber_core/Kernel-Objects", "amber_core/Kernel-Collections"], function(smalltalk,nil,_st, globals){
+define("amber_core/Compiler-Core", ["amber_vm/smalltalk", "amber_vm/nil", "amber_vm/_st", "amber_vm/globals", "amber_core/Kernel-Objects", "amber_core/Kernel-Infrastructure", "amber_core/Kernel-Collections"], function(smalltalk,nil,_st, globals){
 smalltalk.addPackage('Compiler-Core');
 smalltalk.packages["Compiler-Core"].transport = {"type":"amd","amdNamespace":"amber_core"};
 
@@ -687,30 +687,9 @@ globals.Compiler.klass);
 
 smalltalk.addClass('DoIt', globals.Object, [], 'Compiler-Core');
 globals.DoIt.comment="`DoIt` is the class used to compile and evaluate expressions. See `Compiler >> evaluateExpression:`.";
-smalltalk.addMethod(
-smalltalk.method({
-selector: "xxxDoIt",
-protocol: 'xxxDoIt',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st((function(){
-return smalltalk.withContext(function($ctx2) {
-return self._halt();
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._value();
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"xxxDoIt",{},globals.DoIt)})},
-args: [],
-source: "xxxDoIt ^ [ self halt ] value",
-messageSends: ["value", "halt"],
-referencedClasses: []
-}),
-globals.DoIt);
-
 
 
-smalltalk.addClass('Evaluator', globals.Object, [], 'Compiler-Core');
+smalltalk.addClass('Evaluator', globals.InterfacingObject, [], 'Compiler-Core');
 globals.Evaluator.comment="I evaluate code against a receiver, dispatching #evaluate:on: to the receiver.";
 smalltalk.addMethod(
 smalltalk.method({

+ 1 - 6
src/Compiler-Core.st

@@ -223,12 +223,7 @@ Object subclass: #DoIt
 !DoIt commentStamp!
 `DoIt` is the class used to compile and evaluate expressions. See `Compiler >> evaluateExpression:`.!
 
-!DoIt methodsFor: 'xxxDoIt'!
-
-xxxDoIt ^ [ self halt ] value
-! !
-
-Object subclass: #Evaluator
+InterfacingObject subclass: #Evaluator
 	instanceVariableNames: ''
 	package: 'Compiler-Core'!
 !Evaluator commentStamp!