浏览代码

Default `allInstanceVariableNames`, consistent with d633bba.

Herbert Vojčík 7 年之前
父节点
当前提交
6fb9c87272
共有 2 个文件被更改,包括 23 次插入24 次删除
  1. 18 18
      src/Kernel-Classes.js
  2. 5 6
      src/Kernel-Classes.st

+ 18 - 18
src/Kernel-Classes.js

@@ -105,6 +105,24 @@ messageSends: ["at:ifAbsent:", "methodDictionary", "selector", "ifFalse:", "incl
 }),
 $globals.BehaviorBody);
 
+$core.addMethod(
+$core.method({
+selector: "allInstanceVariableNames",
+protocol: "accessing",
+fn: function (){
+var self=this;
+return [];
+
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "allInstanceVariableNames\x0a\x09\x22Default for non-classes; to be able to send #allInstanceVariableNames to any class / trait.\x22\x0a\x09^ #()",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: []
+}),
+$globals.BehaviorBody);
+
 $core.addMethod(
 $core.method({
 selector: "allSubclassesDo:",
@@ -2674,24 +2692,6 @@ messageSends: ["@", "asTraitTransformation"]
 }),
 $globals.Trait);
 
-$core.addMethod(
-$core.method({
-selector: "allInstanceVariableNames",
-protocol: "compiler compatibility",
-fn: function (){
-var self=this;
-return [];
-
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "allInstanceVariableNames\x0a\x09^ #()",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: []
-}),
-$globals.Trait);
-
 $core.addMethod(
 $core.method({
 selector: "asJavascript",

+ 5 - 6
src/Kernel-Classes.st

@@ -15,6 +15,11 @@ I also provides methods for compiling methods and examining the method dictionar
 	^ self methodAt: aString
 !
 
+allInstanceVariableNames
+	"Default for non-classes; to be able to send #allInstanceVariableNames to any class / trait."
+	^ #()
+!
+
 comment
 	^ (self basicAt: 'comment') ifNil: [ '' ]
 !
@@ -661,12 +666,6 @@ traitUsers
 	^ (self basicAt: 'traitUsers') copy
 ! !
 
-!Trait methodsFor: 'compiler compatibility'!
-
-allInstanceVariableNames
-	^ #()
-! !
-
 !Trait methodsFor: 'composition'!
 
 - anArray