Ver Fonte

st.initClass call moved to st.removeMethod

Herbert Vojčík há 11 anos atrás
pai
commit
72944c6b80
4 ficheiros alterados com 5 adições e 13 exclusões
  1. 1 4
      js/Kernel-Classes.deploy.js
  2. 2 5
      js/Kernel-Classes.js
  3. 1 0
      js/boot.js
  4. 1 4
      st/Kernel-Classes.st

+ 1 - 4
js/Kernel-Classes.deploy.js

@@ -178,10 +178,7 @@ selector: "basicRemoveCompiledMethod:",
 fn: function (aMethod){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-
-		smalltalk.removeMethod(aMethod,self);
-		smalltalk.init(self);
-	;
+smalltalk.removeMethod(aMethod,self);
 return self}, function($ctx1) {$ctx1.fill(self,"basicRemoveCompiledMethod:",{aMethod:aMethod},smalltalk.Behavior)})},
 messageSends: []}),
 smalltalk.Behavior);

+ 2 - 5
js/Kernel-Classes.js

@@ -225,13 +225,10 @@ category: 'private',
 fn: function (aMethod){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-
-		smalltalk.removeMethod(aMethod,self);
-		smalltalk.init(self);
-	;
+smalltalk.removeMethod(aMethod,self);
 return self}, function($ctx1) {$ctx1.fill(self,"basicRemoveCompiledMethod:",{aMethod:aMethod},smalltalk.Behavior)})},
 args: ["aMethod"],
-source: "basicRemoveCompiledMethod: aMethod\x0a\x09<\x0a\x09\x09smalltalk.removeMethod(aMethod,self);\x0a\x09\x09smalltalk.init(self);\x0a\x09>",
+source: "basicRemoveCompiledMethod: aMethod\x0a\x09<smalltalk.removeMethod(aMethod,self)>",
 messageSends: [],
 referencedClasses: []
 }),

+ 1 - 0
js/boot.js

@@ -593,6 +593,7 @@ function Smalltalk() {
 		delete klass.fn.prototype[st.selector(method.selector)];
 		delete klass.methods[method.selector];
 
+        st.initClass(klass);
 		propagateMethodChange(klass);
 
 		// Do *not* delete protocols from here.

+ 1 - 4
st/Kernel-Classes.st

@@ -267,10 +267,7 @@ basicAddCompiledMethod: aMethod
 !
 
 basicRemoveCompiledMethod: aMethod
-	<
-		smalltalk.removeMethod(aMethod,self);
-		smalltalk.init(self);
-	>
+	<smalltalk.removeMethod(aMethod,self)>
 ! !
 
 !Behavior methodsFor: 'testing'!