Browse Source

Protocols fix.

Herbert Vojčík 7 years ago
parent
commit
c298d385a5
2 changed files with 14 additions and 12 deletions
  1. 2 2
      src/Compiler-IR.js
  2. 12 10
      src/Compiler-IR.st

+ 2 - 2
src/Compiler-IR.js

@@ -2071,7 +2071,7 @@ $globals.IRMethod);
 $core.addMethod(
 $core.method({
 selector: "isMethod",
-protocol: 'accessing',
+protocol: 'testing',
 fn: function (){
 var self=this;
 return true;
@@ -2690,7 +2690,7 @@ $globals.IRSend);
 $core.addMethod(
 $core.method({
 selector: "isSuperSend",
-protocol: 'accessing',
+protocol: 'testing',
 fn: function (){
 var self=this;
 var receiver;

+ 12 - 10
src/Compiler-IR.st

@@ -495,10 +495,6 @@ internalVariables
 	^ internalVariables ifNil: [ internalVariables := Set new ]
 !
 
-isMethod
-	^ true
-!
-
 messageSends
 	^ self sendIndexes keys
 !
@@ -539,6 +535,12 @@ theClass: aClass
 	theClass := aClass
 ! !
 
+!IRMethod methodsFor: 'testing'!
+
+isMethod
+	^ true
+! !
+
 !IRMethod methodsFor: 'visiting'!
 
 accept: aVisitor
@@ -666,12 +668,6 @@ index: anInteger
 	index := anInteger
 !
 
-isSuperSend
-	| receiver |
-	receiver := self instructions first.
-	^ receiver isVariable and: [ receiver variable name = 'super' ]
-!
-
 selector
 	^ selector
 !
@@ -684,6 +680,12 @@ selector: aString
 
 isSend
 	^ true
+!
+
+isSuperSend
+	| receiver |
+	receiver := self instructions first.
+	^ receiver isVariable and: [ receiver variable name = 'super' ]
 ! !
 
 !IRSend methodsFor: 'visiting'!