Browse Source

Merge branch 'cli-version' of github.com:mkroehnert/amber into mkroehnert-cli-version

Conflicts:
	API-CHANGES.txt
Nicolas Petton 10 years ago
parent
commit
044c0a4a0d

+ 4 - 1
API-CHANGES.txt

@@ -12,7 +12,10 @@
   + tryCatch:
 + Environment >>
   + evaluate:for:
-
++ AmberCli >>
+  + version:
++ Object >>
+  + deprecatedAPI:
 - Environment >>
   - eval:on:
   - evaluateString:on:

+ 1 - 0
cli/index.html

@@ -28,3 +28,4 @@
     </script> 
   </body> 
 </html> 
+

+ 65 - 45
cli/src/AmberCli.js

@@ -66,18 +66,18 @@ selector: "help:",
 protocol: 'commands',
 fn: function (args){
 var self=this;
+function $Transcript(){return globals.Transcript||(typeof Transcript=="undefined"?nil:Transcript)}
 return smalltalk.withContext(function($ctx1) { 
-_st(console)._log_("Available Commands:");
-$ctx1.sendIdx["log:"]=1;
+_st($Transcript())._show_("Available commands");
 _st(self._commandLineSwitches())._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(console)._log_(each);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"help:",{args:args},globals.AmberCli.klass)})},
 args: ["args"],
-source: "help: args\x0a\x09console log: 'Available Commands:'.\x0a\x09self commandLineSwitches do: [ :each | console log: each ]",
-messageSends: ["log:", "do:", "commandLineSwitches"],
-referencedClasses: []
+source: "help: args\x0a\x09Transcript show: 'Available commands'.\x0a\x09self commandLineSwitches do: [ :each | console log: each ]",
+messageSends: ["show:", "do:", "commandLineSwitches", "log:"],
+referencedClasses: ["Transcript"]
 }),
 globals.AmberCli.klass);
 
@@ -88,34 +88,48 @@ protocol: 'startup',
 fn: function (){
 var self=this;
 var args,nodeMinorVersion;
+function $Transcript(){return globals.Transcript||(typeof Transcript=="undefined"?nil:Transcript)}
+function $Smalltalk(){return globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1,$4,$5,$6;
-$3=_st(process)._version();
+var $5,$4,$3,$2,$1,$8,$7,$6,$9,$10,$11;
+$5=_st($Smalltalk())._version();
 $ctx1.sendIdx["version"]=1;
-$2=_st($3)._tokenize_(".");
-$1=_st($2)._second();
-nodeMinorVersion=_st($1)._asNumber();
-$4=_st(nodeMinorVersion).__lt((8));
-if(smalltalk.assert($4)){
-_st(console)._log_("You are currently using Node.js ".__comma(_st(process)._version()));
-$ctx1.sendIdx["log:"]=1;
-_st(console)._log_("Required is at least Node.js v0.8.x or greater.");
+$4="Welcome to Amber version ".__comma($5);
+$ctx1.sendIdx[","]=4;
+$3=_st($4).__comma(" (NodeJS ");
+$ctx1.sendIdx[","]=3;
+$2=_st($3).__comma(_st(_st(process)._versions())._node());
+$ctx1.sendIdx[","]=2;
+$1=_st($2).__comma(").");
+$ctx1.sendIdx[","]=1;
+_st($Transcript())._show_($1);
+$ctx1.sendIdx["show:"]=1;
+$8=_st(process)._version();
+$ctx1.sendIdx["version"]=2;
+$7=_st($8)._tokenize_(".");
+$6=_st($7)._second();
+nodeMinorVersion=_st($6)._asNumber();
+$9=_st(nodeMinorVersion).__lt((8));
+if(smalltalk.assert($9)){
+_st($Transcript())._show_("You are currently using Node.js ".__comma(_st(process)._version()));
+$ctx1.sendIdx["show:"]=2;
+_st($Transcript())._show_("Required is at least Node.js v0.8.x or greater.");
 return (-1);
 };
 args=_st(process)._argv();
 _st(args)._removeFrom_to_((1),(2));
-$5=_st(args)._isEmpty();
-if(smalltalk.assert($5)){
+$10=_st(args)._isEmpty();
+if(smalltalk.assert($10)){
 self._help_(nil);
 } else {
-$6=self._handleArguments_(args);
-return $6;
+$11=self._handleArguments_(args);
+return $11;
 };
 return self}, function($ctx1) {$ctx1.fill(self,"main",{args:args,nodeMinorVersion:nodeMinorVersion},globals.AmberCli.klass)})},
 args: [],
-source: "main\x0a\x09\x22Main entry point for Amber applications.\x0a\x09Parses commandline arguments and starts the according subprogram.\x22\x0a\x09| args nodeMinorVersion |\x0a\x0a\x09nodeMinorVersion := ((process version) tokenize: '.') second asNumber.\x0a\x09nodeMinorVersion < 8 ifTrue: [\x0a\x09\x09console log: 'You are currently using Node.js ', (process version).\x0a\x09\x09console log: 'Required is at least Node.js v0.8.x or greater.'.\x0a\x09\x09^ -1.\x0a\x09].\x0a\x0a\x09args := process argv.\x0a\x09\x22Remove the first args which contain the path to the node executable and the script file.\x22\x0a\x09args removeFrom: 1 to: 2.\x0a\x09\x0a\x09(args isEmpty)\x0a\x09\x09ifTrue: [self help: nil]\x0a\x09\x09ifFalse: [^self handleArguments: args]",
-messageSends: ["asNumber", "second", "tokenize:", "version", "ifTrue:", "<", "log:", ",", "argv", "removeFrom:to:", "ifTrue:ifFalse:", "isEmpty", "help:", "handleArguments:"],
-referencedClasses: []
+source: "main\x0a\x09\x22Main entry point for Amber applications.\x0a\x09Parses commandline arguments and starts the according subprogram.\x22\x0a\x09| args nodeMinorVersion |\x0a\x09\x0a\x09Transcript show: 'Welcome to Amber version ', Smalltalk version, ' (NodeJS ', process versions node, ').'.\x0a\x0a\x09nodeMinorVersion := ((process version) tokenize: '.') second asNumber.\x0a\x09nodeMinorVersion < 8 ifTrue: [\x0a\x09\x09Transcript show: 'You are currently using Node.js ', (process version).\x0a\x09\x09Transcript show: 'Required is at least Node.js v0.8.x or greater.'.\x0a\x09\x09^ -1.\x0a\x09].\x0a\x0a\x09args := process argv.\x0a\x09\x22Remove the first args which contain the path to the node executable and the script file.\x22\x0a\x09args removeFrom: 1 to: 2.\x0a\x09\x0a\x09(args isEmpty)\x0a\x09\x09ifTrue: [self help: nil]\x0a\x09\x09ifFalse: [^self handleArguments: args]",
+messageSends: ["show:", ",", "version", "node", "versions", "asNumber", "second", "tokenize:", "ifTrue:", "<", "argv", "removeFrom:to:", "ifTrue:ifFalse:", "isEmpty", "help:", "handleArguments:"],
+referencedClasses: ["Transcript", "Smalltalk"]
 }),
 globals.AmberCli.klass);
 
@@ -187,6 +201,20 @@ referencedClasses: ["FileServer"]
 }),
 globals.AmberCli.klass);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "version:",
+protocol: 'commands',
+fn: function (arguments){
+var self=this;
+return self},
+args: ["arguments"],
+source: "version: arguments",
+messageSends: [],
+referencedClasses: []
+}),
+globals.AmberCli.klass);
+
 
 smalltalk.addClass('FileServer', globals.Object, ['path', 'http', 'fs', 'url', 'host', 'port', 'basePath', 'util', 'username', 'password', 'fallbackPage'], 'AmberCli');
 globals.FileServer.comment="I am the Amber Smalltalk FileServer.\x0aMy runtime requirement is a functional Node.js executable.\x0a\x0aTo start a FileServer instance on port `4000` use the following code:\x0a\x0a    FileServer new start\x0a\x0aA parameterized instance can be created with the following code:\x0a\x0a    FileServer createServerWithArguments: options\x0a\x0aHere, `options` is an array of commandline style strings each followed by a value e.g. `#('--port', '6000', '--host', '0.0.0.0')`.\x0aA list of all available parameters can be printed to the commandline by passing `--help` as parameter.\x0aSee the `Options` section for further details on how options are mapped to instance methods.\x0a\x0aAfter startup FileServer checks if the directory layout required by Amber is present and logs a warning on absence.\x0a\x0a\x0a## Options\x0a\x0aEach option is of the form `--some-option-string` which is transformed into a selector of the format `someOptionString:`.\x0aThe trailing `--` gets removed, each `-[a-z]` gets transformed into the according uppercase letter, and a `:` is appended to create a selector which takes a single argument.\x0aAfterwards, the selector gets executed on the `FileServer` instance with the value following in the options array as parameter.\x0a\x0a## Adding new commandline parameters\x0a\x0aAdding new commandline parameters to `FileServer` is as easy as adding a new single parameter method to the `accessing` protocol.";
@@ -213,7 +241,7 @@ protocol: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
+var $2,$1,$receiver;
 $2=self["@basePath"];
 if(($receiver = $2) == nil || $receiver == null){
 $1=_st(self._class())._defaultBasePath();
@@ -516,7 +544,7 @@ fn: function (aRequest){
 var self=this;
 var header,token,auth,parts;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$3,$4,$5,$6,$9,$10,$8,$7;
+var $2,$1,$3,$4,$5,$6,$9,$10,$8,$7,$receiver;
 $2=_st(self["@username"])._isNil();
 $ctx1.sendIdx["isNil"]=1;
 $1=_st($2)._and_((function(){
@@ -684,7 +712,7 @@ protocol: 'request handling',
 fn: function (aDirname,aUrl,aResponse){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$3,$5,$7,$6,$4;
+var $2,$1,$3,$5,$7,$6,$4,$receiver;
 $2=_st(aUrl)._pathname();
 $ctx1.sendIdx["pathname"]=1;
 $1=_st($2)._endsWith_("/");
@@ -948,7 +976,7 @@ protocol: 'private',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4,$7,$6,$5,$8,$9;
+var $1,$2,$3,$4,$7,$6,$5,$8,$9,$receiver;
 $1=self["@fs"];
 $2=self._basePath();
 $ctx1.sendIdx["basePath"]=1;
@@ -1255,7 +1283,7 @@ protocol: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
+var $2,$1,$receiver;
 $2=self["@mimeTypes"];
 if(($receiver = $2) == nil || $receiver == null){
 self["@mimeTypes"]=self._defaultMimeTypes();
@@ -1353,7 +1381,7 @@ var self=this;
 function $Error(){return globals.Error||(typeof Error=="undefined"?nil:Error)}
 function $ConsoleErrorHandler(){return globals.ConsoleErrorHandler||(typeof ConsoleErrorHandler=="undefined"?nil:ConsoleErrorHandler)}
 return smalltalk.withContext(function($ctx1) { 
-var $3,$4,$2,$1;
+var $3,$4,$2,$1,$receiver;
 $1=self._parseAssignment_do_(buffer,(function(name,expr){
 var varName,value;
 return smalltalk.withContext(function($ctx2) {
@@ -1627,7 +1655,7 @@ protocol: 'private',
 fn: function (aClass){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
+var $2,$3,$1,$receiver;
 $2=_st(aClass)._superclass();
 $ctx1.sendIdx["superclass"]=1;
 if(($receiver = $2) == nil || $receiver == null){
@@ -1689,7 +1717,7 @@ protocol: 'private',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1,$2,$receiver;
 $1=self["@resultCount"];
 if(($receiver = $1) == nil || $receiver == null){
 self["@resultCount"]=(1);
@@ -1796,24 +1824,15 @@ protocol: 'actions',
 fn: function (){
 var self=this;
 function $Transcript(){return globals.Transcript||(typeof Transcript=="undefined"?nil:Transcript)}
-function $Smalltalk(){return globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1,$4;
-$3=_st("Welcome to Amber version ".__comma(_st(_st($Smalltalk())._current())._version())).__comma(" (NodeJS ");
-$ctx1.sendIdx[","]=3;
-$2=_st($3).__comma(_st(_st(process)._versions())._node());
-$ctx1.sendIdx[","]=2;
-$1=_st($2).__comma(").");
-$ctx1.sendIdx[","]=1;
-_st($Transcript())._show_($1);
-$ctx1.sendIdx["show:"]=1;
+var $1;
 _st($Transcript())._show_("Type :q to exit.");
-$4=_st($Transcript())._cr();
+$1=_st($Transcript())._cr();
 return self}, function($ctx1) {$ctx1.fill(self,"printWelcome",{},globals.Repl)})},
 args: [],
-source: "printWelcome\x0a\x09Transcript show: 'Welcome to Amber version ', Smalltalk current version, ' (NodeJS ', process versions node, ').'.\x0a\x09Transcript show: 'Type :q to exit.'; cr.",
-messageSends: ["show:", ",", "version", "current", "node", "versions", "cr"],
-referencedClasses: ["Transcript", "Smalltalk"]
+source: "printWelcome\x0a\x09Transcript show: 'Type :q to exit.'; cr.",
+messageSends: ["show:", "cr"],
+referencedClasses: ["Transcript"]
 }),
 globals.Repl);
 
@@ -1931,6 +1950,7 @@ protocol: 'initialization',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
+var $receiver;
 _st(_st(process)._stdin())._on_do_("keypress",(function(s,key){
 return smalltalk.withContext(function($ctx2) {
 if(($receiver = key) == nil || $receiver == null){
@@ -1973,7 +1993,7 @@ protocol: 'private',
 fn: function (aClass){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$7,$6,$5,$4,$8,$1;
+var $3,$2,$7,$6,$5,$4,$8,$1,$receiver;
 $3=_st(aClass)._name();
 $ctx1.sendIdx["name"]=1;
 $2=_st($3)._matchesOf_("\x5cd+$");

+ 8 - 4
cli/src/AmberCli.st

@@ -56,7 +56,7 @@ selectorForCommandLineSwitch: aSwitch
 !AmberCli class methodsFor: 'commands'!
 
 help: args
-	console log: 'Available Commands:'.
+	Transcript show: 'Available commands'.
 	self commandLineSwitches do: [ :each | console log: each ]
 !
 
@@ -66,6 +66,9 @@ repl: args
 
 serve: args
 	^(FileServer createServerWithArguments: args) start
+!
+
+version: arguments
 ! !
 
 !AmberCli class methodsFor: 'startup'!
@@ -74,11 +77,13 @@ main
 	"Main entry point for Amber applications.
 	Parses commandline arguments and starts the according subprogram."
 	| args nodeMinorVersion |
+	
+	Transcript show: 'Welcome to Amber version ', Smalltalk version, ' (NodeJS ', process versions node, ').'.
 
 	nodeMinorVersion := ((process version) tokenize: '.') second asNumber.
 	nodeMinorVersion < 8 ifTrue: [
-		console log: 'You are currently using Node.js ', (process version).
-		console log: 'Required is at least Node.js v0.8.x or greater.'.
+		Transcript show: 'You are currently using Node.js ', (process version).
+		Transcript show: 'Required is at least Node.js v0.8.x or greater.'.
 		^ -1.
 	].
 
@@ -983,7 +988,6 @@ eval: buffer on: anObject
 !
 
 printWelcome
-	Transcript show: 'Welcome to Amber version ', Smalltalk current version, ' (NodeJS ', process versions node, ').'.
 	Transcript show: 'Type :q to exit.'; cr.
 !
 

File diff suppressed because it is too large
+ 510 - 136
cli/support/amber-cli.js


+ 2 - 2
src/Compiler-Interpreter.js

@@ -273,7 +273,7 @@ protocol: 'interpreting',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2,$4,$5,$receiver,$receiver;
+var $1,$3,$2,$4,$5,$receiver;
 $1=self._isBlockContext();
 if(smalltalk.assert($1)){
 $3=self._outerContext();
@@ -510,7 +510,7 @@ protocol: 'initialization',
 fn: function (aMethodContext){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4,$receiver,$receiver;
+var $1,$2,$3,$4,$receiver;
 self._evaluatedSelector_(_st(aMethodContext)._evaluatedSelector());
 self._index_(_st(aMethodContext)._index());
 self._sendIndexes_(_st(aMethodContext)._sendIndexes());

+ 1 - 1
src/Compiler-Semantic.js

@@ -299,7 +299,7 @@ fn: function (aNode){
 var self=this;
 var lookup;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$receiver,$receiver;
+var $1,$2,$3,$receiver;
 lookup=self._bindingFor_(aNode);
 $1=lookup;
 if(($receiver = $1) == nil || $receiver == null){

+ 1 - 1
src/Helios-Commands-Tools.js

@@ -625,7 +625,7 @@ protocol: 'defaults',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$4,$1,$receiver,$receiver;
+var $3,$2,$4,$1,$receiver;
 $3=self._model();
 $ctx1.sendIdx["model"]=1;
 $2=_st($3)._selectedMethod();

+ 3 - 3
src/Helios-Core.js

@@ -403,7 +403,7 @@ fn: function (){
 var self=this;
 var currentProtocol;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$3,$receiver,$receiver;
+var $1,$2,$4,$3,$receiver;
 currentProtocol=self._selectedProtocol();
 $1=currentProtocol;
 if(($receiver = $1) == nil || $receiver == null){
@@ -2528,7 +2528,7 @@ fn: function (anObject){
 var self=this;
 return self},
 args: ["anObject"],
-source: "reselectItem: anObject\x0a\x09",
+source: "reselectItem: anObject",
 messageSends: [],
 referencedClasses: []
 }),
@@ -3508,7 +3508,7 @@ var self=this;
 var parent,parentSmalltalkGlobals;
 function $Environment(){return globals.Environment||(typeof Environment=="undefined"?nil:Environment)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4,$5,$6,$7,$receiver,$receiver,$receiver;
+var $1,$2,$3,$4,$5,$6,$7,$receiver;
 $1=_st(window)._opener();
 if(($receiver = $1) == nil || $receiver == null){
 parent=_st(window)._parent();

+ 1 - 1
src/Helios-KeyBindings.js

@@ -2009,7 +2009,7 @@ protocol: 'events handling',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$receiver,$receiver;
+var $1,$2,$3,$receiver;
 $1=self._isKeyDown();
 if(smalltalk.assert($1)){
 self["@keyDown"]=false;

+ 3 - 3
src/IDE.js

@@ -2644,7 +2644,7 @@ fn: function (){
 var self=this;
 var klass;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4,$7,$8,$6,$9,$5,$receiver,$receiver,$receiver;
+var $1,$2,$3,$4,$7,$8,$6,$9,$5,$receiver;
 $1=_st(self["@selectedTab"]).__eq("comment");
 $ctx1.sendIdx["="]=1;
 if(smalltalk.assert($1)){
@@ -3816,7 +3816,7 @@ protocol: 'updating',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$receiver,$receiver;
+var $1,$2,$3,$receiver;
 $1=_st(_st(self["@sourceArea"])._val()).__eq(self._source());
 if(smalltalk.assert($1)){
 $2=self["@saveButton"];
@@ -4559,7 +4559,7 @@ protocol: 'updating',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$receiver,$receiver;
+var $1,$2,$3,$receiver;
 $1=_st(_st(self["@sourceArea"])._val()).__eq(self._source());
 if(smalltalk.assert($1)){
 $2=self["@saveButton"];

+ 1 - 1
src/Kernel-Classes.js

@@ -33,7 +33,7 @@ function $MethodAdded(){return globals.MethodAdded||(typeof MethodAdded=="undefi
 function $MethodModified(){return globals.MethodModified||(typeof MethodModified=="undefined"?nil:MethodModified)}
 function $SystemAnnouncer(){return globals.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1,$4,$5,$6,$7,$8,$9,$10,$11,$receiver,$receiver;
+var $2,$3,$1,$4,$5,$6,$7,$8,$9,$10,$11,$receiver;
 oldMethod=_st(self._methodDictionary())._at_ifAbsent_(_st(aMethod)._selector(),(function(){
 return nil;
 }));

+ 1 - 1
src/Kernel-Infrastructure.js

@@ -91,7 +91,7 @@ protocol: 'private',
 fn: function (aContext){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$receiver,$receiver;
+var $1,$receiver;
 if(($receiver = aContext) == nil || $receiver == null){
 aContext;
 } else {

+ 33 - 1
src/Kernel-Objects.js

@@ -631,7 +631,39 @@ $ctx1.sendIdx[","]=1;
 _st($1)._warn_($2);
 return self}, function($ctx1) {$ctx1.fill(self,"deprecatedAPI",{},globals.Object)})},
 args: [],
-source: "deprecatedAPI\x0a\x09\x22Just a simple way to deprecate methods.\x0a\x09#deprecatedAPI is in the 'error handling' protocol even if it doesn't throw an error,\x0a\x09but it could in the future.\x22\x0a\x09console warn: thisContext home asString, ' is deprecated! (in ', thisContext home home asString, ')'",
+source: "deprecatedAPI\x0a\x09\x22Just a simple way to deprecate methods.\x0a\x09#deprecatedAPI is in the 'error handling' protocol even if it doesn't throw an error,\x0a\x09but it could in the future.\x22\x0a\x09console warn: thisContext home asString, ' is deprecated! (in ', thisContext home home asString, ')'.",
+messageSends: ["warn:", ",", "asString", "home"],
+referencedClasses: []
+}),
+globals.Object);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "deprecatedAPI:",
+protocol: 'error handling',
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1,$6,$5,$4,$8,$7,$3,$2;
+$1=console;
+$6=smalltalk.getThisContext()._home();
+$ctx1.sendIdx["home"]=1;
+$5=_st($6)._asString();
+$ctx1.sendIdx["asString"]=1;
+$4=_st($5).__comma(" is deprecated! (in ");
+$8=_st(smalltalk.getThisContext()._home())._home();
+$ctx1.sendIdx["home"]=2;
+$7=_st($8)._asString();
+$3=_st($4).__comma($7);
+$ctx1.sendIdx[","]=2;
+$2=_st($3).__comma(")");
+$ctx1.sendIdx[","]=1;
+_st($1)._warn_($2);
+$ctx1.sendIdx["warn:"]=1;
+_st(console)._warn_(aString);
+return self}, function($ctx1) {$ctx1.fill(self,"deprecatedAPI:",{aString:aString},globals.Object)})},
+args: ["aString"],
+source: "deprecatedAPI: aString\x0a\x09\x22Just a simple way to deprecate methods.\x0a\x09#deprecatedAPI is in the 'error handling' protocol even if it doesn't throw an error,\x0a\x09but it could in the future.\x22\x0a\x09console warn: thisContext home asString, ' is deprecated! (in ', thisContext home home asString, ')'.\x0a\x09console warn: aString",
 messageSends: ["warn:", ",", "asString", "home"],
 referencedClasses: []
 }),

+ 9 - 1
src/Kernel-Objects.st

@@ -255,7 +255,15 @@ deprecatedAPI
 	"Just a simple way to deprecate methods.
 	#deprecatedAPI is in the 'error handling' protocol even if it doesn't throw an error,
 	but it could in the future."
-	console warn: thisContext home asString, ' is deprecated!! (in ', thisContext home home asString, ')'
+	console warn: thisContext home asString, ' is deprecated!! (in ', thisContext home home asString, ')'.
+!
+
+deprecatedAPI: aString
+	"Just a simple way to deprecate methods.
+	#deprecatedAPI is in the 'error handling' protocol even if it doesn't throw an error,
+	but it could in the future."
+	console warn: thisContext home asString, ' is deprecated!! (in ', thisContext home home asString, ')'.
+	console warn: aString
 !
 
 error: aString

+ 2 - 2
src/Kernel-Tests.js

@@ -7818,7 +7818,7 @@ fn: function (){
 var self=this;
 function $Object(){return globals.Object||(typeof Object=="undefined"?nil:Object)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$5,$4,$3,$7,$6,$9,$8,$11,$10,$receiver,$receiver,$receiver,$receiver;
+var $2,$1,$5,$4,$3,$7,$6,$9,$8,$11,$10,$receiver;
 $2=_st($Object())._new();
 $ctx1.sendIdx["new"]=1;
 $1=_st($2)._isNil();
@@ -8832,7 +8832,7 @@ protocol: 'tests',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2,$4,$6,$5,$receiver,$receiver,$receiver,$receiver;
+var $1,$3,$2,$4,$6,$5,$receiver;
 if(($receiver = nil) == nil || $receiver == null){
 $1=true;
 } else {

Some files were not shown because too many files changed in this diff