Browse Source

Remove kernel-level deprecations.

Herby Vojčík 5 years ago
parent
commit
c5f2c2199b

+ 1 - 0
CHANGELOG

@@ -2,6 +2,7 @@
 ===================================
 
 * Fixes.
+* Remove kernel-level deprecations.
 * Flatter Collection hierarchy with traits, remove IndexableCollection class.
 * Remove some old IE8 cruft.
 * Push CharacterArray down to String and remove it.

+ 0 - 11
lang/base/boot.js

@@ -57,17 +57,6 @@ define([
                 if (initialized) return;
                 brikz.classes.bootstrapHierarchy();
                 configureWithRuntime(brikz);
-                // TODO deprecation helper; remove
-                Object.defineProperty(st, "packages", {
-                    get: function () {
-                        console.warn("Use of .packages deprecated, use .packageDescriptors");
-                        return st.packageDescriptors;
-                    },
-                    set: function (v) {
-                        console.trace();
-                        throw new Error("No one should be setting st.packages directly on initialized Amber.");
-                    }
-                });
                 return Promise.resolve(brikz.startImage.run())
                     .then(function () {
                         initialized = true;

+ 0 - 11
lang/base/kernel-fundamentals.js

@@ -203,17 +203,6 @@ define(function () {
                 throw new Error("addMethod: Method " + method.selector + " already bound to " + method.owner);
             }
             method.owner = traitOrBehavior;
-            // TODO deprecation helper; remove
-            Object.defineProperty(method, "methodClass", {
-                get: function () {
-                    console.warn("Use of .methodClass deprecated, use .owner");
-                    return method.owner;
-                },
-                set: function (v) {
-                    console.warn("Use of .methodClass= deprecated, use .owner=");
-                    method.owner = v;
-                }
-            });
             registerNewSelectors(method);
             traitOrBehavior.localMethods[method.selector] = method;
             updateMethod(method.selector, traitOrBehavior);

+ 1 - 23
lang/base/kernel-language.js

@@ -109,17 +109,6 @@ define(function () {
                 name: traitName,
                 make: function () {
                     var that = new SmalltalkTrait();
-                    // TODO deprecation helper; remove
-                    Object.defineProperty(that, "className", {
-                        get: function () {
-                            console.warn("Use of .className deprecated, use .name");
-                            return that.name;
-                        },
-                        set: function (v) {
-                            console.warn("Use of .className= deprecated, use .name=");
-                            that.name = v;
-                        }
-                    });
                     that.name = traitName;
                     that.traitUsers = [];
                     setupMethods(that);
@@ -324,7 +313,7 @@ define(function () {
 
         this.bootstrapHierarchy = function () {
             var nilSubclasses = [globals.ProtoObject];
-            nilAsClass.a$cls = nilAsClass.klass = globals.Class;
+            nilAsClass.a$cls = globals.Class;
             nilSubclasses.forEach(function (each) {
                 each.a$cls.superclass = globals.Class;
                 addSubclass(each.a$cls);
@@ -351,17 +340,6 @@ define(function () {
                     }, superclass.fn);
                 that.iVarNames = iVarNames || [];
 
-                // TODO deprecation helper; remove
-                Object.defineProperty(that, "className", {
-                    get: function () {
-                        console.warn("Use of .className deprecated, use .name");
-                        return that.name;
-                    },
-                    set: function (v) {
-                        console.warn("Use of .className= deprecated, use .name=");
-                        that.name = v;
-                    }
-                });
                 that.name = className;
                 that.subclasses = [];
 

+ 4 - 4
lang/src/Kernel-Infrastructure.js

@@ -3091,7 +3091,7 @@ var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-delete anObject.klass; delete anObject.a$cls;;
+delete anObject.a$cls;;
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"cancelOptOut:",{anObject:anObject},$globals.SmalltalkImage)});
@@ -3099,7 +3099,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["anObject"],
-source: "cancelOptOut: anObject\x0a\x09\x22A Smalltalk object has a 'a$cls' property.\x0a\x09If this property is shadowed for anObject by optOut:,\x0a\x09the object is treated as plain JS object.\x0a\x09This removes the shadow and anObject is Smalltalk object\x0a\x09again if it was before.\x22\x0a\x09\x0a\x09<inlineJS: 'delete anObject.klass; delete anObject.a$cls;'>",
+source: "cancelOptOut: anObject\x0a\x09\x22A Smalltalk object has a 'a$cls' property.\x0a\x09If this property is shadowed for anObject by optOut:,\x0a\x09the object is treated as plain JS object.\x0a\x09This removes the shadow and anObject is Smalltalk object\x0a\x09again if it was before.\x22\x0a\x09\x0a\x09<inlineJS: 'delete anObject.a$cls;'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3415,7 +3415,7 @@ var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-anObject.klass = null; anObject.a$cls = null;
+anObject.a$cls = null;
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"optOut:",{anObject:anObject},$globals.SmalltalkImage)});
@@ -3423,7 +3423,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["anObject"],
-source: "optOut: anObject\x0a\x09\x22A Smalltalk object has a 'a$cls' property.\x0a\x09This shadows the property for anObject.\x0a\x09The object is treated as plain JS object following this.\x22\x0a\x09\x0a\x09<inlineJS: 'anObject.klass = null; anObject.a$cls = null'>",
+source: "optOut: anObject\x0a\x09\x22A Smalltalk object has a 'a$cls' property.\x0a\x09This shadows the property for anObject.\x0a\x09The object is treated as plain JS object following this.\x22\x0a\x09\x0a\x09<inlineJS: 'anObject.a$cls = null'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []

+ 2 - 2
lang/src/Kernel-Infrastructure.st

@@ -823,7 +823,7 @@ cancelOptOut: anObject
 	This removes the shadow and anObject is Smalltalk object
 	again if it was before."
 	
-	<inlineJS: 'delete anObject.klass; delete anObject.a$cls;'>
+	<inlineJS: 'delete anObject.a$cls;'>
 !
 
 core
@@ -843,7 +843,7 @@ optOut: anObject
 	This shadows the property for anObject.
 	The object is treated as plain JS object following this."
 	
-	<inlineJS: 'anObject.klass = null; anObject.a$cls = null'>
+	<inlineJS: 'anObject.a$cls = null'>
 !
 
 parse: aString