Browse Source

$vm -> $core

Herbert Vojčík 9 years ago
parent
commit
1381197e07

File diff suppressed because it is too large
+ 165 - 165
external/amber-cli/src/AmberCli.js


+ 45 - 45
src/Benchfib.js

@@ -1,20 +1,20 @@
 define("amber_core/Benchfib", ["amber/boot", "amber_core/Kernel-Objects"], function($boot){
-var $vm=$boot.vm,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
-var smalltalk=$vm,_st=$recv,globals=$globals;
-$vm.addPackage('Benchfib');
-$vm.packages["Benchfib"].transport = {"type":"amd","amdNamespace":"amber_core"};
+var $core=$boot.vm,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
+var smalltalk=$core,_st=$recv,globals=$globals;
+$core.addPackage('Benchfib');
+$core.packages["Benchfib"].transport = {"type":"amd","amdNamespace":"amber_core"};
 
-$vm.addClass('Benchfib', $globals.Object, [], 'Benchfib');
+$core.addClass('Benchfib', $globals.Object, [], 'Benchfib');
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "main",
 protocol: 'not yet classified',
 fn: function (){
 var self=this;
 var result;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 result=(0)._tinyBenchmarks();
 _st(console)._log_("0 tinyBenchmarks => ".__comma(result));
@@ -32,18 +32,18 @@ messageSends: ["tinyBenchmarks", "log:", ","]
 }),
 $globals.Benchfib.klass);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "benchFib",
 protocol: '*Benchfib',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 var $2,$5,$4,$3,$1;
 $2=self.__lt((2));
-if($vm.assert($2)){
+if($core.assert($2)){
 $1=(1);
 } else {
 $5=self.__minus((1));
@@ -74,8 +74,8 @@ messageSends: ["ifTrue:ifFalse:", "<", "+", "benchFib", "-"]
 }),
 $globals.Number);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "benchmark",
 protocol: '*Benchfib',
 fn: function (){
@@ -83,13 +83,13 @@ var self=this;
 var size,flags,prime,k,count;
 function $Array(){return $globals.Array||(typeof Array=="undefined"?nil:Array)}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 var $1,$2;
 size=(8190);
 (1)._to_do_(self,(function(iter){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx2) {
+return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
 count=(0);
 count;
@@ -97,7 +97,7 @@ flags=_st($Array())._new();
 flags;
 _st(size)._timesRepeat_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx3) {
+return $core.withContext(function($ctx3) {
 //>>excludeEnd("ctx");
 return _st(flags)._add_(true);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -106,10 +106,10 @@ return _st(flags)._add_(true);
 }));
 return (1)._to_do_(size,(function(i){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx3) {
+return $core.withContext(function($ctx3) {
 //>>excludeEnd("ctx");
 $1=_st(flags)._at_(i);
-if($vm.assert($1)){
+if($core.assert($1)){
 prime=_st(i).__plus((1));
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx3.sendIdx["+"]=1;
@@ -122,7 +122,7 @@ $ctx3.sendIdx["+"]=2;
 k;
 _st((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx4) {
+return $core.withContext(function($ctx4) {
 //>>excludeEnd("ctx");
 return _st(k).__lt_eq(size);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -130,7 +130,7 @@ return _st(k).__lt_eq(size);
 //>>excludeEnd("ctx");
 }))._whileTrue_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx4) {
+return $core.withContext(function($ctx4) {
 //>>excludeEnd("ctx");
 _st(flags)._at_put_(k,false);
 k=_st(k).__plus(prime);
@@ -171,14 +171,14 @@ messageSends: ["to:do:", "new", "timesRepeat:", "add:", "ifTrue:", "at:", "+", "
 }),
 $globals.Number);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "jsbenchFib",
 protocol: '*Benchfib',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 if (this < 2) {
 return 1;
@@ -198,14 +198,14 @@ messageSends: []
 }),
 $globals.Number);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "jsbenchmark",
 protocol: '*Benchfib',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 
 var size = 8190;
@@ -243,8 +243,8 @@ messageSends: []
 }),
 $globals.Number);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "jstinyBenchmarks",
 protocol: '*Benchfib',
 fn: function (){
@@ -252,17 +252,17 @@ var self=this;
 var t1,t2,r,n1,n2;
 function $Date(){return $globals.Date||(typeof Date=="undefined"?nil:Date)}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 var $7,$6,$5,$4,$3,$2,$1;
 n1=(1);
 _st((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx2) {
+return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
 t1=_st($Date())._millisecondsToRun_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx3) {
+return $core.withContext(function($ctx3) {
 //>>excludeEnd("ctx");
 return _st(n1)._jsbenchmark();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -282,7 +282,7 @@ $ctx2.sendIdx["<"]=1;
 //>>excludeEnd("ctx");
 }))._whileTrue_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx2) {
+return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
 n1=_st(n1).__star((2));
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -299,11 +299,11 @@ $ctx1.sendIdx["whileTrue:"]=1;
 n2=(28);
 _st((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx2) {
+return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
 t2=_st($Date())._millisecondsToRun_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx3) {
+return $core.withContext(function($ctx3) {
 //>>excludeEnd("ctx");
 r=_st(n2)._jsbenchFib();
 return r;
@@ -318,7 +318,7 @@ return _st(t2).__lt((1000));
 //>>excludeEnd("ctx");
 }))._whileTrue_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx2) {
+return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
 n2=_st(n2).__plus((1));
 return n2;
@@ -365,8 +365,8 @@ messageSends: ["whileTrue:", "millisecondsToRun:", "jsbenchmark", "<", "*", "jsb
 }),
 $globals.Number);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "tinyBenchmarks",
 protocol: '*Benchfib',
 fn: function (){
@@ -374,17 +374,17 @@ var self=this;
 var t1,t2,r,n1,n2;
 function $Date(){return $globals.Date||(typeof Date=="undefined"?nil:Date)}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 var $7,$6,$5,$4,$3,$2,$1;
 n1=(1);
 _st((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx2) {
+return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
 t1=_st($Date())._millisecondsToRun_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx3) {
+return $core.withContext(function($ctx3) {
 //>>excludeEnd("ctx");
 return _st(n1)._benchmark();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -404,7 +404,7 @@ $ctx2.sendIdx["<"]=1;
 //>>excludeEnd("ctx");
 }))._whileTrue_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx2) {
+return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
 n1=_st(n1).__star((2));
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -421,11 +421,11 @@ $ctx1.sendIdx["whileTrue:"]=1;
 n2=(16);
 _st((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx2) {
+return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
 t2=_st($Date())._millisecondsToRun_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx3) {
+return $core.withContext(function($ctx3) {
 //>>excludeEnd("ctx");
 r=_st(n2)._benchFib();
 return r;
@@ -440,7 +440,7 @@ return _st(t2).__lt((1000));
 //>>excludeEnd("ctx");
 }))._whileTrue_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx2) {
+return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
 n2=_st(n2).__plus((1));
 return n2;

File diff suppressed because it is too large
+ 170 - 170
src/Compiler-AST.js


File diff suppressed because it is too large
+ 168 - 168
src/Compiler-Core.js


+ 39 - 39
src/Compiler-Exceptions.js

@@ -1,45 +1,45 @@
 define("amber_core/Compiler-Exceptions", ["amber/boot", "amber_core/Kernel-Exceptions", "amber_core/Kernel-Objects"], function($boot){
-var $vm=$boot.vm,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
-var smalltalk=$vm,_st=$recv,globals=$globals;
-$vm.addPackage('Compiler-Exceptions');
-$vm.packages["Compiler-Exceptions"].transport = {"type":"amd","amdNamespace":"amber_core"};
+var $core=$boot.vm,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
+var smalltalk=$core,_st=$recv,globals=$globals;
+$core.addPackage('Compiler-Exceptions');
+$core.packages["Compiler-Exceptions"].transport = {"type":"amd","amdNamespace":"amber_core"};
 
-$vm.addClass('CompilerError', $globals.Error, [], 'Compiler-Exceptions');
+$core.addClass('CompilerError', $globals.Error, [], 'Compiler-Exceptions');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.CompilerError.comment="I am the common superclass of all compiling errors.";
 //>>excludeEnd("ide");
 
 
-$vm.addClass('ParseError', $globals.CompilerError, [], 'Compiler-Exceptions');
+$core.addClass('ParseError', $globals.CompilerError, [], 'Compiler-Exceptions');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ParseError.comment="Instance of ParseError are signaled on any parsing error.\x0aSee `Smalltalk >> #parse:`";
 //>>excludeEnd("ide");
 
 
-$vm.addClass('SemanticError', $globals.CompilerError, [], 'Compiler-Exceptions');
+$core.addClass('SemanticError', $globals.CompilerError, [], 'Compiler-Exceptions');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.SemanticError.comment="I represent an abstract semantic error thrown by the SemanticAnalyzer.\x0aSemantic errors can be unknown variable errors, etc.\x0aSee my subclasses for concrete errors.\x0a\x0aThe IDE should catch instances of Semantic error to deal with them when compiling";
 //>>excludeEnd("ide");
 
 
-$vm.addClass('InliningError', $globals.SemanticError, [], 'Compiler-Exceptions');
+$core.addClass('InliningError', $globals.SemanticError, [], 'Compiler-Exceptions');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.InliningError.comment="Instances of InliningError are signaled when using an `InliningCodeGenerator`in a `Compiler`.";
 //>>excludeEnd("ide");
 
 
-$vm.addClass('InvalidAssignmentError', $globals.SemanticError, ['variableName'], 'Compiler-Exceptions');
+$core.addClass('InvalidAssignmentError', $globals.SemanticError, ['variableName'], 'Compiler-Exceptions');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.InvalidAssignmentError.comment="I get signaled when a pseudo variable gets assigned.";
 //>>excludeEnd("ide");
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "messageText",
 protocol: 'accessing',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 var $1;
 $1=" Invalid assignment to variable: ".__comma(self._variableName());
@@ -57,8 +57,8 @@ messageSends: [",", "variableName"]
 }),
 $globals.InvalidAssignmentError);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "variableName",
 protocol: 'accessing',
 fn: function (){
@@ -77,8 +77,8 @@ messageSends: []
 }),
 $globals.InvalidAssignmentError);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "variableName:",
 protocol: 'accessing',
 fn: function (aString){
@@ -98,18 +98,18 @@ $globals.InvalidAssignmentError);
 
 
 
-$vm.addClass('ShadowingVariableError', $globals.SemanticError, ['variableName'], 'Compiler-Exceptions');
+$core.addClass('ShadowingVariableError', $globals.SemanticError, ['variableName'], 'Compiler-Exceptions');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ShadowingVariableError.comment="I get signaled when a variable in a block or method scope shadows a variable of the same name in an outer scope.";
 //>>excludeEnd("ide");
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "messageText",
 protocol: 'accessing',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 var $1;
 $1=_st("Variable shadowing error: ".__comma(self._variableName())).__comma(" is already defined");
@@ -130,8 +130,8 @@ messageSends: [",", "variableName"]
 }),
 $globals.ShadowingVariableError);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "variableName",
 protocol: 'accessing',
 fn: function (){
@@ -150,8 +150,8 @@ messageSends: []
 }),
 $globals.ShadowingVariableError);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "variableName:",
 protocol: 'accessing',
 fn: function (aString){
@@ -171,18 +171,18 @@ $globals.ShadowingVariableError);
 
 
 
-$vm.addClass('UnknownVariableError', $globals.SemanticError, ['variableName'], 'Compiler-Exceptions');
+$core.addClass('UnknownVariableError', $globals.SemanticError, ['variableName'], 'Compiler-Exceptions');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.UnknownVariableError.comment="I get signaled when a variable is not defined.\x0aThe default behavior is to allow it, as this is how Amber currently is able to seamlessly send messages to JavaScript objects.";
 //>>excludeEnd("ide");
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "messageText",
 protocol: 'accessing',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 var $1;
 $1=_st("Unknown Variable error: ".__comma(self._variableName())).__comma(" is not defined");
@@ -203,8 +203,8 @@ messageSends: [",", "variableName"]
 }),
 $globals.UnknownVariableError);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "variableName",
 protocol: 'accessing',
 fn: function (){
@@ -223,8 +223,8 @@ messageSends: []
 }),
 $globals.UnknownVariableError);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "variableName:",
 protocol: 'accessing',
 fn: function (aString){
@@ -244,18 +244,18 @@ $globals.UnknownVariableError);
 
 
 
-$vm.addClass('RethrowErrorHandler', $globals.Object, [], 'Compiler-Exceptions');
+$core.addClass('RethrowErrorHandler', $globals.Object, [], 'Compiler-Exceptions');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.RethrowErrorHandler.comment="This class is used in the commandline version of the compiler.\x0aIt uses the handleError: message of ErrorHandler for printing the stacktrace and throws the error again as JS exception.\x0aAs a result Smalltalk errors are not swallowd by the Amber runtime and compilation can be aborted.";
 //>>excludeEnd("ide");
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "basicSignal:",
 protocol: 'error handling',
 fn: function (anError){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 throw anError;
 return self;
@@ -272,14 +272,14 @@ messageSends: []
 }),
 $globals.RethrowErrorHandler);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "handleError:",
 protocol: 'error handling',
 fn: function (anError){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 self._basicSignal_(anError);
 return self;

File diff suppressed because it is too large
+ 163 - 163
src/Compiler-IR.js


+ 5 - 5
src/Compiler-IR.st

@@ -1034,7 +1034,7 @@ visitIRValue: anIRValue
 
 visitIRVariable: anIRVariable
 	anIRVariable variable name = 'thisContext'
-		ifTrue: [ self stream nextPutAll: '$vm.getThisContext()' ]
+		ifTrue: [ self stream nextPutAll: '$core.getThisContext()' ]
 		ifFalse: [ self stream nextPutAll: anIRVariable variable alias ]
 !
 
@@ -1122,7 +1122,7 @@ nextPutBlockContextFor: anIRClosure during: aBlock
 	self
 		nextPutAll: '//>>excludeStart("ctx", pragmas.excludeDebugContexts);';
 		lf;
-		nextPutAll: 'return $vm.withContext(function(', anIRClosure scope alias, ') {';
+		nextPutAll: 'return $core.withContext(function(', anIRClosure scope alias, ') {';
 		lf;
 		nextPutAll: '//>>excludeEnd("ctx");';
 		lf.
@@ -1183,7 +1183,7 @@ nextPutContextFor: aMethod during: aBlock
 	self
 		nextPutAll: '//>>excludeStart("ctx", pragmas.excludeDebugContexts);';
 		lf;
-		nextPutAll: 'return $vm.withContext(function(', aMethod scope alias, ') { ';
+		nextPutAll: 'return $core.withContext(function(', aMethod scope alias, ') { ';
 		lf;
 		nextPutAll: '//>>excludeEnd("ctx");';
 		lf.
@@ -1243,7 +1243,7 @@ nextPutIfElse: aBlock with: ifBlock with: elseBlock
 
 nextPutMethodDeclaration: aMethod with: aBlock
 	stream
-		nextPutAll: '$vm.method({'; lf;
+		nextPutAll: '$core.method({'; lf;
 		nextPutAll: 'selector: ', aMethod selector asJavascript, ','; lf;
 		nextPutAll: 'source: ', aMethod source asJavascript, ',';lf.
 	aBlock value.
@@ -1300,7 +1300,7 @@ nextPutSendIndexFor: anIRSend
 
 nextPutSequenceWith: aBlock
 	"stream
-		nextPutAll: 'switch($vm.thisContext.pc){'; lf."
+		nextPutAll: 'switch($core.thisContext.pc){'; lf."
 	aBlock value.
 	"stream
 		nextPutAll: '};'; lf"

File diff suppressed because it is too large
+ 163 - 163
src/Compiler-Inlining.js


+ 4 - 4
src/Compiler-Inlining.st

@@ -270,7 +270,7 @@ visitIRInlinedClosure: anIRInlinedClosure
 
 visitIRInlinedIfFalse: anIRInlinedIfFalse
 	self stream nextPutIf: [
-		self stream nextPutAll: '!!$vm.assert('.
+		self stream nextPutAll: '!!$core.assert('.
 		self visit: anIRInlinedIfFalse instructions first.
 		self stream nextPutAll: ')' ]
 		with: [ self visit: anIRInlinedIfFalse instructions last ]
@@ -288,7 +288,7 @@ visitIRInlinedIfNilIfNotNil: anIRInlinedIfNilIfNotNil
 
 visitIRInlinedIfTrue: anIRInlinedIfTrue
 	self stream nextPutIf: [
-		self stream nextPutAll: '$vm.assert('.
+		self stream nextPutAll: '$core.assert('.
 		self visit: anIRInlinedIfTrue instructions first.
 		self stream nextPutAll: ')' ]
 		with: [ self visit: anIRInlinedIfTrue instructions last ]
@@ -297,7 +297,7 @@ visitIRInlinedIfTrue: anIRInlinedIfTrue
 visitIRInlinedIfTrueIfFalse: anIRInlinedIfTrueIfFalse
 	self stream
 		nextPutIfElse: [
-			self stream nextPutAll: '$vm.assert('.
+			self stream nextPutAll: '$core.assert('.
 			self visit: anIRInlinedIfTrueIfFalse instructions first.
 			self stream nextPutAll: ')' ]
 		with: [ self visit: anIRInlinedIfTrueIfFalse instructions second ]
@@ -523,7 +523,7 @@ I inline message sends together with assignments by moving them around into the
 
 Will produce:
 
-	if($vm.assert(true) {
+	if($core.assert(true) {
 		a = 1;
 	};!
 

File diff suppressed because it is too large
+ 169 - 169
src/Compiler-Interpreter.js


File diff suppressed because it is too large
+ 173 - 173
src/Compiler-Semantic.js


File diff suppressed because it is too large
+ 169 - 169
src/Compiler-Tests.js


+ 24 - 24
src/Examples.js

@@ -1,26 +1,26 @@
 define("amber_core/Examples", ["amber/boot", "amber_core/Web"], function($boot){
-var $vm=$boot.vm,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
-var smalltalk=$vm,_st=$recv,globals=$globals;
-$vm.addPackage('Examples');
-$vm.packages["Examples"].transport = {"type":"amd","amdNamespace":"amber_core"};
+var $core=$boot.vm,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
+var smalltalk=$core,_st=$recv,globals=$globals;
+$core.addPackage('Examples');
+$core.packages["Examples"].transport = {"type":"amd","amdNamespace":"amber_core"};
 
-$vm.addClass('Counter', $globals.Widget, ['count', 'header'], 'Examples');
+$core.addClass('Counter', $globals.Widget, ['count', 'header'], 'Examples');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Counter.comment="This is a trivial Widget example mimicking the classic Counter example in Seaside.\x0aIn order to play with it, just evaluate the doit below in a workspace.\x0aThen take a look in the HTML document above the IDE.\x0a\x0a\x09\x09Counter tryExample";
 //>>excludeEnd("ide");
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "decrease",
 protocol: 'actions',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 self["@count"]=_st(self["@count"]).__minus((1));
 _st(self["@header"])._contents_((function(html){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx2) {
+return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
 return _st(html)._with_(_st(self["@count"])._asString());
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -41,19 +41,19 @@ messageSends: ["-", "contents:", "with:", "asString"]
 }),
 $globals.Counter);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "increase",
 protocol: 'actions',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 self["@count"]=_st(self["@count"]).__plus((1));
 _st(self["@header"])._contents_((function(html){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx2) {
+return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
 return _st(html)._with_(_st(self["@count"])._asString());
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -74,14 +74,14 @@ messageSends: ["+", "contents:", "with:", "asString"]
 }),
 $globals.Counter);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "initialize",
 protocol: 'initialization',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 (
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -106,14 +106,14 @@ messageSends: ["initialize"]
 }),
 $globals.Counter);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "renderOn:",
 protocol: 'rendering',
 fn: function (html){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 var $1,$2,$3,$4,$5,$6;
 $1=_st(html)._h1();
@@ -133,7 +133,7 @@ $ctx1.sendIdx["with:"]=2;
 //>>excludeEnd("ctx");
 $4=_st($3)._onClick_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx2) {
+return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
 return self._increase();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -147,7 +147,7 @@ $5=_st(html)._button();
 _st($5)._with_("--");
 $6=_st($5)._onClick_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx2) {
+return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
 return self._decrease();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -169,14 +169,14 @@ messageSends: ["with:", "h1", "asString", "yourself", "button", "onClick:", "inc
 $globals.Counter);
 
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "tryExample",
 protocol: 'example',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 _st(self._new())._appendToJQuery_("body"._asJQuery());
 return self;

File diff suppressed because it is too large
+ 170 - 170
src/IDE.js


+ 140 - 140
src/Kernel-Announcements.js

@@ -1,15 +1,15 @@
 define("amber_core/Kernel-Announcements", ["amber/boot", "amber_core/Kernel-Objects"], function($boot){
-var $vm=$boot.vm,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
-var smalltalk=$vm,_st=$recv,globals=$globals;
-$vm.addPackage('Kernel-Announcements');
-$vm.packages["Kernel-Announcements"].transport = {"type":"amd","amdNamespace":"amber_core"};
+var $core=$boot.vm,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
+var smalltalk=$core,_st=$recv,globals=$globals;
+$core.addPackage('Kernel-Announcements');
+$core.packages["Kernel-Announcements"].transport = {"type":"amd","amdNamespace":"amber_core"};
 
-$vm.addClass('AnnouncementSubscription', $globals.Object, ['valuable', 'announcementClass'], 'Kernel-Announcements');
+$core.addClass('AnnouncementSubscription', $globals.Object, ['valuable', 'announcementClass'], 'Kernel-Announcements');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.AnnouncementSubscription.comment="I am a single entry in a subscription registry of an `Announcer`.\x0aSeveral subscriptions by the same object is possible.";
 //>>excludeEnd("ide");
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "announcementClass",
 protocol: 'accessing',
 fn: function (){
@@ -28,8 +28,8 @@ messageSends: []
 }),
 $globals.AnnouncementSubscription);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "announcementClass:",
 protocol: 'accessing',
 fn: function (aClass){
@@ -47,14 +47,14 @@ messageSends: []
 }),
 $globals.AnnouncementSubscription);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "block",
 protocol: 'accessing',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 var $1;
 self._deprecatedAPI();
@@ -73,14 +73,14 @@ messageSends: ["deprecatedAPI", "valuable"]
 }),
 $globals.AnnouncementSubscription);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "block:",
 protocol: 'accessing',
 fn: function (aValuable){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 self._deprecatedAPI();
 self._valuable_(aValuable);
@@ -98,18 +98,18 @@ messageSends: ["deprecatedAPI", "valuable:"]
 }),
 $globals.AnnouncementSubscription);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "deliver:",
 protocol: 'announcing',
 fn: function (anAnnouncement){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 var $1;
 $1=self._handlesAnnouncement_(anAnnouncement);
-if($vm.assert($1)){
+if($core.assert($1)){
 _st(self._valuable())._value_(anAnnouncement);
 };
 return self;
@@ -126,15 +126,15 @@ messageSends: ["ifTrue:", "handlesAnnouncement:", "value:", "valuable"]
 }),
 $globals.AnnouncementSubscription);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "handlesAnnouncement:",
 protocol: 'announcing',
 fn: function (anAnnouncement){
 var self=this;
 function $Smalltalk(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 var $3,$4,$2,$1,$receiver;
 $3=_st($Smalltalk())._globals();
@@ -170,14 +170,14 @@ messageSends: ["ifNil:ifNotNil:", "at:", "globals", "name", "announcementClass",
 }),
 $globals.AnnouncementSubscription);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "receiver",
 protocol: 'accessing',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 var $1;
 $1=_st(self._valuable())._receiver();
@@ -195,8 +195,8 @@ messageSends: ["receiver", "valuable"]
 }),
 $globals.AnnouncementSubscription);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "valuable",
 protocol: 'accessing',
 fn: function (){
@@ -215,8 +215,8 @@ messageSends: []
 }),
 $globals.AnnouncementSubscription);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "valuable:",
 protocol: 'accessing',
 fn: function (aValuable){
@@ -236,12 +236,12 @@ $globals.AnnouncementSubscription);
 
 
 
-$vm.addClass('AnnouncementValuable', $globals.Object, ['valuable', 'receiver'], 'Kernel-Announcements');
+$core.addClass('AnnouncementValuable', $globals.Object, ['valuable', 'receiver'], 'Kernel-Announcements');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.AnnouncementValuable.comment="I wrap `valuable` objects (typically instances of `BlockClosure`) with a `receiver` to be able to unregister subscriptions based on a `receiver`.";
 //>>excludeEnd("ide");
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "receiver",
 protocol: 'accessing',
 fn: function (){
@@ -260,8 +260,8 @@ messageSends: []
 }),
 $globals.AnnouncementValuable);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "receiver:",
 protocol: 'accessing',
 fn: function (anObject){
@@ -279,8 +279,8 @@ messageSends: []
 }),
 $globals.AnnouncementValuable);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "valuable",
 protocol: 'accessing',
 fn: function (){
@@ -299,8 +299,8 @@ messageSends: []
 }),
 $globals.AnnouncementValuable);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "valuable:",
 protocol: 'accessing',
 fn: function (anObject){
@@ -318,14 +318,14 @@ messageSends: []
 }),
 $globals.AnnouncementValuable);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "value",
 protocol: 'evaluating',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 var $1;
 $1=_st(self._valuable())._value();
@@ -343,14 +343,14 @@ messageSends: ["value", "valuable"]
 }),
 $globals.AnnouncementValuable);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "value:",
 protocol: 'evaluating',
 fn: function (anObject){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 var $1;
 $1=_st(self._valuable())._value_(anObject);
@@ -370,22 +370,22 @@ $globals.AnnouncementValuable);
 
 
 
-$vm.addClass('Announcer', $globals.Object, ['registry', 'subscriptions'], 'Kernel-Announcements');
+$core.addClass('Announcer', $globals.Object, ['registry', 'subscriptions'], 'Kernel-Announcements');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Announcer.comment="I hold annoncement subscriptions (instances of `AnnouncementSubscription`) in a private registry.\x0aI announce (trigger) announces, which are then dispatched to all subscriptions.\x0a\x0aThe code is based on the announcements as [described by Vassili Bykov](http://www.cincomsmalltalk.com/userblogs/vbykov/blogView?searchCategory=Announcements%20Framework).\x0a\x0a## API\x0a\x0aUse `#announce:` to trigger an announcement.\x0a\x0aUse `#on:do:` or `#on:send:to:` to register subscriptions.\x0a\x0aWhen using `#on:send:to:`, unregistration can be done with `#unregister:`.\x0a\x0a## Usage example:\x0a\x0a    SystemAnnouncer current\x0a        on: ClassAdded\x0a        do: [ :ann | window alert: ann theClass name, ' added' ].";
 //>>excludeEnd("ide");
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "announce:",
 protocol: 'announcing',
 fn: function (anAnnouncement){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 _st(self["@subscriptions"])._do_((function(each){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx2) {
+return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
 return _st(each)._deliver_(anAnnouncement);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -406,15 +406,15 @@ messageSends: ["do:", "deliver:"]
 }),
 $globals.Announcer);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "initialize",
 protocol: 'initialization',
 fn: function (){
 var self=this;
 function $OrderedCollection(){return $globals.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 (
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -439,14 +439,14 @@ messageSends: ["initialize", "new"]
 }),
 $globals.Announcer);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "on:do:",
 protocol: 'subscribing',
 fn: function (aClass,aBlock){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 self._on_do_for_(aClass,aBlock,nil);
 return self;
@@ -463,8 +463,8 @@ messageSends: ["on:do:for:"]
 }),
 $globals.Announcer);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "on:do:for:",
 protocol: 'subscribing',
 fn: function (aClass,aBlock,aReceiver){
@@ -472,7 +472,7 @@ var self=this;
 function $AnnouncementSubscription(){return $globals.AnnouncementSubscription||(typeof AnnouncementSubscription=="undefined"?nil:AnnouncementSubscription)}
 function $AnnouncementValuable(){return $globals.AnnouncementValuable||(typeof AnnouncementValuable=="undefined"?nil:AnnouncementValuable)}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 var $1,$3,$4,$6,$7,$5,$8,$2;
 $1=self["@subscriptions"];
@@ -511,8 +511,8 @@ messageSends: ["add:", "valuable:", "new", "receiver:", "yourself", "announcemen
 }),
 $globals.Announcer);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "on:doOnce:",
 protocol: 'subscribing',
 fn: function (aClass,aBlock){
@@ -520,7 +520,7 @@ var self=this;
 var subscription;
 function $AnnouncementSubscription(){return $globals.AnnouncementSubscription||(typeof AnnouncementSubscription=="undefined"?nil:AnnouncementSubscription)}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 var $1,$2;
 $1=_st($AnnouncementSubscription())._new();
@@ -529,7 +529,7 @@ $2=_st($1)._yourself();
 subscription=$2;
 _st(subscription)._valuable_((function(ann){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx2) {
+return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
 _st(self["@subscriptions"])._remove_(subscription);
 return _st(aBlock)._value_(ann);
@@ -552,8 +552,8 @@ messageSends: ["announcementClass:", "new", "yourself", "valuable:", "remove:",
 }),
 $globals.Announcer);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "on:send:to:",
 protocol: 'subscribing',
 fn: function (aClass,aSelector,anObject){
@@ -561,7 +561,7 @@ var self=this;
 function $AnnouncementSubscription(){return $globals.AnnouncementSubscription||(typeof AnnouncementSubscription=="undefined"?nil:AnnouncementSubscription)}
 function $MessageSend(){return $globals.MessageSend||(typeof MessageSend=="undefined"?nil:MessageSend)}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 var $1,$3,$4,$6,$7,$5,$8,$2;
 $1=self["@subscriptions"];
@@ -597,18 +597,18 @@ messageSends: ["add:", "valuable:", "new", "receiver:", "selector:", "yourself",
 }),
 $globals.Announcer);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "unsubscribe:",
 protocol: 'subscribing',
 fn: function (anObject){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 self["@subscriptions"]=_st(self["@subscriptions"])._reject_((function(each){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx2) {
+return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
 return _st(_st(each)._receiver()).__eq(anObject);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -631,20 +631,20 @@ $globals.Announcer);
 
 
 
-$vm.addClass('SystemAnnouncer', $globals.Announcer, [], 'Kernel-Announcements');
+$core.addClass('SystemAnnouncer', $globals.Announcer, [], 'Kernel-Announcements');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.SystemAnnouncer.comment="My unique instance is the global announcer handling all Amber system-related announces.\x0a\x0a## API\x0a\x0aAccess to the unique instance is done via `#current`";
 //>>excludeEnd("ide");
 
 $globals.SystemAnnouncer.klass.iVarNames = ['current'];
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "current",
 protocol: 'accessing',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 var $2,$1,$receiver;
 $2=self["@current"];
@@ -675,14 +675,14 @@ messageSends: ["ifNil:", "new"]
 }),
 $globals.SystemAnnouncer.klass);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "new",
 protocol: 'instance creation',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 self._shouldNotImplement();
 return self;
@@ -700,13 +700,13 @@ messageSends: ["shouldNotImplement"]
 $globals.SystemAnnouncer.klass);
 
 
-$vm.addClass('SystemAnnouncement', $globals.Object, [], 'Kernel-Announcements');
+$core.addClass('SystemAnnouncement', $globals.Object, [], 'Kernel-Announcements');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.SystemAnnouncement.comment="I am the superclass of all system announcements";
 //>>excludeEnd("ide");
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "heliosClass",
 protocol: 'helios',
 fn: function (){
@@ -724,12 +724,12 @@ messageSends: []
 $globals.SystemAnnouncement.klass);
 
 
-$vm.addClass('ClassAnnouncement', $globals.SystemAnnouncement, ['theClass'], 'Kernel-Announcements');
+$core.addClass('ClassAnnouncement', $globals.SystemAnnouncement, ['theClass'], 'Kernel-Announcements');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ClassAnnouncement.comment="I am the abstract superclass of class-related announcements.";
 //>>excludeEnd("ide");
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "theClass",
 protocol: 'accessing',
 fn: function (){
@@ -748,8 +748,8 @@ messageSends: []
 }),
 $globals.ClassAnnouncement);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "theClass:",
 protocol: 'accessing',
 fn: function (aClass){
@@ -769,30 +769,30 @@ $globals.ClassAnnouncement);
 
 
 
-$vm.addClass('ClassAdded', $globals.ClassAnnouncement, [], 'Kernel-Announcements');
+$core.addClass('ClassAdded', $globals.ClassAnnouncement, [], 'Kernel-Announcements');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ClassAdded.comment="I am emitted when a class is added to the system.\x0aSee ClassBuilder >> #addSubclassOf:... methods";
 //>>excludeEnd("ide");
 
 
-$vm.addClass('ClassCommentChanged', $globals.ClassAnnouncement, [], 'Kernel-Announcements');
+$core.addClass('ClassCommentChanged', $globals.ClassAnnouncement, [], 'Kernel-Announcements');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ClassCommentChanged.comment="I am emitted when the comment of a class changes. (Behavior >> #comment)";
 //>>excludeEnd("ide");
 
 
-$vm.addClass('ClassDefinitionChanged', $globals.ClassAnnouncement, [], 'Kernel-Announcements');
+$core.addClass('ClassDefinitionChanged', $globals.ClassAnnouncement, [], 'Kernel-Announcements');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ClassDefinitionChanged.comment="I am emitted when the definition of a class changes.\x0aSee ClassBuilder >> #class:instanceVariableNames:";
 //>>excludeEnd("ide");
 
 
-$vm.addClass('ClassMigrated', $globals.ClassAnnouncement, ['oldClass'], 'Kernel-Announcements');
+$core.addClass('ClassMigrated', $globals.ClassAnnouncement, ['oldClass'], 'Kernel-Announcements');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ClassMigrated.comment="I am emitted when a class is migrated.";
 //>>excludeEnd("ide");
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "oldClass",
 protocol: 'accessing',
 fn: function (){
@@ -811,8 +811,8 @@ messageSends: []
 }),
 $globals.ClassMigrated);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "oldClass:",
 protocol: 'accessing',
 fn: function (aClass){
@@ -832,12 +832,12 @@ $globals.ClassMigrated);
 
 
 
-$vm.addClass('ClassMoved', $globals.ClassAnnouncement, ['oldPackage'], 'Kernel-Announcements');
+$core.addClass('ClassMoved', $globals.ClassAnnouncement, ['oldPackage'], 'Kernel-Announcements');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ClassMoved.comment="I am emitted when a class is moved from one package to another.";
 //>>excludeEnd("ide");
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "oldPackage",
 protocol: 'accessing',
 fn: function (){
@@ -856,8 +856,8 @@ messageSends: []
 }),
 $globals.ClassMoved);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "oldPackage:",
 protocol: 'accessing',
 fn: function (aPackage){
@@ -877,24 +877,24 @@ $globals.ClassMoved);
 
 
 
-$vm.addClass('ClassRemoved', $globals.ClassAnnouncement, [], 'Kernel-Announcements');
+$core.addClass('ClassRemoved', $globals.ClassAnnouncement, [], 'Kernel-Announcements');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ClassRemoved.comment="I am emitted when a class is removed.\x0aSee Smalltalk >> #removeClass:";
 //>>excludeEnd("ide");
 
 
-$vm.addClass('ClassRenamed', $globals.ClassAnnouncement, [], 'Kernel-Announcements');
+$core.addClass('ClassRenamed', $globals.ClassAnnouncement, [], 'Kernel-Announcements');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ClassRenamed.comment="I am emitted when a class is renamed.\x0aSee ClassBuilder >> #renameClass:to:";
 //>>excludeEnd("ide");
 
 
-$vm.addClass('MethodAnnouncement', $globals.SystemAnnouncement, ['method'], 'Kernel-Announcements');
+$core.addClass('MethodAnnouncement', $globals.SystemAnnouncement, ['method'], 'Kernel-Announcements');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.MethodAnnouncement.comment="I am the abstract superclass of method-related announcements.";
 //>>excludeEnd("ide");
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "method",
 protocol: 'accessing',
 fn: function (){
@@ -913,8 +913,8 @@ messageSends: []
 }),
 $globals.MethodAnnouncement);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "method:",
 protocol: 'accessing',
 fn: function (aCompiledMethod){
@@ -934,18 +934,18 @@ $globals.MethodAnnouncement);
 
 
 
-$vm.addClass('MethodAdded', $globals.MethodAnnouncement, [], 'Kernel-Announcements');
+$core.addClass('MethodAdded', $globals.MethodAnnouncement, [], 'Kernel-Announcements');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.MethodAdded.comment="I am emitted when a `CompiledMethod` is added to a class.";
 //>>excludeEnd("ide");
 
 
-$vm.addClass('MethodModified', $globals.MethodAnnouncement, ['oldMethod'], 'Kernel-Announcements');
+$core.addClass('MethodModified', $globals.MethodAnnouncement, ['oldMethod'], 'Kernel-Announcements');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.MethodModified.comment="I am emitted when a `CompiledMethod` is modified (a new method is installed). I hold a reference to the old method being replaced.";
 //>>excludeEnd("ide");
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "oldMethod",
 protocol: 'accessing',
 fn: function (){
@@ -964,8 +964,8 @@ messageSends: []
 }),
 $globals.MethodModified);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "oldMethod:",
 protocol: 'accessing',
 fn: function (aMethod){
@@ -985,12 +985,12 @@ $globals.MethodModified);
 
 
 
-$vm.addClass('MethodMoved', $globals.MethodAnnouncement, ['oldProtocol'], 'Kernel-Announcements');
+$core.addClass('MethodMoved', $globals.MethodAnnouncement, ['oldProtocol'], 'Kernel-Announcements');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.MethodMoved.comment="I am emitted when a `CompiledMethod` is moved to another protocol. I hold a refernce to the old protocol of the method.";
 //>>excludeEnd("ide");
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "oldProtocol",
 protocol: 'accessing',
 fn: function (){
@@ -1009,8 +1009,8 @@ messageSends: []
 }),
 $globals.MethodMoved);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "oldProtocol:",
 protocol: 'accessing',
 fn: function (aString){
@@ -1030,18 +1030,18 @@ $globals.MethodMoved);
 
 
 
-$vm.addClass('MethodRemoved', $globals.MethodAnnouncement, [], 'Kernel-Announcements');
+$core.addClass('MethodRemoved', $globals.MethodAnnouncement, [], 'Kernel-Announcements');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.MethodRemoved.comment="I am emitted when a `CompiledMethod` is removed from a class.";
 //>>excludeEnd("ide");
 
 
-$vm.addClass('PackageAnnouncement', $globals.SystemAnnouncement, ['package'], 'Kernel-Announcements');
+$core.addClass('PackageAnnouncement', $globals.SystemAnnouncement, ['package'], 'Kernel-Announcements');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.PackageAnnouncement.comment="I am the abstract superclass of package-related announcements.";
 //>>excludeEnd("ide");
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "package",
 protocol: 'accessing',
 fn: function (){
@@ -1060,8 +1060,8 @@ messageSends: []
 }),
 $globals.PackageAnnouncement);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "package:",
 protocol: 'accessing',
 fn: function (aPackage){
@@ -1081,43 +1081,43 @@ $globals.PackageAnnouncement);
 
 
 
-$vm.addClass('PackageAdded', $globals.PackageAnnouncement, [], 'Kernel-Announcements');
+$core.addClass('PackageAdded', $globals.PackageAnnouncement, [], 'Kernel-Announcements');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.PackageAdded.comment="I am emitted when a `Package` is added to the system.";
 //>>excludeEnd("ide");
 
 
-$vm.addClass('PackageClean', $globals.PackageAnnouncement, [], 'Kernel-Announcements');
+$core.addClass('PackageClean', $globals.PackageAnnouncement, [], 'Kernel-Announcements');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.PackageClean.comment="I am emitted when a package is committed and becomes clean.";
 //>>excludeEnd("ide");
 
 
-$vm.addClass('PackageDirty', $globals.PackageAnnouncement, [], 'Kernel-Announcements');
+$core.addClass('PackageDirty', $globals.PackageAnnouncement, [], 'Kernel-Announcements');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.PackageDirty.comment="I am emitted when a package becomes dirty.";
 //>>excludeEnd("ide");
 
 
-$vm.addClass('PackageRemoved', $globals.PackageAnnouncement, [], 'Kernel-Announcements');
+$core.addClass('PackageRemoved', $globals.PackageAnnouncement, [], 'Kernel-Announcements');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.PackageRemoved.comment="I am emitted when a `Package` is removed from the system.";
 //>>excludeEnd("ide");
 
 
-$vm.addClass('ProtocolAnnouncement', $globals.SystemAnnouncement, ['theClass', 'protocol'], 'Kernel-Announcements');
+$core.addClass('ProtocolAnnouncement', $globals.SystemAnnouncement, ['theClass', 'protocol'], 'Kernel-Announcements');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ProtocolAnnouncement.comment="I am the abstract superclass of protocol-related announcements.";
 //>>excludeEnd("ide");
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "package",
 protocol: 'accessing',
 fn: function (){
 var self=this;
 function $Package(){return $globals.Package||(typeof Package=="undefined"?nil:Package)}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 var $2,$1,$3,$4;
 $2=self._protocol();
@@ -1125,7 +1125,7 @@ $2=self._protocol();
 $ctx1.sendIdx["protocol"]=1;
 //>>excludeEnd("ctx");
 $1=_st($2)._beginsWith_("*");
-if(!$vm.assert($1)){
+if(!$core.assert($1)){
 $3=_st(self._theClass())._package();
 return $3;
 };
@@ -1147,8 +1147,8 @@ messageSends: ["ifFalse:", "beginsWith:", "protocol", "package", "theClass", "na
 }),
 $globals.ProtocolAnnouncement);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "protocol",
 protocol: 'accessing',
 fn: function (){
@@ -1167,8 +1167,8 @@ messageSends: []
 }),
 $globals.ProtocolAnnouncement);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "protocol:",
 protocol: 'accessing',
 fn: function (aString){
@@ -1186,8 +1186,8 @@ messageSends: []
 }),
 $globals.ProtocolAnnouncement);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "theClass",
 protocol: 'accessing',
 fn: function (){
@@ -1206,8 +1206,8 @@ messageSends: []
 }),
 $globals.ProtocolAnnouncement);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "theClass:",
 protocol: 'accessing',
 fn: function (aClass){
@@ -1227,13 +1227,13 @@ $globals.ProtocolAnnouncement);
 
 
 
-$vm.addClass('ProtocolAdded', $globals.ProtocolAnnouncement, [], 'Kernel-Announcements');
+$core.addClass('ProtocolAdded', $globals.ProtocolAnnouncement, [], 'Kernel-Announcements');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ProtocolAdded.comment="I am emitted when a protocol is added to a class.";
 //>>excludeEnd("ide");
 
 
-$vm.addClass('ProtocolRemoved', $globals.ProtocolAnnouncement, [], 'Kernel-Announcements');
+$core.addClass('ProtocolRemoved', $globals.ProtocolAnnouncement, [], 'Kernel-Announcements');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ProtocolRemoved.comment="I am emitted when a protocol is removed from a class.";
 //>>excludeEnd("ide");

File diff suppressed because it is too large
+ 163 - 163
src/Kernel-Classes.js


+ 7 - 7
src/Kernel-Classes.st

@@ -93,9 +93,9 @@ javascriptConstructor
 
 javascriptConstructor: aJavaScriptFunction
 	"Set the JS constructor used to instantiate.
-	See the JS counter-part in boot.js `$vm.setClassConstructor'"
+	See the JS counter-part in boot.js `$core.setClassConstructor'"
 	
-	<$vm.setClassConstructor(self, aJavaScriptFunction);>
+	<$core.setClassConstructor(self, aJavaScriptFunction);>
 !
 
 lookupSelector: selector
@@ -316,11 +316,11 @@ new
 !Behavior methodsFor: 'private'!
 
 basicAddCompiledMethod: aMethod
-	<$vm.addMethod(aMethod, self)>
+	<$core.addMethod(aMethod, self)>
 !
 
 basicRemoveCompiledMethod: aMethod
-	<$vm.removeMethod(aMethod,self)>
+	<$core.removeMethod(aMethod,self)>
 ! !
 
 !Behavior methodsFor: 'testing'!
@@ -712,7 +712,7 @@ installMethod: aCompiledMethod forClass: aBehavior protocol: aString
 
 basicAddSubclassOf: aClass named: aString instanceVariableNames: aCollection package: packageName
 	<
-		$vm.addClass(aString, aClass, aCollection, packageName);
+		$core.addClass(aString, aClass, aCollection, packageName);
 		return $globals[aString]
 	>
 !
@@ -728,7 +728,7 @@ basicClass: aClass instanceVariables: aCollection
 !
 
 basicRemoveClass: aClass
-	<$vm.removeClass(aClass)>
+	<$core.removeClass(aClass)>
 !
 
 basicRenameClass: aClass to: aString
@@ -756,7 +756,7 @@ rawRenameClass: aClass to: aString
 !ClassBuilder methodsFor: 'public'!
 
 setupClass: aClass
-	<$vm.init(aClass);>
+	<$core.init(aClass);>
 ! !
 
 Object subclass: #ClassCategoryReader

File diff suppressed because it is too large
+ 169 - 169
src/Kernel-Collections.js


+ 1 - 1
src/Kernel-Collections.st

@@ -1497,7 +1497,7 @@ asJSON
 !
 
 asJavaScriptMethodName
-	<return $vm.st2js(self)>
+	<return $core.st2js(self)>
 !
 
 asJavascript

+ 101 - 101
src/Kernel-Exceptions.js

@@ -1,21 +1,21 @@
 define("amber_core/Kernel-Exceptions", ["amber/boot", "amber_core/Kernel-Objects"], function($boot){
-var $vm=$boot.vm,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
-var smalltalk=$vm,_st=$recv,globals=$globals;
-$vm.addPackage('Kernel-Exceptions');
-$vm.packages["Kernel-Exceptions"].transport = {"type":"amd","amdNamespace":"amber_core"};
+var $core=$boot.vm,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
+var smalltalk=$core,_st=$recv,globals=$globals;
+$core.addPackage('Kernel-Exceptions');
+$core.packages["Kernel-Exceptions"].transport = {"type":"amd","amdNamespace":"amber_core"};
 
-$vm.addClass('Error', $globals.Object, ['messageText'], 'Kernel-Exceptions');
+$core.addClass('Error', $globals.Object, ['messageText'], 'Kernel-Exceptions');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Error.comment="From the ANSI standard:\x0a\x0aThis protocol describes the behavior of instances of class `Error`.\x0aThese are used to represent error conditions that prevent the normal continuation of processing.\x0aActual error exceptions used by an application may be subclasses of this class.\x0aAs `Error` is explicitly specified to be subclassable, conforming implementations must implement its behavior in a non-fragile manner.";
 //>>excludeEnd("ide");
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "beHandled",
 protocol: 'accessing',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 self.amberHandled = true;
 return self;
@@ -32,14 +32,14 @@ messageSends: []
 }),
 $globals.Error);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "beUnhandled",
 protocol: 'accessing',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 self.amberHandled = false;
 return self;
@@ -56,14 +56,14 @@ messageSends: []
 }),
 $globals.Error);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "context",
 protocol: 'accessing',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 return self.context;
 return self;
@@ -80,14 +80,14 @@ messageSends: []
 }),
 $globals.Error);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "initialize",
 protocol: 'initialization',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 self._messageText_("Errorclass: ".__comma(_st(self._class())._name()));
 return self;
@@ -104,14 +104,14 @@ messageSends: ["messageText:", ",", "name", "class"]
 }),
 $globals.Error);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "isSmalltalkError",
 protocol: 'testing',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 return self.smalltalkError === true;
 return self;
@@ -128,14 +128,14 @@ messageSends: []
 }),
 $globals.Error);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "jsStack",
 protocol: 'accessing',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 return self.stack;
 return self;
@@ -152,8 +152,8 @@ messageSends: []
 }),
 $globals.Error);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "messageText",
 protocol: 'accessing',
 fn: function (){
@@ -172,8 +172,8 @@ messageSends: []
 }),
 $globals.Error);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "messageText:",
 protocol: 'accessing',
 fn: function (aString){
@@ -191,14 +191,14 @@ messageSends: []
 }),
 $globals.Error);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "resignal",
 protocol: 'signaling',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 
 		self.amberHandled = false;
@@ -218,18 +218,18 @@ messageSends: []
 }),
 $globals.Error);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "signal",
 protocol: 'signaling',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 
 		self.amberHandled = false;
-		self.context = $vm.getThisContext(); 
+		self.context = $core.getThisContext(); 
 		self.smalltalkError = true;
 		throw self;
 	;
@@ -240,21 +240,21 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "signal\x0a\x09<\x0a\x09\x09self.amberHandled = false;\x0a\x09\x09self.context = $vm.getThisContext(); \x0a\x09\x09self.smalltalkError = true;\x0a\x09\x09throw self;\x0a\x09>",
+source: "signal\x0a\x09<\x0a\x09\x09self.amberHandled = false;\x0a\x09\x09self.context = $core.getThisContext(); \x0a\x09\x09self.smalltalkError = true;\x0a\x09\x09throw self;\x0a\x09>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
 }),
 $globals.Error);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "signal:",
 protocol: 'signaling',
 fn: function (aString){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 self._messageText_(aString);
 self._signal();
@@ -272,14 +272,14 @@ messageSends: ["messageText:", "signal"]
 }),
 $globals.Error);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "signalerContext",
 protocol: 'accessing',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 var $1;
 $1=self._signalerContextFrom_(self._context());
@@ -297,19 +297,19 @@ messageSends: ["signalerContextFrom:", "context"]
 }),
 $globals.Error);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "signalerContextFrom:",
 protocol: 'accessing',
 fn: function (aContext){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 var $4,$3,$2,$1;
 $1=_st(aContext)._findContextSuchThat_((function(context){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx2) {
+return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
 $4=_st(context)._receiver();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -321,7 +321,7 @@ $ctx2.sendIdx["=="]=1;
 //>>excludeEnd("ctx");
 $2=_st($3)._or_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx3) {
+return $core.withContext(function($ctx3) {
 //>>excludeEnd("ctx");
 return _st(_st(context)._receiver()).__eq_eq(self._class());
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -347,14 +347,14 @@ messageSends: ["findContextSuchThat:", "not", "or:", "==", "receiver", "class"]
 }),
 $globals.Error);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "wasHandled",
 protocol: 'testing',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 return self.amberHandled || false;
 return self;
@@ -372,8 +372,8 @@ messageSends: []
 $globals.Error);
 
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "heliosClass",
 protocol: 'helios',
 fn: function (){
@@ -390,14 +390,14 @@ messageSends: []
 }),
 $globals.Error.klass);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "signal",
 protocol: 'instance creation',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 var $1;
 $1=_st(self._new())._signal();
@@ -415,14 +415,14 @@ messageSends: ["signal", "new"]
 }),
 $globals.Error.klass);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "signal:",
 protocol: 'instance creation',
 fn: function (aString){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 var $1;
 $1=_st(self._new())._signal_(aString);
@@ -441,12 +441,12 @@ messageSends: ["signal:", "new"]
 $globals.Error.klass);
 
 
-$vm.addClass('Halt', $globals.Error, [], 'Kernel-Exceptions');
+$core.addClass('Halt', $globals.Error, [], 'Kernel-Exceptions');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Halt.comment="I am provided to support `Object>>#halt`.";
 //>>excludeEnd("ide");
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "messageText",
 protocol: 'accessing',
 fn: function (){
@@ -463,19 +463,19 @@ messageSends: []
 }),
 $globals.Halt);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "signalerContextFrom:",
 protocol: 'accessing',
 fn: function (aContext){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 var $4,$3,$2,$1;
 $1=_st(aContext)._findContextSuchThat_((function(context){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx2) {
+return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
 $4=_st(context)._receiver();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -487,11 +487,11 @@ $ctx2.sendIdx["=="]=1;
 //>>excludeEnd("ctx");
 $2=_st($3)._or_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx3) {
+return $core.withContext(function($ctx3) {
 //>>excludeEnd("ctx");
 return _st(_st(_st(context)._receiver()).__eq_eq(self._class()))._or_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx4) {
+return $core.withContext(function($ctx4) {
 //>>excludeEnd("ctx");
 return _st(_st(_st(context)._method())._selector()).__eq("halt");
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -526,18 +526,18 @@ $globals.Halt);
 
 
 
-$vm.addClass('JavaScriptException', $globals.Error, ['exception'], 'Kernel-Exceptions');
+$core.addClass('JavaScriptException', $globals.Error, ['exception'], 'Kernel-Exceptions');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.JavaScriptException.comment="A JavaScriptException is thrown when a non-Smalltalk exception occurs while in the Smalltalk stack.\x0aSee `boot.js` `inContext()` and `BlockClosure >> on:do:`";
 //>>excludeEnd("ide");
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "context:",
 protocol: 'accessing',
 fn: function (aMethodContext){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 self.context = aMethodContext;
 return self;
@@ -554,8 +554,8 @@ messageSends: []
 }),
 $globals.JavaScriptException);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "exception",
 protocol: 'accessing',
 fn: function (){
@@ -574,8 +574,8 @@ messageSends: []
 }),
 $globals.JavaScriptException);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "exception:",
 protocol: 'accessing',
 fn: function (anException){
@@ -593,14 +593,14 @@ messageSends: []
 }),
 $globals.JavaScriptException);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "messageText",
 protocol: 'accessing',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 return 'JavaScript exception: ' + self["@exception"].toString();
 return self;
@@ -618,14 +618,14 @@ messageSends: []
 $globals.JavaScriptException);
 
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "on:",
 protocol: 'instance creation',
 fn: function (anException){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 var $2,$3,$1;
 $2=self._new();
@@ -646,14 +646,14 @@ messageSends: ["exception:", "new", "yourself"]
 }),
 $globals.JavaScriptException.klass);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "on:context:",
 protocol: 'instance creation',
 fn: function (anException,aMethodContext){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 var $2,$3,$1;
 $2=self._new();
@@ -676,12 +676,12 @@ messageSends: ["exception:", "new", "context:", "yourself"]
 $globals.JavaScriptException.klass);
 
 
-$vm.addClass('MessageNotUnderstood', $globals.Error, ['message', 'receiver'], 'Kernel-Exceptions');
+$core.addClass('MessageNotUnderstood', $globals.Error, ['message', 'receiver'], 'Kernel-Exceptions');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.MessageNotUnderstood.comment="This exception is provided to support `Object>>doesNotUnderstand:`.";
 //>>excludeEnd("ide");
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "message",
 protocol: 'accessing',
 fn: function (){
@@ -700,8 +700,8 @@ messageSends: []
 }),
 $globals.MessageNotUnderstood);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "message:",
 protocol: 'accessing',
 fn: function (aMessage){
@@ -719,14 +719,14 @@ messageSends: []
 }),
 $globals.MessageNotUnderstood);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "messageText",
 protocol: 'accessing',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 var $1;
 $1=_st(_st(_st(self._receiver())._asString()).__comma(" does not understand #")).__comma(_st(self._message())._selector());
@@ -747,8 +747,8 @@ messageSends: [",", "asString", "receiver", "selector", "message"]
 }),
 $globals.MessageNotUnderstood);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "receiver",
 protocol: 'accessing',
 fn: function (){
@@ -767,8 +767,8 @@ messageSends: []
 }),
 $globals.MessageNotUnderstood);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "receiver:",
 protocol: 'accessing',
 fn: function (anObject){
@@ -788,12 +788,12 @@ $globals.MessageNotUnderstood);
 
 
 
-$vm.addClass('NonBooleanReceiver', $globals.Error, ['object'], 'Kernel-Exceptions');
+$core.addClass('NonBooleanReceiver', $globals.Error, ['object'], 'Kernel-Exceptions');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.NonBooleanReceiver.comment="NonBooleanReceiver exceptions may be thrown when executing inlined methods such as `#ifTrue:` with a non boolean receiver.";
 //>>excludeEnd("ide");
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "object",
 protocol: 'accessing',
 fn: function (){
@@ -812,8 +812,8 @@ messageSends: []
 }),
 $globals.NonBooleanReceiver);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "object:",
 protocol: 'accessing',
 fn: function (anObject){
@@ -833,7 +833,7 @@ $globals.NonBooleanReceiver);
 
 
 
-$vm.addClass('PackageCommitError', $globals.Error, [], 'Kernel-Exceptions');
+$core.addClass('PackageCommitError', $globals.Error, [], 'Kernel-Exceptions');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.PackageCommitError.comment="I get signaled when an attempt to commit a package has failed.";
 //>>excludeEnd("ide");

+ 1 - 1
src/Kernel-Exceptions.st

@@ -71,7 +71,7 @@ resignal
 signal
 	<
 		self.amberHandled = false;
-		self.context = $vm.getThisContext(); 
+		self.context = $core.getThisContext(); 
 		self.smalltalkError = true;
 		throw self;
 	>

File diff suppressed because it is too large
+ 158 - 158
src/Kernel-ImportExport.js


+ 7 - 7
src/Kernel-ImportExport.st

@@ -261,7 +261,7 @@ jsClassNameFor: aClass
 exportDefinitionOf: aClass on: aStream
 	aStream
 		lf;
-		nextPutAll: '$vm.addClass(';
+		nextPutAll: '$core.addClass(';
 		nextPutAll: '''', (self classNameFor: aClass), ''', ';
 		nextPutAll: (self jsClassNameFor: aClass superclass);
 		nextPutAll: ', ['.
@@ -300,8 +300,8 @@ exportMetaDefinitionOf: aClass on: aStream
 
 exportMethod: aMethod on: aStream
 	aStream
-		nextPutAll: '$vm.addMethod(';lf;
-		nextPutAll: '$vm.method({';lf;
+		nextPutAll: '$core.addMethod(';lf;
+		nextPutAll: '$core.method({';lf;
 		nextPutAll: 'selector: ', aMethod selector asJavascript, ',';lf;
 		nextPutAll: 'protocol: ''', aMethod protocol, ''',';lf;
 		nextPutAll: 'fn: ', aMethod fn compiledSource, ',';lf;
@@ -340,7 +340,7 @@ exportPackage: aPackage on: aStream
 
 exportPackageDefinitionOf: aPackage on: aStream
 	aStream
-		nextPutAll: '$vm.addPackage(';
+		nextPutAll: '$core.addPackage(';
 		nextPutAll: '''', aPackage name, ''');';
 		lf
 !
@@ -359,7 +359,7 @@ exportPackagePrologueOf: aPackage on: aStream
 
 exportPackageTransportOf: aPackage on: aStream
 	aStream
-		nextPutAll: '$vm.packages[';
+		nextPutAll: '$core.packages[';
 		nextPutAll: aPackage name asJavascript;
 		nextPutAll: '].transport = ';
 		nextPutAll: aPackage transport asJSONString;
@@ -391,9 +391,9 @@ exportPackagePrologueOf: aPackage on: aStream
 		nextPutAll: (#('amber/boot'), (self amdNamesOfPackages: aPackage loadDependencies)) asJavascript;
 		nextPutAll: ', function($boot){';
 		lf;
-		nextPutAll: 'var $vm=$boot.vm,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;';
+		nextPutAll: 'var $core=$boot.vm,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;';
 		lf;
-		nextPutAll: 'var smalltalk=$vm,_st=$recv,globals=$globals;';
+		nextPutAll: 'var smalltalk=$core,_st=$recv,globals=$globals;';
 		lf
 ! !
 

File diff suppressed because it is too large
+ 166 - 166
src/Kernel-Infrastructure.js


+ 22 - 18
src/Kernel-Infrastructure.st

@@ -91,7 +91,7 @@ Typical use cases include IDEs, remote access and restricting browsing.!
 !Environment methodsFor: 'accessing'!
 
 allSelectors
-	^ Smalltalk vm allSelectors
+	^ Smalltalk core allSelectors
 !
 
 availableClassNames
@@ -424,7 +424,7 @@ doesNotUnderstand: aMessage
 
 forwardMessage: aString withArguments: anArray
 	<
-		return $vm.accessJavaScript(self._jsObject(), aString, anArray);
+		return $core.accessJavaScript(self._jsObject(), aString, anArray);
 	>
 !
 
@@ -1089,7 +1089,7 @@ Object subclass: #SmalltalkImage
 	package: 'Kernel-Infrastructure'!
 !SmalltalkImage commentStamp!
 I represent the Smalltalk system, wrapping
-operations of variable `$vm` declared in `support/boot.js`.
+operations of variable `$core` declared in `support/boot.js`.
 
 ## API
 
@@ -1131,6 +1131,10 @@ at: aString put: anObject
 	^ self globals at: aString put: anObject
 !
 
+core
+	<return $core>
+!
+
 current
 	"Backward compatibility for Smalltalk current ..."
 	self deprecatedAPI.
@@ -1143,7 +1147,7 @@ globals
 !
 
 includesKey: aKey
-	<return $vm.hasOwnProperty(aKey)>
+	<return $core.hasOwnProperty(aKey)>
 !
 
 parse: aString
@@ -1162,12 +1166,12 @@ pseudoVariableNames
 !
 
 readJSObject: anObject
-	<return $vm.readJSObject(anObject)>
+	<return $core.readJSObject(anObject)>
 !
 
 reservedWords
 	"JavaScript reserved words"
-	<return $vm.reservedWords>
+	<return $core.reservedWords>
 !
 
 settings
@@ -1181,14 +1185,14 @@ version
 !
 
 vm
-	"Future compatibility to be able to use Smalltalk vm ..."
-	<return $vm>
+	self deprecatedAPI: 'Use #core'.
+	^self core
 ! !
 
 !SmalltalkImage methodsFor: 'accessing amd'!
 
 amdRequire
-	^ self vm at: 'amdRequire'
+	^ self core at: 'amdRequire'
 !
 
 defaultAmdNamespace
@@ -1202,7 +1206,7 @@ defaultAmdNamespace: aString
 !SmalltalkImage methodsFor: 'classes'!
 
 classes
-	<return $vm.classes()>
+	<return $core.classes()>
 !
 
 removeClass: aClass
@@ -1243,7 +1247,7 @@ deleteGlobalJsVariable: aString
 
 globalJsVariables
 	"Array of global JavaScript variables"
-	<return $vm.globalJsVariables>
+	<return $core.globalJsVariables>
 ! !
 
 !SmalltalkImage methodsFor: 'packages'!
@@ -1263,7 +1267,7 @@ createPackage: packageName
 !
 
 packageAt: packageName
-	<return $vm.packages[packageName]>
+	<return $core.packages[packageName]>
 !
 
 packageAt: packageName ifAbsent: aBlock
@@ -1274,8 +1278,8 @@ packages
 	"Return all Package instances in the system."
 
 	<
-		return Object.keys($vm.packages).map(function(k) {
-			return $vm.packages[k];
+		return Object.keys($core.packages).map(function(k) {
+			return $core.packages[k];
 		})
 	>
 !
@@ -1305,7 +1309,7 @@ renamePackage: packageName to: newName
 
 basicCreatePackage: packageName
 	"Create and bind a new bare package with given name and return it."
-	<return $vm.addPackage(packageName)>
+	<return $core.addPackage(packageName)>
 !
 
 basicParse: aString
@@ -1323,14 +1327,14 @@ createPackage: packageName properties: aDict
 deleteClass: aClass
 	"Deletes a class by deleting its binding only. Use #removeClass instead"
 	
-	<$vm.removeClass(aClass)>
+	<$core.removeClass(aClass)>
 !
 
 deletePackage: packageName
 	"Deletes a package by deleting its binding, but does not check if it contains classes etc.
 	To remove a package, use #removePackage instead."
 
-	<delete $vm.packages[packageName]>
+	<delete $core.packages[packageName]>
 ! !
 
 !SmalltalkImage methodsFor: 'testing'!
@@ -1374,7 +1378,7 @@ do: aBlock displayingProgress: aString
 !String methodsFor: '*Kernel-Infrastructure'!
 
 asJavaScriptPropertyName
-<return $vm.st2prop(self)>
+<return $core.st2prop(self)>
 !
 
 asJavaScriptSelector

File diff suppressed because it is too large
+ 169 - 169
src/Kernel-Methods.js


+ 4 - 4
src/Kernel-Methods.st

@@ -47,7 +47,7 @@ whileFalse
 !
 
 whileFalse: aBlock
-	<while(!!$vm.assert(self._value())) {aBlock._value()}>
+	<while(!!$core.assert(self._value())) {aBlock._value()}>
 !
 
 whileTrue
@@ -55,13 +55,13 @@ whileTrue
 !
 
 whileTrue: aBlock
-	<while($vm.assert(self._value())) {aBlock._value()}>
+	<while($core.assert(self._value())) {aBlock._value()}>
 ! !
 
 !BlockClosure methodsFor: 'converting'!
 
 asCompiledMethod: aString
-	<return $vm.method({selector:aString, fn:self});>
+	<return $core.method({selector:aString, fn:self});>
 !
 
 currySelf
@@ -633,7 +633,7 @@ receiver
 selector
 	<
 		if(self.selector) {
-			return $vm.js2st(self.selector);
+			return $core.js2st(self.selector);
 		} else {
 			return nil;
 		}

File diff suppressed because it is too large
+ 170 - 170
src/Kernel-Objects.js


+ 2 - 2
src/Kernel-Objects.st

@@ -17,7 +17,7 @@ identityHash
 	<
 		var hash=self.identityHash;
 		if (hash) return hash;
-		hash=$vm.nextId();
+		hash=$core.nextId();
 		Object.defineProperty(self, 'identityHash', {value:hash});
 		return hash;
 	>
@@ -95,7 +95,7 @@ perform: aString
 !
 
 perform: aString withArguments: aCollection
-	<return $vm.send(self, aString._asJavaScriptMethodName(), aCollection)>
+	<return $core.send(self, aString._asJavaScriptMethodName(), aCollection)>
 ! !
 
 !ProtoObject methodsFor: 'printing'!

File diff suppressed because it is too large
+ 157 - 157
src/Kernel-Tests.js


+ 17 - 17
src/Kernel-Transcript.js

@@ -1,15 +1,15 @@
 define("amber_core/Kernel-Transcript", ["amber/boot", "amber_core/Kernel-Objects"], function($boot){
-var $vm=$boot.vm,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
-var smalltalk=$vm,_st=$recv,globals=$globals;
-$vm.addPackage('Kernel-Transcript');
-$vm.packages["Kernel-Transcript"].transport = {"type":"amd","amdNamespace":"amber_core"};
+var $core=$boot.vm,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
+var smalltalk=$core,_st=$recv,globals=$globals;
+$core.addPackage('Kernel-Transcript');
+$core.packages["Kernel-Transcript"].transport = {"type":"amd","amdNamespace":"amber_core"};
 
-$vm.addClass('ConsoleTranscript', $globals.Object, ['textarea'], 'Kernel-Transcript');
+$core.addClass('ConsoleTranscript', $globals.Object, ['textarea'], 'Kernel-Transcript');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ConsoleTranscript.comment="I am a specific transcript emitting to the JavaScript console.\x0a\x0aIf no other transcript is registered, I am the default.";
 //>>excludeEnd("ide");
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "clear",
 protocol: 'printing',
 fn: function (){
@@ -26,8 +26,8 @@ messageSends: []
 }),
 $globals.ConsoleTranscript);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "cr",
 protocol: 'printing',
 fn: function (){
@@ -44,8 +44,8 @@ messageSends: []
 }),
 $globals.ConsoleTranscript);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "open",
 protocol: 'actions',
 fn: function (){
@@ -62,14 +62,14 @@ messageSends: []
 }),
 $globals.ConsoleTranscript);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "show:",
 protocol: 'printing',
 fn: function (anObject){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 console.log(String(_st(anObject)._asString()));
 return self;
@@ -87,15 +87,15 @@ messageSends: []
 $globals.ConsoleTranscript);
 
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "initialize",
 protocol: 'initialization',
 fn: function (){
 var self=this;
 function $Transcript(){return $globals.Transcript||(typeof Transcript=="undefined"?nil:Transcript)}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 _st($Transcript())._registerIfNone_(self._new());
 return self;

+ 100 - 100
src/SUnit-Tests.js

@@ -1,22 +1,22 @@
 define("amber_core/SUnit-Tests", ["amber/boot", "amber_core/SUnit"], function($boot){
-var $vm=$boot.vm,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
-var smalltalk=$vm,_st=$recv,globals=$globals;
-$vm.addPackage('SUnit-Tests');
-$vm.packages["SUnit-Tests"].transport = {"type":"amd","amdNamespace":"amber_core"};
+var $core=$boot.vm,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
+var smalltalk=$core,_st=$recv,globals=$globals;
+$core.addPackage('SUnit-Tests');
+$core.packages["SUnit-Tests"].transport = {"type":"amd","amdNamespace":"amber_core"};
 
-$vm.addClass('ExampleSetTest', $globals.TestCase, ['empty', 'full'], 'SUnit-Tests');
+$core.addClass('ExampleSetTest', $globals.TestCase, ['empty', 'full'], 'SUnit-Tests');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ExampleSetTest.comment="ExampleSetTest is taken from Pharo 1.4.\x0a\x0aTHe purpose of this class is to demonstrate a simple use case of the test framework.";
 //>>excludeEnd("ide");
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "setUp",
 protocol: 'running',
 fn: function (){
 var self=this;
 function $Set(){return $globals.Set||(typeof Set=="undefined"?nil:Set)}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 self["@empty"]=_st($Set())._new();
 self["@full"]=_st($Set())._with_with_((5),"abc");
@@ -34,14 +34,14 @@ messageSends: ["new", "with:with:"]
 }),
 $globals.ExampleSetTest);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "testAdd",
 protocol: 'tests',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 _st(self["@empty"])._add_((5));
 self._assert_(_st(self["@empty"])._includes_((5)));
@@ -59,14 +59,14 @@ messageSends: ["add:", "assert:", "includes:"]
 }),
 $globals.ExampleSetTest);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "testGrow",
 protocol: 'tests',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 _st(self["@empty"])._addAll_((1)._to_((100)));
 self._assert_equals_(_st(self["@empty"])._size(),(100));
@@ -84,19 +84,19 @@ messageSends: ["addAll:", "to:", "assert:equals:", "size"]
 }),
 $globals.ExampleSetTest);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "testIllegal",
 protocol: 'tests',
 fn: function (){
 var self=this;
 function $Error(){return $globals.Error||(typeof Error=="undefined"?nil:Error)}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 self._should_raise_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx2) {
+return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
 return _st(self["@empty"])._at_((5));
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -108,7 +108,7 @@ $ctx1.sendIdx["should:raise:"]=1;
 //>>excludeEnd("ctx");
 self._should_raise_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx2) {
+return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
 return _st(self["@empty"])._at_put_((5),"abc");
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -129,14 +129,14 @@ messageSends: ["should:raise:", "at:", "at:put:"]
 }),
 $globals.ExampleSetTest);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "testIncludes",
 protocol: 'tests',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 var $1;
 $1=_st(self["@full"])._includes_((5));
@@ -162,14 +162,14 @@ messageSends: ["assert:", "includes:"]
 }),
 $globals.ExampleSetTest);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "testOccurrences",
 protocol: 'tests',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 var $1,$2;
 $1=_st(self["@empty"])._occurrencesOf_((0));
@@ -204,14 +204,14 @@ messageSends: ["assert:equals:", "occurrencesOf:", "add:"]
 }),
 $globals.ExampleSetTest);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "testRemove",
 protocol: 'tests',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 var $1;
 _st(self["@full"])._remove_((5));
@@ -237,21 +237,21 @@ $globals.ExampleSetTest);
 
 
 
-$vm.addClass('SUnitAsyncTest', $globals.TestCase, ['flag'], 'SUnit-Tests');
-$vm.addMethod(
-$vm.method({
+$core.addClass('SUnitAsyncTest', $globals.TestCase, ['flag'], 'SUnit-Tests');
+$core.addMethod(
+$core.method({
 selector: "fakeError",
 protocol: 'helpers',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 self["@flag"]="bad";
 self._timeout_((30));
 self["@flag"]=_st(self._async_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx2) {
+return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
 self["@flag"]="ok";
 self["@flag"];
@@ -274,20 +274,20 @@ messageSends: ["timeout:", "valueWithTimeout:", "async:", "error:"]
 }),
 $globals.SUnitAsyncTest);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "fakeErrorFailingInTearDown",
 protocol: 'helpers',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 self["@flag"]="bad";
 self._timeout_((30));
 self["@flag"]=_st(self._async_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx2) {
+return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
 return self._error_("Intentional");
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -308,20 +308,20 @@ messageSends: ["timeout:", "valueWithTimeout:", "async:", "error:"]
 }),
 $globals.SUnitAsyncTest);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "fakeFailure",
 protocol: 'helpers',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 self["@flag"]="bad";
 self._timeout_((30));
 self["@flag"]=_st(self._async_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx2) {
+return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
 self["@flag"]="ok";
 self["@flag"];
@@ -344,14 +344,14 @@ messageSends: ["timeout:", "valueWithTimeout:", "async:", "assert:"]
 }),
 $globals.SUnitAsyncTest);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "fakeMultipleTimeoutFailing",
 protocol: 'helpers',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 var $1;
 self._timeout_((100));
@@ -360,12 +360,12 @@ $ctx1.sendIdx["timeout:"]=1;
 //>>excludeEnd("ctx");
 $1=self._async_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx2) {
+return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
 self._timeout_((20));
 return _st(self._async_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx3) {
+return $core.withContext(function($ctx3) {
 //>>excludeEnd("ctx");
 return self._finished();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -397,14 +397,14 @@ messageSends: ["timeout:", "valueWithTimeout:", "async:", "finished"]
 }),
 $globals.SUnitAsyncTest);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "fakeMultipleTimeoutPassing",
 protocol: 'helpers',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 var $1;
 self._timeout_((20));
@@ -413,12 +413,12 @@ $ctx1.sendIdx["timeout:"]=1;
 //>>excludeEnd("ctx");
 $1=self._async_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx2) {
+return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
 self._timeout_((40));
 return _st(self._async_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx3) {
+return $core.withContext(function($ctx3) {
 //>>excludeEnd("ctx");
 return self._finished();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -450,19 +450,19 @@ messageSends: ["timeout:", "valueWithTimeout:", "async:", "finished"]
 }),
 $globals.SUnitAsyncTest);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "fakeTimeout",
 protocol: 'helpers',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 self._timeout_((10));
 _st(self._async_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx2) {
+return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
 return self._finished();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -483,19 +483,19 @@ messageSends: ["timeout:", "valueWithTimeout:", "async:", "finished"]
 }),
 $globals.SUnitAsyncTest);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "selectorSetOf:",
 protocol: 'private',
 fn: function (aCollection){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 var $1;
 $1=_st(_st(aCollection)._collect_((function(each){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx2) {
+return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
 return _st(each)._selector();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -516,8 +516,8 @@ messageSends: ["asSet", "collect:", "selector"]
 }),
 $globals.SUnitAsyncTest);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "setUp",
 protocol: 'running',
 fn: function (){
@@ -535,14 +535,14 @@ messageSends: []
 }),
 $globals.SUnitAsyncTest);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "tearDown",
 protocol: 'running',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 self._assert_equals_("ok",self["@flag"]);
 return self;
@@ -559,8 +559,8 @@ messageSends: ["assert:equals:"]
 }),
 $globals.SUnitAsyncTest);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "testAsyncErrorsAndFailures",
 protocol: 'tests',
 fn: function (){
@@ -569,12 +569,12 @@ var suite,runner,result,assertBlock;
 function $TestSuiteRunner(){return $globals.TestSuiteRunner||(typeof TestSuiteRunner=="undefined"?nil:TestSuiteRunner)}
 function $ResultAnnouncement(){return $globals.ResultAnnouncement||(typeof ResultAnnouncement=="undefined"?nil:ResultAnnouncement)}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 var $1,$2,$3,$4;
 suite=["fakeError", "fakeErrorFailingInTearDown", "fakeFailure", "testPass"]._collect_((function(each){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx2) {
+return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
 return _st(self._class())._selector_(each);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -589,7 +589,7 @@ $ctx1.sendIdx["result"]=1;
 //>>excludeEnd("ctx");
 assertBlock=self._async_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx2) {
+return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
 $1=self._selectorSetOf_(_st(result)._errors());
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -611,10 +611,10 @@ return self._finished();
 }));
 _st(_st(runner)._announcer())._on_do_($ResultAnnouncement(),(function(ann){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx2) {
+return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
 $3=_st(_st(ann)._result()).__eq_eq(result);
-if($vm.assert($3)){
+if($core.assert($3)){
 $4=_st(_st(result)._runs()).__eq(_st(result)._total());
 return _st($4)._ifTrue_(assertBlock);
 };
@@ -637,19 +637,19 @@ messageSends: ["collect:", "selector:", "class", "on:", "timeout:", "result", "a
 }),
 $globals.SUnitAsyncTest);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "testAsyncNeedsTimeout",
 protocol: 'tests',
 fn: function (){
 var self=this;
 function $Error(){return $globals.Error||(typeof Error=="undefined"?nil:Error)}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 self._should_raise_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx2) {
+return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
 return self._async_((function(){
 
@@ -664,7 +664,7 @@ $ctx2.sendIdx["async:"]=1;
 self._timeout_((0));
 self._shouldnt_raise_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx2) {
+return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
 return self._async_((function(){
 
@@ -688,19 +688,19 @@ messageSends: ["should:raise:", "async:", "timeout:", "shouldnt:raise:", "finish
 }),
 $globals.SUnitAsyncTest);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "testFinishedNeedsTimeout",
 protocol: 'tests',
 fn: function (){
 var self=this;
 function $Error(){return $globals.Error||(typeof Error=="undefined"?nil:Error)}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 self._should_raise_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx2) {
+return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
 return self._finished();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -713,7 +713,7 @@ $ctx2.sendIdx["finished"]=1;
 self._timeout_((0));
 self._shouldnt_raise_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx2) {
+return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
 return self._finished();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -734,14 +734,14 @@ messageSends: ["should:raise:", "finished", "timeout:", "shouldnt:raise:"]
 }),
 $globals.SUnitAsyncTest);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "testIsAsyncReturnsCorrectValues",
 protocol: 'tests',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 var $1,$2;
 $1=self._isAsync();
@@ -774,20 +774,20 @@ messageSends: ["deny:", "isAsync", "timeout:", "assert:", "finished"]
 }),
 $globals.SUnitAsyncTest);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "testPass",
 protocol: 'tests',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 self["@flag"]="bad";
 self._timeout_((10));
 self["@flag"]=_st(self._async_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx2) {
+return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
 self._assert_(true);
 self._finished();
@@ -811,8 +811,8 @@ messageSends: ["timeout:", "valueWithTimeout:", "async:", "assert:", "finished"]
 }),
 $globals.SUnitAsyncTest);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "testTimeouts",
 protocol: 'tests',
 fn: function (){
@@ -822,12 +822,12 @@ function $TestSuiteRunner(){return $globals.TestSuiteRunner||(typeof TestSuiteRu
 function $Set(){return $globals.Set||(typeof Set=="undefined"?nil:Set)}
 function $ResultAnnouncement(){return $globals.ResultAnnouncement||(typeof ResultAnnouncement=="undefined"?nil:ResultAnnouncement)}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 var $1,$2,$3;
 suite=["fakeTimeout", "fakeMultipleTimeoutFailing", "fakeMultipleTimeoutPassing", "testPass"]._collect_((function(each){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx2) {
+return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
 return _st(self._class())._selector_(each);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -842,7 +842,7 @@ $ctx1.sendIdx["result"]=1;
 //>>excludeEnd("ctx");
 assertBlock=self._async_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx2) {
+return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
 $1=self._selectorSetOf_(_st(result)._errors());
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -860,10 +860,10 @@ return self._finished();
 }));
 _st(_st(runner)._announcer())._on_do_($ResultAnnouncement(),(function(ann){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx2) {
+return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
 $2=_st(_st(ann)._result()).__eq_eq(result);
-if($vm.assert($2)){
+if($core.assert($2)){
 $3=_st(_st(result)._runs()).__eq(_st(result)._total());
 return _st($3)._ifTrue_(assertBlock);
 };
@@ -886,15 +886,15 @@ messageSends: ["collect:", "selector:", "class", "on:", "timeout:", "result", "a
 }),
 $globals.SUnitAsyncTest);
 
-$vm.addMethod(
-$vm.method({
+$core.addMethod(
+$core.method({
 selector: "testTwoAsyncPassesWithFinishedOnlyOneIsRun",
 protocol: 'tests',
 fn: function (){
 var self=this;
 var x;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx1) { 
+return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 var $1;
 self["@flag"]="bad";
@@ -902,7 +902,7 @@ self._timeout_((10));
 x=(0);
 $1=self._async_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx2) {
+return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
 self._finished();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -932,7 +932,7 @@ $ctx1.sendIdx["valueWithTimeout:"]=1;
 //>>excludeEnd("ctx");
 self["@flag"]=_st(self._async_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $vm.withContext(function($ctx2) {
+return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
 self._finished();
 self["@flag"]="ok";

File diff suppressed because it is too large
+ 172 - 172
src/SUnit.js


File diff suppressed because it is too large
+ 172 - 172
src/Web.js


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