Browse Source

Remove deprecated NativeFunction APIs.

Herbert Vojčík 7 years ago
parent
commit
2a39bfde78
4 changed files with 16 additions and 144 deletions
  1. 6 0
      API-CHANGES.txt
  2. 10 0
      CHANGELOG
  3. 0 112
      src/Kernel-Methods.js
  4. 0 32
      src/Kernel-Methods.st

+ 6 - 0
API-CHANGES.txt

@@ -2,6 +2,12 @@
 
 * Remove classes InterfacingObject, PlatformInterface.
 
+- NativeFunction class >>
+  - constructor:
+  - constructor:value:
+  - constructor:value:value:
+  - constructor:value:value:value:
+
 
 0.16.1:
 

+ 10 - 0
CHANGELOG

@@ -1,3 +1,13 @@
+?? October 2016 - Release 0.17.0
+===================================
+
+* Remove some deprecated classes and methods.
+
+Breaks bw compat because of removed deprecated pieces.
+
+Commits: https://lolg.it/amber/amber/commits/0.17.0.
+
+
 27 September 2016 - Release 0.16.1
 ===================================
 

+ 0 - 112
src/Kernel-Methods.js

@@ -2640,118 +2640,6 @@ $core.addClass('NativeFunction', $globals.Object, [], 'Kernel-Methods');
 $globals.NativeFunction.comment="I am a wrapper around native functions, such as `WebSocket`.\x0aFor 'normal' functions (whose constructor is the JavaScript `Function` object), use `BlockClosure`.\x0a\x0a## API\x0a\x0aSee the class-side `instance creation` methods for instance creation.\x0a\x0aCreated instances will most probably be instance of `JSObjectProxy`.\x0a\x0a## Usage example:\x0a\x0a\x09| ws |\x0a\x09ws := NativeFunction constructor: 'WebSocket' value: 'ws://localhost'.\x0a\x09ws at: 'onopen' put: [ ws send: 'hey there from Amber' ]";
 //>>excludeEnd("ide");
 
-$core.addMethod(
-$core.method({
-selector: "constructor:",
-protocol: 'instance creation',
-fn: function (aString){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-
-		self._deprecatedAPI_("Use constructorNamed:");
-		var nativeFunc=eval(aString);
-		return new nativeFunc();
-	;
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"constructor:",{aString:aString},$globals.NativeFunction.klass)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString"],
-source: "constructor: aString\x0a\x09<\x0a\x09\x09self._deprecatedAPI_(\x22Use constructorNamed:\x22);\x0a\x09\x09var nativeFunc=eval(aString);\x0a\x09\x09return new nativeFunc();\x0a\x09>",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: []
-}),
-$globals.NativeFunction.klass);
-
-$core.addMethod(
-$core.method({
-selector: "constructor:value:",
-protocol: 'instance creation',
-fn: function (aString,anObject){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-
-		self._deprecatedAPI_("Use constructorNamed:value:");
-		var nativeFunc=eval(aString);
-		return new nativeFunc(anObject);
-	;
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"constructor:value:",{aString:aString,anObject:anObject},$globals.NativeFunction.klass)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString", "anObject"],
-source: "constructor: aString value:anObject\x0a\x09<\x0a\x09\x09self._deprecatedAPI_(\x22Use constructorNamed:value:\x22);\x0a\x09\x09var nativeFunc=eval(aString);\x0a\x09\x09return new nativeFunc(anObject);\x0a\x09>",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: []
-}),
-$globals.NativeFunction.klass);
-
-$core.addMethod(
-$core.method({
-selector: "constructor:value:value:",
-protocol: 'instance creation',
-fn: function (aString,anObject,anObject2){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-
-		self._deprecatedAPI_("Use constructorNamed:value:value:");
-		var nativeFunc=eval(aString);
-		return new nativeFunc(anObject,anObject2);
-	;
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"constructor:value:value:",{aString:aString,anObject:anObject,anObject2:anObject2},$globals.NativeFunction.klass)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString", "anObject", "anObject2"],
-source: "constructor: aString value:anObject value: anObject2\x0a\x09<\x0a\x09\x09self._deprecatedAPI_(\x22Use constructorNamed:value:value:\x22);\x0a\x09\x09var nativeFunc=eval(aString);\x0a\x09\x09return new nativeFunc(anObject,anObject2);\x0a\x09>",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: []
-}),
-$globals.NativeFunction.klass);
-
-$core.addMethod(
-$core.method({
-selector: "constructor:value:value:value:",
-protocol: 'instance creation',
-fn: function (aString,anObject,anObject2,anObject3){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-
-		self._deprecatedAPI_("Use constructorNamed:value:value:value");
-		var nativeFunc=eval(aString);
-		return new nativeFunc(anObject,anObject2, anObject3);
-	;
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"constructor:value:value:value:",{aString:aString,anObject:anObject,anObject2:anObject2,anObject3:anObject3},$globals.NativeFunction.klass)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString", "anObject", "anObject2", "anObject3"],
-source: "constructor: aString value:anObject value: anObject2 value:anObject3\x0a\x09<\x0a\x09\x09self._deprecatedAPI_(\x22Use constructorNamed:value:value:value\x22);\x0a\x09\x09var nativeFunc=eval(aString);\x0a\x09\x09return new nativeFunc(anObject,anObject2, anObject3);\x0a\x09>",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: []
-}),
-$globals.NativeFunction.klass);
-
 $core.addMethod(
 $core.method({
 selector: "constructorNamed:",

+ 0 - 32
src/Kernel-Methods.st

@@ -766,38 +766,6 @@ functionOf: nativeFunc valueWithArgs: args
 
 !NativeFunction class methodsFor: 'instance creation'!
 
-constructor: aString
-	<
-		self._deprecatedAPI_("Use constructorNamed:");
-		var nativeFunc=eval(aString);
-		return new nativeFunc();
-	>
-!
-
-constructor: aString value:anObject
-	<
-		self._deprecatedAPI_("Use constructorNamed:value:");
-		var nativeFunc=eval(aString);
-		return new nativeFunc(anObject);
-	>
-!
-
-constructor: aString value:anObject value: anObject2
-	<
-		self._deprecatedAPI_("Use constructorNamed:value:value:");
-		var nativeFunc=eval(aString);
-		return new nativeFunc(anObject,anObject2);
-	>
-!
-
-constructor: aString value:anObject value: anObject2 value:anObject3
-	<
-		self._deprecatedAPI_("Use constructorNamed:value:value:value");
-		var nativeFunc=eval(aString);
-		return new nativeFunc(anObject,anObject2, anObject3);
-	>
-!
-
 constructorNamed: aString
 	<
 		var nativeFunc=(new Function('return this'))()[aString];