Browse Source

Issue #787: Do not create contexts for trivial methods

I went with a drastic approach: not creating contexts except if the
method has message sends (this includes inlined JS methods).
More than 30% of the methods are compiled without contexts, speeding up
Amber quite a bit!

- Adds `Node >> requiresSmalltalkContext`
- Do not create contexts for methods without message sends
- Recompiles all js files
Nicolas Petton 11 years ago
parent
commit
c5348e70ee

+ 2 - 4
js/Benchfib.js

@@ -114,12 +114,11 @@ selector: "jsbenchFib",
 protocol: '*Benchfib',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 if (this < 2) {
 return 1;
 } else {
 return (this-1)._jsbenchFib() + (this-2)._jsbenchFib() + 1;};
-return self}, function($ctx1) {$ctx1.fill(self,"jsbenchFib",{},smalltalk.Number)})},
+return self},
 args: [],
 source: "jsbenchFib\x0a\x0a\x09<if (this < 2) {\x0areturn 1;\x0a} else {\x0areturn (this-1)._jsbenchFib() + (this-2)._jsbenchFib() + 1;}>",
 messageSends: [],
@@ -133,7 +132,6 @@ selector: "jsbenchmark",
 protocol: '*Benchfib',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 
 var size = 8190;
 var count;
@@ -156,7 +154,7 @@ for (var z=0;z<this;z++) {
 	}
 }
 return count;
-return self}, function($ctx1) {$ctx1.fill(self,"jsbenchmark",{},smalltalk.Number)})},
+return self},
 args: [],
 source: "jsbenchmark\x0a\x0a<\x0avar size = 8190;\x0avar count;\x0afor (var z=0;z<this;z++) {\x0a\x09count = 0;\x0a\x09var flags = new Array();\x0a\x09for (var p=0; p<size; p++) {\x0a\x09flags[p] = true;\x0a\x09}\x0a\x09for (var i=1;i<=size;i++) {\x0a\x09\x09if (flags[i-1]) {\x0a\x09\x09\x09var prime = i+1;\x0a\x09\x09\x09var k = i + prime;\x0a\x09\x09\x09while (k <= size) {\x0a\x09\x09\x09\x09flags[k-1] = false;\x0a\x09\x09\x09\x09k = k + prime;\x0a\x09\x09\x09}\x0a\x09\x09\x09count = count + 1;\x0a\x09\x09}\x0a\x09}\x0a}\x0areturn count>",
 messageSends: [],

+ 18 - 36
js/Canvas.js

@@ -64,9 +64,8 @@ selector: "isAvailable",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return typeof window !== "undefined" && typeof jQuery !== "undefined";
-return self}, function($ctx1) {$ctx1.fill(self,"isAvailable",{},smalltalk.BrowserInterface)})},
+return self},
 args: [],
 source: "isAvailable\x0a<return typeof window !== \x22undefined\x22 && typeof jQuery !== \x22undefined\x22>",
 messageSends: [],
@@ -1596,11 +1595,10 @@ selector: "root",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@root"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"root",{},smalltalk.HTMLCanvas)})},
+},
 args: [],
 source: "root\x0a\x09^ root",
 messageSends: [],
@@ -1614,9 +1612,8 @@ selector: "root:",
 protocol: 'accessing',
 fn: function (aTagBrush){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@root"]=aTagBrush;
-return self}, function($ctx1) {$ctx1.fill(self,"root:",{aTagBrush:aTagBrush},smalltalk.HTMLCanvas)})},
+return self},
 args: ["aTagBrush"],
 source: "root: aTagBrush\x0a\x09root := aTagBrush",
 messageSends: [],
@@ -2376,11 +2373,10 @@ selector: "current",
 protocol: 'instance creation',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@current"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.HTMLSnippet.klass)})},
+},
 args: [],
 source: "current\x0a\x09^ current",
 messageSends: [],
@@ -2441,9 +2437,8 @@ selector: "isDOMAvailable",
 protocol: 'instance creation',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
  return typeof document !== 'undefined' ;
-return self}, function($ctx1) {$ctx1.fill(self,"isDOMAvailable",{},smalltalk.HTMLSnippet.klass)})},
+return self},
 args: [],
 source: "isDOMAvailable\x0a\x09< return typeof document !== 'undefined' >",
 messageSends: [],
@@ -2594,14 +2589,13 @@ selector: "appendChild:",
 protocol: 'adding',
 fn: function (anElement){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var element=self['@element'];
 	if (null == element.canHaveChildren || element.canHaveChildren) {
 		element.appendChild(anElement);
 	} else {
 		element.text = String(element.text) + anElement.innerHTML;
 	} ;
-return self}, function($ctx1) {$ctx1.fill(self,"appendChild:",{anElement:anElement},smalltalk.TagBrush)})},
+return self},
 args: ["anElement"],
 source: "appendChild: anElement\x0a\x09\x22In IE7 and IE8 appendChild fails on several node types. So we need to check\x22\x0a\x09<var element=self['@element'];\x0a\x09if (null == element.canHaveChildren || element.canHaveChildren) {\x0a\x09\x09element.appendChild(anElement);\x0a\x09} else {\x0a\x09\x09element.text = String(element.text) + anElement.innerHTML;\x0a\x09} >",
 messageSends: [],
@@ -2615,9 +2609,8 @@ selector: "appendDocumentFragment:",
 protocol: 'private',
 fn: function (anElement){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var element=self['@element'].appendChild(anElement["@element"]);
-return self}, function($ctx1) {$ctx1.fill(self,"appendDocumentFragment:",{anElement:anElement},smalltalk.TagBrush)})},
+return self},
 args: ["anElement"],
 source: "appendDocumentFragment: anElement\x0a\x09<var element=self['@element'].appendChild(anElement[\x22@element\x22])>",
 messageSends: [],
@@ -2703,9 +2696,8 @@ selector: "at:ifAbsent:",
 protocol: 'attributes',
 fn: function (aString,aBlock){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return self['@element'].hasAttribute(aString) ? self['@element'].getAttribute(aString) : aBlock._value();
-return self}, function($ctx1) {$ctx1.fill(self,"at:ifAbsent:",{aString:aString,aBlock:aBlock},smalltalk.TagBrush)})},
+return self},
 args: ["aString", "aBlock"],
 source: "at: aString ifAbsent: aBlock\x0a\x09<return self['@element'].hasAttribute(aString) ? self['@element'].getAttribute(aString) : aBlock._value()>",
 messageSends: [],
@@ -2719,9 +2711,8 @@ selector: "at:put:",
 protocol: 'attributes',
 fn: function (aString,aValue){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self['@element'].setAttribute(aString, aValue); return aValue;
-return self}, function($ctx1) {$ctx1.fill(self,"at:put:",{aString:aString,aValue:aValue},smalltalk.TagBrush)})},
+return self},
 args: ["aString", "aValue"],
 source: "at: aString put: aValue\x0a\x09<self['@element'].setAttribute(aString, aValue); return aValue>",
 messageSends: [],
@@ -2735,9 +2726,8 @@ selector: "class:",
 protocol: 'attributes',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self['@element'].className = aString;
-return self}, function($ctx1) {$ctx1.fill(self,"class:",{aString:aString},smalltalk.TagBrush)})},
+return self},
 args: ["aString"],
 source: "class: aString\x0a\x09<self['@element'].className = aString>",
 messageSends: [],
@@ -2817,9 +2807,8 @@ selector: "createElementFor:",
 protocol: 'private',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return document.createElement(String(aString));
-return self}, function($ctx1) {$ctx1.fill(self,"createElementFor:",{aString:aString},smalltalk.TagBrush)})},
+return self},
 args: ["aString"],
 source: "createElementFor: aString\x0a\x09<return document.createElement(String(aString))>",
 messageSends: [],
@@ -2833,9 +2822,8 @@ selector: "createTextNodeFor:",
 protocol: 'private',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return document.createTextNode(String(aString));
-return self}, function($ctx1) {$ctx1.fill(self,"createTextNodeFor:",{aString:aString},smalltalk.TagBrush)})},
+return self},
 args: ["aString"],
 source: "createTextNodeFor: aString\x0a\x09<return document.createTextNode(String(aString))>",
 messageSends: [],
@@ -2865,11 +2853,10 @@ selector: "element",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@element"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"element",{},smalltalk.TagBrush)})},
+},
 args: [],
 source: "element\x0a\x09^ element",
 messageSends: [],
@@ -3429,9 +3416,8 @@ selector: "removeAt:",
 protocol: 'attributes',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self['@element'].removeAttribute(aString);
-return self}, function($ctx1) {$ctx1.fill(self,"removeAt:",{aString:aString},smalltalk.TagBrush)})},
+return self},
 args: ["aString"],
 source: "removeAt: aString\x0a\x09<self['@element'].removeAttribute(aString)>",
 messageSends: [],
@@ -3700,8 +3686,7 @@ selector: "renderOn:",
 protocol: 'rendering',
 fn: function (html){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.Widget)})},
+return self},
 args: ["html"],
 source: "renderOn: html\x0a\x09self",
 messageSends: [],
@@ -3716,9 +3701,8 @@ selector: "heliosClass",
 protocol: 'helios',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "widget";
-}, function($ctx1) {$ctx1.fill(self,"heliosClass",{},smalltalk.Widget.klass)})},
+},
 args: [],
 source: "heliosClass\x0a\x09^ 'widget'",
 messageSends: [],
@@ -3848,9 +3832,8 @@ selector: "asJQuery",
 protocol: '*Canvas',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return jQuery(String(self));
-return self}, function($ctx1) {$ctx1.fill(self,"asJQuery",{},smalltalk.String)})},
+return self},
 args: [],
 source: "asJQuery\x0a\x09<return jQuery(String(self))>",
 messageSends: [],
@@ -3864,9 +3847,8 @@ selector: "asJQuery",
 protocol: '*Canvas',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return jQuery(self['@jsObject']);
-return self}, function($ctx1) {$ctx1.fill(self,"asJQuery",{},smalltalk.JSObjectProxy)})},
+return self},
 args: [],
 source: "asJQuery\x0a\x09<return jQuery(self['@jsObject'])>",
 messageSends: [],

+ 109 - 140
js/Compiler-AST.js

@@ -45,9 +45,8 @@ selector: "isAssignmentNode",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"isAssignmentNode",{},smalltalk.Node)})},
+},
 args: [],
 source: "isAssignmentNode\x0a\x09^ false",
 messageSends: [],
@@ -61,9 +60,8 @@ selector: "isBlockNode",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"isBlockNode",{},smalltalk.Node)})},
+},
 args: [],
 source: "isBlockNode\x0a\x09^ false",
 messageSends: [],
@@ -77,9 +75,8 @@ selector: "isBlockSequenceNode",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"isBlockSequenceNode",{},smalltalk.Node)})},
+},
 args: [],
 source: "isBlockSequenceNode\x0a\x09^ false",
 messageSends: [],
@@ -93,9 +90,8 @@ selector: "isCascadeNode",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"isCascadeNode",{},smalltalk.Node)})},
+},
 args: [],
 source: "isCascadeNode\x0a\x09^ false",
 messageSends: [],
@@ -109,9 +105,8 @@ selector: "isImmutable",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"isImmutable",{},smalltalk.Node)})},
+},
 args: [],
 source: "isImmutable\x0a\x09^ false",
 messageSends: [],
@@ -125,9 +120,8 @@ selector: "isJSStatementNode",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"isJSStatementNode",{},smalltalk.Node)})},
+},
 args: [],
 source: "isJSStatementNode\x0a\x09^ false",
 messageSends: [],
@@ -159,9 +153,8 @@ selector: "isNode",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isNode",{},smalltalk.Node)})},
+},
 args: [],
 source: "isNode\x0a\x09^ true",
 messageSends: [],
@@ -200,9 +193,8 @@ selector: "isReturnNode",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"isReturnNode",{},smalltalk.Node)})},
+},
 args: [],
 source: "isReturnNode\x0a\x09^ false",
 messageSends: [],
@@ -216,9 +208,8 @@ selector: "isSendNode",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"isSendNode",{},smalltalk.Node)})},
+},
 args: [],
 source: "isSendNode\x0a\x09^ false",
 messageSends: [],
@@ -232,9 +223,8 @@ selector: "isSequenceNode",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"isSequenceNode",{},smalltalk.Node)})},
+},
 args: [],
 source: "isSequenceNode\x0a\x09^ false",
 messageSends: [],
@@ -248,9 +238,8 @@ selector: "isValueNode",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"isValueNode",{},smalltalk.Node)})},
+},
 args: [],
 source: "isValueNode\x0a\x09^ false",
 messageSends: [],
@@ -264,9 +253,8 @@ selector: "isVariableNode",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"isVariableNode",{},smalltalk.Node)})},
+},
 args: [],
 source: "isVariableNode\x0a\x09^ false",
 messageSends: [],
@@ -429,11 +417,10 @@ selector: "parent",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@parent"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"parent",{},smalltalk.Node)})},
+},
 args: [],
 source: "parent\x0a\x09^ parent",
 messageSends: [],
@@ -447,9 +434,8 @@ selector: "parent:",
 protocol: 'accessing',
 fn: function (aNode){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@parent"]=aNode;
-return self}, function($ctx1) {$ctx1.fill(self,"parent:",{aNode:aNode},smalltalk.Node)})},
+return self},
 args: ["aNode"],
 source: "parent: aNode\x0a\x09parent := aNode",
 messageSends: [],
@@ -493,9 +479,8 @@ selector: "position:",
 protocol: 'building',
 fn: function (aPosition){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@position"]=aPosition;
-return self}, function($ctx1) {$ctx1.fill(self,"position:",{aPosition:aPosition},smalltalk.Node)})},
+return self},
 args: ["aPosition"],
 source: "position: aPosition\x0a\x09position := aPosition",
 messageSends: [],
@@ -523,6 +508,30 @@ referencedClasses: []
 }),
 smalltalk.Node);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "requiresSmalltalkContext",
+protocol: 'testing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st(self._nodes())._detect_ifNone_((function(each){
+return smalltalk.withContext(function($ctx2) {
+return _st(each)._requiresSmalltalkContext();
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}),(function(){
+return smalltalk.withContext(function($ctx2) {
+return nil;
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})})))._notNil();
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"requiresSmalltalkContext",{},smalltalk.Node)})},
+args: [],
+source: "requiresSmalltalkContext\x0a\x09\x22Answer true if the receiver requires a smalltalk context.\x0a\x09Only send nodes require a context.\x0a\x09\x0a\x09If no node requires a context, the method will be compiled without one.\x0a\x09See `IRJSTranslator` and `JSStream` for context creation\x22\x0a\x09\x0a\x09^ (self nodes \x0a\x09\x09detect: [ :each | each requiresSmalltalkContext ]\x0a\x09\x09ifNone: [ nil ]) notNil",
+messageSends: ["notNil", "detect:ifNone:", "nodes", "requiresSmalltalkContext"],
+referencedClasses: []
+}),
+smalltalk.Node);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "shouldBeAliased",
@@ -552,9 +561,8 @@ selector: "shouldBeAliased:",
 protocol: 'accessing',
 fn: function (aBoolean){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@shouldBeAliased"]=aBoolean;
-return self}, function($ctx1) {$ctx1.fill(self,"shouldBeAliased:",{aBoolean:aBoolean},smalltalk.Node)})},
+return self},
 args: ["aBoolean"],
 source: "shouldBeAliased: aBoolean\x0a\x09shouldBeAliased := aBoolean",
 messageSends: [],
@@ -591,9 +599,8 @@ selector: "shouldBeInlined:",
 protocol: 'accessing',
 fn: function (aBoolean){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@shouldBeInlined"]=aBoolean;
-return self}, function($ctx1) {$ctx1.fill(self,"shouldBeInlined:",{aBoolean:aBoolean},smalltalk.Node)})},
+return self},
 args: ["aBoolean"],
 source: "shouldBeInlined: aBoolean\x0a\x09shouldBeInlined := aBoolean",
 messageSends: [],
@@ -607,9 +614,8 @@ selector: "stopOnStepping",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"stopOnStepping",{},smalltalk.Node)})},
+},
 args: [],
 source: "stopOnStepping\x0a\x09^ false",
 messageSends: [],
@@ -673,9 +679,8 @@ selector: "isAssignmentNode",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isAssignmentNode",{},smalltalk.AssignmentNode)})},
+},
 args: [],
 source: "isAssignmentNode\x0a\x09^ true",
 messageSends: [],
@@ -689,11 +694,10 @@ selector: "left",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@left"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"left",{},smalltalk.AssignmentNode)})},
+},
 args: [],
 source: "left\x0a\x09^ left",
 messageSends: [],
@@ -743,11 +747,10 @@ selector: "right",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@right"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"right",{},smalltalk.AssignmentNode)})},
+},
 args: [],
 source: "right\x0a\x09^ right",
 messageSends: [],
@@ -821,9 +824,8 @@ selector: "isBlockNode",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isBlockNode",{},smalltalk.BlockNode)})},
+},
 args: [],
 source: "isBlockNode\x0a\x09^ true",
 messageSends: [],
@@ -837,9 +839,8 @@ selector: "nextChild",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return self;
-}, function($ctx1) {$ctx1.fill(self,"nextChild",{},smalltalk.BlockNode)})},
+},
 args: [],
 source: "nextChild\x0a\x09\x22Answer the receiver as we want to avoid eager evaluation\x22\x0a\x09\x0a\x09^ self",
 messageSends: [],
@@ -853,9 +854,8 @@ selector: "nextNode:",
 protocol: 'accessing',
 fn: function (aNode){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return self;
-}, function($ctx1) {$ctx1.fill(self,"nextNode:",{aNode:aNode},smalltalk.BlockNode)})},
+},
 args: ["aNode"],
 source: "nextNode: aNode\x0a\x09\x22Answer the receiver as we want to avoid eager evaluation\x22\x0a\x09\x0a\x09^ self",
 messageSends: [],
@@ -894,9 +894,8 @@ selector: "parameters:",
 protocol: 'accessing',
 fn: function (aCollection){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@parameters"]=aCollection;
-return self}, function($ctx1) {$ctx1.fill(self,"parameters:",{aCollection:aCollection},smalltalk.BlockNode)})},
+return self},
 args: ["aCollection"],
 source: "parameters: aCollection\x0a\x09parameters := aCollection",
 messageSends: [],
@@ -910,11 +909,10 @@ selector: "scope",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@scope"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"scope",{},smalltalk.BlockNode)})},
+},
 args: [],
 source: "scope\x0a\x09^ scope",
 messageSends: [],
@@ -928,9 +926,8 @@ selector: "scope:",
 protocol: 'accessing',
 fn: function (aLexicalScope){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@scope"]=aLexicalScope;
-return self}, function($ctx1) {$ctx1.fill(self,"scope:",{aLexicalScope:aLexicalScope},smalltalk.BlockNode)})},
+return self},
 args: ["aLexicalScope"],
 source: "scope: aLexicalScope\x0a\x09scope := aLexicalScope",
 messageSends: [],
@@ -987,9 +984,8 @@ selector: "isCascadeNode",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isCascadeNode",{},smalltalk.CascadeNode)})},
+},
 args: [],
 source: "isCascadeNode\x0a\x09^ true",
 messageSends: [],
@@ -1003,11 +999,10 @@ selector: "receiver",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@receiver"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"receiver",{},smalltalk.CascadeNode)})},
+},
 args: [],
 source: "receiver\x0a\x09^ receiver",
 messageSends: [],
@@ -1021,9 +1016,8 @@ selector: "receiver:",
 protocol: 'accessing',
 fn: function (aNode){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@receiver"]=aNode;
-return self}, function($ctx1) {$ctx1.fill(self,"receiver:",{aNode:aNode},smalltalk.CascadeNode)})},
+return self},
 args: ["aNode"],
 source: "receiver: aNode\x0a\x09receiver := aNode",
 messageSends: [],
@@ -1103,9 +1097,8 @@ selector: "isJSStatementNode",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isJSStatementNode",{},smalltalk.JSStatementNode)})},
+},
 args: [],
 source: "isJSStatementNode\x0a\x09^ true",
 messageSends: [],
@@ -1142,9 +1135,8 @@ selector: "source:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@source"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"source:",{aString:aString},smalltalk.JSStatementNode)})},
+return self},
 args: ["aString"],
 source: "source: aString\x0a\x09source := aString",
 messageSends: [],
@@ -1203,9 +1195,8 @@ selector: "arguments:",
 protocol: 'accessing',
 fn: function (aCollection){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@arguments"]=aCollection;
-return self}, function($ctx1) {$ctx1.fill(self,"arguments:",{aCollection:aCollection},smalltalk.MethodNode)})},
+return self},
 args: ["aCollection"],
 source: "arguments: aCollection\x0a\x09arguments := aCollection",
 messageSends: [],
@@ -1219,11 +1210,10 @@ selector: "classReferences",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@classReferences"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"classReferences",{},smalltalk.MethodNode)})},
+},
 args: [],
 source: "classReferences\x0a\x09^ classReferences",
 messageSends: [],
@@ -1237,9 +1227,8 @@ selector: "classReferences:",
 protocol: 'accessing',
 fn: function (aCollection){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@classReferences"]=aCollection;
-return self}, function($ctx1) {$ctx1.fill(self,"classReferences:",{aCollection:aCollection},smalltalk.MethodNode)})},
+return self},
 args: ["aCollection"],
 source: "classReferences: aCollection\x0a\x09classReferences := aCollection",
 messageSends: [],
@@ -1295,9 +1284,8 @@ selector: "method",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return self;
-}, function($ctx1) {$ctx1.fill(self,"method",{},smalltalk.MethodNode)})},
+},
 args: [],
 source: "method\x0a\x09^ self",
 messageSends: [],
@@ -1311,11 +1299,10 @@ selector: "scope",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@scope"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"scope",{},smalltalk.MethodNode)})},
+},
 args: [],
 source: "scope\x0a\x09^ scope",
 messageSends: [],
@@ -1329,9 +1316,8 @@ selector: "scope:",
 protocol: 'accessing',
 fn: function (aMethodScope){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@scope"]=aMethodScope;
-return self}, function($ctx1) {$ctx1.fill(self,"scope:",{aMethodScope:aMethodScope},smalltalk.MethodNode)})},
+return self},
 args: ["aMethodScope"],
 source: "scope: aMethodScope\x0a\x09scope := aMethodScope",
 messageSends: [],
@@ -1345,11 +1331,10 @@ selector: "selector",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@selector"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"selector",{},smalltalk.MethodNode)})},
+},
 args: [],
 source: "selector\x0a\x09^ selector",
 messageSends: [],
@@ -1363,9 +1348,8 @@ selector: "selector:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@selector"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"selector:",{aString:aString},smalltalk.MethodNode)})},
+return self},
 args: ["aString"],
 source: "selector: aString\x0a\x09selector := aString",
 messageSends: [],
@@ -1379,11 +1363,10 @@ selector: "sendIndexes",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@sendIndexes"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"sendIndexes",{},smalltalk.MethodNode)})},
+},
 args: [],
 source: "sendIndexes\x0a\x09^ sendIndexes",
 messageSends: [],
@@ -1397,9 +1380,8 @@ selector: "sendIndexes:",
 protocol: 'accessing',
 fn: function (aDictionary){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@sendIndexes"]=aDictionary;
-return self}, function($ctx1) {$ctx1.fill(self,"sendIndexes:",{aDictionary:aDictionary},smalltalk.MethodNode)})},
+return self},
 args: ["aDictionary"],
 source: "sendIndexes: aDictionary\x0a\x09sendIndexes := aDictionary",
 messageSends: [],
@@ -1413,11 +1395,10 @@ selector: "source",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@source"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"source",{},smalltalk.MethodNode)})},
+},
 args: [],
 source: "source\x0a\x09^ source",
 messageSends: [],
@@ -1431,9 +1412,8 @@ selector: "source:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@source"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"source:",{aString:aString},smalltalk.MethodNode)})},
+return self},
 args: ["aString"],
 source: "source: aString\x0a\x09source := aString",
 messageSends: [],
@@ -1447,11 +1427,10 @@ selector: "superSends",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@superSends"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"superSends",{},smalltalk.MethodNode)})},
+},
 args: [],
 source: "superSends\x0a\x09^ superSends",
 messageSends: [],
@@ -1465,9 +1444,8 @@ selector: "superSends:",
 protocol: 'accessing',
 fn: function (aCollection){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@superSends"]=aCollection;
-return self}, function($ctx1) {$ctx1.fill(self,"superSends:",{aCollection:aCollection},smalltalk.MethodNode)})},
+return self},
 args: ["aCollection"],
 source: "superSends: aCollection\x0a\x09superSends := aCollection",
 messageSends: [],
@@ -1503,9 +1481,8 @@ selector: "isReturnNode",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isReturnNode",{},smalltalk.ReturnNode)})},
+},
 args: [],
 source: "isReturnNode\x0a\x09^ true",
 messageSends: [],
@@ -1537,11 +1514,10 @@ selector: "scope",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@scope"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"scope",{},smalltalk.ReturnNode)})},
+},
 args: [],
 source: "scope\x0a\x09^ scope",
 messageSends: [],
@@ -1555,9 +1531,8 @@ selector: "scope:",
 protocol: 'accessing',
 fn: function (aLexicalScope){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@scope"]=aLexicalScope;
-return self}, function($ctx1) {$ctx1.fill(self,"scope:",{aLexicalScope:aLexicalScope},smalltalk.ReturnNode)})},
+return self},
 args: ["aLexicalScope"],
 source: "scope: aLexicalScope\x0a\x09scope := aLexicalScope",
 messageSends: [],
@@ -1670,11 +1645,10 @@ selector: "index",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@index"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"index",{},smalltalk.SendNode)})},
+},
 args: [],
 source: "index\x0a\x09^ index",
 messageSends: [],
@@ -1688,9 +1662,8 @@ selector: "index:",
 protocol: 'accessing',
 fn: function (anInteger){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@index"]=anInteger;
-return self}, function($ctx1) {$ctx1.fill(self,"index:",{anInteger:anInteger},smalltalk.SendNode)})},
+return self},
 args: ["anInteger"],
 source: "index: anInteger\x0a\x09index := anInteger",
 messageSends: [],
@@ -1722,9 +1695,8 @@ selector: "isSendNode",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isSendNode",{},smalltalk.SendNode)})},
+},
 args: [],
 source: "isSendNode\x0a\x09^ true",
 messageSends: [],
@@ -1770,11 +1742,10 @@ selector: "receiver",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@receiver"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"receiver",{},smalltalk.SendNode)})},
+},
 args: [],
 source: "receiver\x0a\x09^ receiver",
 messageSends: [],
@@ -1803,17 +1774,31 @@ referencedClasses: []
 }),
 smalltalk.SendNode);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "requiresSmalltalkContext",
+protocol: 'testing',
+fn: function (){
+var self=this;
+return true;
+},
+args: [],
+source: "requiresSmalltalkContext\x0a\x09^ true",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.SendNode);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "selector",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@selector"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"selector",{},smalltalk.SendNode)})},
+},
 args: [],
 source: "selector\x0a\x09^ selector",
 messageSends: [],
@@ -1827,9 +1812,8 @@ selector: "selector:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@selector"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"selector:",{aString:aString},smalltalk.SendNode)})},
+return self},
 args: ["aString"],
 source: "selector: aString\x0a\x09selector := aString",
 messageSends: [],
@@ -1873,9 +1857,8 @@ selector: "stopOnStepping",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"stopOnStepping",{},smalltalk.SendNode)})},
+},
 args: [],
 source: "stopOnStepping\x0a\x09^ true",
 messageSends: [],
@@ -1912,9 +1895,8 @@ selector: "superSend:",
 protocol: 'accessing',
 fn: function (aBoolean){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@superSend"]=aBoolean;
-return self}, function($ctx1) {$ctx1.fill(self,"superSend:",{aBoolean:aBoolean},smalltalk.SendNode)})},
+return self},
 args: ["aBoolean"],
 source: "superSend: aBoolean\x0a\x09superSend := aBoolean",
 messageSends: [],
@@ -2007,9 +1989,8 @@ selector: "isSequenceNode",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isSequenceNode",{},smalltalk.SequenceNode)})},
+},
 args: [],
 source: "isSequenceNode\x0a\x09^ true",
 messageSends: [],
@@ -2023,11 +2004,10 @@ selector: "scope",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@scope"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"scope",{},smalltalk.SequenceNode)})},
+},
 args: [],
 source: "scope\x0a\x09^ scope",
 messageSends: [],
@@ -2041,9 +2021,8 @@ selector: "scope:",
 protocol: 'accessing',
 fn: function (aLexicalScope){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@scope"]=aLexicalScope;
-return self}, function($ctx1) {$ctx1.fill(self,"scope:",{aLexicalScope:aLexicalScope},smalltalk.SequenceNode)})},
+return self},
 args: ["aLexicalScope"],
 source: "scope: aLexicalScope\x0a\x09scope := aLexicalScope",
 messageSends: [],
@@ -2080,9 +2059,8 @@ selector: "temps:",
 protocol: 'accessing',
 fn: function (aCollection){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@temps"]=aCollection;
-return self}, function($ctx1) {$ctx1.fill(self,"temps:",{aCollection:aCollection},smalltalk.SequenceNode)})},
+return self},
 args: ["aCollection"],
 source: "temps: aCollection\x0a\x09temps := aCollection",
 messageSends: [],
@@ -2118,9 +2096,8 @@ selector: "isBlockSequenceNode",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isBlockSequenceNode",{},smalltalk.BlockSequenceNode)})},
+},
 args: [],
 source: "isBlockSequenceNode\x0a\x09^ true",
 messageSends: [],
@@ -2174,9 +2151,8 @@ selector: "isValueNode",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isValueNode",{},smalltalk.ValueNode)})},
+},
 args: [],
 source: "isValueNode\x0a\x09^ true",
 messageSends: [],
@@ -2190,11 +2166,10 @@ selector: "value",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@value"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"value",{},smalltalk.ValueNode)})},
+},
 args: [],
 source: "value\x0a\x09^ value",
 messageSends: [],
@@ -2208,9 +2183,8 @@ selector: "value:",
 protocol: 'accessing',
 fn: function (anObject){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@value"]=anObject;
-return self}, function($ctx1) {$ctx1.fill(self,"value:",{anObject:anObject},smalltalk.ValueNode)})},
+return self},
 args: ["anObject"],
 source: "value: anObject\x0a\x09value := anObject",
 messageSends: [],
@@ -2287,9 +2261,8 @@ selector: "assigned:",
 protocol: 'accessing',
 fn: function (aBoolean){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@assigned"]=aBoolean;
-return self}, function($ctx1) {$ctx1.fill(self,"assigned:",{aBoolean:aBoolean},smalltalk.VariableNode)})},
+return self},
 args: ["aBoolean"],
 source: "assigned: aBoolean\x0a\x09assigned := aBoolean",
 messageSends: [],
@@ -2320,11 +2293,10 @@ selector: "binding",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@binding"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"binding",{},smalltalk.VariableNode)})},
+},
 args: [],
 source: "binding\x0a\x09^ binding",
 messageSends: [],
@@ -2338,9 +2310,8 @@ selector: "binding:",
 protocol: 'accessing',
 fn: function (aScopeVar){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@binding"]=aScopeVar;
-return self}, function($ctx1) {$ctx1.fill(self,"binding:",{aScopeVar:aScopeVar},smalltalk.VariableNode)})},
+return self},
 args: ["aScopeVar"],
 source: "binding: aScopeVar\x0a\x09binding := aScopeVar",
 messageSends: [],
@@ -2390,9 +2361,8 @@ selector: "isVariableNode",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isVariableNode",{},smalltalk.VariableNode)})},
+},
 args: [],
 source: "isVariableNode\x0a\x09^ true",
 messageSends: [],
@@ -2407,9 +2377,8 @@ selector: "isNode",
 protocol: '*Compiler-AST',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"isNode",{},smalltalk.Object)})},
+},
 args: [],
 source: "isNode\x0a\x09^ false",
 messageSends: [],

+ 10 - 20
js/Compiler-Core.js

@@ -56,11 +56,10 @@ selector: "currentClass",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@currentClass"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"currentClass",{},smalltalk.AbstractCodeGenerator)})},
+},
 args: [],
 source: "currentClass\x0a\x09^ currentClass",
 messageSends: [],
@@ -74,9 +73,8 @@ selector: "currentClass:",
 protocol: 'accessing',
 fn: function (aClass){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@currentClass"]=aClass;
-return self}, function($ctx1) {$ctx1.fill(self,"currentClass:",{aClass:aClass},smalltalk.AbstractCodeGenerator)})},
+return self},
 args: ["aClass"],
 source: "currentClass: aClass\x0a\x09currentClass := aClass",
 messageSends: [],
@@ -132,9 +130,8 @@ selector: "source:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@source"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"source:",{aString:aString},smalltalk.AbstractCodeGenerator)})},
+return self},
 args: ["aString"],
 source: "source: aString\x0a\x09source := aString",
 messageSends: [],
@@ -268,9 +265,8 @@ selector: "codeGeneratorClass:",
 protocol: 'accessing',
 fn: function (aClass){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@codeGeneratorClass"]=aClass;
-return self}, function($ctx1) {$ctx1.fill(self,"codeGeneratorClass:",{aClass:aClass},smalltalk.Compiler)})},
+return self},
 args: ["aClass"],
 source: "codeGeneratorClass: aClass\x0a\x09codeGeneratorClass := aClass",
 messageSends: [],
@@ -392,11 +388,10 @@ selector: "currentClass",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@currentClass"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"currentClass",{},smalltalk.Compiler)})},
+},
 args: [],
 source: "currentClass\x0a\x09^ currentClass",
 messageSends: [],
@@ -410,9 +405,8 @@ selector: "currentClass:",
 protocol: 'accessing',
 fn: function (aClass){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@currentClass"]=aClass;
-return self}, function($ctx1) {$ctx1.fill(self,"currentClass:",{aClass:aClass},smalltalk.Compiler)})},
+return self},
 args: ["aClass"],
 source: "currentClass: aClass\x0a\x09currentClass := aClass",
 messageSends: [],
@@ -426,9 +420,8 @@ selector: "eval:",
 protocol: 'compiling',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return eval(aString);
-return self}, function($ctx1) {$ctx1.fill(self,"eval:",{aString:aString},smalltalk.Compiler)})},
+return self},
 args: ["aString"],
 source: "eval: aString\x0a\x09<return eval(aString)>",
 messageSends: [],
@@ -612,9 +605,8 @@ selector: "source:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@source"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"source:",{aString:aString},smalltalk.Compiler)})},
+return self},
 args: ["aString"],
 source: "source: aString\x0a\x09source := aString",
 messageSends: [],
@@ -628,11 +620,10 @@ selector: "unknownVariables",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@unknownVariables"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"unknownVariables",{},smalltalk.Compiler)})},
+},
 args: [],
 source: "unknownVariables\x0a\x09^ unknownVariables",
 messageSends: [],
@@ -646,9 +637,8 @@ selector: "unknownVariables:",
 protocol: 'accessing',
 fn: function (aCollection){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@unknownVariables"]=aCollection;
-return self}, function($ctx1) {$ctx1.fill(self,"unknownVariables:",{aCollection:aCollection},smalltalk.Compiler)})},
+return self},
 args: ["aCollection"],
 source: "unknownVariables: aCollection\x0a\x09unknownVariables := aCollection",
 messageSends: [],

+ 7 - 14
js/Compiler-Exceptions.js

@@ -44,11 +44,10 @@ selector: "variableName",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@variableName"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"variableName",{},smalltalk.InvalidAssignmentError)})},
+},
 args: [],
 source: "variableName\x0a\x09^ variableName",
 messageSends: [],
@@ -62,9 +61,8 @@ selector: "variableName:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@variableName"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"variableName:",{aString:aString},smalltalk.InvalidAssignmentError)})},
+return self},
 args: ["aString"],
 source: "variableName: aString\x0a\x09variableName := aString",
 messageSends: [],
@@ -101,11 +99,10 @@ selector: "variableName",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@variableName"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"variableName",{},smalltalk.ShadowingVariableError)})},
+},
 args: [],
 source: "variableName\x0a\x09^ variableName",
 messageSends: [],
@@ -119,9 +116,8 @@ selector: "variableName:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@variableName"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"variableName:",{aString:aString},smalltalk.ShadowingVariableError)})},
+return self},
 args: ["aString"],
 source: "variableName: aString\x0a\x09variableName := aString",
 messageSends: [],
@@ -158,11 +154,10 @@ selector: "variableName",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@variableName"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"variableName",{},smalltalk.UnknownVariableError)})},
+},
 args: [],
 source: "variableName\x0a\x09^ variableName",
 messageSends: [],
@@ -176,9 +171,8 @@ selector: "variableName:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@variableName"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"variableName:",{aString:aString},smalltalk.UnknownVariableError)})},
+return self},
 args: ["aString"],
 source: "variableName: aString\x0a\x09variableName := aString",
 messageSends: [],
@@ -196,9 +190,8 @@ selector: "basicSignal:",
 protocol: 'error handling',
 fn: function (anError){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 throw anError;
-return self}, function($ctx1) {$ctx1.fill(self,"basicSignal:",{anError:anError},smalltalk.RethrowErrorHandler)})},
+return self},
 args: ["anError"],
 source: "basicSignal: anError\x0a\x09<throw anError>",
 messageSends: [],

+ 143 - 167
js/Compiler-IR.js

@@ -101,11 +101,10 @@ selector: "method",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@method"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"method",{},smalltalk.IRASTTranslator)})},
+},
 args: [],
 source: "method\x0a\x09^ method",
 messageSends: [],
@@ -119,9 +118,8 @@ selector: "method:",
 protocol: 'accessing',
 fn: function (anIRMethod){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@method"]=anIRMethod;
-return self}, function($ctx1) {$ctx1.fill(self,"method:",{anIRMethod:anIRMethod},smalltalk.IRASTTranslator)})},
+return self},
 args: ["anIRMethod"],
 source: "method: anIRMethod\x0a\x09method := anIRMethod",
 messageSends: [],
@@ -161,11 +159,10 @@ selector: "sequence",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@sequence"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"sequence",{},smalltalk.IRASTTranslator)})},
+},
 args: [],
 source: "sequence\x0a\x09^ sequence",
 messageSends: [],
@@ -179,9 +176,8 @@ selector: "sequence:",
 protocol: 'accessing',
 fn: function (anIRSequence){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@sequence"]=anIRSequence;
-return self}, function($ctx1) {$ctx1.fill(self,"sequence:",{anIRSequence:anIRSequence},smalltalk.IRASTTranslator)})},
+return self},
 args: ["anIRSequence"],
 source: "sequence: anIRSequence\x0a\x09sequence := anIRSequence",
 messageSends: [],
@@ -195,11 +191,10 @@ selector: "source",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@source"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"source",{},smalltalk.IRASTTranslator)})},
+},
 args: [],
 source: "source\x0a\x09^ source",
 messageSends: [],
@@ -213,9 +208,8 @@ selector: "source:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@source"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"source:",{aString:aString},smalltalk.IRASTTranslator)})},
+return self},
 args: ["aString"],
 source: "source: aString\x0a\x09source := aString",
 messageSends: [],
@@ -229,11 +223,10 @@ selector: "theClass",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@theClass"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.IRASTTranslator)})},
+},
 args: [],
 source: "theClass\x0a\x09^ theClass",
 messageSends: [],
@@ -247,9 +240,8 @@ selector: "theClass:",
 protocol: 'accessing',
 fn: function (aClass){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@theClass"]=aClass;
-return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass},smalltalk.IRASTTranslator)})},
+return self},
 args: ["aClass"],
 source: "theClass: aClass\x0a\x09theClass := aClass",
 messageSends: [],
@@ -544,6 +536,7 @@ _st($2)._arguments_(_st(aNode)._arguments());
 _st($2)._selector_(_st(aNode)._selector());
 _st($2)._sendIndexes_(_st(aNode)._sendIndexes());
 _st($2)._superSends_(_st(aNode)._superSends());
+_st($2)._requiresSmalltalkContext_(_st(aNode)._requiresSmalltalkContext());
 _st($2)._classReferences_(_st(aNode)._classReferences());
 $3=$2;
 $4=_st(aNode)._scope();
@@ -601,8 +594,8 @@ $22=self._method();
 return $22;
 }, function($ctx1) {$ctx1.fill(self,"visitMethodNode:",{aNode:aNode},smalltalk.IRASTTranslator)})},
 args: ["aNode"],
-source: "visitMethodNode: aNode\x0a\x0a\x09self method: (IRMethod new\x0a\x09\x09source: self source crlfSanitized;\x0a\x09\x09theClass: self theClass;\x0a\x09\x09arguments: aNode arguments;\x0a\x09\x09selector: aNode selector;\x0a\x09\x09sendIndexes: aNode sendIndexes;\x0a\x09\x09superSends: aNode superSends;\x0a\x09\x09classReferences: aNode classReferences;\x0a\x09\x09scope: aNode scope;\x0a\x09\x09yourself).\x0a\x0a\x09aNode scope temps do: [ :each |\x0a\x09\x09self method add: (IRTempDeclaration new\x0a\x09\x09\x09name: each name;\x0a\x09\x09\x09scope: aNode scope;\x0a\x09\x09\x09yourself) ].\x0a\x0a\x09aNode nodes do: [ :each | self method add: (self visit: each) ].\x0a\x0a\x09aNode scope hasLocalReturn ifFalse: [\x0a\x09\x09(self method add: IRReturn new) add: (IRVariable new\x0a\x09\x09\x09variable: (aNode scope pseudoVars at: 'self');\x0a\x09\x09\x09yourself) ].\x0a\x0a\x09^ self method",
-messageSends: ["method:", "source:", "new", "crlfSanitized", "source", "theClass:", "theClass", "arguments:", "arguments", "selector:", "selector", "sendIndexes:", "sendIndexes", "superSends:", "superSends", "classReferences:", "classReferences", "scope:", "scope", "yourself", "do:", "temps", "add:", "method", "name:", "name", "nodes", "visit:", "ifFalse:", "hasLocalReturn", "variable:", "at:", "pseudoVars"],
+source: "visitMethodNode: aNode\x0a\x0a\x09self method: (IRMethod new\x0a\x09\x09source: self source crlfSanitized;\x0a\x09\x09theClass: self theClass;\x0a\x09\x09arguments: aNode arguments;\x0a\x09\x09selector: aNode selector;\x0a\x09\x09sendIndexes: aNode sendIndexes;\x0a\x09\x09superSends: aNode superSends;\x0a\x09\x09requiresSmalltalkContext: aNode requiresSmalltalkContext;\x0a\x09\x09classReferences: aNode classReferences;\x0a\x09\x09scope: aNode scope;\x0a\x09\x09yourself).\x0a\x0a\x09aNode scope temps do: [ :each |\x0a\x09\x09self method add: (IRTempDeclaration new\x0a\x09\x09\x09name: each name;\x0a\x09\x09\x09scope: aNode scope;\x0a\x09\x09\x09yourself) ].\x0a\x0a\x09aNode nodes do: [ :each | self method add: (self visit: each) ].\x0a\x0a\x09aNode scope hasLocalReturn ifFalse: [\x0a\x09\x09(self method add: IRReturn new) add: (IRVariable new\x0a\x09\x09\x09variable: (aNode scope pseudoVars at: 'self');\x0a\x09\x09\x09yourself) ].\x0a\x0a\x09^ self method",
+messageSends: ["method:", "source:", "new", "crlfSanitized", "source", "theClass:", "theClass", "arguments:", "arguments", "selector:", "selector", "sendIndexes:", "sendIndexes", "superSends:", "superSends", "requiresSmalltalkContext:", "requiresSmalltalkContext", "classReferences:", "classReferences", "scope:", "scope", "yourself", "do:", "temps", "add:", "method", "name:", "name", "nodes", "visit:", "ifFalse:", "hasLocalReturn", "variable:", "at:", "pseudoVars"],
 referencedClasses: ["IRMethod", "IRTempDeclaration", "IRReturn", "IRVariable"]
 }),
 smalltalk.IRASTTranslator);
@@ -844,9 +837,8 @@ selector: "canBeAssigned",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"canBeAssigned",{},smalltalk.IRInstruction)})},
+},
 args: [],
 source: "canBeAssigned\x0a\x09^ true",
 messageSends: [],
@@ -885,9 +877,8 @@ selector: "isClosure",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"isClosure",{},smalltalk.IRInstruction)})},
+},
 args: [],
 source: "isClosure\x0a\x09^ false",
 messageSends: [],
@@ -901,9 +892,8 @@ selector: "isInlined",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"isInlined",{},smalltalk.IRInstruction)})},
+},
 args: [],
 source: "isInlined\x0a\x09^ false",
 messageSends: [],
@@ -917,9 +907,8 @@ selector: "isLocalReturn",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"isLocalReturn",{},smalltalk.IRInstruction)})},
+},
 args: [],
 source: "isLocalReturn\x0a\x09^ false",
 messageSends: [],
@@ -933,9 +922,8 @@ selector: "isMethod",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"isMethod",{},smalltalk.IRInstruction)})},
+},
 args: [],
 source: "isMethod\x0a\x09^ false",
 messageSends: [],
@@ -949,9 +937,8 @@ selector: "isReturn",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"isReturn",{},smalltalk.IRInstruction)})},
+},
 args: [],
 source: "isReturn\x0a\x09^ false",
 messageSends: [],
@@ -965,9 +952,8 @@ selector: "isSend",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"isSend",{},smalltalk.IRInstruction)})},
+},
 args: [],
 source: "isSend\x0a\x09^ false",
 messageSends: [],
@@ -981,9 +967,8 @@ selector: "isSequence",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"isSequence",{},smalltalk.IRInstruction)})},
+},
 args: [],
 source: "isSequence\x0a\x09^ false",
 messageSends: [],
@@ -997,9 +982,8 @@ selector: "isTempDeclaration",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"isTempDeclaration",{},smalltalk.IRInstruction)})},
+},
 args: [],
 source: "isTempDeclaration\x0a\x09^ false",
 messageSends: [],
@@ -1013,9 +997,8 @@ selector: "isVariable",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"isVariable",{},smalltalk.IRInstruction)})},
+},
 args: [],
 source: "isVariable\x0a\x09^ false",
 messageSends: [],
@@ -1047,9 +1030,8 @@ selector: "needsBoxingAsReceiver",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"needsBoxingAsReceiver",{},smalltalk.IRInstruction)})},
+},
 args: [],
 source: "needsBoxingAsReceiver\x0a\x09^ true",
 messageSends: [],
@@ -1063,11 +1045,10 @@ selector: "parent",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@parent"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"parent",{},smalltalk.IRInstruction)})},
+},
 args: [],
 source: "parent\x0a\x09^ parent",
 messageSends: [],
@@ -1081,9 +1062,8 @@ selector: "parent:",
 protocol: 'accessing',
 fn: function (anIRInstruction){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@parent"]=anIRInstruction;
-return self}, function($ctx1) {$ctx1.fill(self,"parent:",{anIRInstruction:anIRInstruction},smalltalk.IRInstruction)})},
+return self},
 args: ["anIRInstruction"],
 source: "parent: anIRInstruction\x0a\x09parent := anIRInstruction",
 messageSends: [],
@@ -1277,11 +1257,10 @@ selector: "scope",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@scope"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"scope",{},smalltalk.IRScopedInstruction)})},
+},
 args: [],
 source: "scope\x0a\x09^ scope",
 messageSends: [],
@@ -1295,9 +1274,8 @@ selector: "scope:",
 protocol: 'accessing',
 fn: function (aScope){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@scope"]=aScope;
-return self}, function($ctx1) {$ctx1.fill(self,"scope:",{aScope:aScope},smalltalk.IRScopedInstruction)})},
+return self},
 args: ["aScope"],
 source: "scope: aScope\x0a\x09scope := aScope",
 messageSends: [],
@@ -1337,9 +1315,8 @@ selector: "arguments:",
 protocol: 'accessing',
 fn: function (aCollection){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@arguments"]=aCollection;
-return self}, function($ctx1) {$ctx1.fill(self,"arguments:",{aCollection:aCollection},smalltalk.IRClosureInstruction)})},
+return self},
 args: ["aCollection"],
 source: "arguments: aCollection\x0a\x09arguments := aCollection",
 messageSends: [],
@@ -1436,9 +1413,8 @@ selector: "isClosure",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isClosure",{},smalltalk.IRClosure)})},
+},
 args: [],
 source: "isClosure\x0a\x09^ true",
 messageSends: [],
@@ -1466,7 +1442,7 @@ smalltalk.IRClosure);
 
 
 
-smalltalk.addClass('IRMethod', smalltalk.IRClosureInstruction, ['theClass', 'source', 'selector', 'classReferences', 'sendIndexes', 'superSends', 'internalVariables'], 'Compiler-IR');
+smalltalk.addClass('IRMethod', smalltalk.IRClosureInstruction, ['theClass', 'source', 'selector', 'classReferences', 'sendIndexes', 'superSends', 'requiresSmalltalkContext', 'internalVariables'], 'Compiler-IR');
 smalltalk.IRMethod.comment="I am a method instruction";
 smalltalk.addMethod(
 smalltalk.method({
@@ -1492,11 +1468,10 @@ selector: "classReferences",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@classReferences"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"classReferences",{},smalltalk.IRMethod)})},
+},
 args: [],
 source: "classReferences\x0a\x09^ classReferences",
 messageSends: [],
@@ -1510,9 +1485,8 @@ selector: "classReferences:",
 protocol: 'accessing',
 fn: function (aCollection){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@classReferences"]=aCollection;
-return self}, function($ctx1) {$ctx1.fill(self,"classReferences:",{aCollection:aCollection},smalltalk.IRMethod)})},
+return self},
 args: ["aCollection"],
 source: "classReferences: aCollection\x0a\x09classReferences := aCollection",
 messageSends: [],
@@ -1551,9 +1525,8 @@ selector: "isMethod",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isMethod",{},smalltalk.IRMethod)})},
+},
 args: [],
 source: "isMethod\x0a\x09^ true",
 messageSends: [],
@@ -1585,9 +1558,8 @@ selector: "method",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return self;
-}, function($ctx1) {$ctx1.fill(self,"method",{},smalltalk.IRMethod)})},
+},
 args: [],
 source: "method\x0a\x09^ self",
 messageSends: [],
@@ -1597,15 +1569,52 @@ smalltalk.IRMethod);
 
 smalltalk.addMethod(
 smalltalk.method({
-selector: "selector",
+selector: "requiresSmalltalkContext",
 protocol: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
+var $2,$1;
+$2=self["@requiresSmalltalkContext"];
+if(($receiver = $2) == nil || $receiver == null){
+$1=false;
+} else {
+$1=$2;
+};
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"requiresSmalltalkContext",{},smalltalk.IRMethod)})},
+args: [],
+source: "requiresSmalltalkContext\x0a\x09^ requiresSmalltalkContext ifNil: [ false ]",
+messageSends: ["ifNil:"],
+referencedClasses: []
+}),
+smalltalk.IRMethod);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "requiresSmalltalkContext:",
+protocol: 'accessing',
+fn: function (anObject){
+var self=this;
+self["@requiresSmalltalkContext"]=anObject;
+return self},
+args: ["anObject"],
+source: "requiresSmalltalkContext: anObject\x0a\x09requiresSmalltalkContext := anObject",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.IRMethod);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "selector",
+protocol: 'accessing',
+fn: function (){
+var self=this;
 var $1;
 $1=self["@selector"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"selector",{},smalltalk.IRMethod)})},
+},
 args: [],
 source: "selector\x0a\x09^ selector",
 messageSends: [],
@@ -1619,9 +1628,8 @@ selector: "selector:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@selector"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"selector:",{aString:aString},smalltalk.IRMethod)})},
+return self},
 args: ["aString"],
 source: "selector: aString\x0a\x09selector := aString",
 messageSends: [],
@@ -1635,11 +1643,10 @@ selector: "sendIndexes",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@sendIndexes"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"sendIndexes",{},smalltalk.IRMethod)})},
+},
 args: [],
 source: "sendIndexes\x0a\x09^ sendIndexes",
 messageSends: [],
@@ -1653,9 +1660,8 @@ selector: "sendIndexes:",
 protocol: 'accessing',
 fn: function (aDictionary){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@sendIndexes"]=aDictionary;
-return self}, function($ctx1) {$ctx1.fill(self,"sendIndexes:",{aDictionary:aDictionary},smalltalk.IRMethod)})},
+return self},
 args: ["aDictionary"],
 source: "sendIndexes: aDictionary\x0a\x09sendIndexes := aDictionary",
 messageSends: [],
@@ -1669,11 +1675,10 @@ selector: "source",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@source"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"source",{},smalltalk.IRMethod)})},
+},
 args: [],
 source: "source\x0a\x09^ source",
 messageSends: [],
@@ -1687,9 +1692,8 @@ selector: "source:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@source"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"source:",{aString:aString},smalltalk.IRMethod)})},
+return self},
 args: ["aString"],
 source: "source: aString\x0a\x09source := aString",
 messageSends: [],
@@ -1703,11 +1707,10 @@ selector: "superSends",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@superSends"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"superSends",{},smalltalk.IRMethod)})},
+},
 args: [],
 source: "superSends\x0a\x09^ superSends",
 messageSends: [],
@@ -1721,9 +1724,8 @@ selector: "superSends:",
 protocol: 'accessing',
 fn: function (aCollection){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@superSends"]=aCollection;
-return self}, function($ctx1) {$ctx1.fill(self,"superSends:",{aCollection:aCollection},smalltalk.IRMethod)})},
+return self},
 args: ["aCollection"],
 source: "superSends: aCollection\x0a\x09superSends := aCollection",
 messageSends: [],
@@ -1737,11 +1739,10 @@ selector: "theClass",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@theClass"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.IRMethod)})},
+},
 args: [],
 source: "theClass\x0a\x09^ theClass",
 messageSends: [],
@@ -1755,9 +1756,8 @@ selector: "theClass:",
 protocol: 'accessing',
 fn: function (aClass){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@theClass"]=aClass;
-return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass},smalltalk.IRMethod)})},
+return self},
 args: ["aClass"],
 source: "theClass: aClass\x0a\x09theClass := aClass",
 messageSends: [],
@@ -1793,9 +1793,8 @@ selector: "canBeAssigned",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"canBeAssigned",{},smalltalk.IRReturn)})},
+},
 args: [],
 source: "canBeAssigned\x0a\x09^ false",
 messageSends: [],
@@ -1809,9 +1808,8 @@ selector: "isBlockReturn",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"isBlockReturn",{},smalltalk.IRReturn)})},
+},
 args: [],
 source: "isBlockReturn\x0a\x09^ false",
 messageSends: [],
@@ -1825,9 +1823,8 @@ selector: "isLocalReturn",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isLocalReturn",{},smalltalk.IRReturn)})},
+},
 args: [],
 source: "isLocalReturn\x0a\x09^ true",
 messageSends: [],
@@ -1859,9 +1856,8 @@ selector: "isReturn",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isReturn",{},smalltalk.IRReturn)})},
+},
 args: [],
 source: "isReturn\x0a\x09^ true",
 messageSends: [],
@@ -1920,9 +1916,8 @@ selector: "isBlockReturn",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isBlockReturn",{},smalltalk.IRBlockReturn)})},
+},
 args: [],
 source: "isBlockReturn\x0a\x09^ true",
 messageSends: [],
@@ -1958,9 +1953,8 @@ selector: "isLocalReturn",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"isLocalReturn",{},smalltalk.IRNonLocalReturn)})},
+},
 args: [],
 source: "isLocalReturn\x0a\x09^ false",
 messageSends: [],
@@ -1995,9 +1989,8 @@ selector: "isTempDeclaration",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isTempDeclaration",{},smalltalk.IRTempDeclaration)})},
+},
 args: [],
 source: "isTempDeclaration\x0a\x09^ true",
 messageSends: [],
@@ -2011,11 +2004,10 @@ selector: "name",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@name"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"name",{},smalltalk.IRTempDeclaration)})},
+},
 args: [],
 source: "name\x0a\x09^ name",
 messageSends: [],
@@ -2029,9 +2021,8 @@ selector: "name:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@name"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"name:",{aString:aString},smalltalk.IRTempDeclaration)})},
+return self},
 args: ["aString"],
 source: "name: aString\x0a\x09name := aString",
 messageSends: [],
@@ -2067,11 +2058,10 @@ selector: "classSend",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@classSend"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"classSend",{},smalltalk.IRSend)})},
+},
 args: [],
 source: "classSend\x0a\x09^ classSend",
 messageSends: [],
@@ -2085,9 +2075,8 @@ selector: "classSend:",
 protocol: 'accessing',
 fn: function (aClass){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@classSend"]=aClass;
-return self}, function($ctx1) {$ctx1.fill(self,"classSend:",{aClass:aClass},smalltalk.IRSend)})},
+return self},
 args: ["aClass"],
 source: "classSend: aClass\x0a\x09classSend := aClass",
 messageSends: [],
@@ -2101,11 +2090,10 @@ selector: "index",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@index"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"index",{},smalltalk.IRSend)})},
+},
 args: [],
 source: "index\x0a\x09^ index",
 messageSends: [],
@@ -2119,9 +2107,8 @@ selector: "index:",
 protocol: 'accessing',
 fn: function (anInteger){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@index"]=anInteger;
-return self}, function($ctx1) {$ctx1.fill(self,"index:",{anInteger:anInteger},smalltalk.IRSend)})},
+return self},
 args: ["anInteger"],
 source: "index: anInteger\x0a\x09index := anInteger",
 messageSends: [],
@@ -2135,9 +2122,8 @@ selector: "isSend",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isSend",{},smalltalk.IRSend)})},
+},
 args: [],
 source: "isSend\x0a\x09^ true",
 messageSends: [],
@@ -2151,11 +2137,10 @@ selector: "selector",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@selector"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"selector",{},smalltalk.IRSend)})},
+},
 args: [],
 source: "selector\x0a\x09^ selector",
 messageSends: [],
@@ -2169,9 +2154,8 @@ selector: "selector:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@selector"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"selector:",{aString:aString},smalltalk.IRSend)})},
+return self},
 args: ["aString"],
 source: "selector: aString\x0a\x09selector := aString",
 messageSends: [],
@@ -2206,9 +2190,8 @@ selector: "isSequence",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isSequence",{},smalltalk.IRSequence)})},
+},
 args: [],
 source: "isSequence\x0a\x09^ true",
 messageSends: [],
@@ -2265,9 +2248,8 @@ selector: "needsBoxingAsReceiver",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"needsBoxingAsReceiver",{},smalltalk.IRValue)})},
+},
 args: [],
 source: "needsBoxingAsReceiver\x0a\x09^ false",
 messageSends: [],
@@ -2281,11 +2263,10 @@ selector: "value",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@value"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"value",{},smalltalk.IRValue)})},
+},
 args: [],
 source: "value\x0a\x09^ value",
 messageSends: [],
@@ -2299,9 +2280,8 @@ selector: "value:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@value"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"value:",{aString:aString},smalltalk.IRValue)})},
+return self},
 args: ["aString"],
 source: "value: aString\x0a\x09value := aString",
 messageSends: [],
@@ -2337,9 +2317,8 @@ selector: "isVariable",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isVariable",{},smalltalk.IRVariable)})},
+},
 args: [],
 source: "isVariable\x0a\x09^ true",
 messageSends: [],
@@ -2371,11 +2350,10 @@ selector: "variable",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@variable"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"variable",{},smalltalk.IRVariable)})},
+},
 args: [],
 source: "variable\x0a\x09^ variable",
 messageSends: [],
@@ -2389,9 +2367,8 @@ selector: "variable:",
 protocol: 'accessing',
 fn: function (aScopeVariable){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@variable"]=aScopeVariable;
-return self}, function($ctx1) {$ctx1.fill(self,"variable:",{aScopeVariable:aScopeVariable},smalltalk.IRVariable)})},
+return self},
 args: ["aScopeVariable"],
 source: "variable: aScopeVariable\x0a\x09variable := aScopeVariable",
 messageSends: [],
@@ -2426,11 +2403,10 @@ selector: "source",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@source"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"source",{},smalltalk.IRVerbatim)})},
+},
 args: [],
 source: "source\x0a\x09^ source",
 messageSends: [],
@@ -2444,9 +2420,8 @@ selector: "source:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@source"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"source:",{aString:aString},smalltalk.IRVerbatim)})},
+return self},
 args: ["aString"],
 source: "source: aString\x0a\x09source := aString",
 messageSends: [],
@@ -2846,11 +2821,10 @@ selector: "currentClass",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@currentClass"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"currentClass",{},smalltalk.IRJSTranslator)})},
+},
 args: [],
 source: "currentClass\x0a\x09^ currentClass",
 messageSends: [],
@@ -2864,9 +2838,8 @@ selector: "currentClass:",
 protocol: 'accessing',
 fn: function (aClass){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@currentClass"]=aClass;
-return self}, function($ctx1) {$ctx1.fill(self,"currentClass:",{aClass:aClass},smalltalk.IRJSTranslator)})},
+return self},
 args: ["aClass"],
 source: "currentClass: aClass\x0a\x09currentClass := aClass",
 messageSends: [],
@@ -2898,11 +2871,10 @@ selector: "stream",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@stream"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"stream",{},smalltalk.IRJSTranslator)})},
+},
 args: [],
 source: "stream\x0a\x09^ stream",
 messageSends: [],
@@ -2916,9 +2888,8 @@ selector: "stream:",
 protocol: 'accessing',
 fn: function (aStream){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@stream"]=aStream;
-return self}, function($ctx1) {$ctx1.fill(self,"stream:",{aStream:aStream},smalltalk.IRJSTranslator)})},
+return self},
 args: ["aStream"],
 source: "stream: aStream\x0a\x09stream := aStream",
 messageSends: [],
@@ -3207,8 +3178,7 @@ selector: "visitIRTempDeclaration:",
 protocol: 'visiting',
 fn: function (anIRTempDeclaration){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"visitIRTempDeclaration:",{anIRTempDeclaration:anIRTempDeclaration},smalltalk.IRJSTranslator)})},
+return self},
 args: ["anIRTempDeclaration"],
 source: "visitIRTempDeclaration: anIRTempDeclaration\x0a\x09\x22self stream\x0a\x09\x09nextPutAll: 'var ', anIRTempDeclaration name asVariableName, ';';\x0a\x09\x09lf\x22",
 messageSends: [],
@@ -3643,63 +3613,69 @@ protocol: 'streaming',
 fn: function (aMethod,aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $4,$3,$2,$1,$5,$10,$9,$8,$7,$6,$14,$13,$12,$11,$15,$16,$17;
-$4=_st(aMethod)._scope();
+var $1,$2,$6,$5,$4,$3,$7,$12,$11,$10,$9,$8,$16,$15,$14,$13,$17,$18,$19;
+$1=_st(aMethod)._requiresSmalltalkContext();
+if(! smalltalk.assert($1)){
+$2=_st(aBlock)._value();
+$ctx1.sendIdx["value"]=1;
+return $2;
+};
+$6=_st(aMethod)._scope();
 $ctx1.sendIdx["scope"]=1;
-$3=_st($4)._alias();
+$5=_st($6)._alias();
 $ctx1.sendIdx["alias"]=1;
-$2="return smalltalk.withContext(function(".__comma($3);
+$4="return smalltalk.withContext(function(".__comma($5);
 $ctx1.sendIdx[","]=2;
-$1=_st($2).__comma(") { ");
+$3=_st($4).__comma(") { ");
 $ctx1.sendIdx[","]=1;
-self._nextPutAll_($1);
+self._nextPutAll_($3);
 $ctx1.sendIdx["nextPutAll:"]=1;
-$5=self._lf();
+$7=self._lf();
 _st(aBlock)._value();
-$10=_st(aMethod)._scope();
+$12=_st(aMethod)._scope();
 $ctx1.sendIdx["scope"]=2;
-$9=_st($10)._alias();
+$11=_st($12)._alias();
 $ctx1.sendIdx["alias"]=2;
-$8="}, function(".__comma($9);
+$10="}, function(".__comma($11);
 $ctx1.sendIdx[","]=5;
-$7=_st($8).__comma(") {");
+$9=_st($10).__comma(") {");
 $ctx1.sendIdx[","]=4;
-$6=_st($7).__comma(_st(_st(aMethod)._scope())._alias());
+$8=_st($9).__comma(_st(_st(aMethod)._scope())._alias());
 $ctx1.sendIdx[","]=3;
-self._nextPutAll_($6);
+self._nextPutAll_($8);
 $ctx1.sendIdx["nextPutAll:"]=2;
-$14=_st(_st(aMethod)._selector())._asJavascript();
+$16=_st(_st(aMethod)._selector())._asJavascript();
 $ctx1.sendIdx["asJavascript"]=1;
-$13=".fill(self,".__comma($14);
-$12=_st($13).__comma(",{");
+$15=".fill(self,".__comma($16);
+$14=_st($15).__comma(",{");
 $ctx1.sendIdx[","]=6;
-$11=self._nextPutAll_($12);
+$13=self._nextPutAll_($14);
 $ctx1.sendIdx["nextPutAll:"]=3;
 _st(_st(aMethod)._locals())._do_separatedBy_((function(each){
 return smalltalk.withContext(function($ctx2) {
-$15=_st(each)._asVariableName();
+$17=_st(each)._asVariableName();
 $ctx2.sendIdx["asVariableName"]=1;
-self._nextPutAll_($15);
+self._nextPutAll_($17);
 $ctx2.sendIdx["nextPutAll:"]=4;
 self._nextPutAll_(":");
 $ctx2.sendIdx["nextPutAll:"]=5;
-$16=self._nextPutAll_(_st(each)._asVariableName());
+$18=self._nextPutAll_(_st(each)._asVariableName());
 $ctx2.sendIdx["nextPutAll:"]=6;
-return $16;
-}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}),(function(){
+return $18;
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}),(function(){
 return smalltalk.withContext(function($ctx2) {
 return self._nextPutAll_(",");
 $ctx2.sendIdx["nextPutAll:"]=7;
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
 self._nextPutAll_("},");
 $ctx1.sendIdx["nextPutAll:"]=8;
 self._nextPutAll_(_st(_st(aMethod)._theClass())._asJavascript());
 $ctx1.sendIdx["nextPutAll:"]=9;
-$17=self._nextPutAll_(")})");
+$19=self._nextPutAll_(")})");
 return self}, function($ctx1) {$ctx1.fill(self,"nextPutContextFor:during:",{aMethod:aMethod,aBlock:aBlock},smalltalk.JSStream)})},
 args: ["aMethod", "aBlock"],
-source: "nextPutContextFor: aMethod during: aBlock\x0a\x09self\x0a\x09\x09nextPutAll: 'return smalltalk.withContext(function(', aMethod scope alias, ') { '; lf.\x0a\x09aBlock value.\x0a\x09\x0a\x09self\x0a\x09\x09nextPutAll: '}, function(', aMethod scope alias, ') {', aMethod scope alias;\x0a\x09\x09nextPutAll: '.fill(self,', aMethod selector asJavascript, ',{'.\x0a\x0a\x09aMethod locals\x0a\x09\x09do: [ :each |\x0a\x09\x09\x09self\x0a\x09\x09\x09\x09nextPutAll: each asVariableName;\x0a\x09\x09\x09\x09nextPutAll: ':';\x0a\x09\x09\x09\x09nextPutAll: each asVariableName ]\x0a\x09\x09separatedBy: [ self nextPutAll: ',' ].\x0a\x09\x0a\x09self\x0a\x09\x09nextPutAll: '},';\x0a\x09\x09nextPutAll: aMethod theClass asJavascript;\x0a\x09\x09nextPutAll: ')})'",
-messageSends: ["nextPutAll:", ",", "alias", "scope", "lf", "value", "asJavascript", "selector", "do:separatedBy:", "locals", "asVariableName", "theClass"],
+source: "nextPutContextFor: aMethod during: aBlock\x0a\x09aMethod requiresSmalltalkContext ifFalse: [ ^ aBlock value ].\x0a\x09\x0a\x09self\x0a\x09\x09nextPutAll: 'return smalltalk.withContext(function(', aMethod scope alias, ') { '; lf.\x0a\x09aBlock value.\x0a\x09\x0a\x09self\x0a\x09\x09nextPutAll: '}, function(', aMethod scope alias, ') {', aMethod scope alias;\x0a\x09\x09nextPutAll: '.fill(self,', aMethod selector asJavascript, ',{'.\x0a\x0a\x09aMethod locals\x0a\x09\x09do: [ :each |\x0a\x09\x09\x09self\x0a\x09\x09\x09\x09nextPutAll: each asVariableName;\x0a\x09\x09\x09\x09nextPutAll: ':';\x0a\x09\x09\x09\x09nextPutAll: each asVariableName ]\x0a\x09\x09separatedBy: [ self nextPutAll: ',' ].\x0a\x09\x0a\x09self\x0a\x09\x09nextPutAll: '},';\x0a\x09\x09nextPutAll: aMethod theClass asJavascript;\x0a\x09\x09nextPutAll: ')})'",
+messageSends: ["ifFalse:", "requiresSmalltalkContext", "value", "nextPutAll:", ",", "alias", "scope", "lf", "asJavascript", "selector", "do:separatedBy:", "locals", "asVariableName", "theClass"],
 referencedClasses: []
 }),
 smalltalk.JSStream);

+ 12 - 24
js/Compiler-Inlining.js

@@ -28,9 +28,8 @@ selector: "isInlined",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isInlined",{},smalltalk.IRInlinedAssignment)})},
+},
 args: [],
 source: "isInlined\x0a\x09^ true",
 messageSends: [],
@@ -64,9 +63,8 @@ selector: "isInlined",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isInlined",{},smalltalk.IRInlinedClosure)})},
+},
 args: [],
 source: "isInlined\x0a\x09^ true",
 messageSends: [],
@@ -102,9 +100,8 @@ selector: "isInlined",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isInlined",{},smalltalk.IRInlinedReturn)})},
+},
 args: [],
 source: "isInlined\x0a\x09^ true",
 messageSends: [],
@@ -138,9 +135,8 @@ selector: "isInlined",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isInlined",{},smalltalk.IRInlinedSend)})},
+},
 args: [],
 source: "isInlined\x0a\x09^ true",
 messageSends: [],
@@ -254,9 +250,8 @@ selector: "isInlined",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isInlined",{},smalltalk.IRInlinedSequence)})},
+},
 args: [],
 source: "isInlined\x0a\x09^ true",
 messageSends: [],
@@ -1313,11 +1308,10 @@ selector: "send",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@send"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"send",{},smalltalk.IRSendInliner)})},
+},
 args: [],
 source: "send\x0a\x09^ send",
 messageSends: [],
@@ -1331,9 +1325,8 @@ selector: "send:",
 protocol: 'accessing',
 fn: function (anIRSend){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@send"]=anIRSend;
-return self}, function($ctx1) {$ctx1.fill(self,"send:",{anIRSend:anIRSend},smalltalk.IRSendInliner)})},
+return self},
 args: ["anIRSend"],
 source: "send: anIRSend\x0a\x09send := anIRSend",
 messageSends: [],
@@ -1347,11 +1340,10 @@ selector: "translator",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@translator"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"translator",{},smalltalk.IRSendInliner)})},
+},
 args: [],
 source: "translator\x0a\x09^ translator",
 messageSends: [],
@@ -1365,9 +1357,8 @@ selector: "translator:",
 protocol: 'accessing',
 fn: function (anASTTranslator){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@translator"]=anASTTranslator;
-return self}, function($ctx1) {$ctx1.fill(self,"translator:",{anASTTranslator:anASTTranslator},smalltalk.IRSendInliner)})},
+return self},
 args: ["anASTTranslator"],
 source: "translator: anASTTranslator\x0a\x09translator := anASTTranslator",
 messageSends: [],
@@ -1382,11 +1373,10 @@ selector: "inlinedSelectors",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=["ifTrue:", "ifFalse:", "ifTrue:ifFalse:", "ifFalse:ifTrue:", "ifNil:", "ifNotNil:", "ifNil:ifNotNil:", "ifNotNil:ifNil:"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"inlinedSelectors",{},smalltalk.IRSendInliner.klass)})},
+},
 args: [],
 source: "inlinedSelectors\x0a\x09^ #('ifTrue:' 'ifFalse:' 'ifTrue:ifFalse:' 'ifFalse:ifTrue:' 'ifNil:' 'ifNotNil:' 'ifNil:ifNotNil:' 'ifNotNil:ifNil:')",
 messageSends: [],
@@ -1435,11 +1425,10 @@ selector: "assignment",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@assignment"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"assignment",{},smalltalk.IRAssignmentInliner)})},
+},
 args: [],
 source: "assignment\x0a\x09^ assignment",
 messageSends: [],
@@ -1453,9 +1442,8 @@ selector: "assignment:",
 protocol: 'accessing',
 fn: function (aNode){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@assignment"]=aNode;
-return self}, function($ctx1) {$ctx1.fill(self,"assignment:",{aNode:aNode},smalltalk.IRAssignmentInliner)})},
+return self},
 args: ["aNode"],
 source: "assignment: aNode\x0a\x09assignment := aNode",
 messageSends: [],

+ 36 - 72
js/Compiler-Interpreter.js

@@ -26,9 +26,8 @@ selector: "compiledSource",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "[ AST Block closure ]";
-}, function($ctx1) {$ctx1.fill(self,"compiledSource",{},smalltalk.AIBlockClosure)})},
+},
 args: [],
 source: "compiledSource\x0a\x09\x22Unlike blocks, the receiver doesn't represent a JS function\x22\x0a\x09\x0a\x09^ '[ AST Block closure ]'",
 messageSends: [],
@@ -58,10 +57,9 @@ selector: "initializeWithContext:node:",
 protocol: 'initialization',
 fn: function (aContext,aNode){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@node"]=aNode;
 self["@outerContext"]=aContext;
-return self}, function($ctx1) {$ctx1.fill(self,"initializeWithContext:node:",{aContext:aContext,aNode:aNode},smalltalk.AIBlockClosure)})},
+return self},
 args: ["aContext", "aNode"],
 source: "initializeWithContext: aContext node: aNode\x0a\x09node := aNode.\x0a\x09outerContext := aContext",
 messageSends: [],
@@ -302,11 +300,10 @@ selector: "evaluatedSelector",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@evaluatedSelector"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"evaluatedSelector",{},smalltalk.AIContext)})},
+},
 args: [],
 source: "evaluatedSelector\x0a\x09^ evaluatedSelector",
 messageSends: [],
@@ -320,9 +317,8 @@ selector: "evaluatedSelector:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@evaluatedSelector"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"evaluatedSelector:",{aString:aString},smalltalk.AIContext)})},
+return self},
 args: ["aString"],
 source: "evaluatedSelector: aString\x0a\x09evaluatedSelector := aString",
 messageSends: [],
@@ -359,9 +355,8 @@ selector: "index:",
 protocol: 'accessing',
 fn: function (anInteger){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@index"]=anInteger;
-return self}, function($ctx1) {$ctx1.fill(self,"index:",{anInteger:anInteger},smalltalk.AIContext)})},
+return self},
 args: ["anInteger"],
 source: "index: anInteger\x0a\x09index := anInteger",
 messageSends: [],
@@ -482,11 +477,10 @@ selector: "innerContext",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@innerContext"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"innerContext",{},smalltalk.AIContext)})},
+},
 args: [],
 source: "innerContext\x0a\x09^ innerContext",
 messageSends: [],
@@ -500,9 +494,8 @@ selector: "innerContext:",
 protocol: 'accessing',
 fn: function (anAIContext){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@innerContext"]=anAIContext;
-return self}, function($ctx1) {$ctx1.fill(self,"innerContext:",{anAIContext:anAIContext},smalltalk.AIContext)})},
+return self},
 args: ["anAIContext"],
 source: "innerContext: anAIContext\x0a\x09innerContext := anAIContext",
 messageSends: [],
@@ -540,9 +533,8 @@ selector: "interpreter:",
 protocol: 'interpreting',
 fn: function (anInterpreter){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@interpreter"]=anInterpreter;
-return self}, function($ctx1) {$ctx1.fill(self,"interpreter:",{anInterpreter:anInterpreter},smalltalk.AIContext)})},
+return self},
 args: ["anInterpreter"],
 source: "interpreter: anInterpreter\x0a\x09interpreter := anInterpreter",
 messageSends: [],
@@ -701,11 +693,10 @@ selector: "outerContext",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@outerContext"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"outerContext",{},smalltalk.AIContext)})},
+},
 args: [],
 source: "outerContext\x0a\x09^ outerContext",
 messageSends: [],
@@ -770,11 +761,10 @@ selector: "selector",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@selector"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"selector",{},smalltalk.AIContext)})},
+},
 args: [],
 source: "selector\x0a\x09^ selector",
 messageSends: [],
@@ -788,9 +778,8 @@ selector: "selector:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@selector"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"selector:",{aString:aString},smalltalk.AIContext)})},
+return self},
 args: ["aString"],
 source: "selector: aString\x0a\x09selector := aString",
 messageSends: [],
@@ -849,9 +838,8 @@ selector: "sendIndexes:",
 protocol: 'accessing',
 fn: function (aDictionary){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@sendIndexes"]=aDictionary;
-return self}, function($ctx1) {$ctx1.fill(self,"sendIndexes:",{aDictionary:aDictionary},smalltalk.AIContext)})},
+return self},
 args: ["aDictionary"],
 source: "sendIndexes: aDictionary\x0a\x09sendIndexes := aDictionary",
 messageSends: [],
@@ -966,11 +954,10 @@ selector: "context",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@context"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"context",{},smalltalk.ASTDebugger)})},
+},
 args: [],
 source: "context\x0a\x09^ context",
 messageSends: [],
@@ -984,9 +971,8 @@ selector: "context:",
 protocol: 'accessing',
 fn: function (aContext){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@context"]=aContext;
-return self}, function($ctx1) {$ctx1.fill(self,"context:",{aContext:aContext},smalltalk.ASTDebugger)})},
+return self},
 args: ["aContext"],
 source: "context: aContext\x0a\x09context := aContext",
 messageSends: [],
@@ -1001,9 +987,8 @@ protocol: 'defaults',
 fn: function (){
 var self=this;
 function $ASTInterpreter(){return smalltalk.ASTInterpreter||(typeof ASTInterpreter=="undefined"?nil:ASTInterpreter)}
-return smalltalk.withContext(function($ctx1) { 
 return $ASTInterpreter();
-}, function($ctx1) {$ctx1.fill(self,"defaultInterpreterClass",{},smalltalk.ASTDebugger)})},
+},
 args: [],
 source: "defaultInterpreterClass\x0a\x09^ ASTInterpreter",
 messageSends: [],
@@ -1083,9 +1068,8 @@ selector: "interpreter:",
 protocol: 'accessing',
 fn: function (anInterpreter){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@interpreter"]=anInterpreter;
-return self}, function($ctx1) {$ctx1.fill(self,"interpreter:",{anInterpreter:anInterpreter},smalltalk.ASTDebugger)})},
+return self},
 args: ["anInterpreter"],
 source: "interpreter: anInterpreter\x0a\x09interpreter := anInterpreter",
 messageSends: [],
@@ -1288,11 +1272,10 @@ selector: "context",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@context"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"context",{},smalltalk.ASTInterpreter)})},
+},
 args: [],
 source: "context\x0a\x09^ context",
 messageSends: [],
@@ -1306,9 +1289,8 @@ selector: "context:",
 protocol: 'accessing',
 fn: function (aContext){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@context"]=aContext;
-return self}, function($ctx1) {$ctx1.fill(self,"context:",{aContext:aContext},smalltalk.ASTInterpreter)})},
+return self},
 args: ["aContext"],
 source: "context: aContext\x0a\x09context := aContext",
 messageSends: [],
@@ -1485,11 +1467,10 @@ selector: "node",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@node"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"node",{},smalltalk.ASTInterpreter)})},
+},
 args: [],
 source: "node\x0a\x09\x22Answer the next node, ie the node to be evaluated in the next step\x22\x0a\x09\x0a\x09^ node",
 messageSends: [],
@@ -1503,9 +1484,8 @@ selector: "node:",
 protocol: 'accessing',
 fn: function (aNode){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@node"]=aNode;
-return self}, function($ctx1) {$ctx1.fill(self,"node:",{aNode:aNode},smalltalk.ASTInterpreter)})},
+return self},
 args: ["aNode"],
 source: "node: aNode\x0a\x09node := aNode",
 messageSends: [],
@@ -1647,11 +1627,10 @@ selector: "returnValue",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@returnValue"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"returnValue",{},smalltalk.ASTInterpreter)})},
+},
 args: [],
 source: "returnValue\x0a\x09^ returnValue",
 messageSends: [],
@@ -1665,9 +1644,8 @@ selector: "returnValue:",
 protocol: 'accessing',
 fn: function (anObject){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@returnValue"]=anObject;
-return self}, function($ctx1) {$ctx1.fill(self,"returnValue:",{anObject:anObject},smalltalk.ASTInterpreter)})},
+return self},
 args: ["anObject"],
 source: "returnValue: anObject\x0a\x09returnValue := anObject",
 messageSends: [],
@@ -1962,8 +1940,7 @@ selector: "visitNode:",
 protocol: 'visiting',
 fn: function (aNode){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"visitNode:",{aNode:aNode},smalltalk.ASTInterpreter)})},
+return self},
 args: ["aNode"],
 source: "visitNode: aNode\x0a\x09\x22Do nothing by default. Especially, do not visit children recursively.\x22",
 messageSends: [],
@@ -2118,11 +2095,10 @@ selector: "context",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@context"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"context",{},smalltalk.ASTPCNodeVisitor)})},
+},
 args: [],
 source: "context\x0a\x09^ context",
 messageSends: [],
@@ -2136,9 +2112,8 @@ selector: "context:",
 protocol: 'accessing',
 fn: function (aContext){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@context"]=aContext;
-return self}, function($ctx1) {$ctx1.fill(self,"context:",{aContext:aContext},smalltalk.ASTPCNodeVisitor)})},
+return self},
 args: ["aContext"],
 source: "context: aContext\x0a\x09context := aContext",
 messageSends: [],
@@ -2152,11 +2127,10 @@ selector: "currentNode",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@currentNode"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"currentNode",{},smalltalk.ASTPCNodeVisitor)})},
+},
 args: [],
 source: "currentNode\x0a\x09^ currentNode",
 messageSends: [],
@@ -2210,11 +2184,10 @@ selector: "selector",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@selector"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"selector",{},smalltalk.ASTPCNodeVisitor)})},
+},
 args: [],
 source: "selector\x0a\x09^ selector",
 messageSends: [],
@@ -2228,9 +2201,8 @@ selector: "selector:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@selector"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"selector:",{aString:aString},smalltalk.ASTPCNodeVisitor)})},
+return self},
 args: ["aString"],
 source: "selector: aString\x0a\x09selector := aString",
 messageSends: [],
@@ -2244,9 +2216,8 @@ selector: "visitJSStatementNode:",
 protocol: 'visiting',
 fn: function (aNode){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@currentNode"]=aNode;
-return self}, function($ctx1) {$ctx1.fill(self,"visitJSStatementNode:",{aNode:aNode},smalltalk.ASTPCNodeVisitor)})},
+return self},
 args: ["aNode"],
 source: "visitJSStatementNode: aNode\x0a\x09\x22If a JSStatementNode is encountered, it always is the current node.\x0a\x09Stop visiting the AST there\x22\x0a\x09\x0a\x09currentNode := aNode",
 messageSends: [],
@@ -2299,9 +2270,8 @@ selector: "isSteppingNode",
 protocol: '*Compiler-Interpreter',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"isSteppingNode",{},smalltalk.Node)})},
+},
 args: [],
 source: "isSteppingNode\x0a\x09^ false",
 messageSends: [],
@@ -2315,9 +2285,8 @@ selector: "isSteppingNode",
 protocol: '*Compiler-Interpreter',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isSteppingNode",{},smalltalk.AssignmentNode)})},
+},
 args: [],
 source: "isSteppingNode\x0a\x09^ true",
 messageSends: [],
@@ -2331,9 +2300,8 @@ selector: "isSteppingNode",
 protocol: '*Compiler-Interpreter',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isSteppingNode",{},smalltalk.BlockNode)})},
+},
 args: [],
 source: "isSteppingNode\x0a\x09^ true",
 messageSends: [],
@@ -2347,9 +2315,8 @@ selector: "isSteppingNode",
 protocol: '*Compiler-Interpreter',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isSteppingNode",{},smalltalk.DynamicArrayNode)})},
+},
 args: [],
 source: "isSteppingNode\x0a\x09^ true",
 messageSends: [],
@@ -2363,9 +2330,8 @@ selector: "isSteppingNode",
 protocol: '*Compiler-Interpreter',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isSteppingNode",{},smalltalk.DynamicDictionaryNode)})},
+},
 args: [],
 source: "isSteppingNode\x0a\x09^ true",
 messageSends: [],
@@ -2379,9 +2345,8 @@ selector: "isSteppingNode",
 protocol: '*Compiler-Interpreter',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isSteppingNode",{},smalltalk.JSStatementNode)})},
+},
 args: [],
 source: "isSteppingNode\x0a\x09^ true",
 messageSends: [],
@@ -2395,9 +2360,8 @@ selector: "isSteppingNode",
 protocol: '*Compiler-Interpreter',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isSteppingNode",{},smalltalk.SendNode)})},
+},
 args: [],
 source: "isSteppingNode\x0a\x09^ true",
 messageSends: [],

+ 37 - 74
js/Compiler-Semantic.js

@@ -173,9 +173,8 @@ selector: "blockIndex:",
 protocol: 'accessing',
 fn: function (anInteger){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@blockIndex"]=anInteger;
-return self}, function($ctx1) {$ctx1.fill(self,"blockIndex:",{anInteger:anInteger},smalltalk.LexicalScope)})},
+return self},
 args: ["anInteger"],
 source: "blockIndex: anInteger \x0a\x09blockIndex := anInteger",
 messageSends: [],
@@ -210,11 +209,10 @@ selector: "instruction",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@instruction"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"instruction",{},smalltalk.LexicalScope)})},
+},
 args: [],
 source: "instruction\x0a\x09^ instruction",
 messageSends: [],
@@ -228,9 +226,8 @@ selector: "instruction:",
 protocol: 'accessing',
 fn: function (anIRInstruction){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@instruction"]=anIRInstruction;
-return self}, function($ctx1) {$ctx1.fill(self,"instruction:",{anIRInstruction:anIRInstruction},smalltalk.LexicalScope)})},
+return self},
 args: ["anIRInstruction"],
 source: "instruction: anIRInstruction\x0a\x09instruction := anIRInstruction",
 messageSends: [],
@@ -286,9 +283,8 @@ selector: "isMethodScope",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"isMethodScope",{},smalltalk.LexicalScope)})},
+},
 args: [],
 source: "isMethodScope\x0a\x09^ false",
 messageSends: [],
@@ -359,11 +355,10 @@ selector: "node",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@node"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"node",{},smalltalk.LexicalScope)})},
+},
 args: [],
 source: "node\x0a\x09\x22Answer the node in which I am defined\x22\x0a\x09\x0a\x09^ node",
 messageSends: [],
@@ -377,9 +372,8 @@ selector: "node:",
 protocol: 'accessing',
 fn: function (aNode){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@node"]=aNode;
-return self}, function($ctx1) {$ctx1.fill(self,"node:",{aNode:aNode},smalltalk.LexicalScope)})},
+return self},
 args: ["aNode"],
 source: "node: aNode\x0a\x09node := aNode",
 messageSends: [],
@@ -393,11 +387,10 @@ selector: "outerScope",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@outerScope"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"outerScope",{},smalltalk.LexicalScope)})},
+},
 args: [],
 source: "outerScope\x0a\x09^ outerScope",
 messageSends: [],
@@ -411,9 +404,8 @@ selector: "outerScope:",
 protocol: 'accessing',
 fn: function (aLexicalScope){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@outerScope"]=aLexicalScope;
-return self}, function($ctx1) {$ctx1.fill(self,"outerScope:",{aLexicalScope:aLexicalScope},smalltalk.LexicalScope)})},
+return self},
 args: ["aLexicalScope"],
 source: "outerScope: aLexicalScope\x0a\x09outerScope := aLexicalScope",
 messageSends: [],
@@ -588,9 +580,8 @@ selector: "canInlineNonLocalReturns",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"canInlineNonLocalReturns",{},smalltalk.MethodLexicalScope)})},
+},
 args: [],
 source: "canInlineNonLocalReturns\x0a\x09^ true",
 messageSends: [],
@@ -665,9 +656,8 @@ selector: "isMethodScope",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isMethodScope",{},smalltalk.MethodLexicalScope)})},
+},
 args: [],
 source: "isMethodScope\x0a\x09^ true",
 messageSends: [],
@@ -704,9 +694,8 @@ selector: "localReturn:",
 protocol: 'accessing',
 fn: function (aBoolean){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@localReturn"]=aBoolean;
-return self}, function($ctx1) {$ctx1.fill(self,"localReturn:",{aBoolean:aBoolean},smalltalk.MethodLexicalScope)})},
+return self},
 args: ["aBoolean"],
 source: "localReturn: aBoolean\x0a\x09localReturn := aBoolean",
 messageSends: [],
@@ -720,9 +709,8 @@ selector: "methodScope",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return self;
-}, function($ctx1) {$ctx1.fill(self,"methodScope",{},smalltalk.MethodLexicalScope)})},
+},
 args: [],
 source: "methodScope\x0a\x09^ self",
 messageSends: [],
@@ -861,9 +849,8 @@ selector: "isArgVar",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"isArgVar",{},smalltalk.ScopeVar)})},
+},
 args: [],
 source: "isArgVar\x0a\x09^ false",
 messageSends: [],
@@ -877,9 +864,8 @@ selector: "isClassRefVar",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"isClassRefVar",{},smalltalk.ScopeVar)})},
+},
 args: [],
 source: "isClassRefVar\x0a\x09^ false",
 messageSends: [],
@@ -893,9 +879,8 @@ selector: "isImmutable",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"isImmutable",{},smalltalk.ScopeVar)})},
+},
 args: [],
 source: "isImmutable\x0a\x09^ false",
 messageSends: [],
@@ -909,9 +894,8 @@ selector: "isInstanceVar",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"isInstanceVar",{},smalltalk.ScopeVar)})},
+},
 args: [],
 source: "isInstanceVar\x0a\x09^ false",
 messageSends: [],
@@ -925,9 +909,8 @@ selector: "isPseudoVar",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"isPseudoVar",{},smalltalk.ScopeVar)})},
+},
 args: [],
 source: "isPseudoVar\x0a\x09^ false",
 messageSends: [],
@@ -941,9 +924,8 @@ selector: "isTempVar",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"isTempVar",{},smalltalk.ScopeVar)})},
+},
 args: [],
 source: "isTempVar\x0a\x09^ false",
 messageSends: [],
@@ -957,9 +939,8 @@ selector: "isUnknownVar",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"isUnknownVar",{},smalltalk.ScopeVar)})},
+},
 args: [],
 source: "isUnknownVar\x0a\x09^ false",
 messageSends: [],
@@ -973,11 +954,10 @@ selector: "name",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@name"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"name",{},smalltalk.ScopeVar)})},
+},
 args: [],
 source: "name\x0a\x09^ name",
 messageSends: [],
@@ -991,9 +971,8 @@ selector: "name:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@name"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"name:",{aString:aString},smalltalk.ScopeVar)})},
+return self},
 args: ["aString"],
 source: "name: aString\x0a\x09name := aString",
 messageSends: [],
@@ -1007,11 +986,10 @@ selector: "scope",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@scope"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"scope",{},smalltalk.ScopeVar)})},
+},
 args: [],
 source: "scope\x0a\x09^ scope",
 messageSends: [],
@@ -1025,9 +1003,8 @@ selector: "scope:",
 protocol: 'accessing',
 fn: function (aScope){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@scope"]=aScope;
-return self}, function($ctx1) {$ctx1.fill(self,"scope:",{aScope:aScope},smalltalk.ScopeVar)})},
+return self},
 args: ["aScope"],
 source: "scope: aScope\x0a\x09scope := aScope",
 messageSends: [],
@@ -1093,11 +1070,10 @@ selector: "node",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@node"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"node",{},smalltalk.AliasVar)})},
+},
 args: [],
 source: "node\x0a\x09^ node",
 messageSends: [],
@@ -1111,9 +1087,8 @@ selector: "node:",
 protocol: 'accessing',
 fn: function (aNode){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@node"]=aNode;
-return self}, function($ctx1) {$ctx1.fill(self,"node:",{aNode:aNode},smalltalk.AliasVar)})},
+return self},
 args: ["aNode"],
 source: "node: aNode\x0a\x09node := aNode",
 messageSends: [],
@@ -1131,9 +1106,8 @@ selector: "isArgVar",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isArgVar",{},smalltalk.ArgVar)})},
+},
 args: [],
 source: "isArgVar\x0a\x09^ true",
 messageSends: [],
@@ -1147,9 +1121,8 @@ selector: "isImmutable",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isImmutable",{},smalltalk.ArgVar)})},
+},
 args: [],
 source: "isImmutable\x0a\x09^ true",
 messageSends: [],
@@ -1186,9 +1159,8 @@ selector: "isClassRefVar",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isClassRefVar",{},smalltalk.ClassRefVar)})},
+},
 args: [],
 source: "isClassRefVar\x0a\x09^ true",
 messageSends: [],
@@ -1202,9 +1174,8 @@ selector: "isImmutable",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isImmutable",{},smalltalk.ClassRefVar)})},
+},
 args: [],
 source: "isImmutable\x0a\x09^ true",
 messageSends: [],
@@ -1241,9 +1212,8 @@ selector: "isInstanceVar",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isInstanceVar",{},smalltalk.InstanceVar)})},
+},
 args: [],
 source: "isInstanceVar\x0a\x09^ true",
 messageSends: [],
@@ -1279,9 +1249,8 @@ selector: "isImmutable",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isImmutable",{},smalltalk.PseudoVar)})},
+},
 args: [],
 source: "isImmutable\x0a\x09^ true",
 messageSends: [],
@@ -1295,9 +1264,8 @@ selector: "isPseudoVar",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isPseudoVar",{},smalltalk.PseudoVar)})},
+},
 args: [],
 source: "isPseudoVar\x0a\x09^ true",
 messageSends: [],
@@ -1315,9 +1283,8 @@ selector: "isTempVar",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isTempVar",{},smalltalk.TempVar)})},
+},
 args: [],
 source: "isTempVar\x0a\x09^ true",
 messageSends: [],
@@ -1335,9 +1302,8 @@ selector: "isUnknownVar",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isUnknownVar",{},smalltalk.UnknownVar)})},
+},
 args: [],
 source: "isUnknownVar\x0a\x09^ true",
 messageSends: [],
@@ -1436,9 +1402,8 @@ selector: "isVariableGloballyUndefined:",
 protocol: 'testing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return eval('typeof ' + aString + ' == "undefined"');
-return self}, function($ctx1) {$ctx1.fill(self,"isVariableGloballyUndefined:",{aString:aString},smalltalk.SemanticAnalyzer)})},
+return self},
 args: ["aString"],
 source: "isVariableGloballyUndefined: aString\x0a\x09<return eval('typeof ' + aString + ' == \x22undefined\x22')>",
 messageSends: [],
@@ -1627,11 +1592,10 @@ selector: "theClass",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@theClass"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.SemanticAnalyzer)})},
+},
 args: [],
 source: "theClass\x0a\x09^ theClass",
 messageSends: [],
@@ -1645,9 +1609,8 @@ selector: "theClass:",
 protocol: 'accessing',
 fn: function (aClass){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@theClass"]=aClass;
-return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass},smalltalk.SemanticAnalyzer)})},
+return self},
 args: ["aClass"],
 source: "theClass: aClass\x0a\x09theClass := aClass",
 messageSends: [],

+ 3 - 6
js/Compiler-Tests.js

@@ -277,9 +277,8 @@ protocol: 'accessing',
 fn: function (){
 var self=this;
 function $CodeGenerator(){return smalltalk.CodeGenerator||(typeof CodeGenerator=="undefined"?nil:CodeGenerator)}
-return smalltalk.withContext(function($ctx1) { 
 return $CodeGenerator();
-}, function($ctx1) {$ctx1.fill(self,"codeGeneratorClass",{},smalltalk.CodeGeneratorTest)})},
+},
 args: [],
 source: "codeGeneratorClass\x0a\x09^ CodeGenerator",
 messageSends: [],
@@ -375,8 +374,7 @@ selector: "tearDown",
 protocol: 'initialization',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"tearDown",{},smalltalk.CodeGeneratorTest)})},
+return self},
 args: [],
 source: "tearDown\x0a\x09\x22receiver := nil\x22",
 messageSends: [],
@@ -1065,9 +1063,8 @@ protocol: 'accessing',
 fn: function (){
 var self=this;
 function $InliningCodeGenerator(){return smalltalk.InliningCodeGenerator||(typeof InliningCodeGenerator=="undefined"?nil:InliningCodeGenerator)}
-return smalltalk.withContext(function($ctx1) { 
 return $InliningCodeGenerator();
-}, function($ctx1) {$ctx1.fill(self,"codeGeneratorClass",{},smalltalk.InliningCodeGeneratorTest)})},
+},
 args: [],
 source: "codeGeneratorClass\x0a\x09^ InliningCodeGenerator",
 messageSends: [],

+ 25 - 50
js/Helios-Announcements.js

@@ -9,11 +9,10 @@ selector: "actionBlock",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@actionBlock"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"actionBlock",{},smalltalk.HLAboutToChange)})},
+},
 args: [],
 source: "actionBlock\x0a\x09^ actionBlock",
 messageSends: [],
@@ -27,9 +26,8 @@ selector: "actionBlock:",
 protocol: 'accessing',
 fn: function (aBlock){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@actionBlock"]=aBlock;
-return self}, function($ctx1) {$ctx1.fill(self,"actionBlock:",{aBlock:aBlock},smalltalk.HLAboutToChange)})},
+return self},
 args: ["aBlock"],
 source: "actionBlock: aBlock\x0a\x09actionBlock := aBlock",
 messageSends: [],
@@ -48,9 +46,8 @@ selector: "heliosClass",
 protocol: 'helios',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "announcement";
-}, function($ctx1) {$ctx1.fill(self,"heliosClass",{},smalltalk.HLAnnouncement.klass)})},
+},
 args: [],
 source: "heliosClass\x0a\x09^ 'announcement'",
 messageSends: [],
@@ -67,11 +64,10 @@ selector: "code",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@code"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"code",{},smalltalk.HLCodeHandled)})},
+},
 args: [],
 source: "code\x0a\x0a\x09^ code",
 messageSends: [],
@@ -85,9 +81,8 @@ selector: "code:",
 protocol: 'accessing',
 fn: function (aModel){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@code"]=aModel;
-return self}, function($ctx1) {$ctx1.fill(self,"code:",{aModel:aModel},smalltalk.HLCodeHandled)})},
+return self},
 args: ["aModel"],
 source: "code: aModel\x0a\x0a\x09code := aModel",
 messageSends: [],
@@ -141,11 +136,10 @@ selector: "context",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@context"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"context",{},smalltalk.HLDebuggerAnnouncement)})},
+},
 args: [],
 source: "context\x0a\x09^ context",
 messageSends: [],
@@ -159,9 +153,8 @@ selector: "context:",
 protocol: 'accessing',
 fn: function (aContext){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@context"]=aContext;
-return self}, function($ctx1) {$ctx1.fill(self,"context:",{aContext:aContext},smalltalk.HLDebuggerAnnouncement)})},
+return self},
 args: ["aContext"],
 source: "context: aContext\x0a\x09context := aContext",
 messageSends: [],
@@ -178,11 +171,10 @@ selector: "context",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@context"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"context",{},smalltalk.HLDebuggerContextSelected)})},
+},
 args: [],
 source: "context\x0a\x09^ context",
 messageSends: [],
@@ -196,9 +188,8 @@ selector: "context:",
 protocol: 'accessing',
 fn: function (aContext){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@context"]=aContext;
-return self}, function($ctx1) {$ctx1.fill(self,"context:",{aContext:aContext},smalltalk.HLDebuggerContextSelected)})},
+return self},
 args: ["aContext"],
 source: "context: aContext\x0a\x09context := aContext",
 messageSends: [],
@@ -227,11 +218,10 @@ selector: "error",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@error"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"error",{},smalltalk.HLErrorRaised)})},
+},
 args: [],
 source: "error\x0a\x09^ error",
 messageSends: [],
@@ -245,9 +235,8 @@ selector: "error:",
 protocol: 'accessing',
 fn: function (anError){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@error"]=anError;
-return self}, function($ctx1) {$ctx1.fill(self,"error:",{anError:anError},smalltalk.HLErrorRaised)})},
+return self},
 args: ["anError"],
 source: "error: anError\x0a\x09error := anError",
 messageSends: [],
@@ -267,11 +256,10 @@ selector: "column",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@column"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"column",{},smalltalk.HLParseErrorRaised)})},
+},
 args: [],
 source: "column\x0a\x09^ column",
 messageSends: [],
@@ -285,9 +273,8 @@ selector: "column:",
 protocol: 'accessing',
 fn: function (anInteger){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@column"]=anInteger;
-return self}, function($ctx1) {$ctx1.fill(self,"column:",{anInteger:anInteger},smalltalk.HLParseErrorRaised)})},
+return self},
 args: ["anInteger"],
 source: "column: anInteger\x0a\x09column := anInteger",
 messageSends: [],
@@ -301,11 +288,10 @@ selector: "line",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@line"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"line",{},smalltalk.HLParseErrorRaised)})},
+},
 args: [],
 source: "line\x0a\x09^ line",
 messageSends: [],
@@ -319,9 +305,8 @@ selector: "line:",
 protocol: 'accessing',
 fn: function (anInteger){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@line"]=anInteger;
-return self}, function($ctx1) {$ctx1.fill(self,"line:",{anInteger:anInteger},smalltalk.HLParseErrorRaised)})},
+return self},
 args: ["anInteger"],
 source: "line: anInteger\x0a\x09line := anInteger",
 messageSends: [],
@@ -335,11 +320,10 @@ selector: "message",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@message"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"message",{},smalltalk.HLParseErrorRaised)})},
+},
 args: [],
 source: "message\x0a\x09^ message",
 messageSends: [],
@@ -353,9 +337,8 @@ selector: "message:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@message"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"message:",{aString:aString},smalltalk.HLParseErrorRaised)})},
+return self},
 args: ["aString"],
 source: "message: aString\x0a\x09message := aString",
 messageSends: [],
@@ -393,11 +376,10 @@ selector: "theClass",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@theClass"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.HLInstVarAdded)})},
+},
 args: [],
 source: "theClass\x0a\x09^ theClass",
 messageSends: [],
@@ -411,9 +393,8 @@ selector: "theClass:",
 protocol: 'accessing',
 fn: function (aClass){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@theClass"]=aClass;
-return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass},smalltalk.HLInstVarAdded)})},
+return self},
 args: ["aClass"],
 source: "theClass: aClass\x0a\x09theClass := aClass",
 messageSends: [],
@@ -427,11 +408,10 @@ selector: "variableName",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@variableName"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"variableName",{},smalltalk.HLInstVarAdded)})},
+},
 args: [],
 source: "variableName\x0a\x09^ variableName",
 messageSends: [],
@@ -445,9 +425,8 @@ selector: "variableName:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@variableName"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"variableName:",{aString:aString},smalltalk.HLInstVarAdded)})},
+return self},
 args: ["aString"],
 source: "variableName: aString\x0a\x09variableName := aString",
 messageSends: [],
@@ -464,11 +443,10 @@ selector: "item",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@item"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"item",{},smalltalk.HLItemSelected)})},
+},
 args: [],
 source: "item\x0a\x09^ item",
 messageSends: [],
@@ -482,9 +460,8 @@ selector: "item:",
 protocol: 'accessing',
 fn: function (anObject){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@item"]=anObject;
-return self}, function($ctx1) {$ctx1.fill(self,"item:",{anObject:anObject},smalltalk.HLItemSelected)})},
+return self},
 args: ["anObject"],
 source: "item: anObject\x0a\x09item := anObject",
 messageSends: [],
@@ -540,11 +517,10 @@ selector: "searchString",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@searchString"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"searchString",{},smalltalk.HLSearchReferences)})},
+},
 args: [],
 source: "searchString\x0a\x09^ searchString",
 messageSends: [],
@@ -558,9 +534,8 @@ selector: "searchString:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@searchString"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"searchString:",{aString:aString},smalltalk.HLSearchReferences)})},
+return self},
 args: ["aString"],
 source: "searchString: aString\x0a\x09searchString := aString",
 messageSends: [],

+ 24 - 48
js/Helios-Browser.js

@@ -10,9 +10,8 @@ selector: "canHaveFocus",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"canHaveFocus",{},smalltalk.HLBrowser)})},
+},
 args: [],
 source: "canHaveFocus\x0a\x09^ true",
 messageSends: [],
@@ -139,9 +138,8 @@ selector: "model:",
 protocol: 'accessing',
 fn: function (aModel){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@model"]=aModel;
-return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},smalltalk.HLBrowser)})},
+return self},
 args: ["aModel"],
 source: "model: aModel\x0a\x09model := aModel",
 messageSends: [],
@@ -306,9 +304,8 @@ selector: "canBeOpenAsTab",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLBrowser.klass)})},
+},
 args: [],
 source: "canBeOpenAsTab\x0a\x09^ true",
 messageSends: [],
@@ -347,9 +344,8 @@ selector: "tabClass",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "browser";
-}, function($ctx1) {$ctx1.fill(self,"tabClass",{},smalltalk.HLBrowser.klass)})},
+},
 args: [],
 source: "tabClass\x0a\x09^ 'browser'",
 messageSends: [],
@@ -363,9 +359,8 @@ selector: "tabLabel",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Browser";
-}, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLBrowser.klass)})},
+},
 args: [],
 source: "tabLabel\x0a\x09^ 'Browser'",
 messageSends: [],
@@ -379,9 +374,8 @@ selector: "tabPriority",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return (0);
-}, function($ctx1) {$ctx1.fill(self,"tabPriority",{},smalltalk.HLBrowser.klass)})},
+},
 args: [],
 source: "tabPriority\x0a\x09^ 0",
 messageSends: [],
@@ -398,9 +392,8 @@ selector: "canHaveFocus",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"canHaveFocus",{},smalltalk.HLBrowserBottomWidget)})},
+},
 args: [],
 source: "canHaveFocus\x0a\x09^ true",
 messageSends: [],
@@ -486,11 +479,10 @@ selector: "model",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@model"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLBrowserBottomWidget)})},
+},
 args: [],
 source: "model\x0a\x09^ model",
 messageSends: [],
@@ -575,8 +567,7 @@ selector: "previous",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"previous",{},smalltalk.HLBrowserBottomWidget)})},
+return self},
 args: [],
 source: "previous\x0a\x09\x22For navigation\x22",
 messageSends: [],
@@ -590,8 +581,7 @@ selector: "previous:",
 protocol: 'accessing',
 fn: function (aWidget){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"previous:",{aWidget:aWidget},smalltalk.HLBrowserBottomWidget)})},
+return self},
 args: ["aWidget"],
 source: "previous: aWidget\x0a\x09\x22For navigation\x22",
 messageSends: [],
@@ -749,9 +739,8 @@ selector: "isBrowserModel",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isBrowserModel",{},smalltalk.HLBrowserModel)})},
+},
 args: [],
 source: "isBrowserModel\x0a\x09^ true",
 messageSends: [],
@@ -1094,11 +1083,10 @@ selector: "selectorsCache",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@selectorsCache"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"selectorsCache",{},smalltalk.HLClassCache)})},
+},
 args: [],
 source: "selectorsCache\x0a\x09^ selectorsCache",
 messageSends: [],
@@ -1112,9 +1100,8 @@ selector: "selectorsCache:",
 protocol: 'accessing',
 fn: function (aCache){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@selectorsCache"]=aCache;
-return self}, function($ctx1) {$ctx1.fill(self,"selectorsCache:",{aCache:aCache},smalltalk.HLClassCache)})},
+return self},
 args: ["aCache"],
 source: "selectorsCache: aCache\x0a\x09selectorsCache := aCache",
 messageSends: [],
@@ -1128,11 +1115,10 @@ selector: "theClass",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@class"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.HLClassCache)})},
+},
 args: [],
 source: "theClass\x0a\x09^ class",
 messageSends: [],
@@ -1146,9 +1132,8 @@ selector: "theClass:",
 protocol: 'accessing',
 fn: function (aClass){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@class"]=aClass;
-return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass},smalltalk.HLClassCache)})},
+return self},
 args: ["aClass"],
 source: "theClass: aClass\x0a\x09class := aClass",
 messageSends: [],
@@ -1289,9 +1274,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Classes";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLClassesListWidget)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Classes'",
 messageSends: [],
@@ -2022,9 +2006,8 @@ selector: "defaultDocumentation",
 protocol: 'defaults',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "No documentation available. \x0a**That's bad. Seriously.**";
-}, function($ctx1) {$ctx1.fill(self,"defaultDocumentation",{},smalltalk.HLDocumentationWidget)})},
+},
 args: [],
 source: "defaultDocumentation\x0a\x09^ 'No documentation available. \x0a**That''s bad. Seriously.**'",
 messageSends: [],
@@ -2038,9 +2021,8 @@ selector: "defaultHead",
 protocol: 'defaults',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "No class selected";
-}, function($ctx1) {$ctx1.fill(self,"defaultHead",{},smalltalk.HLDocumentationWidget)})},
+},
 args: [],
 source: "defaultHead\x0a\x09^ 'No class selected'",
 messageSends: [],
@@ -2123,11 +2105,10 @@ selector: "model",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@model"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLDocumentationWidget)})},
+},
 args: [],
 source: "model\x0a\x09^ model",
 messageSends: [],
@@ -2565,9 +2546,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Methods";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLMethodsListWidget)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Methods'",
 messageSends: [],
@@ -3168,9 +3148,8 @@ selector: "cssClassForItem:",
 protocol: 'accessing',
 fn: function (anItem){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "package";
-}, function($ctx1) {$ctx1.fill(self,"cssClassForItem:",{anItem:anItem},smalltalk.HLPackagesListWidget)})},
+},
 args: ["anItem"],
 source: "cssClassForItem: anItem\x09\x0a\x09^ 'package'",
 messageSends: [],
@@ -3248,9 +3227,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Packages";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLPackagesListWidget)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Packages'",
 messageSends: [],
@@ -3481,9 +3459,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Protocols";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLProtocolsListWidget)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Protocols'",
 messageSends: [],
@@ -4003,9 +3980,8 @@ selector: "flush",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@current"]=nil;
-return self}, function($ctx1) {$ctx1.fill(self,"flush",{},smalltalk.HLSelectorsCache.klass)})},
+return self},
 args: [],
 source: "flush\x0a\x09current := nil",
 messageSends: [],

+ 30 - 60
js/Helios-Commands-Browser.js

@@ -49,9 +49,8 @@ selector: "key",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "g";
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLBrowserGoToCommand.klass)})},
+},
 args: [],
 source: "key\x0a\x09^ 'g'",
 messageSends: [],
@@ -65,9 +64,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Go to";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLBrowserGoToCommand.klass)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Go to'",
 messageSends: [],
@@ -100,9 +98,8 @@ selector: "key",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "c";
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLGoToClassesCommand.klass)})},
+},
 args: [],
 source: "key\x0a\x09^ 'c'",
 messageSends: [],
@@ -116,9 +113,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Classes";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLGoToClassesCommand.klass)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Classes'",
 messageSends: [],
@@ -151,9 +147,8 @@ selector: "key",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "m";
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLGoToMethodsCommand.klass)})},
+},
 args: [],
 source: "key\x0a\x09^ 'm'",
 messageSends: [],
@@ -167,9 +162,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Methods";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLGoToMethodsCommand.klass)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Methods'",
 messageSends: [],
@@ -202,9 +196,8 @@ selector: "key",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "p";
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLGoToPackagesCommand.klass)})},
+},
 args: [],
 source: "key\x0a\x09^ 'p'",
 messageSends: [],
@@ -218,9 +211,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Packages";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLGoToPackagesCommand.klass)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Packages'",
 messageSends: [],
@@ -253,9 +245,8 @@ selector: "key",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "t";
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLGoToProtocolsCommand.klass)})},
+},
 args: [],
 source: "key\x0a\x09^ 't'",
 messageSends: [],
@@ -269,9 +260,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Protocols";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLGoToProtocolsCommand.klass)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Protocols'",
 messageSends: [],
@@ -304,9 +294,8 @@ selector: "key",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "s";
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLGoToSourceCodeCommand.klass)})},
+},
 args: [],
 source: "key\x0a\x09^ 's'",
 messageSends: [],
@@ -320,9 +309,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Source code";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLGoToSourceCodeCommand.klass)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Source code'",
 messageSends: [],
@@ -379,9 +367,8 @@ selector: "key",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "d";
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLEditCommentCommand.klass)})},
+},
 args: [],
 source: "key\x0a\x09^ 'd'",
 messageSends: [],
@@ -395,9 +382,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Edit documentation";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLEditCommentCommand.klass)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Edit documentation'",
 messageSends: [],
@@ -415,9 +401,8 @@ selector: "key",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "h";
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLGenerateCommand.klass)})},
+},
 args: [],
 source: "key\x0a\x09^ 'h'",
 messageSends: [],
@@ -431,9 +416,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Generate";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLGenerateCommand.klass)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Generate'",
 messageSends: [],
@@ -474,9 +458,8 @@ selector: "key",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "c";
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLCategorizeUnclassifiedCommand.klass)})},
+},
 args: [],
 source: "key\x0a\x09^ 'c'",
 messageSends: [],
@@ -490,9 +473,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Categorize";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLCategorizeUnclassifiedCommand.klass)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Categorize'",
 messageSends: [],
@@ -542,9 +524,8 @@ selector: "key",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "i";
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLGenerateAccessorsCommand.klass)})},
+},
 args: [],
 source: "key\x0a\x09^ 'i'",
 messageSends: [],
@@ -558,9 +539,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Initialize";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLGenerateAccessorsCommand.klass)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Initialize'",
 messageSends: [],
@@ -606,9 +586,8 @@ selector: "key",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "a";
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLGenerateInitializeCommand.klass)})},
+},
 args: [],
 source: "key\x0a\x09^ 'a'",
 messageSends: [],
@@ -622,9 +601,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Accessors";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLGenerateInitializeCommand.klass)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Accessors'",
 messageSends: [],
@@ -641,9 +619,8 @@ selector: "key",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "t";
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLToggleCommand.klass)})},
+},
 args: [],
 source: "key\x0a\x09^ 't'",
 messageSends: [],
@@ -657,9 +634,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Toggle";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLToggleCommand.klass)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Toggle'",
 messageSends: [],
@@ -695,9 +671,8 @@ selector: "key",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "d";
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLToggleClassCommentCommand.klass)})},
+},
 args: [],
 source: "key\x0a\x09^ 'd'",
 messageSends: [],
@@ -711,9 +686,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Documentation";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLToggleClassCommentCommand.klass)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Documentation'",
 messageSends: [],
@@ -746,9 +720,8 @@ selector: "key",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "c";
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLToggleClassSideCommand.klass)})},
+},
 args: [],
 source: "key\x0a\x09^ 'c'",
 messageSends: [],
@@ -762,9 +735,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Class side";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLToggleClassSideCommand.klass)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Class side'",
 messageSends: [],
@@ -797,9 +769,8 @@ selector: "key",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "i";
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLToggleInstanceSideCommand.klass)})},
+},
 args: [],
 source: "key\x0a\x09^ 'i'",
 messageSends: [],
@@ -813,9 +784,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Instance side";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLToggleInstanceSideCommand.klass)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Instance side'",
 messageSends: [],

+ 24 - 48
js/Helios-Commands-Core.js

@@ -89,9 +89,8 @@ selector: "defaultInput",
 protocol: 'defaults',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "";
-}, function($ctx1) {$ctx1.fill(self,"defaultInput",{},smalltalk.HLCommand)})},
+},
 args: [],
 source: "defaultInput\x0a\x09^ ''",
 messageSends: [],
@@ -123,8 +122,7 @@ selector: "execute",
 protocol: 'executing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLCommand)})},
+return self},
 args: [],
 source: "execute",
 messageSends: [],
@@ -138,11 +136,10 @@ selector: "input",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@input"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"input",{},smalltalk.HLCommand)})},
+},
 args: [],
 source: "input\x0a\x09^ input",
 messageSends: [],
@@ -156,12 +153,11 @@ selector: "input:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 self["@input"]=aString;
 $1=self["@input"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"input:",{aString:aString},smalltalk.HLCommand)})},
+},
 args: ["aString"],
 source: "input: aString\x0a\x09^ input := aString",
 messageSends: [],
@@ -175,11 +171,10 @@ selector: "inputCompletion",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=[];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"inputCompletion",{},smalltalk.HLCommand)})},
+},
 args: [],
 source: "inputCompletion\x0a\x09^ #()",
 messageSends: [],
@@ -229,9 +224,8 @@ selector: "isActive",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isActive",{},smalltalk.HLCommand)})},
+},
 args: [],
 source: "isActive\x0a\x09^ true",
 messageSends: [],
@@ -263,9 +257,8 @@ selector: "isInputRequired",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"isInputRequired",{},smalltalk.HLCommand)})},
+},
 args: [],
 source: "isInputRequired\x0a\x09^ false",
 messageSends: [],
@@ -399,9 +392,8 @@ selector: "documentation",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "";
-}, function($ctx1) {$ctx1.fill(self,"documentation",{},smalltalk.HLCommand.klass)})},
+},
 args: [],
 source: "documentation\x0a\x09^ ''",
 messageSends: [],
@@ -433,9 +425,8 @@ selector: "isValidFor:",
 protocol: 'testing',
 fn: function (aModel){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isValidFor:",{aModel:aModel},smalltalk.HLCommand.klass)})},
+},
 args: ["aModel"],
 source: "isValidFor: aModel\x0a\x09^ true",
 messageSends: [],
@@ -449,9 +440,8 @@ selector: "key",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return nil;
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLCommand.klass)})},
+},
 args: [],
 source: "key\x0a\x09\x22Answer a single character string or nil if no key\x22\x0a\x09\x0a\x09^ nil",
 messageSends: [],
@@ -465,9 +455,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLCommand.klass)})},
+},
 args: [],
 source: "label\x0a\x09^ ''",
 messageSends: [],
@@ -566,9 +555,8 @@ selector: "key",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "w";
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLCloseTabCommand.klass)})},
+},
 args: [],
 source: "key\x0a\x09^ 'w'",
 messageSends: [],
@@ -582,9 +570,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Close tab";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLCloseTabCommand.klass)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Close tab'",
 messageSends: [],
@@ -600,11 +587,10 @@ selector: "model",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@model"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLModelCommand)})},
+},
 args: [],
 source: "model\x0a\x09^ model",
 messageSends: [],
@@ -618,9 +604,8 @@ selector: "model:",
 protocol: 'accessing',
 fn: function (aModel){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@model"]=aModel;
-return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},smalltalk.HLModelCommand)})},
+return self},
 args: ["aModel"],
 source: "model: aModel\x0a\x09model := aModel",
 messageSends: [],
@@ -706,9 +691,8 @@ selector: "key",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "o";
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLOpenCommand.klass)})},
+},
 args: [],
 source: "key\x0a\x09^ 'o'",
 messageSends: [],
@@ -722,9 +706,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Open";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLOpenCommand.klass)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Open'",
 messageSends: [],
@@ -760,9 +743,8 @@ selector: "key",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "b";
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLOpenBrowserCommand.klass)})},
+},
 args: [],
 source: "key\x0a\x09^ 'b'",
 messageSends: [],
@@ -776,9 +758,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Browser";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLOpenBrowserCommand.klass)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Browser'",
 messageSends: [],
@@ -814,9 +795,8 @@ selector: "key",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "w";
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLOpenWorkspaceCommand.klass)})},
+},
 args: [],
 source: "key\x0a\x09^ 'w'",
 messageSends: [],
@@ -830,9 +810,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Workspace";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLOpenWorkspaceCommand.klass)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Workspace'",
 messageSends: [],
@@ -926,9 +905,8 @@ selector: "key",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "s";
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLSwitchTabCommand.klass)})},
+},
 args: [],
 source: "key\x0a\x09^ 's'",
 messageSends: [],
@@ -942,9 +920,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Switch";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLSwitchTabCommand.klass)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Switch'",
 messageSends: [],
@@ -961,9 +938,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "View";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLViewCommand.klass)})},
+},
 args: [],
 source: "label\x0a\x09^ 'View'",
 messageSends: [],

+ 79 - 158
js/Helios-Commands-Tools.js

@@ -9,9 +9,8 @@ selector: "category",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return nil;
-}, function($ctx1) {$ctx1.fill(self,"category",{},smalltalk.HLToolCommand)})},
+},
 args: [],
 source: "category\x0a\x09^ nil",
 messageSends: [],
@@ -67,9 +66,8 @@ selector: "category",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Packages";
-}, function($ctx1) {$ctx1.fill(self,"category",{},smalltalk.HLCommitPackageCommand)})},
+},
 args: [],
 source: "category\x0a\x09^ 'Packages'",
 messageSends: [],
@@ -99,9 +97,8 @@ selector: "isActive",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isActive",{},smalltalk.HLCommitPackageCommand)})},
+},
 args: [],
 source: "isActive\x0a\x09^ true\x0a\x09\x22 slf model isPackageDirty\x22",
 messageSends: [],
@@ -116,9 +113,8 @@ selector: "key",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "k";
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLCommitPackageCommand.klass)})},
+},
 args: [],
 source: "key\x0a\x09^ 'k'",
 messageSends: [],
@@ -132,9 +128,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Commit";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLCommitPackageCommand.klass)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Commit'",
 messageSends: [],
@@ -151,9 +146,8 @@ selector: "key",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "c";
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLCopyCommand.klass)})},
+},
 args: [],
 source: "key\x0a\x09^ 'c'",
 messageSends: [],
@@ -167,9 +161,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Copy";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLCopyCommand.klass)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Copy'",
 messageSends: [],
@@ -185,9 +178,8 @@ selector: "category",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Classes";
-}, function($ctx1) {$ctx1.fill(self,"category",{},smalltalk.HLCopyClassCommand)})},
+},
 args: [],
 source: "category\x0a\x09^ 'Classes'",
 messageSends: [],
@@ -219,9 +211,8 @@ selector: "displayLabel",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "New class name:";
-}, function($ctx1) {$ctx1.fill(self,"displayLabel",{},smalltalk.HLCopyClassCommand)})},
+},
 args: [],
 source: "displayLabel\x0a\x09^ 'New class name:'",
 messageSends: [],
@@ -269,9 +260,8 @@ selector: "isInputRequired",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isInputRequired",{},smalltalk.HLCopyClassCommand)})},
+},
 args: [],
 source: "isInputRequired\x0a\x09^ true",
 messageSends: [],
@@ -286,9 +276,8 @@ selector: "key",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "c";
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLCopyClassCommand.klass)})},
+},
 args: [],
 source: "key\x0a\x09^ 'c'",
 messageSends: [],
@@ -302,9 +291,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Class";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLCopyClassCommand.klass)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Class'",
 messageSends: [],
@@ -318,9 +306,8 @@ selector: "menuLabel",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Copy class...";
-}, function($ctx1) {$ctx1.fill(self,"menuLabel",{},smalltalk.HLCopyClassCommand.klass)})},
+},
 args: [],
 source: "menuLabel\x0a\x09^ 'Copy class...'",
 messageSends: [],
@@ -337,9 +324,8 @@ selector: "key",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "f";
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLFindCommand.klass)})},
+},
 args: [],
 source: "key\x0a\x09^ 'f'",
 messageSends: [],
@@ -353,9 +339,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Find";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLFindCommand.klass)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Find'",
 messageSends: [],
@@ -371,9 +356,8 @@ selector: "displayLabel",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "select a class";
-}, function($ctx1) {$ctx1.fill(self,"displayLabel",{},smalltalk.HLFindClassCommand)})},
+},
 args: [],
 source: "displayLabel\x0a\x09^ 'select a class'",
 messageSends: [],
@@ -421,9 +405,8 @@ selector: "inputLabel",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Find a class";
-}, function($ctx1) {$ctx1.fill(self,"inputLabel",{},smalltalk.HLFindClassCommand)})},
+},
 args: [],
 source: "inputLabel\x0a\x09^ 'Find a class'",
 messageSends: [],
@@ -437,9 +420,8 @@ selector: "isInputRequired",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isInputRequired",{},smalltalk.HLFindClassCommand)})},
+},
 args: [],
 source: "isInputRequired\x0a\x09^ true",
 messageSends: [],
@@ -472,9 +454,8 @@ selector: "key",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "c";
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLFindClassCommand.klass)})},
+},
 args: [],
 source: "key\x0a\x09^ 'c'",
 messageSends: [],
@@ -488,9 +469,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Class";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLFindClassCommand.klass)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Class'",
 messageSends: [],
@@ -540,9 +520,8 @@ selector: "displayLabel",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "find references";
-}, function($ctx1) {$ctx1.fill(self,"displayLabel",{},smalltalk.HLFindReferencesCommand)})},
+},
 args: [],
 source: "displayLabel\x0a\x09^ 'find references'",
 messageSends: [],
@@ -597,9 +576,8 @@ selector: "inputLabel",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Find references of";
-}, function($ctx1) {$ctx1.fill(self,"inputLabel",{},smalltalk.HLFindReferencesCommand)})},
+},
 args: [],
 source: "inputLabel\x0a\x09^ 'Find references of'",
 messageSends: [],
@@ -613,9 +591,8 @@ selector: "isInputRequired",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isInputRequired",{},smalltalk.HLFindReferencesCommand)})},
+},
 args: [],
 source: "isInputRequired\x0a\x09^ true",
 messageSends: [],
@@ -630,9 +607,8 @@ selector: "key",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "r";
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLFindReferencesCommand.klass)})},
+},
 args: [],
 source: "key\x0a\x09^ 'r'",
 messageSends: [],
@@ -646,9 +622,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "References";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLFindReferencesCommand.klass)})},
+},
 args: [],
 source: "label\x0a\x09^ 'References'",
 messageSends: [],
@@ -665,9 +640,8 @@ selector: "key",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "m";
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLMoveToCommand.klass)})},
+},
 args: [],
 source: "key\x0a\x09^ 'm'",
 messageSends: [],
@@ -681,9 +655,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Move";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLMoveToCommand.klass)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Move'",
 messageSends: [],
@@ -718,9 +691,8 @@ selector: "key",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "c";
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLMoveClassToCommand.klass)})},
+},
 args: [],
 source: "key\x0a\x09^ 'c'",
 messageSends: [],
@@ -734,9 +706,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Class";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLMoveClassToCommand.klass)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Class'",
 messageSends: [],
@@ -752,9 +723,8 @@ selector: "category",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Classes";
-}, function($ctx1) {$ctx1.fill(self,"category",{},smalltalk.HLMoveClassToPackageCommand)})},
+},
 args: [],
 source: "category\x0a\x09^ 'Classes'",
 messageSends: [],
@@ -768,9 +738,8 @@ selector: "displayLabel",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "select a package";
-}, function($ctx1) {$ctx1.fill(self,"displayLabel",{},smalltalk.HLMoveClassToPackageCommand)})},
+},
 args: [],
 source: "displayLabel\x0a\x09^ 'select a package'",
 messageSends: [],
@@ -818,9 +787,8 @@ selector: "inputLabel",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Move class to package:";
-}, function($ctx1) {$ctx1.fill(self,"inputLabel",{},smalltalk.HLMoveClassToPackageCommand)})},
+},
 args: [],
 source: "inputLabel\x0a\x09^ 'Move class to package:'",
 messageSends: [],
@@ -834,9 +802,8 @@ selector: "isInputRequired",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isInputRequired",{},smalltalk.HLMoveClassToPackageCommand)})},
+},
 args: [],
 source: "isInputRequired\x0a\x09^ true",
 messageSends: [],
@@ -851,9 +818,8 @@ selector: "key",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "p";
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLMoveClassToPackageCommand.klass)})},
+},
 args: [],
 source: "key\x0a\x09^ 'p'",
 messageSends: [],
@@ -867,9 +833,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "to package";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLMoveClassToPackageCommand.klass)})},
+},
 args: [],
 source: "label\x0a\x09^ 'to package'",
 messageSends: [],
@@ -883,9 +848,8 @@ selector: "menuLabel",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Move to package...";
-}, function($ctx1) {$ctx1.fill(self,"menuLabel",{},smalltalk.HLMoveClassToPackageCommand.klass)})},
+},
 args: [],
 source: "menuLabel\x09\x0a\x09^ 'Move to package...'",
 messageSends: [],
@@ -901,9 +865,8 @@ selector: "category",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Methods";
-}, function($ctx1) {$ctx1.fill(self,"category",{},smalltalk.HLMoveMethodToCommand)})},
+},
 args: [],
 source: "category\x0a\x09^ 'Methods'",
 messageSends: [],
@@ -936,9 +899,8 @@ selector: "key",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "m";
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLMoveMethodToCommand.klass)})},
+},
 args: [],
 source: "key\x0a\x09^ 'm'",
 messageSends: [],
@@ -952,9 +914,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Method";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLMoveMethodToCommand.klass)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Method'",
 messageSends: [],
@@ -970,9 +931,8 @@ selector: "displayLabel",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "select a class";
-}, function($ctx1) {$ctx1.fill(self,"displayLabel",{},smalltalk.HLMoveMethodToClassCommand)})},
+},
 args: [],
 source: "displayLabel\x0a\x09^ 'select a class'",
 messageSends: [],
@@ -1020,9 +980,8 @@ selector: "inputLabel",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Move method to class:";
-}, function($ctx1) {$ctx1.fill(self,"inputLabel",{},smalltalk.HLMoveMethodToClassCommand)})},
+},
 args: [],
 source: "inputLabel\x0a\x09^ 'Move method to class:'",
 messageSends: [],
@@ -1036,9 +995,8 @@ selector: "isInputRequired",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isInputRequired",{},smalltalk.HLMoveMethodToClassCommand)})},
+},
 args: [],
 source: "isInputRequired\x0a\x09^ true",
 messageSends: [],
@@ -1053,9 +1011,8 @@ selector: "key",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "c";
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLMoveMethodToClassCommand.klass)})},
+},
 args: [],
 source: "key\x0a\x09^ 'c'",
 messageSends: [],
@@ -1069,9 +1026,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "to class";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLMoveMethodToClassCommand.klass)})},
+},
 args: [],
 source: "label\x09\x0a\x09^ 'to class'",
 messageSends: [],
@@ -1085,9 +1041,8 @@ selector: "menuLabel",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Move to class...";
-}, function($ctx1) {$ctx1.fill(self,"menuLabel",{},smalltalk.HLMoveMethodToClassCommand.klass)})},
+},
 args: [],
 source: "menuLabel\x09\x0a\x09^ 'Move to class...'",
 messageSends: [],
@@ -1103,9 +1058,8 @@ selector: "displayLabel",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "select a protocol";
-}, function($ctx1) {$ctx1.fill(self,"displayLabel",{},smalltalk.HLMoveMethodToProtocolCommand)})},
+},
 args: [],
 source: "displayLabel\x0a\x09^ 'select a protocol'",
 messageSends: [],
@@ -1153,9 +1107,8 @@ selector: "inputLabel",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Move method to a protocol:";
-}, function($ctx1) {$ctx1.fill(self,"inputLabel",{},smalltalk.HLMoveMethodToProtocolCommand)})},
+},
 args: [],
 source: "inputLabel\x0a\x09^ 'Move method to a protocol:'",
 messageSends: [],
@@ -1169,9 +1122,8 @@ selector: "isInputRequired",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isInputRequired",{},smalltalk.HLMoveMethodToProtocolCommand)})},
+},
 args: [],
 source: "isInputRequired\x0a\x09^ true",
 messageSends: [],
@@ -1186,9 +1138,8 @@ selector: "key",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "t";
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLMoveMethodToProtocolCommand.klass)})},
+},
 args: [],
 source: "key\x0a\x09^ 't'",
 messageSends: [],
@@ -1202,9 +1153,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "to protocol";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLMoveMethodToProtocolCommand.klass)})},
+},
 args: [],
 source: "label\x0a\x09^ 'to protocol'",
 messageSends: [],
@@ -1218,9 +1168,8 @@ selector: "menuLabel",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Move to protocol...";
-}, function($ctx1) {$ctx1.fill(self,"menuLabel",{},smalltalk.HLMoveMethodToProtocolCommand.klass)})},
+},
 args: [],
 source: "menuLabel\x0a\x09^ 'Move to protocol...'",
 messageSends: [],
@@ -1237,9 +1186,8 @@ selector: "key",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "x";
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLRemoveCommand.klass)})},
+},
 args: [],
 source: "key\x0a\x09^ 'x'",
 messageSends: [],
@@ -1253,9 +1201,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Remove";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLRemoveCommand.klass)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Remove'",
 messageSends: [],
@@ -1271,9 +1218,8 @@ selector: "category",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Classes";
-}, function($ctx1) {$ctx1.fill(self,"category",{},smalltalk.HLRemoveClassCommand)})},
+},
 args: [],
 source: "category\x0a\x09^ 'Classes'",
 messageSends: [],
@@ -1322,9 +1268,8 @@ selector: "key",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "c";
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLRemoveClassCommand.klass)})},
+},
 args: [],
 source: "key\x0a\x09^ 'c'",
 messageSends: [],
@@ -1338,9 +1283,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Class";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLRemoveClassCommand.klass)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Class'",
 messageSends: [],
@@ -1354,9 +1298,8 @@ selector: "menuLabel",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Remove class";
-}, function($ctx1) {$ctx1.fill(self,"menuLabel",{},smalltalk.HLRemoveClassCommand.klass)})},
+},
 args: [],
 source: "menuLabel\x0a\x09^ 'Remove class'",
 messageSends: [],
@@ -1372,9 +1315,8 @@ selector: "category",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Methods";
-}, function($ctx1) {$ctx1.fill(self,"category",{},smalltalk.HLRemoveMethodCommand)})},
+},
 args: [],
 source: "category\x0a\x09^ 'Methods'",
 messageSends: [],
@@ -1423,9 +1365,8 @@ selector: "key",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "m";
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLRemoveMethodCommand.klass)})},
+},
 args: [],
 source: "key\x0a\x09^ 'm'",
 messageSends: [],
@@ -1439,9 +1380,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Method";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLRemoveMethodCommand.klass)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Method'",
 messageSends: [],
@@ -1455,9 +1395,8 @@ selector: "menuLabel",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Remove method";
-}, function($ctx1) {$ctx1.fill(self,"menuLabel",{},smalltalk.HLRemoveMethodCommand.klass)})},
+},
 args: [],
 source: "menuLabel\x0a\x09^ 'Remove method'",
 messageSends: [],
@@ -1473,9 +1412,8 @@ selector: "category",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Protocols";
-}, function($ctx1) {$ctx1.fill(self,"category",{},smalltalk.HLRemoveProtocolCommand)})},
+},
 args: [],
 source: "category\x0a\x09^ 'Protocols'",
 messageSends: [],
@@ -1524,9 +1462,8 @@ selector: "key",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "t";
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLRemoveProtocolCommand.klass)})},
+},
 args: [],
 source: "key\x0a\x09^ 't'",
 messageSends: [],
@@ -1540,9 +1477,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Protocol";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLRemoveProtocolCommand.klass)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Protocol'",
 messageSends: [],
@@ -1556,9 +1492,8 @@ selector: "menuLabel",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Remove protocol";
-}, function($ctx1) {$ctx1.fill(self,"menuLabel",{},smalltalk.HLRemoveProtocolCommand.klass)})},
+},
 args: [],
 source: "menuLabel\x0a\x09^ 'Remove protocol'",
 messageSends: [],
@@ -1575,9 +1510,8 @@ selector: "key",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "r";
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLRenameCommand.klass)})},
+},
 args: [],
 source: "key\x0a\x09^ 'r'",
 messageSends: [],
@@ -1591,9 +1525,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Rename";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLRenameCommand.klass)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Rename'",
 messageSends: [],
@@ -1609,9 +1542,8 @@ selector: "category",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Classes";
-}, function($ctx1) {$ctx1.fill(self,"category",{},smalltalk.HLRenameClassCommand)})},
+},
 args: [],
 source: "category\x0a\x09^ 'Classes'",
 messageSends: [],
@@ -1643,9 +1575,8 @@ selector: "displayLabel",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Rename class to:";
-}, function($ctx1) {$ctx1.fill(self,"displayLabel",{},smalltalk.HLRenameClassCommand)})},
+},
 args: [],
 source: "displayLabel\x0a\x09^ 'Rename class to:'",
 messageSends: [],
@@ -1693,9 +1624,8 @@ selector: "isInputRequired",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isInputRequired",{},smalltalk.HLRenameClassCommand)})},
+},
 args: [],
 source: "isInputRequired\x0a\x09^ true",
 messageSends: [],
@@ -1710,9 +1640,8 @@ selector: "key",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "c";
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLRenameClassCommand.klass)})},
+},
 args: [],
 source: "key\x0a\x09^ 'c'",
 messageSends: [],
@@ -1726,9 +1655,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Class";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLRenameClassCommand.klass)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Class'",
 messageSends: [],
@@ -1742,9 +1670,8 @@ selector: "menuLabel",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Rename class...";
-}, function($ctx1) {$ctx1.fill(self,"menuLabel",{},smalltalk.HLRenameClassCommand.klass)})},
+},
 args: [],
 source: "menuLabel\x0a\x09^ 'Rename class...'",
 messageSends: [],
@@ -1760,9 +1687,8 @@ selector: "category",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Protocols";
-}, function($ctx1) {$ctx1.fill(self,"category",{},smalltalk.HLRenameProtocolCommand)})},
+},
 args: [],
 source: "category\x0a\x09^ 'Protocols'",
 messageSends: [],
@@ -1794,9 +1720,8 @@ selector: "displayLabel",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Rename protocol to:";
-}, function($ctx1) {$ctx1.fill(self,"displayLabel",{},smalltalk.HLRenameProtocolCommand)})},
+},
 args: [],
 source: "displayLabel\x0a\x09^ 'Rename protocol to:'",
 messageSends: [],
@@ -1844,9 +1769,8 @@ selector: "isInputRequired",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isInputRequired",{},smalltalk.HLRenameProtocolCommand)})},
+},
 args: [],
 source: "isInputRequired\x0a\x09^ true",
 messageSends: [],
@@ -1861,9 +1785,8 @@ selector: "key",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "t";
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLRenameProtocolCommand.klass)})},
+},
 args: [],
 source: "key\x0a\x09^ 't'",
 messageSends: [],
@@ -1877,9 +1800,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Protocol";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLRenameProtocolCommand.klass)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Protocol'",
 messageSends: [],
@@ -1893,9 +1815,8 @@ selector: "menuLabel",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Rename protocol...";
-}, function($ctx1) {$ctx1.fill(self,"menuLabel",{},smalltalk.HLRenameProtocolCommand.klass)})},
+},
 args: [],
 source: "menuLabel\x0a\x09^ 'Rename protocol...'",
 messageSends: [],

+ 70 - 140
js/Helios-Core.js

@@ -58,9 +58,8 @@ selector: "environment:",
 protocol: 'accessing',
 fn: function (anEnvironment){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@environment"]=anEnvironment;
-return self}, function($ctx1) {$ctx1.fill(self,"environment:",{anEnvironment:anEnvironment},smalltalk.HLModel)})},
+return self},
 args: ["anEnvironment"],
 source: "environment: anEnvironment\x0a\x09environment := anEnvironment",
 messageSends: [],
@@ -74,9 +73,8 @@ selector: "isBrowserModel",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"isBrowserModel",{},smalltalk.HLModel)})},
+},
 args: [],
 source: "isBrowserModel\x0a\x09^ false",
 messageSends: [],
@@ -90,9 +88,8 @@ selector: "isReferencesModel",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"isReferencesModel",{},smalltalk.HLModel)})},
+},
 args: [],
 source: "isReferencesModel\x0a\x09^ false",
 messageSends: [],
@@ -106,9 +103,8 @@ selector: "isToolModel",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"isToolModel",{},smalltalk.HLModel)})},
+},
 args: [],
 source: "isToolModel\x0a\x09^ false",
 messageSends: [],
@@ -213,9 +209,8 @@ selector: "allProtocol",
 protocol: 'defaults',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "-- all --";
-}, function($ctx1) {$ctx1.fill(self,"allProtocol",{},smalltalk.HLToolModel)})},
+},
 args: [],
 source: "allProtocol\x0a\x09^ '-- all --'",
 messageSends: [],
@@ -534,9 +529,8 @@ selector: "isToolModel",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isToolModel",{},smalltalk.HLToolModel)})},
+},
 args: [],
 source: "isToolModel\x0a\x09^ true",
 messageSends: [],
@@ -818,11 +812,10 @@ selector: "selectedClass",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@selectedClass"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"selectedClass",{},smalltalk.HLToolModel)})},
+},
 args: [],
 source: "selectedClass\x0a\x09^ selectedClass",
 messageSends: [],
@@ -954,11 +947,10 @@ selector: "selectedPackage",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@selectedPackage"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"selectedPackage",{},smalltalk.HLToolModel)})},
+},
 args: [],
 source: "selectedPackage\x0a\x09^ selectedPackage",
 messageSends: [],
@@ -1000,11 +992,10 @@ selector: "selectedProtocol",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@selectedProtocol"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"selectedProtocol",{},smalltalk.HLToolModel)})},
+},
 args: [],
 source: "selectedProtocol\x0a\x09^ selectedProtocol",
 messageSends: [],
@@ -1067,9 +1058,8 @@ selector: "unclassifiedProtocol",
 protocol: 'defaults',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "as yet unclassified";
-}, function($ctx1) {$ctx1.fill(self,"unclassifiedProtocol",{},smalltalk.HLToolModel)})},
+},
 args: [],
 source: "unclassifiedProtocol\x0a\x09^ 'as yet unclassified'",
 messageSends: [],
@@ -1369,9 +1359,8 @@ selector: "label:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@label"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"label:",{aString:aString},smalltalk.HLTabWidget)})},
+return self},
 args: ["aString"],
 source: "label: aString\x0a\x09label := aString",
 messageSends: [],
@@ -1514,11 +1503,10 @@ selector: "widget",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@widget"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"widget",{},smalltalk.HLTabWidget)})},
+},
 args: [],
 source: "widget\x0a\x09^ widget",
 messageSends: [],
@@ -1532,9 +1520,8 @@ selector: "widget:",
 protocol: 'accessing',
 fn: function (aWidget){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@widget"]=aWidget;
-return self}, function($ctx1) {$ctx1.fill(self,"widget:",{aWidget:aWidget},smalltalk.HLTabWidget)})},
+return self},
 args: ["aWidget"],
 source: "widget: aWidget\x0a\x09widget := aWidget",
 messageSends: [],
@@ -1593,9 +1580,8 @@ selector: "canHaveFocus",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"canHaveFocus",{},smalltalk.HLWidget)})},
+},
 args: [],
 source: "canHaveFocus\x0a\x09^ false",
 messageSends: [],
@@ -1730,8 +1716,7 @@ selector: "registerBindingsOn:",
 protocol: 'keybindings',
 fn: function (aBindingGroup){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"registerBindingsOn:",{aBindingGroup:aBindingGroup},smalltalk.HLWidget)})},
+return self},
 args: ["aBindingGroup"],
 source: "registerBindingsOn: aBindingGroup",
 messageSends: [],
@@ -1745,8 +1730,7 @@ selector: "renderContentOn:",
 protocol: 'rendering',
 fn: function (html){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLWidget)})},
+return self},
 args: ["html"],
 source: "renderContentOn: html",
 messageSends: [],
@@ -1850,8 +1834,7 @@ selector: "unregister",
 protocol: 'actions',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"unregister",{},smalltalk.HLWidget)})},
+return self},
 args: [],
 source: "unregister\x0a\x09\x22This method is called whenever the receiver is closed (as a tab).\x0a\x09Widgets subscribing to announcements should unregister there\x22",
 messageSends: [],
@@ -1865,11 +1848,10 @@ selector: "wrapper",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@wrapper"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"wrapper",{},smalltalk.HLWidget)})},
+},
 args: [],
 source: "wrapper\x0a\x09^ wrapper",
 messageSends: [],
@@ -1884,9 +1866,8 @@ selector: "canBeOpenAsTab",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLWidget.klass)})},
+},
 args: [],
 source: "canBeOpenAsTab\x0a\x09^ false",
 messageSends: [],
@@ -1918,9 +1899,8 @@ selector: "tabClass",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "";
-}, function($ctx1) {$ctx1.fill(self,"tabClass",{},smalltalk.HLWidget.klass)})},
+},
 args: [],
 source: "tabClass\x0a\x09^ ''",
 messageSends: [],
@@ -1934,9 +1914,8 @@ selector: "tabLabel",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Tab";
-}, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLWidget.klass)})},
+},
 args: [],
 source: "tabLabel\x0a\x09^ 'Tab'",
 messageSends: [],
@@ -1950,9 +1929,8 @@ selector: "tabPriority",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return (500);
-}, function($ctx1) {$ctx1.fill(self,"tabPriority",{},smalltalk.HLWidget.klass)})},
+},
 args: [],
 source: "tabPriority\x0a\x09^ 500",
 messageSends: [],
@@ -1985,9 +1963,8 @@ selector: "canHaveFocus",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"canHaveFocus",{},smalltalk.HLFocusableWidget)})},
+},
 args: [],
 source: "canHaveFocus\x0a\x09^ true",
 messageSends: [],
@@ -2017,9 +1994,8 @@ selector: "focusClass",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "focused";
-}, function($ctx1) {$ctx1.fill(self,"focusClass",{},smalltalk.HLFocusableWidget)})},
+},
 args: [],
 source: "focusClass\x0a\x09^ 'focused'",
 messageSends: [],
@@ -2057,8 +2033,7 @@ selector: "renderContentOn:",
 protocol: 'rendering',
 fn: function (html){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLFocusableWidget)})},
+return self},
 args: ["html"],
 source: "renderContentOn: html",
 messageSends: [],
@@ -2222,9 +2197,8 @@ selector: "cssClassForItem:",
 protocol: 'accessing',
 fn: function (anObject){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "";
-}, function($ctx1) {$ctx1.fill(self,"cssClassForItem:",{anObject:anObject},smalltalk.HLListWidget)})},
+},
 args: ["anObject"],
 source: "cssClassForItem: anObject\x0a\x09^ ''",
 messageSends: [],
@@ -2238,11 +2212,10 @@ selector: "defaultItems",
 protocol: 'defaults',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=[];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"defaultItems",{},smalltalk.HLListWidget)})},
+},
 args: [],
 source: "defaultItems\x0a\x09^ #()",
 messageSends: [],
@@ -2404,9 +2377,8 @@ selector: "items:",
 protocol: 'accessing',
 fn: function (aCollection){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@items"]=aCollection;
-return self}, function($ctx1) {$ctx1.fill(self,"items:",{aCollection:aCollection},smalltalk.HLListWidget)})},
+return self},
 args: ["aCollection"],
 source: "items: aCollection\x0a\x09items := aCollection",
 messageSends: [],
@@ -2443,11 +2415,10 @@ selector: "positionOf:",
 protocol: 'accessing',
 fn: function (aListItem){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 
     	return aListItem.parent().children().get().indexOf(aListItem.get(0)) + 1
 	;
-return self}, function($ctx1) {$ctx1.fill(self,"positionOf:",{aListItem:aListItem},smalltalk.HLListWidget)})},
+return self},
 args: ["aListItem"],
 source: "positionOf: aListItem\x0a\x09<\x0a    \x09return aListItem.parent().children().get().indexOf(aListItem.get(0)) + 1\x0a\x09>",
 messageSends: [],
@@ -2485,8 +2456,7 @@ selector: "renderButtonsOn:",
 protocol: 'rendering',
 fn: function (html){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.HLListWidget)})},
+return self},
 args: ["html"],
 source: "renderButtonsOn: html",
 messageSends: [],
@@ -2621,11 +2591,10 @@ selector: "selectedItem",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@selectedItem"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"selectedItem",{},smalltalk.HLListWidget)})},
+},
 args: [],
 source: "selectedItem\x0a\x09^ selectedItem",
 messageSends: [],
@@ -2639,9 +2608,8 @@ selector: "selectedItem:",
 protocol: 'accessing',
 fn: function (anObject){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@selectedItem"]=anObject;
-return self}, function($ctx1) {$ctx1.fill(self,"selectedItem:",{anObject:anObject},smalltalk.HLListWidget)})},
+return self},
 args: ["anObject"],
 source: "selectedItem: anObject\x0a\x09selectedItem := anObject",
 messageSends: [],
@@ -2686,11 +2654,10 @@ selector: "next",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@next"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"next",{},smalltalk.HLNavigationListWidget)})},
+},
 args: [],
 source: "next\x0a\x09^ next",
 messageSends: [],
@@ -2748,11 +2715,10 @@ selector: "previous",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@previous"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"previous",{},smalltalk.HLNavigationListWidget)})},
+},
 args: [],
 source: "previous\x0a\x09^ previous",
 messageSends: [],
@@ -2919,9 +2885,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "List";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLToolListWidget)})},
+},
 args: [],
 source: "label\x0a\x09^ 'List'",
 messageSends: [],
@@ -2973,11 +2938,10 @@ selector: "model",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@model"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLToolListWidget)})},
+},
 args: [],
 source: "model\x0a\x09^ model",
 messageSends: [],
@@ -3010,8 +2974,7 @@ selector: "observeModel",
 protocol: 'actions',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLToolListWidget)})},
+return self},
 args: [],
 source: "observeModel",
 messageSends: [],
@@ -3025,8 +2988,7 @@ selector: "observeSystem",
 protocol: 'actions',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{},smalltalk.HLToolListWidget)})},
+return self},
 args: [],
 source: "observeSystem",
 messageSends: [],
@@ -3261,9 +3223,8 @@ selector: "callback:",
 protocol: 'accessing',
 fn: function (aBlock){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@callback"]=aBlock;
-return self}, function($ctx1) {$ctx1.fill(self,"callback:",{aBlock:aBlock},smalltalk.HLTabListWidget)})},
+return self},
 args: ["aBlock"],
 source: "callback: aBlock\x0a\x09callback := aBlock",
 messageSends: [],
@@ -3338,11 +3299,10 @@ selector: "activeTab",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@activeTab"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"activeTab",{},smalltalk.HLManager)})},
+},
 args: [],
 source: "activeTab\x0a\x09^ activeTab",
 messageSends: [],
@@ -3509,9 +3469,8 @@ selector: "environment:",
 protocol: 'accessing',
 fn: function (anEnvironment){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@environment"]=anEnvironment;
-return self}, function($ctx1) {$ctx1.fill(self,"environment:",{anEnvironment:anEnvironment},smalltalk.HLManager)})},
+return self},
 args: ["anEnvironment"],
 source: "environment: anEnvironment\x0a\x09environment := anEnvironment",
 messageSends: [],
@@ -3550,9 +3509,8 @@ selector: "history:",
 protocol: 'accessing',
 fn: function (aCollection){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@history"]=aCollection;
-return self}, function($ctx1) {$ctx1.fill(self,"history:",{aCollection:aCollection},smalltalk.HLManager)})},
+return self},
 args: ["aCollection"],
 source: "history: aCollection\x0a\x09history := aCollection",
 messageSends: [],
@@ -4092,9 +4050,8 @@ selector: "cssClass",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "";
-}, function($ctx1) {$ctx1.fill(self,"cssClass",{},smalltalk.HLModalWidget)})},
+},
 args: [],
 source: "cssClass\x0a\x09^ ''",
 messageSends: [],
@@ -4124,9 +4081,8 @@ selector: "hasButtons",
 protocol: 'rendering',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"hasButtons",{},smalltalk.HLModalWidget)})},
+},
 args: [],
 source: "hasButtons\x0a\x09^ true",
 messageSends: [],
@@ -4245,8 +4201,7 @@ selector: "renderMainOn:",
 protocol: 'rendering',
 fn: function (html){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"renderMainOn:",{html:html},smalltalk.HLModalWidget)})},
+return self},
 args: ["html"],
 source: "renderMainOn: html",
 messageSends: [],
@@ -4329,9 +4284,8 @@ selector: "actionBlock:",
 protocol: 'accessing',
 fn: function (aBlock){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@actionBlock"]=aBlock;
-return self}, function($ctx1) {$ctx1.fill(self,"actionBlock:",{aBlock:aBlock},smalltalk.HLConfirmationWidget)})},
+return self},
 args: ["aBlock"],
 source: "actionBlock: aBlock\x0a\x09actionBlock := aBlock",
 messageSends: [],
@@ -4387,9 +4341,8 @@ selector: "cancelBlock:",
 protocol: 'accessing',
 fn: function (aBlock){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@cancelBlock"]=aBlock;
-return self}, function($ctx1) {$ctx1.fill(self,"cancelBlock:",{aBlock:aBlock},smalltalk.HLConfirmationWidget)})},
+return self},
 args: ["aBlock"],
 source: "cancelBlock: aBlock\x0a\x09cancelBlock := aBlock",
 messageSends: [],
@@ -4443,9 +4396,8 @@ selector: "confirmationString:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@confirmationString"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"confirmationString:",{aString:aString},smalltalk.HLConfirmationWidget)})},
+return self},
 args: ["aString"],
 source: "confirmationString: aString\x0a\x09confirmationString := aString",
 messageSends: [],
@@ -4496,9 +4448,8 @@ selector: "cssClass",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "large";
-}, function($ctx1) {$ctx1.fill(self,"cssClass",{},smalltalk.HLRequestWidget)})},
+},
 args: [],
 source: "cssClass\x0a\x09^ 'large'",
 messageSends: [],
@@ -4512,8 +4463,7 @@ selector: "giveFocusToButton:",
 protocol: 'private',
 fn: function (aButton){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"giveFocusToButton:",{aButton:aButton},smalltalk.HLRequestWidget)})},
+return self},
 args: ["aButton"],
 source: "giveFocusToButton: aButton",
 messageSends: [],
@@ -4571,9 +4521,8 @@ selector: "value:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@value"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"value:",{aString:aString},smalltalk.HLRequestWidget)})},
+return self},
 args: ["aString"],
 source: "value: aString\x0a\x09value := aString",
 messageSends: [],
@@ -4655,9 +4604,8 @@ selector: "hasButtons",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"hasButtons",{},smalltalk.HLProgressWidget)})},
+},
 args: [],
 source: "hasButtons\x0a\x09^ false",
 messageSends: [],
@@ -4880,9 +4828,8 @@ selector: "cancelCallback:",
 protocol: 'accessing',
 fn: function (aBlock){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@cancelCallback"]=aBlock;
-return self}, function($ctx1) {$ctx1.fill(self,"cancelCallback:",{aBlock:aBlock},smalltalk.HLTabSelectionWidget)})},
+return self},
 args: ["aBlock"],
 source: "cancelCallback: aBlock\x0a\x09cancelCallback := aBlock",
 messageSends: [],
@@ -4938,9 +4885,8 @@ selector: "confirmCallback:",
 protocol: 'accessing',
 fn: function (aBlock){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@confirmCallback"]=aBlock;
-return self}, function($ctx1) {$ctx1.fill(self,"confirmCallback:",{aBlock:aBlock},smalltalk.HLTabSelectionWidget)})},
+return self},
 args: ["aBlock"],
 source: "confirmCallback: aBlock\x0a\x09confirmCallback := aBlock",
 messageSends: [],
@@ -5069,9 +5015,8 @@ selector: "selectCallback:",
 protocol: 'accessing',
 fn: function (aBlock){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@selectCallback"]=aBlock;
-return self}, function($ctx1) {$ctx1.fill(self,"selectCallback:",{aBlock:aBlock},smalltalk.HLTabSelectionWidget)})},
+return self},
 args: ["aBlock"],
 source: "selectCallback: aBlock\x0a\x09selectCallback := aBlock",
 messageSends: [],
@@ -5102,11 +5047,10 @@ selector: "selectedTab",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@selectedTab"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"selectedTab",{},smalltalk.HLTabSelectionWidget)})},
+},
 args: [],
 source: "selectedTab\x0a\x09^ selectedTab",
 messageSends: [],
@@ -5120,9 +5064,8 @@ selector: "selectedTab:",
 protocol: 'accessing',
 fn: function (aTab){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@selectedTab"]=aTab;
-return self}, function($ctx1) {$ctx1.fill(self,"selectedTab:",{aTab:aTab},smalltalk.HLTabSelectionWidget)})},
+return self},
 args: ["aTab"],
 source: "selectedTab: aTab\x0a\x09selectedTab := aTab",
 messageSends: [],
@@ -5219,9 +5162,8 @@ selector: "tabs:",
 protocol: 'accessing',
 fn: function (aCollection){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@tabs"]=aCollection;
-return self}, function($ctx1) {$ctx1.fill(self,"tabs:",{aCollection:aCollection},smalltalk.HLTabSelectionWidget)})},
+return self},
 args: ["aCollection"],
 source: "tabs: aCollection\x0a\x09tabs := aCollection",
 messageSends: [],
@@ -5239,11 +5181,10 @@ selector: "collection",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@collection"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"collection",{},smalltalk.HLProgressBarWidget)})},
+},
 args: [],
 source: "collection\x0a\x09^ collection",
 messageSends: [],
@@ -5257,9 +5198,8 @@ selector: "collection:",
 protocol: 'accessing',
 fn: function (aCollection){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@collection"]=aCollection;
-return self}, function($ctx1) {$ctx1.fill(self,"collection:",{aCollection:aCollection},smalltalk.HLProgressBarWidget)})},
+return self},
 args: ["aCollection"],
 source: "collection: aCollection\x0a\x09collection := aCollection",
 messageSends: [],
@@ -5313,11 +5253,10 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@label"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLProgressBarWidget)})},
+},
 args: [],
 source: "label\x0a\x09^ label",
 messageSends: [],
@@ -5331,9 +5270,8 @@ selector: "label:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@label"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"label:",{aString:aString},smalltalk.HLProgressBarWidget)})},
+return self},
 args: ["aString"],
 source: "label: aString\x0a\x09label := aString",
 messageSends: [],
@@ -5347,11 +5285,10 @@ selector: "parent",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@parent"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"parent",{},smalltalk.HLProgressBarWidget)})},
+},
 args: [],
 source: "parent\x0a\x09^ parent",
 messageSends: [],
@@ -5365,9 +5302,8 @@ selector: "parent:",
 protocol: 'accessing',
 fn: function (aProgress){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@parent"]=aProgress;
-return self}, function($ctx1) {$ctx1.fill(self,"parent:",{aProgress:aProgress},smalltalk.HLProgressBarWidget)})},
+return self},
 args: ["aProgress"],
 source: "parent: aProgress\x0a\x09parent := aProgress",
 messageSends: [],
@@ -5459,11 +5395,10 @@ selector: "workBlock",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@workBlock"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"workBlock",{},smalltalk.HLProgressBarWidget)})},
+},
 args: [],
 source: "workBlock\x0a\x09^ workBlock",
 messageSends: [],
@@ -5477,9 +5412,8 @@ selector: "workBlock:",
 protocol: 'accessing',
 fn: function (aBlock){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@workBlock"]=aBlock;
-return self}, function($ctx1) {$ctx1.fill(self,"workBlock:",{aBlock:aBlock},smalltalk.HLProgressBarWidget)})},
+return self},
 args: ["aBlock"],
 source: "workBlock: aBlock\x0a\x09workBlock := aBlock",
 messageSends: [],
@@ -5522,9 +5456,8 @@ selector: "canBeOpenAsTab",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLSUnit.klass)})},
+},
 args: [],
 source: "canBeOpenAsTab\x0a\x09^ true",
 messageSends: [],
@@ -5538,9 +5471,8 @@ selector: "tabClass",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "sunit";
-}, function($ctx1) {$ctx1.fill(self,"tabClass",{},smalltalk.HLSUnit.klass)})},
+},
 args: [],
 source: "tabClass\x0a\x09^ 'sunit'",
 messageSends: [],
@@ -5554,9 +5486,8 @@ selector: "tabLabel",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "SUnit";
-}, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLSUnit.klass)})},
+},
 args: [],
 source: "tabLabel\x0a\x09^ 'SUnit'",
 messageSends: [],
@@ -5570,9 +5501,8 @@ selector: "tabPriority",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return (1000);
-}, function($ctx1) {$ctx1.fill(self,"tabPriority",{},smalltalk.HLSUnit.klass)})},
+},
 args: [],
 source: "tabPriority\x0a\x09^ 1000",
 messageSends: [],

+ 7 - 14
js/Helios-Debugger.js

@@ -9,11 +9,10 @@ selector: "context",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@context"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"context",{},smalltalk.HLContextInspectorDecorator)})},
+},
 args: [],
 source: "context\x0a\x09^ context",
 messageSends: [],
@@ -27,9 +26,8 @@ selector: "initializeFromContext:",
 protocol: 'initialization',
 fn: function (aContext){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@context"]=aContext;
-return self}, function($ctx1) {$ctx1.fill(self,"initializeFromContext:",{aContext:aContext},smalltalk.HLContextInspectorDecorator)})},
+return self},
 args: ["aContext"],
 source: "initializeFromContext: aContext\x0a\x09context := aContext",
 messageSends: [],
@@ -375,9 +373,8 @@ selector: "tabClass",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "debugger";
-}, function($ctx1) {$ctx1.fill(self,"tabClass",{},smalltalk.HLDebugger.klass)})},
+},
 args: [],
 source: "tabClass\x0a\x09^ 'debugger'",
 messageSends: [],
@@ -391,9 +388,8 @@ selector: "tabLabel",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Debugger";
-}, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLDebugger.klass)})},
+},
 args: [],
 source: "tabLabel\x0a\x09^ 'Debugger'",
 messageSends: [],
@@ -612,11 +608,10 @@ selector: "contexts",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@contexts"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"contexts",{},smalltalk.HLDebuggerModel)})},
+},
 args: [],
 source: "contexts\x0a\x09^ contexts",
 messageSends: [],
@@ -785,11 +780,10 @@ selector: "rootContext",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@rootContext"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"rootContext",{},smalltalk.HLDebuggerModel)})},
+},
 args: [],
 source: "rootContext\x0a\x09^ rootContext",
 messageSends: [],
@@ -979,9 +973,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Call stack";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLStackListWidget)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Call stack'",
 messageSends: [],

+ 14 - 28
js/Helios-Helpers.js

@@ -56,11 +56,10 @@ selector: "method",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@method"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"method",{},smalltalk.HLClassifier)})},
+},
 args: [],
 source: "method\x0a\x09^ method",
 messageSends: [],
@@ -99,11 +98,10 @@ selector: "next",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@next"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"next",{},smalltalk.HLClassifier)})},
+},
 args: [],
 source: "next\x0a\x09^ next",
 messageSends: [],
@@ -117,9 +115,8 @@ selector: "next:",
 protocol: 'accessing',
 fn: function (anObject){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@next"]=anObject;
-return self}, function($ctx1) {$ctx1.fill(self,"next:",{anObject:anObject},smalltalk.HLClassifier)})},
+return self},
 args: ["anObject"],
 source: "next: anObject\x0a\x09next := anObject",
 messageSends: [],
@@ -443,11 +440,10 @@ selector: "protocol",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@protocol"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"protocol",{},smalltalk.HLGenerationOutput)})},
+},
 args: [],
 source: "protocol\x0a\x09^ protocol",
 messageSends: [],
@@ -461,9 +457,8 @@ selector: "protocol:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@protocol"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"protocol:",{aString:aString},smalltalk.HLGenerationOutput)})},
+return self},
 args: ["aString"],
 source: "protocol: aString\x0a\x09protocol := aString",
 messageSends: [],
@@ -477,11 +472,10 @@ selector: "sourceCodes",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@sourceCodes"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"sourceCodes",{},smalltalk.HLGenerationOutput)})},
+},
 args: [],
 source: "sourceCodes\x0a\x09^ sourceCodes",
 messageSends: [],
@@ -495,9 +489,8 @@ selector: "sourceCodes:",
 protocol: 'accessing',
 fn: function (aCollection){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@sourceCodes"]=aCollection;
-return self}, function($ctx1) {$ctx1.fill(self,"sourceCodes:",{aCollection:aCollection},smalltalk.HLGenerationOutput)})},
+return self},
 args: ["aCollection"],
 source: "sourceCodes: aCollection\x0a\x09sourceCodes := aCollection",
 messageSends: [],
@@ -511,11 +504,10 @@ selector: "targetClass",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@targetClass"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"targetClass",{},smalltalk.HLGenerationOutput)})},
+},
 args: [],
 source: "targetClass\x0a\x09^ targetClass",
 messageSends: [],
@@ -529,9 +521,8 @@ selector: "targetClass:",
 protocol: 'accessing',
 fn: function (aClass){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@targetClass"]=aClass;
-return self}, function($ctx1) {$ctx1.fill(self,"targetClass:",{aClass:aClass},smalltalk.HLGenerationOutput)})},
+return self},
 args: ["aClass"],
 source: "targetClass: aClass\x0a\x09targetClass := aClass",
 messageSends: [],
@@ -714,11 +705,10 @@ selector: "output",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@output"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"output",{},smalltalk.HLMethodGenerator)})},
+},
 args: [],
 source: "output\x0a\x09^ output",
 messageSends: [],
@@ -1002,11 +992,10 @@ selector: "selector",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@selector"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"selector",{},smalltalk.HLMethodSourceCode)})},
+},
 args: [],
 source: "selector\x0a\x09^ selector",
 messageSends: [],
@@ -1020,9 +1009,8 @@ selector: "selector:",
 protocol: 'accessing',
 fn: function (aSelector){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@selector"]=aSelector;
-return self}, function($ctx1) {$ctx1.fill(self,"selector:",{aSelector:aSelector},smalltalk.HLMethodSourceCode)})},
+return self},
 args: ["aSelector"],
 source: "selector: aSelector\x0a\x09selector := aSelector",
 messageSends: [],
@@ -1036,11 +1024,10 @@ selector: "sourceCode",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@sourceCode"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"sourceCode",{},smalltalk.HLMethodSourceCode)})},
+},
 args: [],
 source: "sourceCode\x0a\x09^ sourceCode",
 messageSends: [],
@@ -1054,9 +1041,8 @@ selector: "sourceCode:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@sourceCode"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"sourceCode:",{aString:aString},smalltalk.HLMethodSourceCode)})},
+return self},
 args: ["aString"],
 source: "sourceCode: aString\x0a\x09sourceCode := aString",
 messageSends: [],

+ 18 - 36
js/Helios-Inspector.js

@@ -9,11 +9,10 @@ selector: "model",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@model"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLInspectorDisplayWidget)})},
+},
 args: [],
 source: "model\x0a\x0a\x09^ model",
 messageSends: [],
@@ -27,9 +26,8 @@ selector: "model:",
 protocol: 'accessing',
 fn: function (aModel){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@model"]=aModel;
-return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},smalltalk.HLInspectorDisplayWidget)})},
+return self},
 args: ["aModel"],
 source: "model: aModel\x0a\x0a\x09model := aModel",
 messageSends: [],
@@ -161,9 +159,8 @@ selector: "environment:",
 protocol: 'accessing',
 fn: function (anEnvironment){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@environment"]=anEnvironment;
-return self}, function($ctx1) {$ctx1.fill(self,"environment:",{anEnvironment:anEnvironment},smalltalk.HLInspectorModel)})},
+return self},
 args: ["anEnvironment"],
 source: "environment: anEnvironment\x0a\x09environment := anEnvironment",
 messageSends: [],
@@ -195,11 +192,10 @@ selector: "inspectee",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@inspectee"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"inspectee",{},smalltalk.HLInspectorModel)})},
+},
 args: [],
 source: "inspectee \x0a\x09^ inspectee",
 messageSends: [],
@@ -213,9 +209,8 @@ selector: "inspectee:",
 protocol: 'accessing',
 fn: function (anObject){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@inspectee"]=anObject;
-return self}, function($ctx1) {$ctx1.fill(self,"inspectee:",{anObject:anObject},smalltalk.HLInspectorModel)})},
+return self},
 args: ["anObject"],
 source: "inspectee: anObject \x0a\x09inspectee := anObject",
 messageSends: [],
@@ -270,9 +265,8 @@ selector: "label:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@label"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"label:",{aString:aString},smalltalk.HLInspectorModel)})},
+return self},
 args: ["aString"],
 source: "label: aString\x0a    label := aString",
 messageSends: [],
@@ -286,7 +280,6 @@ selector: "onKeyDown:",
 protocol: 'reactions',
 fn: function (anEvent){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 if(anEvent.ctrlKey) {
 		if(anEvent.keyCode === 80) { //ctrl+p
 			self._printIt();
@@ -304,7 +297,7 @@ if(anEvent.ctrlKey) {
 			return false;
 		}
 	};
-return self}, function($ctx1) {$ctx1.fill(self,"onKeyDown:",{anEvent:anEvent},smalltalk.HLInspectorModel)})},
+return self},
 args: ["anEvent"],
 source: "onKeyDown: anEvent\x0a\x0a\x09<if(anEvent.ctrlKey) {\x0a\x09\x09if(anEvent.keyCode === 80) { //ctrl+p\x0a\x09\x09\x09self._printIt();\x0a\x09\x09\x09anEvent.preventDefault();\x0a\x09\x09\x09return false;\x0a\x09\x09}\x0a\x09\x09if(anEvent.keyCode === 68) { //ctrl+d\x0a\x09\x09\x09self._doIt();\x0a\x09\x09\x09anEvent.preventDefault();\x0a\x09\x09\x09return false;\x0a\x09\x09}\x0a\x09\x09if(anEvent.keyCode === 73) { //ctrl+i\x0a\x09\x09\x09self._inspectIt();\x0a\x09\x09\x09anEvent.preventDefault();\x0a\x09\x09\x09return false;\x0a\x09\x09}\x0a\x09}>",
 messageSends: [],
@@ -433,9 +426,8 @@ selector: "variables:",
 protocol: 'accessing',
 fn: function (aCollection){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@variables"]=aCollection;
-return self}, function($ctx1) {$ctx1.fill(self,"variables:",{aCollection:aCollection},smalltalk.HLInspectorModel)})},
+return self},
 args: ["aCollection"],
 source: "variables: aCollection\x0a\x09variables := aCollection",
 messageSends: [],
@@ -534,11 +526,10 @@ selector: "model",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@model"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLInspectorVariablesWidget)})},
+},
 args: [],
 source: "model\x0a    ^ model",
 messageSends: [],
@@ -552,9 +543,8 @@ selector: "model:",
 protocol: 'accessing',
 fn: function (aModel){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@model"]=aModel;
-return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},smalltalk.HLInspectorVariablesWidget)})},
+return self},
 args: ["aModel"],
 source: "model: aModel\x0a    model := aModel",
 messageSends: [],
@@ -650,9 +640,8 @@ selector: "resetItems",
 protocol: 'actions',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@items"]=nil;
-return self}, function($ctx1) {$ctx1.fill(self,"resetItems",{},smalltalk.HLInspectorVariablesWidget)})},
+return self},
 args: [],
 source: "resetItems\x0a\x09items := nil",
 messageSends: [],
@@ -1006,8 +995,7 @@ selector: "onInspectIt",
 protocol: 'reactions',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"onInspectIt",{},smalltalk.HLInspectorWidget)})},
+return self},
 args: [],
 source: "onInspectIt",
 messageSends: [],
@@ -1038,8 +1026,7 @@ selector: "onPrintIt",
 protocol: 'reactions',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"onPrintIt",{},smalltalk.HLInspectorWidget)})},
+return self},
 args: [],
 source: "onPrintIt",
 messageSends: [],
@@ -1171,9 +1158,8 @@ selector: "tabLabel",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Inspector";
-}, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLInspectorWidget)})},
+},
 args: [],
 source: "tabLabel\x0a    ^ 'Inspector'",
 messageSends: [],
@@ -1266,9 +1252,8 @@ selector: "canBeOpenAsTab",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLInspector.klass)})},
+},
 args: [],
 source: "canBeOpenAsTab\x0a\x09^ false",
 messageSends: [],
@@ -1359,9 +1344,8 @@ selector: "tabClass",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "inspector";
-}, function($ctx1) {$ctx1.fill(self,"tabClass",{},smalltalk.HLInspector.klass)})},
+},
 args: [],
 source: "tabClass\x0a\x09^ 'inspector'",
 messageSends: [],
@@ -1375,9 +1359,8 @@ selector: "tabLabel",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Inspector";
-}, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLInspector.klass)})},
+},
 args: [],
 source: "tabLabel\x0a\x09^ 'Inspector'",
 messageSends: [],
@@ -1391,9 +1374,8 @@ selector: "tabPriority",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return (10);
-}, function($ctx1) {$ctx1.fill(self,"tabPriority",{},smalltalk.HLInspector.klass)})},
+},
 args: [],
 source: "tabPriority\x0a\x09^ 10",
 messageSends: [],

+ 31 - 62
js/Helios-KeyBindings.js

@@ -10,8 +10,7 @@ selector: "apply",
 protocol: 'actions',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"apply",{},smalltalk.HLBinding)})},
+return self},
 args: [],
 source: "apply",
 messageSends: [],
@@ -25,9 +24,8 @@ selector: "atKey:",
 protocol: 'accessing',
 fn: function (aKey){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return nil;
-}, function($ctx1) {$ctx1.fill(self,"atKey:",{aKey:aKey},smalltalk.HLBinding)})},
+},
 args: ["aKey"],
 source: "atKey: aKey\x0a\x09\x22Answer the sub-binding at key aKey.\x0a\x09Always answer nil here. See HLBindingGroup for more.\x22\x0a\x09\x0a\x09^ nil",
 messageSends: [],
@@ -77,11 +75,10 @@ selector: "key",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@key"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLBinding)})},
+},
 args: [],
 source: "key\x0a\x09^ key",
 messageSends: [],
@@ -95,9 +92,8 @@ selector: "key:",
 protocol: 'accessing',
 fn: function (anInteger){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@key"]=anInteger;
-return self}, function($ctx1) {$ctx1.fill(self,"key:",{anInteger:anInteger},smalltalk.HLBinding)})},
+return self},
 args: ["anInteger"],
 source: "key: anInteger\x0a\x09key := anInteger",
 messageSends: [],
@@ -111,11 +107,10 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@label"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLBinding)})},
+},
 args: [],
 source: "label\x0a\x09^ label",
 messageSends: [],
@@ -129,9 +124,8 @@ selector: "label:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@label"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"label:",{aString:aString},smalltalk.HLBinding)})},
+return self},
 args: ["aString"],
 source: "label: aString\x0a\x09label := aString",
 messageSends: [],
@@ -145,8 +139,7 @@ selector: "release",
 protocol: 'actions',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"release",{},smalltalk.HLBinding)})},
+return self},
 args: [],
 source: "release",
 messageSends: [],
@@ -160,8 +153,7 @@ selector: "renderOn:html:",
 protocol: 'rendering',
 fn: function (aBindingHelper,html){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"renderOn:html:",{aBindingHelper:aBindingHelper,html:html},smalltalk.HLBinding)})},
+return self},
 args: ["aBindingHelper", "html"],
 source: "renderOn: aBindingHelper html: html",
 messageSends: [],
@@ -243,11 +235,10 @@ selector: "command",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@command"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"command",{},smalltalk.HLBindingAction)})},
+},
 args: [],
 source: "command\x0a\x09^ command",
 messageSends: [],
@@ -261,9 +252,8 @@ selector: "command:",
 protocol: 'accessing',
 fn: function (aCommand){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@command"]=aCommand;
-return self}, function($ctx1) {$ctx1.fill(self,"command:",{aCommand:aCommand},smalltalk.HLBindingAction)})},
+return self},
 args: ["aCommand"],
 source: "command: aCommand\x0a\x09command := aCommand",
 messageSends: [],
@@ -699,9 +689,8 @@ selector: "callback:",
 protocol: 'accessing',
 fn: function (aBlock){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@callback"]=aBlock;
-return self}, function($ctx1) {$ctx1.fill(self,"callback:",{aBlock:aBlock},smalltalk.HLBindingActionInputWidget)})},
+return self},
 args: ["aBlock"],
 source: "callback: aBlock\x0a\x09callback := aBlock",
 messageSends: [],
@@ -756,9 +745,8 @@ selector: "defaultValue:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@defaultValue"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"defaultValue:",{aString:aString},smalltalk.HLBindingActionInputWidget)})},
+return self},
 args: ["aString"],
 source: "defaultValue: aString\x0a\x09defaultValue := aString",
 messageSends: [],
@@ -817,11 +805,10 @@ selector: "ghostText",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@ghostText"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"ghostText",{},smalltalk.HLBindingActionInputWidget)})},
+},
 args: [],
 source: "ghostText\x0a\x09^ ghostText",
 messageSends: [],
@@ -835,9 +822,8 @@ selector: "ghostText:",
 protocol: 'accessing',
 fn: function (aText){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@ghostText"]=aText;
-return self}, function($ctx1) {$ctx1.fill(self,"ghostText:",{aText:aText},smalltalk.HLBindingActionInputWidget)})},
+return self},
 args: ["aText"],
 source: "ghostText: aText\x0a\x09ghostText := aText",
 messageSends: [],
@@ -851,11 +837,10 @@ selector: "input",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@input"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"input",{},smalltalk.HLBindingActionInputWidget)})},
+},
 args: [],
 source: "input\x0a\x09^ input",
 messageSends: [],
@@ -892,9 +877,8 @@ selector: "inputCompletion:",
 protocol: 'accessing',
 fn: function (aCollection){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@inputCompletion"]=aCollection;
-return self}, function($ctx1) {$ctx1.fill(self,"inputCompletion:",{aCollection:aCollection},smalltalk.HLBindingActionInputWidget)})},
+return self},
 args: ["aCollection"],
 source: "inputCompletion: aCollection\x0a\x09inputCompletion := aCollection",
 messageSends: [],
@@ -932,9 +916,8 @@ selector: "message:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@message"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"message:",{aString:aString},smalltalk.HLBindingActionInputWidget)})},
+return self},
 args: ["aString"],
 source: "message: aString\x0a\x09message := aString",
 messageSends: [],
@@ -1058,9 +1041,8 @@ selector: "status:",
 protocol: 'accessing',
 fn: function (aStatus){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@status"]=aStatus;
-return self}, function($ctx1) {$ctx1.fill(self,"status:",{aStatus:aStatus},smalltalk.HLBindingActionInputWidget)})},
+return self},
 args: ["aStatus"],
 source: "status: aStatus\x0a\x09status := aStatus",
 messageSends: [],
@@ -1094,9 +1076,8 @@ selector: "activationKey",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return (32);
-}, function($ctx1) {$ctx1.fill(self,"activationKey",{},smalltalk.HLKeyBinder)})},
+},
 args: [],
 source: "activationKey\x0a\x09\x22SPACE\x22\x0a\x09^ 32",
 messageSends: [],
@@ -1110,9 +1091,8 @@ selector: "activationKeyLabel",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "ctrl + space";
-}, function($ctx1) {$ctx1.fill(self,"activationKeyLabel",{},smalltalk.HLKeyBinder)})},
+},
 args: [],
 source: "activationKeyLabel\x0a\x09^ 'ctrl + space'",
 messageSends: [],
@@ -1232,9 +1212,8 @@ selector: "escapeKey",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return (27);
-}, function($ctx1) {$ctx1.fill(self,"escapeKey",{},smalltalk.HLKeyBinder)})},
+},
 args: [],
 source: "escapeKey\x0a\x09\x22ESC\x22\x0a\x09^ 27",
 messageSends: [],
@@ -1248,9 +1227,8 @@ selector: "flushBindings",
 protocol: 'actions',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@bindings"]=nil;
-return self}, function($ctx1) {$ctx1.fill(self,"flushBindings",{},smalltalk.HLKeyBinder)})},
+return self},
 args: [],
 source: "flushBindings\x0a\x09bindings := nil",
 messageSends: [],
@@ -1372,11 +1350,10 @@ selector: "helper",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@helper"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"helper",{},smalltalk.HLKeyBinder)})},
+},
 args: [],
 source: "helper\x0a\x09^ helper",
 messageSends: [],
@@ -1557,9 +1534,8 @@ selector: "cssClass",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "key_helper";
-}, function($ctx1) {$ctx1.fill(self,"cssClass",{},smalltalk.HLKeyBinderHelperWidget)})},
+},
 args: [],
 source: "cssClass\x0a\x09^ 'key_helper'",
 messageSends: [],
@@ -1606,11 +1582,10 @@ selector: "keyBinder",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@keyBinder"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"keyBinder",{},smalltalk.HLKeyBinderHelperWidget)})},
+},
 args: [],
 source: "keyBinder\x0a\x09^ keyBinder",
 messageSends: [],
@@ -1624,9 +1599,8 @@ selector: "keyBinder:",
 protocol: 'accessing',
 fn: function (aKeyBinder){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@keyBinder"]=aKeyBinder;
-return self}, function($ctx1) {$ctx1.fill(self,"keyBinder:",{aKeyBinder:aKeyBinder},smalltalk.HLKeyBinderHelperWidget)})},
+return self},
 args: ["aKeyBinder"],
 source: "keyBinder: aKeyBinder\x0a\x09keyBinder := aKeyBinder",
 messageSends: [],
@@ -1640,9 +1614,8 @@ selector: "mainId",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "binding-helper-main";
-}, function($ctx1) {$ctx1.fill(self,"mainId",{},smalltalk.HLKeyBinderHelperWidget)})},
+},
 args: [],
 source: "mainId\x0a\x09^ 'binding-helper-main'",
 messageSends: [],
@@ -2014,9 +1987,8 @@ selector: "defaultRepeatInterval",
 protocol: 'defaults',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return (70);
-}, function($ctx1) {$ctx1.fill(self,"defaultRepeatInterval",{},smalltalk.HLRepeatedKeyDownHandler)})},
+},
 args: [],
 source: "defaultRepeatInterval\x0a\x09^ 70",
 messageSends: [],
@@ -2194,9 +2166,8 @@ selector: "repeatInterval:",
 protocol: 'accessing',
 fn: function (anInteger){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@repeatInterval"]=anInteger;
-return self}, function($ctx1) {$ctx1.fill(self,"repeatInterval:",{anInteger:anInteger},smalltalk.HLRepeatedKeyDownHandler)})},
+return self},
 args: ["anInteger"],
 source: "repeatInterval: anInteger\x0a\x09repeatInterval := anInteger",
 messageSends: [],
@@ -2290,11 +2261,10 @@ selector: "widget",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@widget"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"widget",{},smalltalk.HLRepeatedKeyDownHandler)})},
+},
 args: [],
 source: "widget\x0a\x09^ widget",
 messageSends: [],
@@ -2308,9 +2278,8 @@ selector: "widget:",
 protocol: 'accessing',
 fn: function (aWidget){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@widget"]=aWidget;
-return self}, function($ctx1) {$ctx1.fill(self,"widget:",{aWidget:aWidget},smalltalk.HLRepeatedKeyDownHandler)})},
+return self},
 args: ["aWidget"],
 source: "widget: aWidget\x0a\x09widget := aWidget",
 messageSends: [],

+ 12 - 24
js/Helios-Layout.js

@@ -28,11 +28,10 @@ selector: "splitter",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@splitter"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"splitter",{},smalltalk.HLContainer)})},
+},
 args: [],
 source: "splitter\x0a\x09^ splitter",
 messageSends: [],
@@ -46,9 +45,8 @@ selector: "splitter:",
 protocol: 'accessing',
 fn: function (aSplitter){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@splitter"]=aSplitter;
-return self}, function($ctx1) {$ctx1.fill(self,"splitter:",{aSplitter:aSplitter},smalltalk.HLContainer)})},
+return self},
 args: ["aSplitter"],
 source: "splitter: aSplitter\x0a\x09splitter := aSplitter",
 messageSends: [],
@@ -86,9 +84,8 @@ selector: "cssClass",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "splitter";
-}, function($ctx1) {$ctx1.fill(self,"cssClass",{},smalltalk.HLSplitter)})},
+},
 args: [],
 source: "cssClass\x0a\x09^ 'splitter'",
 messageSends: [],
@@ -102,11 +99,10 @@ selector: "firstWidget",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@firstWidget"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"firstWidget",{},smalltalk.HLSplitter)})},
+},
 args: [],
 source: "firstWidget\x0a\x09^ firstWidget",
 messageSends: [],
@@ -120,9 +116,8 @@ selector: "firstWidget:",
 protocol: 'accessing',
 fn: function (aWidget){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@firstWidget"]=aWidget;
-return self}, function($ctx1) {$ctx1.fill(self,"firstWidget:",{aWidget:aWidget},smalltalk.HLSplitter)})},
+return self},
 args: ["aWidget"],
 source: "firstWidget: aWidget\x0a\x09firstWidget := aWidget",
 messageSends: [],
@@ -136,9 +131,8 @@ selector: "isHeliosSplitter",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isHeliosSplitter",{},smalltalk.HLSplitter)})},
+},
 args: [],
 source: "isHeliosSplitter\x0a\x09^ true",
 messageSends: [],
@@ -152,9 +146,8 @@ selector: "panesCssClass",
 protocol: 'rendering',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "panes";
-}, function($ctx1) {$ctx1.fill(self,"panesCssClass",{},smalltalk.HLSplitter)})},
+},
 args: [],
 source: "panesCssClass\x0a\x09^ 'panes'",
 messageSends: [],
@@ -211,8 +204,7 @@ selector: "resize",
 protocol: 'rendering',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"resize",{},smalltalk.HLSplitter)})},
+return self},
 args: [],
 source: "resize",
 messageSends: [],
@@ -226,11 +218,10 @@ selector: "secondWidget",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@secondWidget"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"secondWidget",{},smalltalk.HLSplitter)})},
+},
 args: [],
 source: "secondWidget\x0a\x09^ secondWidget",
 messageSends: [],
@@ -244,9 +235,8 @@ selector: "secondWidget:",
 protocol: 'accessing',
 fn: function (aWidget){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@secondWidget"]=aWidget;
-return self}, function($ctx1) {$ctx1.fill(self,"secondWidget:",{aWidget:aWidget},smalltalk.HLSplitter)})},
+return self},
 args: ["aWidget"],
 source: "secondWidget: aWidget\x0a\x09secondWidget := aWidget",
 messageSends: [],
@@ -260,8 +250,7 @@ selector: "setupSplitter",
 protocol: 'rendering',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"setupSplitter",{},smalltalk.HLSplitter)})},
+return self},
 args: [],
 source: "setupSplitter",
 messageSends: [],
@@ -612,9 +601,8 @@ selector: "isHeliosSplitter",
 protocol: '*Helios-Layout',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"isHeliosSplitter",{},smalltalk.Object)})},
+},
 args: [],
 source: "isHeliosSplitter\x0a\x09^ false",
 messageSends: [],

+ 16 - 32
js/Helios-References.js

@@ -45,11 +45,10 @@ selector: "methodClass",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@methodClass"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"methodClass",{},smalltalk.HLMethodReference)})},
+},
 args: [],
 source: "methodClass\x0a\x09^ methodClass",
 messageSends: [],
@@ -63,9 +62,8 @@ selector: "methodClass:",
 protocol: 'accessing',
 fn: function (aClass){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@methodClass"]=aClass;
-return self}, function($ctx1) {$ctx1.fill(self,"methodClass:",{aClass:aClass},smalltalk.HLMethodReference)})},
+return self},
 args: ["aClass"],
 source: "methodClass: aClass\x0a\x09methodClass := aClass",
 messageSends: [],
@@ -79,11 +77,10 @@ selector: "selector",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@selector"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"selector",{},smalltalk.HLMethodReference)})},
+},
 args: [],
 source: "selector\x0a\x09^ selector",
 messageSends: [],
@@ -97,9 +94,8 @@ selector: "selector:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@selector"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"selector:",{aString:aString},smalltalk.HLMethodReference)})},
+return self},
 args: ["aString"],
 source: "selector: aString\x0a\x09selector := aString",
 messageSends: [],
@@ -235,9 +231,8 @@ selector: "model:",
 protocol: 'accessing',
 fn: function (aModel){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@model"]=aModel;
-return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},smalltalk.HLReferences)})},
+return self},
 args: ["aModel"],
 source: "model: aModel\x0a\x09model := aModel",
 messageSends: [],
@@ -396,9 +391,8 @@ selector: "canBeOpenAsTab",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLReferences.klass)})},
+},
 args: [],
 source: "canBeOpenAsTab\x0a\x09^ false",
 messageSends: [],
@@ -412,9 +406,8 @@ selector: "tabClass",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "references";
-}, function($ctx1) {$ctx1.fill(self,"tabClass",{},smalltalk.HLReferences.klass)})},
+},
 args: [],
 source: "tabClass\x0a\x09^ 'references'",
 messageSends: [],
@@ -428,9 +421,8 @@ selector: "tabLabel",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "References";
-}, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLReferences.klass)})},
+},
 args: [],
 source: "tabLabel\x0a\x09^ 'References'",
 messageSends: [],
@@ -444,9 +436,8 @@ selector: "tabPriority",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return (100);
-}, function($ctx1) {$ctx1.fill(self,"tabPriority",{},smalltalk.HLReferences.klass)})},
+},
 args: [],
 source: "tabPriority\x0a\x09^ 100",
 messageSends: [],
@@ -481,9 +472,8 @@ selector: "commandCategory",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Methods";
-}, function($ctx1) {$ctx1.fill(self,"commandCategory",{},smalltalk.HLReferencesListWidget)})},
+},
 args: [],
 source: "commandCategory\x0a\x09^ 'Methods'",
 messageSends: [],
@@ -497,9 +487,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "List";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLReferencesListWidget)})},
+},
 args: [],
 source: "label\x0a\x09^ 'List'",
 messageSends: [],
@@ -654,9 +643,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Class references";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLClassReferencesListWidget)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Class references'",
 messageSends: [],
@@ -691,9 +679,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Implementors";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLImplementorsListWidget)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Implementors'",
 messageSends: [],
@@ -728,9 +715,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Source search";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLRegexpListWidget)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Source search'",
 messageSends: [],
@@ -765,9 +751,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Senders";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLSendersListWidget)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Senders'",
 messageSends: [],
@@ -907,9 +892,8 @@ selector: "isReferencesModel",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isReferencesModel",{},smalltalk.HLReferencesModel)})},
+},
 args: [],
 source: "isReferencesModel\x0a\x09^ true",
 messageSends: [],

+ 22 - 44
js/Helios-Workspace.js

@@ -94,9 +94,8 @@ selector: "environment:",
 protocol: 'accessing',
 fn: function (anEnvironment){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@environment"]=anEnvironment;
-return self}, function($ctx1) {$ctx1.fill(self,"environment:",{anEnvironment:anEnvironment},smalltalk.HLCodeModel)})},
+return self},
 args: ["anEnvironment"],
 source: "environment: anEnvironment\x0a\x09environment := anEnvironment",
 messageSends: [],
@@ -150,9 +149,8 @@ selector: "receiver:",
 protocol: 'accessing',
 fn: function (anObject){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@receiver"]=anObject;
-return self}, function($ctx1) {$ctx1.fill(self,"receiver:",{anObject:anObject},smalltalk.HLCodeModel)})},
+return self},
 args: ["anObject"],
 source: "receiver: anObject\x0a\x09receiver := anObject",
 messageSends: [],
@@ -208,9 +206,8 @@ selector: "canHaveFocus",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"canHaveFocus",{},smalltalk.HLCodeWidget)})},
+},
 args: [],
 source: "canHaveFocus\x0a\x09^ true",
 messageSends: [],
@@ -376,11 +373,10 @@ selector: "editor",
 protocol: 'actions',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@editor"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"editor",{},smalltalk.HLCodeWidget)})},
+},
 args: [],
 source: "editor\x0a\x09^ editor",
 messageSends: [],
@@ -466,9 +462,8 @@ selector: "hasModification",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"hasModification",{},smalltalk.HLCodeWidget)})},
+},
 args: [],
 source: "hasModification\x0a\x09^ false",
 messageSends: [],
@@ -557,9 +552,8 @@ selector: "model:",
 protocol: 'accessing',
 fn: function (aModel){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@model"]=aModel;
-return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},smalltalk.HLCodeWidget)})},
+return self},
 args: ["aModel"],
 source: "model: aModel\x0a\x09model := aModel",
 messageSends: [],
@@ -637,8 +631,7 @@ selector: "onSaveIt",
 protocol: 'reactions',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"onSaveIt",{},smalltalk.HLCodeWidget)})},
+return self},
 args: [],
 source: "onSaveIt\x0a\x09\x22I do not do anything\x22",
 messageSends: [],
@@ -853,8 +846,7 @@ selector: "saveIt",
 protocol: 'actions',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"saveIt",{},smalltalk.HLCodeWidget)})},
+return self},
 args: [],
 source: "saveIt\x0a\x09\x22I do not do anything\x22",
 messageSends: [],
@@ -954,9 +946,8 @@ selector: "setEditorOn:",
 protocol: 'actions',
 fn: function (aTextarea){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self['@editor'] = CodeMirror.fromTextArea(aTextarea, self._editorOptions());
-return self}, function($ctx1) {$ctx1.fill(self,"setEditorOn:",{aTextarea:aTextarea},smalltalk.HLCodeWidget)})},
+return self},
 args: ["aTextarea"],
 source: "setEditorOn: aTextarea\x0a\x09<self['@editor'] = CodeMirror.fromTextArea(aTextarea, self._editorOptions())>",
 messageSends: [],
@@ -1286,14 +1277,13 @@ selector: "setupCodeMirror",
 protocol: 'initialization',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
  
 		CodeMirror.keyMap.default.fallthrough = ["basic"];
 		CodeMirror.commands.autocomplete = function(cm) {
 			CodeMirror.showHint(cm, self._hintFor_options_);
 		}
 	;
-return self}, function($ctx1) {$ctx1.fill(self,"setupCodeMirror",{},smalltalk.HLCodeWidget.klass)})},
+return self},
 args: [],
 source: "setupCodeMirror\x0a\x09< \x0a\x09\x09CodeMirror.keyMap.default.fallthrough = [\x22basic\x22];\x0a\x09\x09CodeMirror.commands.autocomplete = function(cm) {\x0a\x09\x09\x09CodeMirror.showHint(cm, self._hintFor_options_);\x0a\x09\x09}\x0a\x09>",
 messageSends: [],
@@ -1350,9 +1340,8 @@ selector: "setupKeyMaps",
 protocol: 'initialization',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 CodeMirror.keyMap['Amber'] = self._keyMap();
-return self}, function($ctx1) {$ctx1.fill(self,"setupKeyMaps",{},smalltalk.HLCodeWidget.klass)})},
+return self},
 args: [],
 source: "setupKeyMaps\x0a\x09<CodeMirror.keyMap['Amber'] = self._keyMap()>",
 messageSends: [],
@@ -1461,12 +1450,11 @@ selector: "methodContents:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 self["@methodContents"]=aString;
 $1=self["@methodContents"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"methodContents:",{aString:aString},smalltalk.HLNavigationCodeWidget)})},
+},
 args: ["aString"],
 source: "methodContents: aString\x0a\x09^ methodContents := aString",
 messageSends: [],
@@ -1480,8 +1468,7 @@ selector: "previous",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"previous",{},smalltalk.HLNavigationCodeWidget)})},
+return self},
 args: [],
 source: "previous\x0a\x09\x22for browser lists widget\x22",
 messageSends: [],
@@ -1495,8 +1482,7 @@ selector: "previous:",
 protocol: 'accessing',
 fn: function (aWidget){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"previous:",{aWidget:aWidget},smalltalk.HLNavigationCodeWidget)})},
+return self},
 args: ["aWidget"],
 source: "previous: aWidget\x0a\x09\x22for browser lists widget\x22",
 messageSends: [],
@@ -1511,9 +1497,8 @@ selector: "canBeOpenAsTab",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLNavigationCodeWidget.klass)})},
+},
 args: [],
 source: "canBeOpenAsTab\x0a\x09^ false",
 messageSends: [],
@@ -1550,11 +1535,10 @@ selector: "browserModel",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@browserModel"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"browserModel",{},smalltalk.HLBrowserCodeWidget)})},
+},
 args: [],
 source: "browserModel\x0a\x09^ browserModel",
 messageSends: [],
@@ -2119,9 +2103,8 @@ selector: "canBeOpenAsTab",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLBrowserCodeWidget.klass)})},
+},
 args: [],
 source: "canBeOpenAsTab\x0a\x09^ false",
 messageSends: [],
@@ -2158,9 +2141,8 @@ selector: "canHaveFocus",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"canHaveFocus",{},smalltalk.HLWorkspace)})},
+},
 args: [],
 source: "canHaveFocus\x0a\x09^ true",
 messageSends: [],
@@ -2312,9 +2294,8 @@ selector: "canBeOpenAsTab",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLWorkspace.klass)})},
+},
 args: [],
 source: "canBeOpenAsTab\x0a\x09^ true",
 messageSends: [],
@@ -2328,9 +2309,8 @@ selector: "tabClass",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "workspace";
-}, function($ctx1) {$ctx1.fill(self,"tabClass",{},smalltalk.HLWorkspace.klass)})},
+},
 args: [],
 source: "tabClass\x0a\x09^ 'workspace'",
 messageSends: [],
@@ -2344,9 +2324,8 @@ selector: "tabLabel",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Workspace";
-}, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLWorkspace.klass)})},
+},
 args: [],
 source: "tabLabel\x0a\x09^ 'Workspace'",
 messageSends: [],
@@ -2360,9 +2339,8 @@ selector: "tabPriority",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return (10);
-}, function($ctx1) {$ctx1.fill(self,"tabPriority",{},smalltalk.HLWorkspace.klass)})},
+},
 args: [],
 source: "tabPriority\x0a\x09^ 10",
 messageSends: [],

+ 44 - 88
js/IDE.js

@@ -9,11 +9,10 @@ selector: "browser",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@browser"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"browser",{},smalltalk.ClassesList)})},
+},
 args: [],
 source: "browser\x0a\x09^ browser",
 messageSends: [],
@@ -27,9 +26,8 @@ selector: "browser:",
 protocol: 'accessing',
 fn: function (aBrowser){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@browser"]=aBrowser;
-return self}, function($ctx1) {$ctx1.fill(self,"browser:",{aBrowser:aBrowser},smalltalk.ClassesList)})},
+return self},
 args: ["aBrowser"],
 source: "browser: aBrowser\x0a\x09browser := aBrowser",
 messageSends: [],
@@ -145,9 +143,8 @@ selector: "resetNodes",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@nodes"]=nil;
-return self}, function($ctx1) {$ctx1.fill(self,"resetNodes",{},smalltalk.ClassesList)})},
+return self},
 args: [],
 source: "resetNodes\x0a\x09nodes := nil",
 messageSends: [],
@@ -207,11 +204,10 @@ selector: "browser",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@browser"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"browser",{},smalltalk.ClassesListNode)})},
+},
 args: [],
 source: "browser\x0a\x09^ browser",
 messageSends: [],
@@ -225,9 +221,8 @@ selector: "browser:",
 protocol: 'accessing',
 fn: function (aBrowser){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@browser"]=aBrowser;
-return self}, function($ctx1) {$ctx1.fill(self,"browser:",{aBrowser:aBrowser},smalltalk.ClassesListNode)})},
+return self},
 args: ["aBrowser"],
 source: "browser: aBrowser\x0a\x09browser := aBrowser",
 messageSends: [],
@@ -302,11 +297,10 @@ selector: "level",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@level"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"level",{},smalltalk.ClassesListNode)})},
+},
 args: [],
 source: "level\x0a\x09^ level",
 messageSends: [],
@@ -320,9 +314,8 @@ selector: "level:",
 protocol: 'accessing',
 fn: function (anInteger){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@level"]=anInteger;
-return self}, function($ctx1) {$ctx1.fill(self,"level:",{anInteger:anInteger},smalltalk.ClassesListNode)})},
+return self},
 args: ["anInteger"],
 source: "level: anInteger\x0a\x09level := anInteger",
 messageSends: [],
@@ -336,11 +329,10 @@ selector: "nodes",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@nodes"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"nodes",{},smalltalk.ClassesListNode)})},
+},
 args: [],
 source: "nodes\x0a\x09^ nodes",
 messageSends: [],
@@ -400,11 +392,10 @@ selector: "theClass",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@theClass"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.ClassesListNode)})},
+},
 args: [],
 source: "theClass\x0a\x09^ theClass",
 messageSends: [],
@@ -418,9 +409,8 @@ selector: "theClass:",
 protocol: 'accessing',
 fn: function (aClass){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@theClass"]=aClass;
-return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass},smalltalk.ClassesListNode)})},
+return self},
 args: ["aClass"],
 source: "theClass: aClass\x0a\x09theClass := aClass",
 messageSends: [],
@@ -601,11 +591,10 @@ selector: "editor",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@editor"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"editor",{},smalltalk.SourceArea)})},
+},
 args: [],
 source: "editor\x0a\x09^ editor",
 messageSends: [],
@@ -686,7 +675,6 @@ selector: "handleKeyDown:",
 protocol: 'actions',
 fn: function (anEvent){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 if(anEvent.ctrlKey) {
 		if(anEvent.keyCode === 80) { //ctrl+p
 			self._printIt();
@@ -704,7 +692,7 @@ if(anEvent.ctrlKey) {
 			return false;
 		}
 	};
-return self}, function($ctx1) {$ctx1.fill(self,"handleKeyDown:",{anEvent:anEvent},smalltalk.SourceArea)})},
+return self},
 args: ["anEvent"],
 source: "handleKeyDown: anEvent\x0a\x09<if(anEvent.ctrlKey) {\x0a\x09\x09if(anEvent.keyCode === 80) { //ctrl+p\x0a\x09\x09\x09self._printIt();\x0a\x09\x09\x09anEvent.preventDefault();\x0a\x09\x09\x09return false;\x0a\x09\x09}\x0a\x09\x09if(anEvent.keyCode === 68) { //ctrl+d\x0a\x09\x09\x09self._doIt();\x0a\x09\x09\x09anEvent.preventDefault();\x0a\x09\x09\x09return false;\x0a\x09\x09}\x0a\x09\x09if(anEvent.keyCode === 73) { //ctrl+i\x0a\x09\x09\x09self._inspectIt();\x0a\x09\x09\x09anEvent.preventDefault();\x0a\x09\x09\x09return false;\x0a\x09\x09}\x0a\x09}>",
 messageSends: [],
@@ -734,11 +722,10 @@ selector: "onDoIt",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@onDoIt"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"onDoIt",{},smalltalk.SourceArea)})},
+},
 args: [],
 source: "onDoIt\x0a\x09^ onDoIt",
 messageSends: [],
@@ -752,9 +739,8 @@ selector: "onDoIt:",
 protocol: 'accessing',
 fn: function (aBlock){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@onDoIt"]=aBlock;
-return self}, function($ctx1) {$ctx1.fill(self,"onDoIt:",{aBlock:aBlock},smalltalk.SourceArea)})},
+return self},
 args: ["aBlock"],
 source: "onDoIt: aBlock\x0a\x09onDoIt := aBlock",
 messageSends: [],
@@ -903,9 +889,8 @@ selector: "receiver:",
 protocol: 'accessing',
 fn: function (anObject){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@receiver"]=anObject;
-return self}, function($ctx1) {$ctx1.fill(self,"receiver:",{anObject:anObject},smalltalk.SourceArea)})},
+return self},
 args: ["anObject"],
 source: "receiver: anObject\x0a\x09receiver := anObject",
 messageSends: [],
@@ -964,7 +949,6 @@ selector: "setEditorOn:",
 protocol: 'accessing',
 fn: function (aTextarea){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self['@editor'] = CodeMirror.fromTextArea(aTextarea, {
 		theme: 'default',
 				lineNumbers: true,
@@ -974,7 +958,7 @@ self['@editor'] = CodeMirror.fromTextArea(aTextarea, {
 				matchBrackets: true,
 				electricChars: false
 	});
-return self}, function($ctx1) {$ctx1.fill(self,"setEditorOn:",{aTextarea:aTextarea},smalltalk.SourceArea)})},
+return self},
 args: ["aTextarea"],
 source: "setEditorOn: aTextarea\x0a\x09<self['@editor'] = CodeMirror.fromTextArea(aTextarea, {\x0a\x09\x09theme: 'default',\x0a\x09\x09\x09\x09lineNumbers: true,\x0a\x09\x09\x09\x09enterMode: 'flat',\x0a\x09\x09\x09\x09indentWithTabs: true,\x0a\x09\x09\x09\x09indentUnit: 4,\x0a\x09\x09\x09\x09matchBrackets: true,\x0a\x09\x09\x09\x09electricChars: false\x0a\x09})>",
 messageSends: [],
@@ -1040,9 +1024,8 @@ selector: "setupCodeMirror",
 protocol: 'initialization',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
  CodeMirror.keyMap["default"].fallthrough = ["basic"] ;
-return self}, function($ctx1) {$ctx1.fill(self,"setupCodeMirror",{},smalltalk.SourceArea.klass)})},
+return self},
 args: [],
 source: "setupCodeMirror\x0a\x09< CodeMirror.keyMap[\x22default\x22].fallthrough = [\x22basic\x22] >",
 messageSends: [],
@@ -1734,9 +1717,8 @@ selector: "canBeClosed",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"canBeClosed",{},smalltalk.TabWidget)})},
+},
 args: [],
 source: "canBeClosed\x0a\x09^ false",
 messageSends: [],
@@ -1836,8 +1818,7 @@ selector: "renderBoxOn:",
 protocol: 'rendering',
 fn: function (html){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},smalltalk.TabWidget)})},
+return self},
 args: ["html"],
 source: "renderBoxOn: html",
 messageSends: [],
@@ -1851,8 +1832,7 @@ selector: "renderButtonsOn:",
 protocol: 'rendering',
 fn: function (html){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.TabWidget)})},
+return self},
 args: ["html"],
 source: "renderButtonsOn: html",
 messageSends: [],
@@ -2058,9 +2038,8 @@ selector: "canBeClosed",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"canBeClosed",{},smalltalk.Browser)})},
+},
 args: [],
 source: "canBeClosed\x0a\x09^ true",
 messageSends: [],
@@ -2498,9 +2477,8 @@ selector: "dummyMethodSource",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "messageSelectorAndArgumentNames\x0a\x09\x22comment stating purpose of message\x22\x0a\x0a\x09| temporary variable names |\x0a\x09statements";
-}, function($ctx1) {$ctx1.fill(self,"dummyMethodSource",{},smalltalk.Browser)})},
+},
 args: [],
 source: "dummyMethodSource\x0a\x09^ 'messageSelectorAndArgumentNames\x0a\x09\x22comment stating purpose of message\x22\x0a\x0a\x09| temporary variable names |\x0a\x09statements'",
 messageSends: [],
@@ -2514,7 +2492,6 @@ selector: "handleSourceAreaKeyDown:",
 protocol: 'actions',
 fn: function (anEvent){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 if(anEvent.ctrlKey) {
 		if(anEvent.keyCode === 83) { //ctrl+s
 			self._compile();
@@ -2523,7 +2500,7 @@ if(anEvent.ctrlKey) {
 		}
 	}
 	;
-return self}, function($ctx1) {$ctx1.fill(self,"handleSourceAreaKeyDown:",{anEvent:anEvent},smalltalk.Browser)})},
+return self},
 args: ["anEvent"],
 source: "handleSourceAreaKeyDown: anEvent\x0a\x09<if(anEvent.ctrlKey) {\x0a\x09\x09if(anEvent.keyCode === 83) { //ctrl+s\x0a\x09\x09\x09self._compile();\x0a\x09\x09\x09anEvent.preventDefault();\x0a\x09\x09\x09return false;\x0a\x09\x09}\x0a\x09}\x0a\x09>",
 messageSends: [],
@@ -3380,11 +3357,10 @@ selector: "selectedClass",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@selectedClass"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"selectedClass",{},smalltalk.Browser)})},
+},
 args: [],
 source: "selectedClass\x0a\x09^ selectedClass",
 messageSends: [],
@@ -3398,11 +3374,10 @@ selector: "selectedPackage",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@selectedPackage"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"selectedPackage",{},smalltalk.Browser)})},
+},
 args: [],
 source: "selectedPackage\x0a\x09^ selectedPackage",
 messageSends: [],
@@ -4083,9 +4058,8 @@ selector: "canBeClosed",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"canBeClosed",{},smalltalk.Debugger)})},
+},
 args: [],
 source: "canBeClosed\x0a\x09^ true",
 messageSends: [],
@@ -4099,11 +4073,10 @@ selector: "error",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@error"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"error",{},smalltalk.Debugger)})},
+},
 args: [],
 source: "error\x0a\x09^ error",
 messageSends: [],
@@ -4117,9 +4090,8 @@ selector: "error:",
 protocol: 'accessing',
 fn: function (anError){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@error"]=anError;
-return self}, function($ctx1) {$ctx1.fill(self,"error:",{anError:anError},smalltalk.Debugger)})},
+return self},
 args: ["anError"],
 source: "error: anError\x0a\x09error := anError",
 messageSends: [],
@@ -4166,9 +4138,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "[ Debugger ]";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.Debugger)})},
+},
 args: [],
 source: "label\x0a\x09^ '[ Debugger ]'",
 messageSends: [],
@@ -4734,9 +4705,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Transcript";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.IDETranscript)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Transcript'",
 messageSends: [],
@@ -4919,9 +4889,8 @@ selector: "canBeClosed",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"canBeClosed",{},smalltalk.Inspector)})},
+},
 args: [],
 source: "canBeClosed\x0a\x09^ true",
 messageSends: [],
@@ -5194,11 +5163,10 @@ selector: "selectedVariable",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@selectedVariable"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"selectedVariable",{},smalltalk.Inspector)})},
+},
 args: [],
 source: "selectedVariable\x0a\x09^ selectedVariable",
 messageSends: [],
@@ -5212,9 +5180,8 @@ selector: "selectedVariable:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@selectedVariable"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"selectedVariable:",{aString:aString},smalltalk.Inspector)})},
+return self},
 args: ["aString"],
 source: "selectedVariable: aString\x0a\x09selectedVariable := aString",
 messageSends: [],
@@ -5228,9 +5195,8 @@ selector: "setLabel:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@label"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"setLabel:",{aString:aString},smalltalk.Inspector)})},
+return self},
 args: ["aString"],
 source: "setLabel: aString\x0a\x09label := aString",
 messageSends: [],
@@ -5244,9 +5210,8 @@ selector: "setVariables:",
 protocol: 'accessing',
 fn: function (aCollection){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@variables"]=aCollection;
-return self}, function($ctx1) {$ctx1.fill(self,"setVariables:",{aCollection:aCollection},smalltalk.Inspector)})},
+return self},
 args: ["aCollection"],
 source: "setVariables: aCollection\x0a\x09variables := aCollection",
 messageSends: [],
@@ -5260,11 +5225,10 @@ selector: "sourceArea",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@sourceArea"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"sourceArea",{},smalltalk.Inspector)})},
+},
 args: [],
 source: "sourceArea\x0a\x09^ sourceArea",
 messageSends: [],
@@ -5369,11 +5333,10 @@ selector: "variables",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@variables"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"variables",{},smalltalk.Inspector)})},
+},
 args: [],
 source: "variables\x0a\x09^ variables",
 messageSends: [],
@@ -5456,9 +5419,8 @@ selector: "percent:",
 protocol: 'accessing',
 fn: function (aNumber){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@percent"]=aNumber;
-return self}, function($ctx1) {$ctx1.fill(self,"percent:",{aNumber:aNumber},smalltalk.ProgressBar)})},
+return self},
 args: ["aNumber"],
 source: "percent: aNumber\x0a\x09percent := aNumber",
 messageSends: [],
@@ -5539,9 +5501,8 @@ selector: "canBeClosed",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"canBeClosed",{},smalltalk.ReferencesBrowser)})},
+},
 args: [],
 source: "canBeClosed\x0a\x09^ true",
 messageSends: [],
@@ -5621,9 +5582,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "[ References ]";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.ReferencesBrowser)})},
+},
 args: [],
 source: "label\x0a\x09^ '[ References ]'",
 messageSends: [],
@@ -5976,11 +5936,10 @@ selector: "selector",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@selector"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"selector",{},smalltalk.ReferencesBrowser)})},
+},
 args: [],
 source: "selector\x0a\x09^ selector",
 messageSends: [],
@@ -6381,9 +6340,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "SUnit";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.TestRunner)})},
+},
 args: [],
 source: "label\x0a\x09^ 'SUnit'",
 messageSends: [],
@@ -6708,11 +6666,10 @@ selector: "result",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@result"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"result",{},smalltalk.TestRunner)})},
+},
 args: [],
 source: "result\x0a\x09^ result",
 messageSends: [],
@@ -7159,9 +7116,8 @@ selector: "label",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Workspace";
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.Workspace)})},
+},
 args: [],
 source: "label\x0a\x09^ 'Workspace'",
 messageSends: [],

+ 23 - 46
js/Kernel-Announcements.js

@@ -10,11 +10,10 @@ selector: "announcementClass",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@announcementClass"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"announcementClass",{},smalltalk.AnnouncementSubscription)})},
+},
 args: [],
 source: "announcementClass\x0a\x09^ announcementClass",
 messageSends: [],
@@ -28,9 +27,8 @@ selector: "announcementClass:",
 protocol: 'accessing',
 fn: function (aClass){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@announcementClass"]=aClass;
-return self}, function($ctx1) {$ctx1.fill(self,"announcementClass:",{aClass:aClass},smalltalk.AnnouncementSubscription)})},
+return self},
 args: ["aClass"],
 source: "announcementClass: aClass\x0a\x09announcementClass := aClass",
 messageSends: [],
@@ -149,11 +147,10 @@ selector: "valuable",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@valuable"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"valuable",{},smalltalk.AnnouncementSubscription)})},
+},
 args: [],
 source: "valuable\x0a\x09^ valuable",
 messageSends: [],
@@ -167,9 +164,8 @@ selector: "valuable:",
 protocol: 'accessing',
 fn: function (aValuable){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@valuable"]=aValuable;
-return self}, function($ctx1) {$ctx1.fill(self,"valuable:",{aValuable:aValuable},smalltalk.AnnouncementSubscription)})},
+return self},
 args: ["aValuable"],
 source: "valuable: aValuable\x0a\x09valuable := aValuable",
 messageSends: [],
@@ -376,9 +372,8 @@ selector: "heliosClass",
 protocol: 'helios',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "announcement";
-}, function($ctx1) {$ctx1.fill(self,"heliosClass",{},smalltalk.SystemAnnouncement.klass)})},
+},
 args: [],
 source: "heliosClass\x0a\x09^ 'announcement'",
 messageSends: [],
@@ -395,11 +390,10 @@ selector: "theClass",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@theClass"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.ClassAnnouncement)})},
+},
 args: [],
 source: "theClass\x0a\x09^ theClass",
 messageSends: [],
@@ -413,9 +407,8 @@ selector: "theClass:",
 protocol: 'accessing',
 fn: function (aClass){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@theClass"]=aClass;
-return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass},smalltalk.ClassAnnouncement)})},
+return self},
 args: ["aClass"],
 source: "theClass: aClass\x0a\x09theClass := aClass",
 messageSends: [],
@@ -445,11 +438,10 @@ selector: "oldClass",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@oldClass"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"oldClass",{},smalltalk.ClassMigrated)})},
+},
 args: [],
 source: "oldClass\x0a\x09^ oldClass",
 messageSends: [],
@@ -463,9 +455,8 @@ selector: "oldClass:",
 protocol: 'accessing',
 fn: function (aClass){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@oldClass"]=aClass;
-return self}, function($ctx1) {$ctx1.fill(self,"oldClass:",{aClass:aClass},smalltalk.ClassMigrated)})},
+return self},
 args: ["aClass"],
 source: "oldClass: aClass\x0a\x09oldClass := aClass",
 messageSends: [],
@@ -483,11 +474,10 @@ selector: "oldPackage",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@oldPackage"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"oldPackage",{},smalltalk.ClassMoved)})},
+},
 args: [],
 source: "oldPackage\x0a\x09^ oldPackage",
 messageSends: [],
@@ -501,9 +491,8 @@ selector: "oldPackage:",
 protocol: 'accessing',
 fn: function (aPackage){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@oldPackage"]=aPackage;
-return self}, function($ctx1) {$ctx1.fill(self,"oldPackage:",{aPackage:aPackage},smalltalk.ClassMoved)})},
+return self},
 args: ["aPackage"],
 source: "oldPackage: aPackage\x0a\x09oldPackage := aPackage",
 messageSends: [],
@@ -529,11 +518,10 @@ selector: "method",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@method"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"method",{},smalltalk.MethodAnnouncement)})},
+},
 args: [],
 source: "method\x0a\x09^ method",
 messageSends: [],
@@ -547,9 +535,8 @@ selector: "method:",
 protocol: 'accessing',
 fn: function (aCompiledMethod){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@method"]=aCompiledMethod;
-return self}, function($ctx1) {$ctx1.fill(self,"method:",{aCompiledMethod:aCompiledMethod},smalltalk.MethodAnnouncement)})},
+return self},
 args: ["aCompiledMethod"],
 source: "method: aCompiledMethod\x0a\x09method := aCompiledMethod",
 messageSends: [],
@@ -571,11 +558,10 @@ selector: "oldMethod",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@oldMethod"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"oldMethod",{},smalltalk.MethodModified)})},
+},
 args: [],
 source: "oldMethod\x0a\x09^ oldMethod",
 messageSends: [],
@@ -589,9 +575,8 @@ selector: "oldMethod:",
 protocol: 'accessing',
 fn: function (aMethod){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@oldMethod"]=aMethod;
-return self}, function($ctx1) {$ctx1.fill(self,"oldMethod:",{aMethod:aMethod},smalltalk.MethodModified)})},
+return self},
 args: ["aMethod"],
 source: "oldMethod: aMethod\x0a\x09oldMethod := aMethod",
 messageSends: [],
@@ -609,11 +594,10 @@ selector: "oldProtocol",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@oldProtocol"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"oldProtocol",{},smalltalk.MethodMoved)})},
+},
 args: [],
 source: "oldProtocol\x0a\x09^ oldProtocol",
 messageSends: [],
@@ -627,9 +611,8 @@ selector: "oldProtocol:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@oldProtocol"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"oldProtocol:",{aString:aString},smalltalk.MethodMoved)})},
+return self},
 args: ["aString"],
 source: "oldProtocol: aString\x0a\x09oldProtocol := aString",
 messageSends: [],
@@ -651,11 +634,10 @@ selector: "package",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@package"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"package",{},smalltalk.PackageAnnouncement)})},
+},
 args: [],
 source: "package\x0a\x09^ package",
 messageSends: [],
@@ -669,9 +651,8 @@ selector: "package:",
 protocol: 'accessing',
 fn: function (aPackage){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@package"]=aPackage;
-return self}, function($ctx1) {$ctx1.fill(self,"package:",{aPackage:aPackage},smalltalk.PackageAnnouncement)})},
+return self},
 args: ["aPackage"],
 source: "package: aPackage\x0a\x09package := aPackage",
 messageSends: [],
@@ -697,11 +678,10 @@ selector: "protocol",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@protocol"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"protocol",{},smalltalk.ProtocolAnnouncement)})},
+},
 args: [],
 source: "protocol\x0a\x09^ protocol",
 messageSends: [],
@@ -715,9 +695,8 @@ selector: "protocol:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@protocol"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"protocol:",{aString:aString},smalltalk.ProtocolAnnouncement)})},
+return self},
 args: ["aString"],
 source: "protocol: aString\x0a\x09protocol := aString",
 messageSends: [],
@@ -731,11 +710,10 @@ selector: "theClass",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@theClass"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.ProtocolAnnouncement)})},
+},
 args: [],
 source: "theClass\x0a\x09^ theClass",
 messageSends: [],
@@ -749,9 +727,8 @@ selector: "theClass:",
 protocol: 'accessing',
 fn: function (aClass){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@theClass"]=aClass;
-return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass},smalltalk.ProtocolAnnouncement)})},
+return self},
 args: ["aClass"],
 source: "theClass: aClass\x0a\x09theClass := aClass",
 messageSends: [],

+ 31 - 62
js/Kernel-Classes.js

@@ -221,9 +221,8 @@ selector: "basicAddCompiledMethod:",
 protocol: 'private',
 fn: function (aMethod){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 smalltalk.addMethod(aMethod, self);
-return self}, function($ctx1) {$ctx1.fill(self,"basicAddCompiledMethod:",{aMethod:aMethod},smalltalk.Behavior)})},
+return self},
 args: ["aMethod"],
 source: "basicAddCompiledMethod: aMethod\x0a\x09<smalltalk.addMethod(aMethod, self)>",
 messageSends: [],
@@ -237,9 +236,8 @@ selector: "basicNew",
 protocol: 'instance creation',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return new self.fn();
-return self}, function($ctx1) {$ctx1.fill(self,"basicNew",{},smalltalk.Behavior)})},
+return self},
 args: [],
 source: "basicNew\x0a\x09<return new self.fn()>",
 messageSends: [],
@@ -253,9 +251,8 @@ selector: "basicRemoveCompiledMethod:",
 protocol: 'private',
 fn: function (aMethod){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 smalltalk.removeMethod(aMethod,self);
-return self}, function($ctx1) {$ctx1.fill(self,"basicRemoveCompiledMethod:",{aMethod:aMethod},smalltalk.Behavior)})},
+return self},
 args: ["aMethod"],
 source: "basicRemoveCompiledMethod: aMethod\x0a\x09<smalltalk.removeMethod(aMethod,self)>",
 messageSends: [],
@@ -419,9 +416,8 @@ selector: "definition",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "";
-}, function($ctx1) {$ctx1.fill(self,"definition",{},smalltalk.Behavior)})},
+},
 args: [],
 source: "definition\x0a\x09^ ''",
 messageSends: [],
@@ -505,9 +501,8 @@ selector: "instanceVariableNames",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return self.iVarNames;
-return self}, function($ctx1) {$ctx1.fill(self,"instanceVariableNames",{},smalltalk.Behavior)})},
+return self},
 args: [],
 source: "instanceVariableNames\x0a\x09<return self.iVarNames>",
 messageSends: [],
@@ -521,9 +516,8 @@ selector: "isBehavior",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isBehavior",{},smalltalk.Behavior)})},
+},
 args: [],
 source: "isBehavior\x0a\x09^ true",
 messageSends: [],
@@ -537,9 +531,8 @@ selector: "javascriptConstructor",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return self.fn;
-return self}, function($ctx1) {$ctx1.fill(self,"javascriptConstructor",{},smalltalk.Behavior)})},
+return self},
 args: [],
 source: "javascriptConstructor\x0a\x09\x22Answer the JS constructor used to instantiate. See boot.js\x22\x0a\x09\x0a\x09<return self.fn>",
 messageSends: [],
@@ -553,9 +546,8 @@ selector: "javascriptConstructor:",
 protocol: 'accessing',
 fn: function (aJavaScriptFunction){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 smalltalk.setClassConstructor(self, aJavaScriptFunction);;
-return self}, function($ctx1) {$ctx1.fill(self,"javascriptConstructor:",{aJavaScriptFunction:aJavaScriptFunction},smalltalk.Behavior)})},
+return self},
 args: ["aJavaScriptFunction"],
 source: "javascriptConstructor: aJavaScriptFunction\x0a\x09\x22Set the JS constructor used to instantiate.\x0a\x09See the JS counter-part in boot.js `smalltalk.setClassConstructor'\x22\x0a\x09\x0a\x09<smalltalk.setClassConstructor(self, aJavaScriptFunction);>",
 messageSends: [],
@@ -623,7 +615,6 @@ selector: "methodDictionary",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var dict = smalltalk.HashedCollection._new();
 	var methods = self.methods;
 	Object.keys(methods).forEach(function(i) {
@@ -632,7 +623,7 @@ var dict = smalltalk.HashedCollection._new();
 		}
 	});
 	return dict;
-return self}, function($ctx1) {$ctx1.fill(self,"methodDictionary",{},smalltalk.Behavior)})},
+return self},
 args: [],
 source: "methodDictionary\x0a\x09<var dict = smalltalk.HashedCollection._new();\x0a\x09var methods = self.methods;\x0a\x09Object.keys(methods).forEach(function(i) {\x0a\x09\x09if(methods[i].selector) {\x0a\x09\x09\x09dict._at_put_(methods[i].selector, methods[i]);\x0a\x09\x09}\x0a\x09});\x0a\x09return dict>",
 messageSends: [],
@@ -725,9 +716,8 @@ selector: "name",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return self.className || nil;
-return self}, function($ctx1) {$ctx1.fill(self,"name",{},smalltalk.Behavior)})},
+return self},
 args: [],
 source: "name\x0a\x09<return self.className || nil>",
 messageSends: [],
@@ -874,9 +864,8 @@ selector: "prototype",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return self.fn.prototype;
-return self}, function($ctx1) {$ctx1.fill(self,"prototype",{},smalltalk.Behavior)})},
+return self},
 args: [],
 source: "prototype\x0a\x09<return self.fn.prototype>",
 messageSends: [],
@@ -989,9 +978,8 @@ selector: "superclass",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return self.superclass || nil;
-return self}, function($ctx1) {$ctx1.fill(self,"superclass",{},smalltalk.Behavior)})},
+return self},
 args: [],
 source: "superclass\x0a\x09<return self.superclass || nil>",
 messageSends: [],
@@ -1023,9 +1011,8 @@ selector: "theNonMetaClass",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return self;
-}, function($ctx1) {$ctx1.fill(self,"theNonMetaClass",{},smalltalk.Behavior)})},
+},
 args: [],
 source: "theNonMetaClass\x0a\x09^ self",
 messageSends: [],
@@ -1164,9 +1151,8 @@ selector: "isClass",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isClass",{},smalltalk.Class)})},
+},
 args: [],
 source: "isClass\x0a\x09^ true",
 messageSends: [],
@@ -1341,9 +1327,8 @@ selector: "subclasses",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return self.subclasses._copy();
-return self}, function($ctx1) {$ctx1.fill(self,"subclasses",{},smalltalk.Class)})},
+return self},
 args: [],
 source: "subclasses\x0a\x09<return self.subclasses._copy()>",
 messageSends: [],
@@ -1416,9 +1401,8 @@ selector: "instanceClass",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return self.instanceClass;
-return self}, function($ctx1) {$ctx1.fill(self,"instanceClass",{},smalltalk.Metaclass)})},
+return self},
 args: [],
 source: "instanceClass\x0a\x09<return self.instanceClass>",
 messageSends: [],
@@ -1449,9 +1433,8 @@ selector: "isMetaclass",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isMetaclass",{},smalltalk.Metaclass)})},
+},
 args: [],
 source: "isMetaclass\x0a\x09^ true",
 messageSends: [],
@@ -1508,9 +1491,8 @@ selector: "theMetaClass",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return self;
-}, function($ctx1) {$ctx1.fill(self,"theMetaClass",{},smalltalk.Metaclass)})},
+},
 args: [],
 source: "theMetaClass\x0a\x09^ self",
 messageSends: [],
@@ -1580,12 +1562,11 @@ selector: "basicAddSubclassOf:named:instanceVariableNames:package:",
 protocol: 'private',
 fn: function (aClass,aString,aCollection,packageName){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 
 		smalltalk.addClass(aString, aClass, aCollection, packageName);
 		return smalltalk[aString]
 	;
-return self}, function($ctx1) {$ctx1.fill(self,"basicAddSubclassOf:named:instanceVariableNames:package:",{aClass:aClass,aString:aString,aCollection:aCollection,packageName:packageName},smalltalk.ClassBuilder)})},
+return self},
 args: ["aClass", "aString", "aCollection", "packageName"],
 source: "basicAddSubclassOf: aClass named: aString instanceVariableNames: aCollection package: packageName\x0a\x09<\x0a\x09\x09smalltalk.addClass(aString, aClass, aCollection, packageName);\x0a\x09\x09return smalltalk[aString]\x0a\x09>",
 messageSends: [],
@@ -1636,9 +1617,8 @@ selector: "basicRemoveClass:",
 protocol: 'private',
 fn: function (aClass){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 smalltalk.removeClass(aClass);
-return self}, function($ctx1) {$ctx1.fill(self,"basicRemoveClass:",{aClass:aClass},smalltalk.ClassBuilder)})},
+return self},
 args: ["aClass"],
 source: "basicRemoveClass: aClass\x0a\x09<smalltalk.removeClass(aClass)>",
 messageSends: [],
@@ -1652,13 +1632,12 @@ selector: "basicRenameClass:to:",
 protocol: 'private',
 fn: function (aClass,aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 
 		smalltalk[aString] = aClass;
 		delete smalltalk[aClass.className];
 		aClass.className = aString;
 	;
-return self}, function($ctx1) {$ctx1.fill(self,"basicRenameClass:to:",{aClass:aClass,aString:aString},smalltalk.ClassBuilder)})},
+return self},
 args: ["aClass", "aString"],
 source: "basicRenameClass: aClass to: aString\x0a\x09<\x0a\x09\x09smalltalk[aString] = aClass;\x0a\x09\x09delete smalltalk[aClass.className];\x0a\x09\x09aClass.className = aString;\x0a\x09>",
 messageSends: [],
@@ -1672,13 +1651,12 @@ selector: "basicSwapClassNames:with:",
 protocol: 'private',
 fn: function (aClass,anotherClass){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 
 		var tmp = aClass.className;
 		aClass.className = anotherClass.className;
 		anotherClass.className = tmp;
 	;
-return self}, function($ctx1) {$ctx1.fill(self,"basicSwapClassNames:with:",{aClass:aClass,anotherClass:anotherClass},smalltalk.ClassBuilder)})},
+return self},
 args: ["aClass", "anotherClass"],
 source: "basicSwapClassNames: aClass with: anotherClass\x0a\x09<\x0a\x09\x09var tmp = aClass.className;\x0a\x09\x09aClass.className = anotherClass.className;\x0a\x09\x09anotherClass.className = tmp;\x0a\x09>",
 messageSends: [],
@@ -1906,11 +1884,10 @@ selector: "rawRenameClass:to:",
 protocol: 'private',
 fn: function (aClass,aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 
 		smalltalk[aString] = aClass;
 	;
-return self}, function($ctx1) {$ctx1.fill(self,"rawRenameClass:to:",{aClass:aClass,aString:aString},smalltalk.ClassBuilder)})},
+return self},
 args: ["aClass", "aString"],
 source: "rawRenameClass: aClass to: aString\x0a\x09<\x0a\x09\x09smalltalk[aString] = aClass;\x0a\x09>",
 messageSends: [],
@@ -1948,9 +1925,8 @@ selector: "setupClass:",
 protocol: 'public',
 fn: function (aClass){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 smalltalk.init(aClass);;
-return self}, function($ctx1) {$ctx1.fill(self,"setupClass:",{aClass:aClass},smalltalk.ClassBuilder)})},
+return self},
 args: ["aClass"],
 source: "setupClass: aClass\x0a\x09<smalltalk.init(aClass);>",
 messageSends: [],
@@ -2019,10 +1995,9 @@ selector: "class:category:",
 protocol: 'accessing',
 fn: function (aClass,aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@class"]=aClass;
 self["@category"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"class:category:",{aClass:aClass,aString:aString},smalltalk.ClassCategoryReader)})},
+return self},
 args: ["aClass", "aString"],
 source: "class: aClass category: aString\x0a\x09class := aClass.\x0a\x09category := aString",
 messageSends: [],
@@ -2100,9 +2075,8 @@ selector: "class:",
 protocol: 'accessing',
 fn: function (aClass){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@class"]=aClass;
-return self}, function($ctx1) {$ctx1.fill(self,"class:",{aClass:aClass},smalltalk.ClassCommentReader)})},
+return self},
 args: ["aClass"],
 source: "class: aClass\x0a\x09class := aClass",
 messageSends: [],
@@ -2208,11 +2182,10 @@ selector: "level",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@level"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"level",{},smalltalk.ClassSorterNode)})},
+},
 args: [],
 source: "level\x0a\x09^ level",
 messageSends: [],
@@ -2226,9 +2199,8 @@ selector: "level:",
 protocol: 'accessing',
 fn: function (anInteger){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@level"]=anInteger;
-return self}, function($ctx1) {$ctx1.fill(self,"level:",{anInteger:anInteger},smalltalk.ClassSorterNode)})},
+return self},
 args: ["anInteger"],
 source: "level: anInteger\x0a\x09level := anInteger",
 messageSends: [],
@@ -2242,11 +2214,10 @@ selector: "nodes",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@nodes"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"nodes",{},smalltalk.ClassSorterNode)})},
+},
 args: [],
 source: "nodes\x0a\x09^ nodes",
 messageSends: [],
@@ -2260,11 +2231,10 @@ selector: "theClass",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@theClass"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.ClassSorterNode)})},
+},
 args: [],
 source: "theClass\x0a\x09^ theClass",
 messageSends: [],
@@ -2278,9 +2248,8 @@ selector: "theClass:",
 protocol: 'accessing',
 fn: function (aClass){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@theClass"]=aClass;
-return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass},smalltalk.ClassSorterNode)})},
+return self},
 args: ["aClass"],
 source: "theClass: aClass\x0a\x09theClass := aClass",
 messageSends: [],

File diff suppressed because it is too large
+ 82 - 164
js/Kernel-Collections.js


+ 20 - 40
js/Kernel-Exceptions.js

@@ -10,9 +10,8 @@ selector: "context",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return self.context;
-return self}, function($ctx1) {$ctx1.fill(self,"context",{},smalltalk.Error)})},
+return self},
 args: [],
 source: "context\x0a\x09<return self.context>",
 messageSends: [],
@@ -42,9 +41,8 @@ selector: "isSmalltalkError",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return self.smalltalkError === true;
-return self}, function($ctx1) {$ctx1.fill(self,"isSmalltalkError",{},smalltalk.Error)})},
+return self},
 args: [],
 source: "isSmalltalkError\x0a\x09<return self.smalltalkError === true>",
 messageSends: [],
@@ -58,9 +56,8 @@ selector: "jsStack",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return self.stack;
-return self}, function($ctx1) {$ctx1.fill(self,"jsStack",{},smalltalk.Error)})},
+return self},
 args: [],
 source: "jsStack\x0a\x09<return self.stack>",
 messageSends: [],
@@ -74,11 +71,10 @@ selector: "messageText",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@messageText"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"messageText",{},smalltalk.Error)})},
+},
 args: [],
 source: "messageText\x0a\x09^ messageText",
 messageSends: [],
@@ -92,9 +88,8 @@ selector: "messageText:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@messageText"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"messageText:",{aString:aString},smalltalk.Error)})},
+return self},
 args: ["aString"],
 source: "messageText: aString\x0a\x09messageText := aString",
 messageSends: [],
@@ -108,9 +103,8 @@ selector: "resignal",
 protocol: 'signaling',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 throw(self);
-return self}, function($ctx1) {$ctx1.fill(self,"resignal",{},smalltalk.Error)})},
+return self},
 args: [],
 source: "resignal\x0a\x09\x22Resignal the receiver without changing its exception context\x22\x0a\x09\x0a\x09<throw(self)>",
 messageSends: [],
@@ -124,9 +118,8 @@ selector: "signal",
 protocol: 'signaling',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self.context = smalltalk.getThisContext(); self.smalltalkError = true; throw(self);
-return self}, function($ctx1) {$ctx1.fill(self,"signal",{},smalltalk.Error)})},
+return self},
 args: [],
 source: "signal\x0a\x09<self.context = smalltalk.getThisContext(); self.smalltalkError = true; throw(self)>",
 messageSends: [],
@@ -158,9 +151,8 @@ selector: "heliosClass",
 protocol: 'helios',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "exception";
-}, function($ctx1) {$ctx1.fill(self,"heliosClass",{},smalltalk.Error.klass)})},
+},
 args: [],
 source: "heliosClass\x0a\x09^ 'exception'",
 messageSends: [],
@@ -213,9 +205,8 @@ selector: "context:",
 protocol: 'accessing',
 fn: function (aMethodContext){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self.context = aMethodContext;
-return self}, function($ctx1) {$ctx1.fill(self,"context:",{aMethodContext:aMethodContext},smalltalk.JavaScriptException)})},
+return self},
 args: ["aMethodContext"],
 source: "context: aMethodContext\x0a\x09\x22Set the context from the outside.\x0a\x09See boot.js `inContext()` exception handling\x22\x0a\x09\x0a\x09<self.context = aMethodContext>",
 messageSends: [],
@@ -229,11 +220,10 @@ selector: "exception",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@exception"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"exception",{},smalltalk.JavaScriptException)})},
+},
 args: [],
 source: "exception\x0a\x09^ exception",
 messageSends: [],
@@ -247,9 +237,8 @@ selector: "exception:",
 protocol: 'accessing',
 fn: function (anException){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@exception"]=anException;
-return self}, function($ctx1) {$ctx1.fill(self,"exception:",{anException:anException},smalltalk.JavaScriptException)})},
+return self},
 args: ["anException"],
 source: "exception: anException\x0a\x09exception := anException",
 messageSends: [],
@@ -263,9 +252,8 @@ selector: "messageText",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return 'JavaScript exception: ' + self["@exception"].toString();
-return self}, function($ctx1) {$ctx1.fill(self,"messageText",{},smalltalk.JavaScriptException)})},
+return self},
 args: [],
 source: "messageText\x0a\x09<return 'JavaScript exception: ' + self[\x22@exception\x22].toString()>",
 messageSends: [],
@@ -326,11 +314,10 @@ selector: "message",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@message"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"message",{},smalltalk.MessageNotUnderstood)})},
+},
 args: [],
 source: "message\x0a\x09^ message",
 messageSends: [],
@@ -344,9 +331,8 @@ selector: "message:",
 protocol: 'accessing',
 fn: function (aMessage){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@message"]=aMessage;
-return self}, function($ctx1) {$ctx1.fill(self,"message:",{aMessage:aMessage},smalltalk.MessageNotUnderstood)})},
+return self},
 args: ["aMessage"],
 source: "message: aMessage\x0a\x09message := aMessage",
 messageSends: [],
@@ -379,11 +365,10 @@ selector: "receiver",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@receiver"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"receiver",{},smalltalk.MessageNotUnderstood)})},
+},
 args: [],
 source: "receiver\x0a\x09^ receiver",
 messageSends: [],
@@ -397,9 +382,8 @@ selector: "receiver:",
 protocol: 'accessing',
 fn: function (anObject){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@receiver"]=anObject;
-return self}, function($ctx1) {$ctx1.fill(self,"receiver:",{anObject:anObject},smalltalk.MessageNotUnderstood)})},
+return self},
 args: ["anObject"],
 source: "receiver: anObject\x0a\x09receiver := anObject",
 messageSends: [],
@@ -417,11 +401,10 @@ selector: "object",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@object"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"object",{},smalltalk.NonBooleanReceiver)})},
+},
 args: [],
 source: "object\x0a\x09^ object",
 messageSends: [],
@@ -435,9 +418,8 @@ selector: "object:",
 protocol: 'accessing',
 fn: function (anObject){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@object"]=anObject;
-return self}, function($ctx1) {$ctx1.fill(self,"object:",{anObject:anObject},smalltalk.NonBooleanReceiver)})},
+return self},
 args: ["anObject"],
 source: "object: anObject\x0a\x09object := anObject",
 messageSends: [],
@@ -564,11 +546,10 @@ selector: "current",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@current"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.ErrorHandler.klass)})},
+},
 args: [],
 source: "current\x0a\x09^ current",
 messageSends: [],
@@ -599,9 +580,8 @@ selector: "setCurrent:",
 protocol: 'accessing',
 fn: function (anHandler){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@current"]=anHandler;
-return self}, function($ctx1) {$ctx1.fill(self,"setCurrent:",{anHandler:anHandler},smalltalk.ErrorHandler.klass)})},
+return self},
 args: ["anHandler"],
 source: "setCurrent: anHandler\x0a\x09current := anHandler",
 messageSends: [],

+ 19 - 38
js/Kernel-ImportExport.js

@@ -1113,11 +1113,10 @@ selector: "last",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@last"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"last",{},smalltalk.ChunkParser)})},
+},
 args: [],
 source: "last\x0a\x09^ last",
 messageSends: [],
@@ -1178,9 +1177,8 @@ selector: "stream:",
 protocol: 'accessing',
 fn: function (aStream){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@stream"]=aStream;
-return self}, function($ctx1) {$ctx1.fill(self,"stream:",{aStream:aStream},smalltalk.ChunkParser)})},
+return self},
 args: ["aStream"],
 source: "stream: aStream\x0a\x09stream := aStream",
 messageSends: [],
@@ -1239,11 +1237,10 @@ selector: "name",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@name"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"name",{},smalltalk.ExportMethodProtocol)})},
+},
 args: [],
 source: "name\x0a\x09^ name",
 messageSends: [],
@@ -1257,9 +1254,8 @@ selector: "name:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@name"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"name:",{aString:aString},smalltalk.ExportMethodProtocol)})},
+return self},
 args: ["aString"],
 source: "name: aString\x0a\x09name := aString",
 messageSends: [],
@@ -1273,11 +1269,10 @@ selector: "theClass",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@theClass"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.ExportMethodProtocol)})},
+},
 args: [],
 source: "theClass\x0a\x09^ theClass",
 messageSends: [],
@@ -1291,9 +1286,8 @@ selector: "theClass:",
 protocol: 'accessing',
 fn: function (aClass){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@theClass"]=aClass;
-return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass},smalltalk.ExportMethodProtocol)})},
+return self},
 args: ["aClass"],
 source: "theClass: aClass\x0a\x09theClass := aClass",
 messageSends: [],
@@ -1391,11 +1385,10 @@ selector: "lastChunk",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@lastChunk"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"lastChunk",{},smalltalk.Importer)})},
+},
 args: [],
 source: "lastChunk\x0a\x09^ lastChunk",
 messageSends: [],
@@ -1409,11 +1402,10 @@ selector: "lastSection",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@lastSection"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"lastSection",{},smalltalk.Importer)})},
+},
 args: [],
 source: "lastSection\x0a\x09^ lastSection",
 messageSends: [],
@@ -1507,9 +1499,8 @@ protocol: 'accessing',
 fn: function (){
 var self=this;
 function $ChunkExporter(){return smalltalk.ChunkExporter||(typeof ChunkExporter=="undefined"?nil:ChunkExporter)}
-return smalltalk.withContext(function($ctx1) { 
 return $ChunkExporter();
-}, function($ctx1) {$ctx1.fill(self,"chunkExporterClass",{},smalltalk.PackageHandler)})},
+},
 args: [],
 source: "chunkExporterClass\x0a\x09^ ChunkExporter",
 messageSends: [],
@@ -1663,9 +1654,8 @@ protocol: 'accessing',
 fn: function (){
 var self=this;
 function $Exporter(){return smalltalk.Exporter||(typeof Exporter=="undefined"?nil:Exporter)}
-return smalltalk.withContext(function($ctx1) { 
 return $Exporter();
-}, function($ctx1) {$ctx1.fill(self,"exporterClass",{},smalltalk.PackageHandler)})},
+},
 args: [],
 source: "exporterClass\x0a\x09^ Exporter",
 messageSends: [],
@@ -1736,9 +1726,8 @@ protocol: 'accessing',
 fn: function (){
 var self=this;
 function $AmdExporter(){return smalltalk.AmdExporter||(typeof AmdExporter=="undefined"?nil:AmdExporter)}
-return smalltalk.withContext(function($ctx1) { 
 return $AmdExporter();
-}, function($ctx1) {$ctx1.fill(self,"exporterClass",{},smalltalk.AmdPackageHandler)})},
+},
 args: [],
 source: "exporterClass\x0a\x09^ AmdExporter",
 messageSends: [],
@@ -1933,9 +1922,8 @@ selector: "definition",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "";
-}, function($ctx1) {$ctx1.fill(self,"definition",{},smalltalk.PackageTransport)})},
+},
 args: [],
 source: "definition\x0a\x09^ ''",
 messageSends: [],
@@ -1965,11 +1953,10 @@ selector: "package",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@package"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"package",{},smalltalk.PackageTransport)})},
+},
 args: [],
 source: "package\x0a\x09^ package",
 messageSends: [],
@@ -1983,9 +1970,8 @@ selector: "package:",
 protocol: 'accessing',
 fn: function (aPackage){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@package"]=aPackage;
-return self}, function($ctx1) {$ctx1.fill(self,"package:",{aPackage:aPackage},smalltalk.PackageTransport)})},
+return self},
 args: ["aPackage"],
 source: "package: aPackage\x0a\x09package := aPackage",
 messageSends: [],
@@ -1999,8 +1985,7 @@ selector: "setupFromJson:",
 protocol: 'initialization',
 fn: function (anObject){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"setupFromJson:",{anObject:anObject},smalltalk.PackageTransport)})},
+return self},
 args: ["anObject"],
 source: "setupFromJson: anObject\x0a\x09\x22no op. override if needed in subclasses\x22",
 messageSends: [],
@@ -2175,9 +2160,8 @@ selector: "type",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return nil;
-}, function($ctx1) {$ctx1.fill(self,"type",{},smalltalk.PackageTransport.klass)})},
+},
 args: [],
 source: "type\x0a\x09\x22Override in subclasses\x22\x0a\x09^ nil",
 messageSends: [],
@@ -2216,9 +2200,8 @@ protocol: 'accessing',
 fn: function (){
 var self=this;
 function $AmdPackageHandler(){return smalltalk.AmdPackageHandler||(typeof AmdPackageHandler=="undefined"?nil:AmdPackageHandler)}
-return smalltalk.withContext(function($ctx1) { 
 return $AmdPackageHandler();
-}, function($ctx1) {$ctx1.fill(self,"commitHandlerClass",{},smalltalk.AmdPackageTransport)})},
+},
 args: [],
 source: "commitHandlerClass\x0a\x09^ AmdPackageHandler",
 messageSends: [],
@@ -2303,9 +2286,8 @@ selector: "namespace:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@namespace"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"namespace:",{aString:aString},smalltalk.AmdPackageTransport)})},
+return self},
 args: ["aString"],
 source: "namespace: aString\x0a\x09namespace := aString",
 messageSends: [],
@@ -2379,9 +2361,8 @@ selector: "type",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "amd";
-}, function($ctx1) {$ctx1.fill(self,"type",{},smalltalk.AmdPackageTransport.klass)})},
+},
 args: [],
 source: "type\x0a\x09^ 'amd'",
 messageSends: [],

+ 43 - 86
js/Kernel-Infrastructure.js

@@ -55,9 +55,8 @@ selector: "register:",
 protocol: 'registration',
 fn: function (anInspector){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@inspector"]=anInspector;
-return self}, function($ctx1) {$ctx1.fill(self,"register:",{anInspector:anInspector},smalltalk.InspectorHandler.klass)})},
+return self},
 args: ["anInspector"],
 source: "register: anInspector\x0a\x09inspector := anInspector",
 messageSends: [],
@@ -830,13 +829,12 @@ selector: "addObjectVariablesTo:",
 protocol: 'proxy',
 fn: function (aDictionary){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 
 		for(var i in self['@jsObject']) {
 			aDictionary._at_put_(i, self['@jsObject'][i]);
 		}
 	;
-return self}, function($ctx1) {$ctx1.fill(self,"addObjectVariablesTo:",{aDictionary:aDictionary},smalltalk.JSObjectProxy)})},
+return self},
 args: ["aDictionary"],
 source: "addObjectVariablesTo: aDictionary\x0a\x09<\x0a\x09\x09for(var i in self['@jsObject']) {\x0a\x09\x09\x09aDictionary._at_put_(i, self['@jsObject'][i]);\x0a\x09\x09}\x0a\x09>",
 messageSends: [],
@@ -850,11 +848,10 @@ selector: "asJSON",
 protocol: 'enumerating',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@jsObject"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"asJSON",{},smalltalk.JSObjectProxy)})},
+},
 args: [],
 source: "asJSON\x0a\x09\x22Answers the receiver in a stringyfy-friendly fashion\x22\x0a\x0a\x09^ jsObject",
 messageSends: [],
@@ -868,9 +865,8 @@ selector: "at:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return self['@jsObject'][aString];
-return self}, function($ctx1) {$ctx1.fill(self,"at:",{aString:aString},smalltalk.JSObjectProxy)})},
+return self},
 args: ["aString"],
 source: "at: aString\x0a\x09<return self['@jsObject'][aString]>",
 messageSends: [],
@@ -884,12 +880,11 @@ selector: "at:ifAbsent:",
 protocol: 'accessing',
 fn: function (aString,aBlock){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 
 		var obj = self['@jsObject'];
 		return aString in obj ? obj[aString] : aBlock._value();
 	;
-return self}, function($ctx1) {$ctx1.fill(self,"at:ifAbsent:",{aString:aString,aBlock:aBlock},smalltalk.JSObjectProxy)})},
+return self},
 args: ["aString", "aBlock"],
 source: "at: aString ifAbsent: aBlock\x0a\x09\x22return the aString property or evaluate aBlock if the property is not defined on the object\x22\x0a\x09<\x0a\x09\x09var obj = self['@jsObject'];\x0a\x09\x09return aString in obj ? obj[aString] : aBlock._value();\x0a\x09>",
 messageSends: [],
@@ -903,12 +898,11 @@ selector: "at:ifPresent:",
 protocol: 'accessing',
 fn: function (aString,aBlock){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 
 		var obj = self['@jsObject'];
 		return aString in obj ? aBlock._value_(obj[aString]) : nil;
 	;
-return self}, function($ctx1) {$ctx1.fill(self,"at:ifPresent:",{aString:aString,aBlock:aBlock},smalltalk.JSObjectProxy)})},
+return self},
 args: ["aString", "aBlock"],
 source: "at: aString ifPresent: aBlock\x0a\x09\x22return the evaluation of aBlock with the value if the property is defined or return nil\x22\x0a\x09<\x0a\x09\x09var obj = self['@jsObject'];\x0a\x09\x09return aString in obj ? aBlock._value_(obj[aString]) : nil;\x0a\x09>",
 messageSends: [],
@@ -922,12 +916,11 @@ selector: "at:ifPresent:ifAbsent:",
 protocol: 'accessing',
 fn: function (aString,aBlock,anotherBlock){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 
 		var obj = self['@jsObject'];
 		return aString in obj ? aBlock._value_(obj[aString]) : anotherBlock._value();
 	;
-return self}, function($ctx1) {$ctx1.fill(self,"at:ifPresent:ifAbsent:",{aString:aString,aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.JSObjectProxy)})},
+return self},
 args: ["aString", "aBlock", "anotherBlock"],
 source: "at: aString ifPresent: aBlock ifAbsent: anotherBlock\x0a\x09\x22return the evaluation of aBlock with the value if the property is defined\x0a\x09or return value of anotherBlock\x22\x0a\x09<\x0a\x09\x09var obj = self['@jsObject'];\x0a\x09\x09return aString in obj ? aBlock._value_(obj[aString]) : anotherBlock._value();\x0a\x09>",
 messageSends: [],
@@ -941,9 +934,8 @@ selector: "at:put:",
 protocol: 'accessing',
 fn: function (aString,anObject){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return self['@jsObject'][aString] = anObject;
-return self}, function($ctx1) {$ctx1.fill(self,"at:put:",{aString:aString,anObject:anObject},smalltalk.JSObjectProxy)})},
+return self},
 args: ["aString", "anObject"],
 source: "at: aString put: anObject\x0a\x09<return self['@jsObject'][aString] = anObject>",
 messageSends: [],
@@ -957,9 +949,8 @@ selector: "compareJSObjectWith:",
 protocol: 'private',
 fn: function (aJSObject){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return self["@jsObject"] === aJSObject;
-return self}, function($ctx1) {$ctx1.fill(self,"compareJSObjectWith:",{aJSObject:aJSObject},smalltalk.JSObjectProxy)})},
+return self},
 args: ["aJSObject"],
 source: " compareJSObjectWith: aJSObject\x0a \x09<return self[\x22@jsObject\x22] === aJSObject>",
 messageSends: [],
@@ -998,11 +989,10 @@ selector: "forwardMessage:withArguments:",
 protocol: 'proxy',
 fn: function (aString,anArray){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 
 		return smalltalk.send(self._jsObject(), aString, anArray);
 	;
-return self}, function($ctx1) {$ctx1.fill(self,"forwardMessage:withArguments:",{aString:aString,anArray:anArray},smalltalk.JSObjectProxy)})},
+return self},
 args: ["aString", "anArray"],
 source: "forwardMessage: aString withArguments: anArray\x0a\x09<\x0a\x09\x09return smalltalk.send(self._jsObject(), aString, anArray);\x0a\x09>",
 messageSends: [],
@@ -1038,11 +1028,10 @@ selector: "jsObject",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@jsObject"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"jsObject",{},smalltalk.JSObjectProxy)})},
+},
 args: [],
 source: "jsObject\x0a\x09^ jsObject",
 messageSends: [],
@@ -1056,9 +1045,8 @@ selector: "jsObject:",
 protocol: 'accessing',
 fn: function (aJSObject){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@jsObject"]=aJSObject;
-return self}, function($ctx1) {$ctx1.fill(self,"jsObject:",{aJSObject:aJSObject},smalltalk.JSObjectProxy)})},
+return self},
 args: ["aJSObject"],
 source: "jsObject: aJSObject\x0a\x09jsObject := aJSObject",
 messageSends: [],
@@ -1072,14 +1060,13 @@ selector: "keysAndValuesDo:",
 protocol: 'enumerating',
 fn: function (aBlock){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 
 		var o = self['@jsObject'];
 		for(var i in o) {
 			aBlock._value_value_(i, o[i]);
 		}
 	;
-return self}, function($ctx1) {$ctx1.fill(self,"keysAndValuesDo:",{aBlock:aBlock},smalltalk.JSObjectProxy)})},
+return self},
 args: ["aBlock"],
 source: "keysAndValuesDo: aBlock\x0a\x09<\x0a\x09\x09var o = self['@jsObject'];\x0a\x09\x09for(var i in o) {\x0a\x09\x09\x09aBlock._value_value_(i, o[i]);\x0a\x09\x09}\x0a\x09>",
 messageSends: [],
@@ -1093,9 +1080,8 @@ selector: "lookupProperty:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return aString in self._jsObject() ? aString : nil;
-return self}, function($ctx1) {$ctx1.fill(self,"lookupProperty:",{aString:aString},smalltalk.JSObjectProxy)})},
+return self},
 args: ["aString"],
 source: "lookupProperty: aString\x0a\x09\x22Looks up a property in JS object.\x0a\x09Answer the property if it is present, or nil if it is not present.\x22\x0a\x09\x0a\x09<return aString in self._jsObject() ? aString : nil>",
 messageSends: [],
@@ -1125,14 +1111,13 @@ selector: "printString",
 protocol: 'printing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 
 		var js = self['@jsObject'];
 		return js.toString
 			? js.toString()
 			: Object.prototype.toString.call(js)
 	;
-return self}, function($ctx1) {$ctx1.fill(self,"printString",{},smalltalk.JSObjectProxy)})},
+return self},
 args: [],
 source: "printString\x0a\x09<\x0a\x09\x09var js = self['@jsObject'];\x0a\x09\x09return js.toString\x0a\x09\x09\x09? js.toString()\x0a\x09\x09\x09: Object.prototype.toString.call(js)\x0a\x09>",
 messageSends: [],
@@ -1171,9 +1156,8 @@ selector: "addElement:",
 protocol: 'accessing',
 fn: function (anObject){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self.elements.addElement(anObject);
-return self}, function($ctx1) {$ctx1.fill(self,"addElement:",{anObject:anObject},smalltalk.Organizer)})},
+return self},
 args: ["anObject"],
 source: "addElement: anObject\x0a\x09<self.elements.addElement(anObject)>",
 messageSends: [],
@@ -1205,9 +1189,8 @@ selector: "removeElement:",
 protocol: 'accessing',
 fn: function (anObject){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self.elements.removeElement(anObject);
-return self}, function($ctx1) {$ctx1.fill(self,"removeElement:",{anObject:anObject},smalltalk.Organizer)})},
+return self},
 args: ["anObject"],
 source: "removeElement: anObject\x0a\x09<self.elements.removeElement(anObject)>",
 messageSends: [],
@@ -1273,9 +1256,8 @@ selector: "theClass",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
  return self.theClass ;
-return self}, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.ClassOrganizer)})},
+return self},
 args: [],
 source: "theClass\x0a\x09< return self.theClass >",
 messageSends: [],
@@ -1297,9 +1279,8 @@ selector: "basicTransport",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return self.transport;
-return self}, function($ctx1) {$ctx1.fill(self,"basicTransport",{},smalltalk.Package)})},
+return self},
 args: [],
 source: "basicTransport\x0a\x09\x22Answer the transport literal JavaScript object as setup in the JavaScript file, if any\x22\x0a\x09\x0a\x09<return self.transport>",
 messageSends: [],
@@ -1380,9 +1361,8 @@ selector: "isPackage",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isPackage",{},smalltalk.Package)})},
+},
 args: [],
 source: "isPackage\x0a\x09^ true",
 messageSends: [],
@@ -1464,9 +1444,8 @@ selector: "name",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return self.pkgName;
-return self}, function($ctx1) {$ctx1.fill(self,"name",{},smalltalk.Package)})},
+return self},
 args: [],
 source: "name\x0a\x09<return self.pkgName>",
 messageSends: [],
@@ -1480,9 +1459,8 @@ selector: "name:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self.pkgName = aString;
-return self}, function($ctx1) {$ctx1.fill(self,"name:",{aString:aString},smalltalk.Package)})},
+return self},
 args: ["aString"],
 source: "name: aString\x0a\x09<self.pkgName = aString>",
 messageSends: [],
@@ -1840,9 +1818,8 @@ selector: "globals",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return (new Function('return this'))();;
-return self}, function($ctx1) {$ctx1.fill(self,"globals",{},smalltalk.PlatformInterface.klass)})},
+return self},
 args: [],
 source: "globals\x0a\x09<return (new Function('return this'))();>",
 messageSends: [],
@@ -1909,9 +1886,8 @@ selector: "setWorker:",
 protocol: 'accessing',
 fn: function (anObject){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@worker"]=anObject;
-return self}, function($ctx1) {$ctx1.fill(self,"setWorker:",{anObject:anObject},smalltalk.PlatformInterface.klass)})},
+return self},
 args: ["anObject"],
 source: "setWorker: anObject\x0a\x09worker := anObject",
 messageSends: [],
@@ -2003,9 +1979,8 @@ selector: "setCurrent:",
 protocol: 'accessing',
 fn: function (anHandler){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@current"]=anHandler;
-return self}, function($ctx1) {$ctx1.fill(self,"setCurrent:",{anHandler:anHandler},smalltalk.ProgressHandler.klass)})},
+return self},
 args: ["anHandler"],
 source: "setCurrent: anHandler\x0a\x09current := anHandler",
 messageSends: [],
@@ -2084,9 +2059,8 @@ selector: "at:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return smalltalk[aString];
-return self}, function($ctx1) {$ctx1.fill(self,"at:",{aString:aString},smalltalk.SmalltalkImage)})},
+return self},
 args: ["aString"],
 source: "at: aString\x0a\x09<return smalltalk[aString]>",
 messageSends: [],
@@ -2123,9 +2097,8 @@ selector: "at:put:",
 protocol: 'accessing',
 fn: function (aString,anObject){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return smalltalk[aString]=anObject;
-return self}, function($ctx1) {$ctx1.fill(self,"at:put:",{aString:aString,anObject:anObject},smalltalk.SmalltalkImage)})},
+return self},
 args: ["aString", "anObject"],
 source: "at: aString put: anObject\x0a\x09<return smalltalk[aString]=anObject>",
 messageSends: [],
@@ -2139,9 +2112,8 @@ selector: "basicCreatePackage:",
 protocol: 'private',
 fn: function (packageName){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return smalltalk.addPackage(packageName);
-return self}, function($ctx1) {$ctx1.fill(self,"basicCreatePackage:",{packageName:packageName},smalltalk.SmalltalkImage)})},
+return self},
 args: ["packageName"],
 source: "basicCreatePackage: packageName\x0a\x09\x22Create and bind a new bare package with given name and return it.\x22\x0a\x09<return smalltalk.addPackage(packageName)>",
 messageSends: [],
@@ -2155,9 +2127,8 @@ selector: "basicParse:",
 protocol: 'private',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return smalltalk.parser.parse(aString);
-return self}, function($ctx1) {$ctx1.fill(self,"basicParse:",{aString:aString},smalltalk.SmalltalkImage)})},
+return self},
 args: ["aString"],
 source: "basicParse: aString\x0a\x09<return smalltalk.parser.parse(aString)>",
 messageSends: [],
@@ -2171,9 +2142,8 @@ selector: "classes",
 protocol: 'classes',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return smalltalk.classes();
-return self}, function($ctx1) {$ctx1.fill(self,"classes",{},smalltalk.SmalltalkImage)})},
+return self},
 args: [],
 source: "classes\x0a\x09<return smalltalk.classes()>",
 messageSends: [],
@@ -2288,9 +2258,8 @@ selector: "deleteClass:",
 protocol: 'private',
 fn: function (aClass){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 smalltalk.removeClass(aClass);
-return self}, function($ctx1) {$ctx1.fill(self,"deleteClass:",{aClass:aClass},smalltalk.SmalltalkImage)})},
+return self},
 args: ["aClass"],
 source: "deleteClass: aClass\x0a\x09\x22Deletes a class by deleting its binding only. Use #removeClass instead\x22\x0a\x09\x0a\x09<smalltalk.removeClass(aClass)>",
 messageSends: [],
@@ -2322,9 +2291,8 @@ selector: "deletePackage:",
 protocol: 'private',
 fn: function (packageName){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 delete smalltalk.packages[packageName];
-return self}, function($ctx1) {$ctx1.fill(self,"deletePackage:",{packageName:packageName},smalltalk.SmalltalkImage)})},
+return self},
 args: ["packageName"],
 source: "deletePackage: packageName\x0a\x09\x22Deletes a package by deleting its binding, but does not check if it contains classes etc.\x0a\x09To remove a package, use #removePackage instead.\x22\x0a\x0a\x09<delete smalltalk.packages[packageName]>",
 messageSends: [],
@@ -2338,9 +2306,8 @@ selector: "globalJsVariables",
 protocol: 'globals',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return smalltalk.globalJsVariables;
-return self}, function($ctx1) {$ctx1.fill(self,"globalJsVariables",{},smalltalk.SmalltalkImage)})},
+return self},
 args: [],
 source: "globalJsVariables\x0a\x09\x22Array of global JavaScript variables\x22\x0a\x09<return smalltalk.globalJsVariables>",
 messageSends: [],
@@ -2354,9 +2321,8 @@ selector: "globals",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return self;
-}, function($ctx1) {$ctx1.fill(self,"globals",{},smalltalk.SmalltalkImage)})},
+},
 args: [],
 source: "globals\x0a\x09\x22Future compatibility to be able to use Smalltalk globals at: ...\x22\x0a\x09^ self",
 messageSends: [],
@@ -2370,9 +2336,8 @@ selector: "includesKey:",
 protocol: 'accessing',
 fn: function (aKey){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return smalltalk.hasOwnProperty(aKey);
-return self}, function($ctx1) {$ctx1.fill(self,"includesKey:",{aKey:aKey},smalltalk.SmalltalkImage)})},
+return self},
 args: ["aKey"],
 source: "includesKey: aKey\x0a\x09<return smalltalk.hasOwnProperty(aKey)>",
 messageSends: [],
@@ -2386,9 +2351,8 @@ selector: "isSmalltalkObject:",
 protocol: 'testing',
 fn: function (anObject){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return typeof anObject.klass !== 'undefined';
-return self}, function($ctx1) {$ctx1.fill(self,"isSmalltalkObject:",{anObject:anObject},smalltalk.SmalltalkImage)})},
+return self},
 args: ["anObject"],
 source: "isSmalltalkObject: anObject\x0a\x09\x22Consider anObject a Smalltalk object if it has a 'klass' property.\x0a\x09Note that this may be unaccurate\x22\x0a\x09\x0a\x09<return typeof anObject.klass !== 'undefined'>",
 messageSends: [],
@@ -2402,9 +2366,8 @@ selector: "packageAt:",
 protocol: 'packages',
 fn: function (packageName){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return smalltalk.packages[packageName];
-return self}, function($ctx1) {$ctx1.fill(self,"packageAt:",{packageName:packageName},smalltalk.SmalltalkImage)})},
+return self},
 args: ["packageName"],
 source: "packageAt: packageName\x0a\x09<return smalltalk.packages[packageName]>",
 messageSends: [],
@@ -2437,13 +2400,12 @@ selector: "packages",
 protocol: 'packages',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 
 		return Object.keys(smalltalk.packages).map(function(k) {
 			return smalltalk.packages[k];
 		})
 	;
-return self}, function($ctx1) {$ctx1.fill(self,"packages",{},smalltalk.SmalltalkImage)})},
+return self},
 args: [],
 source: "packages\x0a\x09\x22Return all Package instances in the system.\x22\x0a\x0a\x09<\x0a\x09\x09return Object.keys(smalltalk.packages).map(function(k) {\x0a\x09\x09\x09return smalltalk.packages[k];\x0a\x09\x09})\x0a\x09>",
 messageSends: [],
@@ -2520,11 +2482,10 @@ selector: "pseudoVariableNames",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=["self", "super", "nil", "true", "false", "thisContext"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"pseudoVariableNames",{},smalltalk.SmalltalkImage)})},
+},
 args: [],
 source: "pseudoVariableNames\x0a\x09^ #('self' 'super' 'nil' 'true' 'false' 'thisContext')",
 messageSends: [],
@@ -2538,9 +2499,8 @@ selector: "readJSObject:",
 protocol: 'accessing',
 fn: function (anObject){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return smalltalk.readJSObject(anObject);
-return self}, function($ctx1) {$ctx1.fill(self,"readJSObject:",{anObject:anObject},smalltalk.SmalltalkImage)})},
+return self},
 args: ["anObject"],
 source: "readJSObject: anObject\x0a\x09<return smalltalk.readJSObject(anObject)>",
 messageSends: [],
@@ -2639,9 +2599,8 @@ selector: "reservedWords",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return smalltalk.reservedWords;
-return self}, function($ctx1) {$ctx1.fill(self,"reservedWords",{},smalltalk.SmalltalkImage)})},
+return self},
 args: [],
 source: "reservedWords\x0a\x09\x22JavaScript reserved words\x22\x0a\x09<return smalltalk.reservedWords>",
 messageSends: [],
@@ -2655,9 +2614,8 @@ selector: "version",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "0.13.0-pre";
-}, function($ctx1) {$ctx1.fill(self,"version",{},smalltalk.SmalltalkImage)})},
+},
 args: [],
 source: "version\x0a\x09\x22Answer the version string of Amber\x22\x0a\x09\x0a\x09^ '0.13.0-pre'",
 messageSends: [],
@@ -2671,9 +2629,8 @@ selector: "vm",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return smalltalk;
-return self}, function($ctx1) {$ctx1.fill(self,"vm",{},smalltalk.SmalltalkImage)})},
+return self},
 args: [],
 source: "vm\x0a\x09\x22Future compatibility to be able to use Smalltalk vm ...\x22\x0a\x09<return smalltalk>",
 messageSends: [],

+ 46 - 92
js/Kernel-Methods.js

@@ -10,9 +10,8 @@ selector: "applyTo:arguments:",
 protocol: 'evaluating',
 fn: function (anObject,aCollection){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return self.apply(anObject, aCollection);
-return self}, function($ctx1) {$ctx1.fill(self,"applyTo:arguments:",{anObject:anObject,aCollection:aCollection},smalltalk.BlockClosure)})},
+return self},
 args: ["anObject", "aCollection"],
 source: "applyTo: anObject arguments: aCollection\x0a\x09<return self.apply(anObject, aCollection)>",
 messageSends: [],
@@ -26,9 +25,8 @@ selector: "asCompiledMethod:",
 protocol: 'converting',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return smalltalk.method({selector:aString, fn:self});;
-return self}, function($ctx1) {$ctx1.fill(self,"asCompiledMethod:",{aString:aString},smalltalk.BlockClosure)})},
+return self},
 args: ["aString"],
 source: "asCompiledMethod: aString\x0a\x09<return smalltalk.method({selector:aString, fn:self});>",
 messageSends: [],
@@ -42,9 +40,8 @@ selector: "compiledSource",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return self.toString();
-return self}, function($ctx1) {$ctx1.fill(self,"compiledSource",{},smalltalk.BlockClosure)})},
+return self},
 args: [],
 source: "compiledSource\x0a\x09<return self.toString()>",
 messageSends: [],
@@ -58,7 +55,6 @@ selector: "currySelf",
 protocol: 'converting',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 
 		return function () {
 			var args = [ this ];
@@ -66,7 +62,7 @@ return smalltalk.withContext(function($ctx1) {
 			return self.apply(null, args);
 		}
 	;
-return self}, function($ctx1) {$ctx1.fill(self,"currySelf",{},smalltalk.BlockClosure)})},
+return self},
 args: [],
 source: "currySelf\x0a\x09\x22Transforms [ :selfarg :x :y | stcode ] block\x0a\x09which represents JS function (selfarg, x, y, ...) {jscode}\x0a\x09into function (x, y, ...) {jscode} that takes selfarg from 'this'.\x0a\x09IOW, it is usable as JS method and first arg takes the receiver.\x22\x0a\x09\x0a\x09<\x0a\x09\x09return function () {\x0a\x09\x09\x09var args = [ this ];\x0a\x09\x09\x09args.push.apply(args, arguments);\x0a\x09\x09\x09return self.apply(null, args);\x0a\x09\x09}\x0a\x09>",
 messageSends: [],
@@ -80,9 +76,8 @@ selector: "ensure:",
 protocol: 'evaluating',
 fn: function (aBlock){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 try{return self._value()}finally{aBlock._value()};
-return self}, function($ctx1) {$ctx1.fill(self,"ensure:",{aBlock:aBlock},smalltalk.BlockClosure)})},
+return self},
 args: ["aBlock"],
 source: "ensure: aBlock\x0a\x09<try{return self._value()}finally{aBlock._value()}>",
 messageSends: [],
@@ -113,9 +108,8 @@ selector: "new",
 protocol: 'evaluating',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return new self();
-return self}, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.BlockClosure)})},
+return self},
 args: [],
 source: "new\x0a\x09\x22Use the receiver as a JS constructor.\x0a\x09*Do not* use this method to instanciate Smalltalk objects!\x22\x0a\x09<return new self()>",
 messageSends: [],
@@ -183,7 +177,6 @@ selector: "newWithValues:",
 protocol: 'evaluating',
 fn: function (aCollection){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 
 		var constructor = function() {};
 		constructor.prototype = self.prototype;
@@ -191,7 +184,7 @@ return smalltalk.withContext(function($ctx1) {
 		var result = self.apply(object, aCollection);
 		return typeof result === "object" ? result : object;
 	;
-return self}, function($ctx1) {$ctx1.fill(self,"newWithValues:",{aCollection:aCollection},smalltalk.BlockClosure)})},
+return self},
 args: ["aCollection"],
 source: "newWithValues: aCollection\x0a\x09\x22Use the receiver as a JavaScript constructor with a variable number of arguments.\x0a\x09Answer the object created using the operator `new`.\x0a\x0a\x09This algorithm was inspired by http://stackoverflow.com/a/6069331.\x0a\x0a\x09Here's a general breakdown of what's going on:\x0a\x091) Create a new, empty constructor function.\x0a\x092) Set it's prototype to the receiver's prototype. Because the receiver is a `BlockClosure`, it is also a JavaScript function.\x0a\x093) Instantiate a new object using the constructor function just created. \x0a\x09\x09This forces the interpreter to set the internal [[prototype]] property to what was set on the function before. \x0a   \x09\x09This has to be done, as we have no access to the [[prototype]] property externally.\x0a\x094) Apply `self` to the object I just instantiated.\x22\x0a\x0a\x09<\x0a\x09\x09var constructor = function() {};\x0a\x09\x09constructor.prototype = self.prototype;\x0a\x09\x09var object = new constructor;\x0a\x09\x09var result = self.apply(object, aCollection);\x0a\x09\x09return typeof result === \x22object\x22 ? result : object;\x0a\x09>",
 messageSends: [],
@@ -205,9 +198,8 @@ selector: "numArgs",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return self.length;
-return self}, function($ctx1) {$ctx1.fill(self,"numArgs",{},smalltalk.BlockClosure)})},
+return self},
 args: [],
 source: "numArgs\x0a\x09<return self.length>",
 messageSends: [],
@@ -251,9 +243,8 @@ selector: "receiver",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return nil;
-}, function($ctx1) {$ctx1.fill(self,"receiver",{},smalltalk.BlockClosure)})},
+},
 args: [],
 source: "receiver\x0a\x09^ nil",
 messageSends: [],
@@ -286,9 +277,8 @@ selector: "value",
 protocol: 'evaluating',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return self();;
-return self}, function($ctx1) {$ctx1.fill(self,"value",{},smalltalk.BlockClosure)})},
+return self},
 args: [],
 source: "value\x0a\x09<return self();>",
 messageSends: [],
@@ -302,9 +292,8 @@ selector: "value:",
 protocol: 'evaluating',
 fn: function (anArg){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return self(anArg);;
-return self}, function($ctx1) {$ctx1.fill(self,"value:",{anArg:anArg},smalltalk.BlockClosure)})},
+return self},
 args: ["anArg"],
 source: "value: anArg\x0a\x09<return self(anArg);>",
 messageSends: [],
@@ -318,9 +307,8 @@ selector: "value:value:",
 protocol: 'evaluating',
 fn: function (firstArg,secondArg){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return self(firstArg, secondArg);;
-return self}, function($ctx1) {$ctx1.fill(self,"value:value:",{firstArg:firstArg,secondArg:secondArg},smalltalk.BlockClosure)})},
+return self},
 args: ["firstArg", "secondArg"],
 source: "value: firstArg value: secondArg\x0a\x09<return self(firstArg, secondArg);>",
 messageSends: [],
@@ -334,9 +322,8 @@ selector: "value:value:value:",
 protocol: 'evaluating',
 fn: function (firstArg,secondArg,thirdArg){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return self(firstArg, secondArg, thirdArg);;
-return self}, function($ctx1) {$ctx1.fill(self,"value:value:value:",{firstArg:firstArg,secondArg:secondArg,thirdArg:thirdArg},smalltalk.BlockClosure)})},
+return self},
 args: ["firstArg", "secondArg", "thirdArg"],
 source: "value: firstArg value: secondArg value: thirdArg\x0a\x09<return self(firstArg, secondArg, thirdArg);>",
 messageSends: [],
@@ -350,12 +337,11 @@ selector: "valueWithInterval:",
 protocol: 'timeout/interval',
 fn: function (aNumber){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 
 		var interval = setInterval(self, aNumber);
 		return smalltalk.Timeout._on_(interval);
 	;
-return self}, function($ctx1) {$ctx1.fill(self,"valueWithInterval:",{aNumber:aNumber},smalltalk.BlockClosure)})},
+return self},
 args: ["aNumber"],
 source: "valueWithInterval: aNumber\x0a\x09<\x0a\x09\x09var interval = setInterval(self, aNumber);\x0a\x09\x09return smalltalk.Timeout._on_(interval);\x0a\x09>",
 messageSends: [],
@@ -369,9 +355,8 @@ selector: "valueWithPossibleArguments:",
 protocol: 'evaluating',
 fn: function (aCollection){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return self.apply(null, aCollection);;
-return self}, function($ctx1) {$ctx1.fill(self,"valueWithPossibleArguments:",{aCollection:aCollection},smalltalk.BlockClosure)})},
+return self},
 args: ["aCollection"],
 source: "valueWithPossibleArguments: aCollection\x0a\x09<return self.apply(null, aCollection);>",
 messageSends: [],
@@ -385,12 +370,11 @@ selector: "valueWithTimeout:",
 protocol: 'timeout/interval',
 fn: function (aNumber){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 
 		var timeout = setTimeout(self, aNumber);
 		return smalltalk.Timeout._on_(timeout);
 	;
-return self}, function($ctx1) {$ctx1.fill(self,"valueWithTimeout:",{aNumber:aNumber},smalltalk.BlockClosure)})},
+return self},
 args: ["aNumber"],
 source: "valueWithTimeout: aNumber\x0a\x09<\x0a\x09\x09var timeout = setTimeout(self, aNumber);\x0a\x09\x09return smalltalk.Timeout._on_(timeout);\x0a\x09>",
 messageSends: [],
@@ -422,9 +406,8 @@ selector: "whileFalse:",
 protocol: 'controlling',
 fn: function (aBlock){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 while(!smalltalk.assert(self._value())) {aBlock._value()};
-return self}, function($ctx1) {$ctx1.fill(self,"whileFalse:",{aBlock:aBlock},smalltalk.BlockClosure)})},
+return self},
 args: ["aBlock"],
 source: "whileFalse: aBlock\x0a\x09<while(!smalltalk.assert(self._value())) {aBlock._value()}>",
 messageSends: [],
@@ -456,9 +439,8 @@ selector: "whileTrue:",
 protocol: 'controlling',
 fn: function (aBlock){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 while(smalltalk.assert(self._value())) {aBlock._value()};
-return self}, function($ctx1) {$ctx1.fill(self,"whileTrue:",{aBlock:aBlock},smalltalk.BlockClosure)})},
+return self},
 args: ["aBlock"],
 source: "whileTrue: aBlock\x0a\x09<while(smalltalk.assert(self._value())) {aBlock._value()}>",
 messageSends: [],
@@ -476,9 +458,8 @@ selector: "arguments",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return self.args || [];
-return self}, function($ctx1) {$ctx1.fill(self,"arguments",{},smalltalk.CompiledMethod)})},
+return self},
 args: [],
 source: "arguments\x0a\x09<return self.args || []>",
 messageSends: [],
@@ -510,9 +491,8 @@ selector: "defaultProtocol",
 protocol: 'defaults',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "as yet unclassified";
-}, function($ctx1) {$ctx1.fill(self,"defaultProtocol",{},smalltalk.CompiledMethod)})},
+},
 args: [],
 source: "defaultProtocol\x0a\x09^ 'as yet unclassified'",
 messageSends: [],
@@ -560,9 +540,8 @@ selector: "isCompiledMethod",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return true;
-}, function($ctx1) {$ctx1.fill(self,"isCompiledMethod",{},smalltalk.CompiledMethod)})},
+},
 args: [],
 source: "isCompiledMethod\x0a\x09^ true",
 messageSends: [],
@@ -982,9 +961,8 @@ selector: "maxPoolSize:",
 protocol: 'accessing',
 fn: function (anInteger){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@maxPoolSize"]=anInteger;
-return self}, function($ctx1) {$ctx1.fill(self,"maxPoolSize:",{anInteger:anInteger},smalltalk.ForkPool)})},
+return self},
 args: ["anInteger"],
 source: "maxPoolSize: anInteger\x0a\x09maxPoolSize := anInteger",
 messageSends: [],
@@ -1024,9 +1002,8 @@ selector: "defaultMaxPoolSize",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return (100);
-}, function($ctx1) {$ctx1.fill(self,"defaultMaxPoolSize",{},smalltalk.ForkPool.klass)})},
+},
 args: [],
 source: "defaultMaxPoolSize\x0a\x09^ 100",
 messageSends: [],
@@ -1040,9 +1017,8 @@ selector: "resetDefault",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@default"]=nil;
-return self}, function($ctx1) {$ctx1.fill(self,"resetDefault",{},smalltalk.ForkPool.klass)})},
+return self},
 args: [],
 source: "resetDefault\x0a\x09default := nil",
 messageSends: [],
@@ -1059,11 +1035,10 @@ selector: "arguments",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@arguments"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"arguments",{},smalltalk.Message)})},
+},
 args: [],
 source: "arguments\x0a\x09^ arguments",
 messageSends: [],
@@ -1077,9 +1052,8 @@ selector: "arguments:",
 protocol: 'accessing',
 fn: function (anArray){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@arguments"]=anArray;
-return self}, function($ctx1) {$ctx1.fill(self,"arguments:",{anArray:anArray},smalltalk.Message)})},
+return self},
 args: ["anArray"],
 source: "arguments: anArray\x0a\x09arguments := anArray",
 messageSends: [],
@@ -1115,11 +1089,10 @@ selector: "selector",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@selector"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"selector",{},smalltalk.Message)})},
+},
 args: [],
 source: "selector\x0a\x09^ selector",
 messageSends: [],
@@ -1133,9 +1106,8 @@ selector: "selector:",
 protocol: 'accessing',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@selector"]=aString;
-return self}, function($ctx1) {$ctx1.fill(self,"selector:",{aString:aString},smalltalk.Message)})},
+return self},
 args: ["aString"],
 source: "selector: aString\x0a\x09selector := aString",
 messageSends: [],
@@ -1271,11 +1243,10 @@ selector: "receiver",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@receiver"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"receiver",{},smalltalk.MessageSend)})},
+},
 args: [],
 source: "receiver\x0a\x09^ receiver",
 messageSends: [],
@@ -1289,9 +1260,8 @@ selector: "receiver:",
 protocol: 'accessing',
 fn: function (anObject){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@receiver"]=anObject;
-return self}, function($ctx1) {$ctx1.fill(self,"receiver:",{anObject:anObject},smalltalk.MessageSend)})},
+return self},
 args: ["anObject"],
 source: "receiver: anObject\x0a\x09receiver := anObject",
 messageSends: [],
@@ -1470,9 +1440,8 @@ selector: "evaluatedSelector",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return self.evaluatedSelector;
-return self}, function($ctx1) {$ctx1.fill(self,"evaluatedSelector",{},smalltalk.MethodContext)})},
+return self},
 args: [],
 source: "evaluatedSelector\x0a\x09<return self.evaluatedSelector>",
 messageSends: [],
@@ -1486,9 +1455,8 @@ selector: "home",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return self.homeContext;
-return self}, function($ctx1) {$ctx1.fill(self,"home",{},smalltalk.MethodContext)})},
+return self},
 args: [],
 source: "home\x0a\x09<return self.homeContext>",
 messageSends: [],
@@ -1502,9 +1470,8 @@ selector: "index",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return self.index || 0;
-return self}, function($ctx1) {$ctx1.fill(self,"index",{},smalltalk.MethodContext)})},
+return self},
 args: [],
 source: "index\x0a\x09<return self.index || 0>",
 messageSends: [],
@@ -1536,9 +1503,8 @@ selector: "locals",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return self.locals || {};
-return self}, function($ctx1) {$ctx1.fill(self,"locals",{},smalltalk.MethodContext)})},
+return self},
 args: [],
 source: "locals\x0a\x09<return self.locals || {}>",
 messageSends: [],
@@ -1609,9 +1575,8 @@ selector: "outerContext",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return self.outerContext || self.homeContext;
-return self}, function($ctx1) {$ctx1.fill(self,"outerContext",{},smalltalk.MethodContext)})},
+return self},
 args: [],
 source: "outerContext\x0a\x09<return self.outerContext || self.homeContext>",
 messageSends: [],
@@ -1647,9 +1612,8 @@ selector: "receiver",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return self.receiver;
-return self}, function($ctx1) {$ctx1.fill(self,"receiver",{},smalltalk.MethodContext)})},
+return self},
 args: [],
 source: "receiver\x0a\x09<return self.receiver>",
 messageSends: [],
@@ -1663,7 +1627,6 @@ selector: "selector",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 
 		if(self.selector) {
 			return smalltalk.convertSelector(self.selector);
@@ -1671,7 +1634,7 @@ return smalltalk.withContext(function($ctx1) {
 			return nil;
 		}
 	;
-return self}, function($ctx1) {$ctx1.fill(self,"selector",{},smalltalk.MethodContext)})},
+return self},
 args: [],
 source: "selector\x0a\x09<\x0a\x09\x09if(self.selector) {\x0a\x09\x09\x09return smalltalk.convertSelector(self.selector);\x0a\x09\x09} else {\x0a\x09\x09\x09return nil;\x0a\x09\x09}\x0a\x09>",
 messageSends: [],
@@ -1685,9 +1648,8 @@ selector: "sendIndexAt:",
 protocol: 'accessing',
 fn: function (aSelector){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return self.sendIdx[aSelector] || 0;
-return self}, function($ctx1) {$ctx1.fill(self,"sendIndexAt:",{aSelector:aSelector},smalltalk.MethodContext)})},
+return self},
 args: ["aSelector"],
 source: "sendIndexAt: aSelector\x0a\x09<return self.sendIdx[aSelector] || 0>",
 messageSends: [],
@@ -1701,9 +1663,8 @@ selector: "sendIndexes",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return self.sendIdx;
-return self}, function($ctx1) {$ctx1.fill(self,"sendIndexes",{},smalltalk.MethodContext)})},
+return self},
 args: [],
 source: "sendIndexes\x0a\x09<return self.sendIdx>",
 messageSends: [],
@@ -1741,12 +1702,11 @@ selector: "constructor:",
 protocol: 'instance creation',
 fn: function (aString){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 
 		var native=eval(aString);
 		return new native();
 	;
-return self}, function($ctx1) {$ctx1.fill(self,"constructor:",{aString:aString},smalltalk.NativeFunction.klass)})},
+return self},
 args: ["aString"],
 source: "constructor: aString\x0a\x09<\x0a\x09\x09var native=eval(aString);\x0a\x09\x09return new native();\x0a\x09>",
 messageSends: [],
@@ -1760,12 +1720,11 @@ selector: "constructor:value:",
 protocol: 'instance creation',
 fn: function (aString,anObject){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 
 		var native=eval(aString);
 		return new native(anObject);
 	;
-return self}, function($ctx1) {$ctx1.fill(self,"constructor:value:",{aString:aString,anObject:anObject},smalltalk.NativeFunction.klass)})},
+return self},
 args: ["aString", "anObject"],
 source: "constructor: aString value:anObject\x0a\x09<\x0a\x09\x09var native=eval(aString);\x0a\x09\x09return new native(anObject);\x0a\x09>",
 messageSends: [],
@@ -1779,12 +1738,11 @@ selector: "constructor:value:value:",
 protocol: 'instance creation',
 fn: function (aString,anObject,anObject2){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 
 		var native=eval(aString);
 		return new native(anObject,anObject2);
 	;
-return self}, function($ctx1) {$ctx1.fill(self,"constructor:value:value:",{aString:aString,anObject:anObject,anObject2:anObject2},smalltalk.NativeFunction.klass)})},
+return self},
 args: ["aString", "anObject", "anObject2"],
 source: "constructor: aString value:anObject value: anObject2\x0a\x09<\x0a\x09\x09var native=eval(aString);\x0a\x09\x09return new native(anObject,anObject2);\x0a\x09>",
 messageSends: [],
@@ -1798,12 +1756,11 @@ selector: "constructor:value:value:value:",
 protocol: 'instance creation',
 fn: function (aString,anObject,anObject2,anObject3){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 
 		var native=eval(aString);
 		return new native(anObject,anObject2, anObject3);
 	;
-return self}, function($ctx1) {$ctx1.fill(self,"constructor:value:value:value:",{aString:aString,anObject:anObject,anObject2:anObject2,anObject3:anObject3},smalltalk.NativeFunction.klass)})},
+return self},
 args: ["aString", "anObject", "anObject2", "anObject3"],
 source: "constructor: aString value:anObject value: anObject2 value:anObject3\x0a\x09<\x0a\x09\x09var native=eval(aString);\x0a\x09\x09return new native(anObject,anObject2, anObject3);\x0a\x09>",
 messageSends: [],
@@ -1839,12 +1796,11 @@ selector: "clearInterval",
 protocol: 'timeout/interval',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 
 		var interval = self["@rawTimeout"];
 		clearInterval(interval);
 	;
-return self}, function($ctx1) {$ctx1.fill(self,"clearInterval",{},smalltalk.Timeout)})},
+return self},
 args: [],
 source: "clearInterval\x0a\x09<\x0a\x09\x09var interval = self[\x22@rawTimeout\x22];\x0a\x09\x09clearInterval(interval);\x0a\x09>",
 messageSends: [],
@@ -1858,12 +1814,11 @@ selector: "clearTimeout",
 protocol: 'timeout/interval',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 
 		var timeout = self["@rawTimeout"];
 		clearTimeout(timeout);
 	;
-return self}, function($ctx1) {$ctx1.fill(self,"clearTimeout",{},smalltalk.Timeout)})},
+return self},
 args: [],
 source: "clearTimeout\x0a\x09<\x0a\x09\x09var timeout = self[\x22@rawTimeout\x22];\x0a\x09\x09clearTimeout(timeout);\x0a\x09>",
 messageSends: [],
@@ -1877,9 +1832,8 @@ selector: "rawTimeout:",
 protocol: 'accessing',
 fn: function (anObject){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@rawTimeout"]=anObject;
-return self}, function($ctx1) {$ctx1.fill(self,"rawTimeout:",{anObject:anObject},smalltalk.Timeout)})},
+return self},
 args: ["anObject"],
 source: "rawTimeout: anObject\x0a\x09rawTimeout := anObject",
 messageSends: [],

File diff suppressed because it is too large
+ 88 - 176
js/Kernel-Objects.js


+ 52 - 104
js/Kernel-Tests.js

@@ -297,7 +297,6 @@ selector: "testNewWithValues",
 protocol: 'tests',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 
 	function theTestPrototype() {this.name = "theTestPrototype";}
 	function theTestConstructor(arg1, arg2, arg3) {}
@@ -310,7 +309,7 @@ return smalltalk.withContext(function($ctx1) {
 	"newWithValues: cannot help if the argument list is wrong, and should warn that a mistake was made."
 	function constructionShouldFail() {var anotherResult = theWrappedConstructor._newWithValues_('This is so wrong');}
 	self._should_raise_(_st(constructionShouldFail), smalltalk.Error);;
-return self}, function($ctx1) {$ctx1.fill(self,"testNewWithValues",{},smalltalk.BlockClosureTest)})},
+return self},
 args: [],
 source: "testNewWithValues\x0a<\x0a\x09function theTestPrototype() {this.name = \x22theTestPrototype\x22;}\x0a\x09function theTestConstructor(arg1, arg2, arg3) {}\x0a\x09theTestConstructor.prototype = new theTestPrototype;\x0a\x0a\x09var theWrappedConstructor = _st(theTestConstructor);\x0a\x09var theResult = theWrappedConstructor._newWithValues_([1, 2, 3 ]);\x0a\x09self._assert_equals_(Object.getPrototypeOf(theResult).name, 'theTestPrototype');\x0a\x0a\x09\x22newWithValues: cannot help if the argument list is wrong, and should warn that a mistake was made.\x22\x0a\x09function constructionShouldFail() {var anotherResult = theWrappedConstructor._newWithValues_('This is so wrong');}\x0a\x09self._should_raise_(_st(constructionShouldFail), smalltalk.Error);\x0a>",
 messageSends: [],
@@ -1362,9 +1361,8 @@ selector: "isCollectionReadOnly",
 protocol: 'testing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return false;
-}, function($ctx1) {$ctx1.fill(self,"isCollectionReadOnly",{},smalltalk.CollectionTest)})},
+},
 args: [],
 source: "isCollectionReadOnly\x0a\x09^ false",
 messageSends: [],
@@ -1378,9 +1376,8 @@ selector: "sampleNewValue",
 protocol: 'fixture',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "N";
-}, function($ctx1) {$ctx1.fill(self,"sampleNewValue",{},smalltalk.CollectionTest)})},
+},
 args: [],
 source: "sampleNewValue\x0a\x09\x22Answers a value that is not yet there\x0a\x09and can be put into a tested collection\x22\x0a\x09\x0a\x09^ 'N'",
 messageSends: [],
@@ -2234,9 +2231,8 @@ selector: "collectionClass",
 protocol: 'fixture',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return nil;
-}, function($ctx1) {$ctx1.fill(self,"collectionClass",{},smalltalk.CollectionTest.klass)})},
+},
 args: [],
 source: "collectionClass\x0a\x09\x22Answers class of collection type tested,\x0a\x09or nil if test is abstract\x22\x0a\x0a\x09^ nil",
 messageSends: [],
@@ -2757,9 +2753,8 @@ selector: "sampleNewIndex",
 protocol: 'fixture',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "new";
-}, function($ctx1) {$ctx1.fill(self,"sampleNewIndex",{},smalltalk.AssociativeCollectionTest)})},
+},
 args: [],
 source: "sampleNewIndex\x0a\x09^ 'new'",
 messageSends: [],
@@ -3241,9 +3236,8 @@ selector: "collectionSize",
 protocol: 'fixture',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return (4);
-}, function($ctx1) {$ctx1.fill(self,"collectionSize",{},smalltalk.DictionaryTest)})},
+},
 args: [],
 source: "collectionSize\x0a\x09^ 4",
 messageSends: [],
@@ -3257,11 +3251,10 @@ selector: "collectionValues",
 protocol: 'fixture',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=[(1),(2),(3),(-4)];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"collectionValues",{},smalltalk.DictionaryTest)})},
+},
 args: [],
 source: "collectionValues\x0a\x09^ {1. 2. 3. -4}",
 messageSends: [],
@@ -3471,9 +3464,8 @@ protocol: 'fixture',
 fn: function (){
 var self=this;
 function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
-return smalltalk.withContext(function($ctx1) { 
 return $Dictionary();
-}, function($ctx1) {$ctx1.fill(self,"collectionClass",{},smalltalk.DictionaryTest.klass)})},
+},
 args: [],
 source: "collectionClass\x0a\x09^ Dictionary",
 messageSends: [],
@@ -3513,11 +3505,10 @@ selector: "collectionKeys",
 protocol: 'fixture',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=["b","a","c","d"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"collectionKeys",{},smalltalk.HashedCollectionTest)})},
+},
 args: [],
 source: "collectionKeys\x0a\x09^ { 'b'. 'a'. 'c'. 'd' }",
 messageSends: [],
@@ -3555,9 +3546,8 @@ selector: "collectionSize",
 protocol: 'fixture',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return (4);
-}, function($ctx1) {$ctx1.fill(self,"collectionSize",{},smalltalk.HashedCollectionTest)})},
+},
 args: [],
 source: "collectionSize\x0a\x09^ 4",
 messageSends: [],
@@ -3571,11 +3561,10 @@ selector: "collectionValues",
 protocol: 'fixture',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=[(1),(2),(3),(-4)];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"collectionValues",{},smalltalk.HashedCollectionTest)})},
+},
 args: [],
 source: "collectionValues\x0a\x09^ { 1. 2. 3. -4 }",
 messageSends: [],
@@ -3687,9 +3676,8 @@ protocol: 'fixture',
 fn: function (){
 var self=this;
 function $HashedCollection(){return smalltalk.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}
-return smalltalk.withContext(function($ctx1) { 
 return $HashedCollection();
-}, function($ctx1) {$ctx1.fill(self,"collectionClass",{},smalltalk.HashedCollectionTest.klass)})},
+},
 args: [],
 source: "collectionClass\x0a\x09^ HashedCollection",
 messageSends: [],
@@ -4124,11 +4112,10 @@ selector: "collection",
 protocol: 'fixture',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=[(1), (2), (3), (-4)];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"collection",{},smalltalk.ArrayTest)})},
+},
 args: [],
 source: "collection\x0a\x09^ #(1 2 3 -4)",
 messageSends: [],
@@ -4142,9 +4129,8 @@ selector: "collectionFirst",
 protocol: 'fixture',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return (1);
-}, function($ctx1) {$ctx1.fill(self,"collectionFirst",{},smalltalk.ArrayTest)})},
+},
 args: [],
 source: "collectionFirst\x0a\x09^ 1",
 messageSends: [],
@@ -4158,11 +4144,10 @@ selector: "collectionFirstTwo",
 protocol: 'fixture',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=[(1), (2)];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"collectionFirstTwo",{},smalltalk.ArrayTest)})},
+},
 args: [],
 source: "collectionFirstTwo\x0a\x09^ #(1 2)",
 messageSends: [],
@@ -4176,9 +4161,8 @@ selector: "collectionLast",
 protocol: 'fixture',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return (-4);
-}, function($ctx1) {$ctx1.fill(self,"collectionLast",{},smalltalk.ArrayTest)})},
+},
 args: [],
 source: "collectionLast\x0a\x09^ -4",
 messageSends: [],
@@ -4192,11 +4176,10 @@ selector: "collectionLastTwo",
 protocol: 'fixture',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=[(3), (-4)];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"collectionLastTwo",{},smalltalk.ArrayTest)})},
+},
 args: [],
 source: "collectionLastTwo\x0a\x09^ #(3 -4)",
 messageSends: [],
@@ -4210,11 +4193,10 @@ selector: "collectionOfPrintStrings",
 protocol: 'fixture',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=["1", "2", "3", "-4"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"collectionOfPrintStrings",{},smalltalk.ArrayTest)})},
+},
 args: [],
 source: "collectionOfPrintStrings\x0a\x09^ #('1' '2' '3' '-4')",
 messageSends: [],
@@ -4228,9 +4210,8 @@ selector: "collectionSize",
 protocol: 'fixture',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return (4);
-}, function($ctx1) {$ctx1.fill(self,"collectionSize",{},smalltalk.ArrayTest)})},
+},
 args: [],
 source: "collectionSize\x0a\x09^ 4",
 messageSends: [],
@@ -4244,11 +4225,10 @@ selector: "collectionWithDuplicates",
 protocol: 'fixture',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=["a", "b", "c", (1), (2), (1), "a"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"collectionWithDuplicates",{},smalltalk.ArrayTest)})},
+},
 args: [],
 source: "collectionWithDuplicates\x0a\x09^ #('a' 'b' 'c' 1 2 1 'a')",
 messageSends: [],
@@ -4262,11 +4242,10 @@ selector: "collectionWithNewValue",
 protocol: 'fixture',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=[(1), (2), (3), (-4), "N"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"collectionWithNewValue",{},smalltalk.ArrayTest)})},
+},
 args: [],
 source: "collectionWithNewValue\x0a\x09^ #(1 2 3 -4 'N')",
 messageSends: [],
@@ -4280,9 +4259,8 @@ selector: "sampleNewIndex",
 protocol: 'fixture',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return (5);
-}, function($ctx1) {$ctx1.fill(self,"sampleNewIndex",{},smalltalk.ArrayTest)})},
+},
 args: [],
 source: "sampleNewIndex\x0a\x09^ 5",
 messageSends: [],
@@ -4538,9 +4516,8 @@ protocol: 'fixture',
 fn: function (){
 var self=this;
 function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
-return smalltalk.withContext(function($ctx1) { 
 return $Array();
-}, function($ctx1) {$ctx1.fill(self,"collectionClass",{},smalltalk.ArrayTest.klass)})},
+},
 args: [],
 source: "collectionClass\x0a\x09^ Array",
 messageSends: [],
@@ -4556,9 +4533,8 @@ selector: "collection",
 protocol: 'fixture',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "helLo";
-}, function($ctx1) {$ctx1.fill(self,"collection",{},smalltalk.StringTest)})},
+},
 args: [],
 source: "collection\x0a\x09^ 'helLo'",
 messageSends: [],
@@ -4572,9 +4548,8 @@ selector: "collectionFirst",
 protocol: 'fixture',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "h";
-}, function($ctx1) {$ctx1.fill(self,"collectionFirst",{},smalltalk.StringTest)})},
+},
 args: [],
 source: "collectionFirst\x0a\x09^ 'h'",
 messageSends: [],
@@ -4588,9 +4563,8 @@ selector: "collectionFirstTwo",
 protocol: 'fixture',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "he";
-}, function($ctx1) {$ctx1.fill(self,"collectionFirstTwo",{},smalltalk.StringTest)})},
+},
 args: [],
 source: "collectionFirstTwo\x0a\x09^ 'he'",
 messageSends: [],
@@ -4604,9 +4578,8 @@ selector: "collectionLast",
 protocol: 'fixture',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "o";
-}, function($ctx1) {$ctx1.fill(self,"collectionLast",{},smalltalk.StringTest)})},
+},
 args: [],
 source: "collectionLast\x0a\x09^ 'o'",
 messageSends: [],
@@ -4620,9 +4593,8 @@ selector: "collectionLastTwo",
 protocol: 'fixture',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "Lo";
-}, function($ctx1) {$ctx1.fill(self,"collectionLastTwo",{},smalltalk.StringTest)})},
+},
 args: [],
 source: "collectionLastTwo\x0a\x09^ 'Lo'",
 messageSends: [],
@@ -4636,9 +4608,8 @@ selector: "collectionOfPrintStrings",
 protocol: 'fixture',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "'h''e''l''L''o'";
-}, function($ctx1) {$ctx1.fill(self,"collectionOfPrintStrings",{},smalltalk.StringTest)})},
+},
 args: [],
 source: "collectionOfPrintStrings\x0a\x09^ '''h''''e''''l''''L''''o'''",
 messageSends: [],
@@ -4652,9 +4623,8 @@ selector: "collectionSize",
 protocol: 'fixture',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return (5);
-}, function($ctx1) {$ctx1.fill(self,"collectionSize",{},smalltalk.StringTest)})},
+},
 args: [],
 source: "collectionSize\x0a\x09^ 5",
 messageSends: [],
@@ -4668,9 +4638,8 @@ selector: "collectionWithDuplicates",
 protocol: 'fixture',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "abbaerte";
-}, function($ctx1) {$ctx1.fill(self,"collectionWithDuplicates",{},smalltalk.StringTest)})},
+},
 args: [],
 source: "collectionWithDuplicates\x0a\x09^ 'abbaerte'",
 messageSends: [],
@@ -4684,9 +4653,8 @@ selector: "collectionWithNewValue",
 protocol: 'fixture',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "helLoN";
-}, function($ctx1) {$ctx1.fill(self,"collectionWithNewValue",{},smalltalk.StringTest)})},
+},
 args: [],
 source: "collectionWithNewValue\x0a\x09^ 'helLoN'",
 messageSends: [],
@@ -4700,9 +4668,8 @@ selector: "sampleNewValueAsCollection",
 protocol: 'fixture',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "N";
-}, function($ctx1) {$ctx1.fill(self,"sampleNewValueAsCollection",{},smalltalk.StringTest)})},
+},
 args: [],
 source: "sampleNewValueAsCollection\x0a\x09^ 'N'",
 messageSends: [],
@@ -5139,8 +5106,7 @@ selector: "testIndexOfStartingAtWithNull",
 protocol: 'tests',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"testIndexOfStartingAtWithNull",{},smalltalk.StringTest)})},
+return self},
 args: [],
 source: "testIndexOfStartingAtWithNull\x0a\x09\x22String cannot hold JS null\x22",
 messageSends: [],
@@ -5154,8 +5120,7 @@ selector: "testIndexOfWithNull",
 protocol: 'tests',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"testIndexOfWithNull",{},smalltalk.StringTest)})},
+return self},
 args: [],
 source: "testIndexOfWithNull\x0a\x09\x22String cannot hold JS null\x22",
 messageSends: [],
@@ -5306,9 +5271,8 @@ protocol: 'fixture',
 fn: function (){
 var self=this;
 function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
-return smalltalk.withContext(function($ctx1) { 
 return $String();
-}, function($ctx1) {$ctx1.fill(self,"collectionClass",{},smalltalk.StringTest.klass)})},
+},
 args: [],
 source: "collectionClass\x0a\x09^ String",
 messageSends: [],
@@ -5381,9 +5345,8 @@ selector: "collectionSize",
 protocol: 'fixture',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return (4);
-}, function($ctx1) {$ctx1.fill(self,"collectionSize",{},smalltalk.SetTest)})},
+},
 args: [],
 source: "collectionSize\x0a\x09^ 4",
 messageSends: [],
@@ -5769,9 +5732,8 @@ protocol: 'fixture',
 fn: function (){
 var self=this;
 function $Set(){return smalltalk.Set||(typeof Set=="undefined"?nil:Set)}
-return smalltalk.withContext(function($ctx1) { 
 return $Set();
-}, function($ctx1) {$ctx1.fill(self,"collectionClass",{},smalltalk.SetTest.klass)})},
+},
 args: [],
 source: "collectionClass\x0a\x09^ Set",
 messageSends: [],
@@ -5823,9 +5785,8 @@ selector: "jsObject",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return jsObject = {a: 1, b: function() {return 2;}, c: function(object) {return object;}, d: '', 'e': null, 'f': void 0};
-return self}, function($ctx1) {$ctx1.fill(self,"jsObject",{},smalltalk.JSObjectProxyTest)})},
+return self},
 args: [],
 source: "jsObject\x0a\x09<return jsObject = {a: 1, b: function() {return 2;}, c: function(object) {return object;}, d: '', 'e': null, 'f': void 0}>",
 messageSends: [],
@@ -6263,9 +6224,8 @@ selector: "throwException",
 protocol: 'helpers',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 throw 'test';
-return self}, function($ctx1) {$ctx1.fill(self,"throwException",{},smalltalk.JavaScriptExceptionTest)})},
+return self},
 args: [],
 source: "throwException\x0a\x09<throw 'test'>",
 messageSends: [],
@@ -6338,9 +6298,8 @@ protocol: 'accessing',
 fn: function (){
 var self=this;
 function $CodeGenerator(){return smalltalk.CodeGenerator||(typeof CodeGenerator=="undefined"?nil:CodeGenerator)}
-return smalltalk.withContext(function($ctx1) { 
 return $CodeGenerator();
-}, function($ctx1) {$ctx1.fill(self,"codeGeneratorClass",{},smalltalk.MethodInheritanceTest)})},
+},
 args: [],
 source: "codeGeneratorClass\x0a\x09^ CodeGenerator",
 messageSends: [],
@@ -6628,9 +6587,8 @@ protocol: 'accessing',
 fn: function (){
 var self=this;
 function $JavaScriptException(){return smalltalk.JavaScriptException||(typeof JavaScriptException=="undefined"?nil:JavaScriptException)}
-return smalltalk.withContext(function($ctx1) { 
 return $JavaScriptException();
-}, function($ctx1) {$ctx1.fill(self,"targetClassBottom",{},smalltalk.MethodInheritanceTest)})},
+},
 args: [],
 source: "targetClassBottom\x0a\x09^ JavaScriptException",
 messageSends: [],
@@ -6645,9 +6603,8 @@ protocol: 'accessing',
 fn: function (){
 var self=this;
 function $Error(){return smalltalk.Error||(typeof Error=="undefined"?nil:Error)}
-return smalltalk.withContext(function($ctx1) { 
 return $Error();
-}, function($ctx1) {$ctx1.fill(self,"targetClassMiddle",{},smalltalk.MethodInheritanceTest)})},
+},
 args: [],
 source: "targetClassMiddle\x0a\x09^ Error",
 messageSends: [],
@@ -6662,9 +6619,8 @@ protocol: 'accessing',
 fn: function (){
 var self=this;
 function $Object(){return smalltalk.Object||(typeof Object=="undefined"?nil:Object)}
-return smalltalk.withContext(function($ctx1) { 
 return $Object();
-}, function($ctx1) {$ctx1.fill(self,"targetClassTop",{},smalltalk.MethodInheritanceTest)})},
+},
 args: [],
 source: "targetClassTop\x0a\x09^ Object",
 messageSends: [],
@@ -7722,11 +7678,10 @@ selector: "foo",
 protocol: 'not yet classified',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@foo"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"foo",{},smalltalk.ObjectMock)})},
+},
 args: [],
 source: "foo\x0a\x09^ foo",
 messageSends: [],
@@ -7740,9 +7695,8 @@ selector: "foo:",
 protocol: 'not yet classified',
 fn: function (anObject){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@foo"]=anObject;
-return self}, function($ctx1) {$ctx1.fill(self,"foo:",{anObject:anObject},smalltalk.ObjectMock)})},
+return self},
 args: ["anObject"],
 source: "foo: anObject\x0a\x09foo := anObject",
 messageSends: [],
@@ -7759,9 +7713,8 @@ selector: "notDefined",
 protocol: 'tests',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return void 0;;
-return self}, function($ctx1) {$ctx1.fill(self,"notDefined",{},smalltalk.ObjectTest)})},
+return self},
 args: [],
 source: "notDefined\x0a\x09<return void 0;>",
 messageSends: [],
@@ -8676,8 +8629,7 @@ selector: "testStreamContents",
 protocol: 'tests',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"testStreamContents",{},smalltalk.StreamTest)})},
+return self},
 args: [],
 source: "testStreamContents",
 messageSends: [],
@@ -8746,9 +8698,8 @@ selector: "collectionClass",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return nil;
-}, function($ctx1) {$ctx1.fill(self,"collectionClass",{},smalltalk.StreamTest.klass)})},
+},
 args: [],
 source: "collectionClass\x0a\x09^ nil",
 messageSends: [],
@@ -8802,9 +8753,8 @@ protocol: 'accessing',
 fn: function (){
 var self=this;
 function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
-return smalltalk.withContext(function($ctx1) { 
 return $Array();
-}, function($ctx1) {$ctx1.fill(self,"collectionClass",{},smalltalk.ArrayStreamTest.klass)})},
+},
 args: [],
 source: "collectionClass\x0a\x09^ Array",
 messageSends: [],
@@ -8820,9 +8770,8 @@ selector: "newCollection",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "hello world";
-}, function($ctx1) {$ctx1.fill(self,"newCollection",{},smalltalk.StringStreamTest)})},
+},
 args: [],
 source: "newCollection\x0a\x09^ 'hello world'",
 messageSends: [],
@@ -8838,9 +8787,8 @@ protocol: 'accessing',
 fn: function (){
 var self=this;
 function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
-return smalltalk.withContext(function($ctx1) { 
 return $String();
-}, function($ctx1) {$ctx1.fill(self,"collectionClass",{},smalltalk.StringStreamTest.klass)})},
+},
 args: [],
 source: "collectionClass\x0a\x09^ String",
 messageSends: [],

+ 6 - 12
js/Kernel-Transcript.js

@@ -10,8 +10,7 @@ selector: "clear",
 protocol: 'printing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"clear",{},smalltalk.ConsoleTranscript)})},
+return self},
 args: [],
 source: "clear\x0a\x09\x22no op\x22",
 messageSends: [],
@@ -25,8 +24,7 @@ selector: "cr",
 protocol: 'printing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"cr",{},smalltalk.ConsoleTranscript)})},
+return self},
 args: [],
 source: "cr\x0a\x09\x22no op\x22",
 messageSends: [],
@@ -40,8 +38,7 @@ selector: "open",
 protocol: 'actions',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"open",{},smalltalk.ConsoleTranscript)})},
+return self},
 args: [],
 source: "open",
 messageSends: [],
@@ -55,9 +52,8 @@ selector: "show:",
 protocol: 'printing',
 fn: function (anObject){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 console.log(String(_st(anObject)._asString()));
-return self}, function($ctx1) {$ctx1.fill(self,"show:",{anObject:anObject},smalltalk.ConsoleTranscript)})},
+return self},
 args: ["anObject"],
 source: "show: anObject\x0a\x22Smalltalk objects should have no trouble displaying themselves on the Transcript; Javascript objects don't know how, so must be wrapped in a JSObectProxy.\x22\x0a<console.log(String(_st(anObject)._asString()))>",
 messageSends: [],
@@ -127,11 +123,10 @@ selector: "current",
 protocol: 'instance creation',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@current"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.Transcript.klass)})},
+},
 args: [],
 source: "current\x0a\x09^ current",
 messageSends: [],
@@ -193,9 +188,8 @@ selector: "register:",
 protocol: 'instance creation',
 fn: function (aTranscript){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@current"]=aTranscript;
-return self}, function($ctx1) {$ctx1.fill(self,"register:",{aTranscript:aTranscript},smalltalk.Transcript.klass)})},
+return self},
 args: ["aTranscript"],
 source: "register: aTranscript\x0a\x09current := aTranscript",
 messageSends: [],

+ 1 - 2
js/SUnit-Tests.js

@@ -324,9 +324,8 @@ selector: "setUp",
 protocol: 'running',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@flag"]="ok";
-return self}, function($ctx1) {$ctx1.fill(self,"setUp",{},smalltalk.SUnitAsyncTest)})},
+return self},
 args: [],
 source: "setUp\x0a\x09flag := 'ok'",
 messageSends: [],

+ 21 - 42
js/SUnit.js

@@ -10,11 +10,10 @@ selector: "result",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@result"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"result",{},smalltalk.ResultAnnouncement)})},
+},
 args: [],
 source: "result\x0a\x09^ result",
 messageSends: [],
@@ -28,9 +27,8 @@ selector: "result:",
 protocol: 'accessing',
 fn: function (aTestResult){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@result"]=aTestResult;
-return self}, function($ctx1) {$ctx1.fill(self,"result:",{aTestResult:aTestResult},smalltalk.ResultAnnouncement)})},
+return self},
 args: ["aTestResult"],
 source: "result: aTestResult\x0a\x09result := aTestResult",
 messageSends: [],
@@ -135,9 +133,8 @@ selector: "context:",
 protocol: 'accessing',
 fn: function (aRunningTestContext){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@context"]=aRunningTestContext;
-return self}, function($ctx1) {$ctx1.fill(self,"context:",{aRunningTestContext:aRunningTestContext},smalltalk.TestCase)})},
+return self},
 args: ["aRunningTestContext"],
 source: "context: aRunningTestContext\x0a\x09context := aRunningTestContext",
 messageSends: [],
@@ -256,11 +253,10 @@ selector: "selector",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@testSelector"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"selector",{},smalltalk.TestCase)})},
+},
 args: [],
 source: "selector\x0a\x09^ testSelector",
 messageSends: [],
@@ -274,9 +270,8 @@ selector: "setTestSelector:",
 protocol: 'accessing',
 fn: function (aSelector){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@testSelector"]=aSelector;
-return self}, function($ctx1) {$ctx1.fill(self,"setTestSelector:",{aSelector:aSelector},smalltalk.TestCase)})},
+return self},
 args: ["aSelector"],
 source: "setTestSelector: aSelector\x0a\x09testSelector := aSelector",
 messageSends: [],
@@ -290,8 +285,7 @@ selector: "setUp",
 protocol: 'running',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"setUp",{},smalltalk.TestCase)})},
+return self},
 args: [],
 source: "setUp",
 messageSends: [],
@@ -387,8 +381,7 @@ selector: "tearDown",
 protocol: 'running',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return self}, function($ctx1) {$ctx1.fill(self,"tearDown",{},smalltalk.TestCase)})},
+return self},
 args: [],
 source: "tearDown",
 messageSends: [],
@@ -475,9 +468,8 @@ selector: "heliosClass",
 protocol: 'helios',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "test";
-}, function($ctx1) {$ctx1.fill(self,"heliosClass",{},smalltalk.TestCase.klass)})},
+},
 args: [],
 source: "heliosClass\x0a\x09^ 'test'",
 messageSends: [],
@@ -510,9 +502,8 @@ protocol: 'accessing',
 fn: function (){
 var self=this;
 function $TestCase(){return smalltalk.TestCase||(typeof TestCase=="undefined"?nil:TestCase)}
-return smalltalk.withContext(function($ctx1) { 
 return $TestCase();
-}, function($ctx1) {$ctx1.fill(self,"lookupHierarchyRoot",{},smalltalk.TestCase.klass)})},
+},
 args: [],
 source: "lookupHierarchyRoot\x0a\x09^ TestCase",
 messageSends: [],
@@ -651,9 +642,8 @@ selector: "testCase:",
 protocol: 'accessing',
 fn: function (aTestCase){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@testCase"]=aTestCase;
-return self}, function($ctx1) {$ctx1.fill(self,"testCase:",{aTestCase:aTestCase},smalltalk.TestContext)})},
+return self},
 args: ["aTestCase"],
 source: "testCase: aTestCase\x0a\x09testCase := aTestCase",
 messageSends: [],
@@ -722,9 +712,8 @@ selector: "finished:",
 protocol: 'accessing',
 fn: function (aBlock){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@finished"]=aBlock;
-return self}, function($ctx1) {$ctx1.fill(self,"finished:",{aBlock:aBlock},smalltalk.ReportingTestContext)})},
+return self},
 args: ["aBlock"],
 source: "finished: aBlock\x0a\x09finished := aBlock",
 messageSends: [],
@@ -738,9 +727,8 @@ selector: "result:",
 protocol: 'accessing',
 fn: function (aTestResult){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@result"]=aTestResult;
-return self}, function($ctx1) {$ctx1.fill(self,"result:",{aTestResult:aTestResult},smalltalk.ReportingTestContext)})},
+return self},
 args: ["aTestResult"],
 source: "result: aTestResult\x0a\x09result := aTestResult",
 messageSends: [],
@@ -844,11 +832,10 @@ selector: "errors",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@errors"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"errors",{},smalltalk.TestResult)})},
+},
 args: [],
 source: "errors\x0a\x09^ errors",
 messageSends: [],
@@ -862,11 +849,10 @@ selector: "failures",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@failures"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"failures",{},smalltalk.TestResult)})},
+},
 args: [],
 source: "failures\x0a\x09^ failures",
 messageSends: [],
@@ -975,11 +961,10 @@ selector: "runs",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@runs"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"runs",{},smalltalk.TestResult)})},
+},
 args: [],
 source: "runs\x0a\x09^ runs",
 messageSends: [],
@@ -1022,11 +1007,10 @@ selector: "timestamp",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@timestamp"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"timestamp",{},smalltalk.TestResult)})},
+},
 args: [],
 source: "timestamp\x0a\x09^ timestamp",
 messageSends: [],
@@ -1040,11 +1024,10 @@ selector: "total",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@total"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"total",{},smalltalk.TestResult)})},
+},
 args: [],
 source: "total\x0a\x09^ total",
 messageSends: [],
@@ -1058,9 +1041,8 @@ selector: "total:",
 protocol: 'accessing',
 fn: function (aNumber){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@total"]=aNumber;
-return self}, function($ctx1) {$ctx1.fill(self,"total:",{aNumber:aNumber},smalltalk.TestResult)})},
+return self},
 args: ["aNumber"],
 source: "total: aNumber\x0a\x09total := aNumber",
 messageSends: [],
@@ -1078,11 +1060,10 @@ selector: "announcer",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@announcer"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"announcer",{},smalltalk.TestSuiteRunner)})},
+},
 args: [],
 source: "announcer\x0a\x09^ announcer",
 messageSends: [],
@@ -1150,11 +1131,10 @@ selector: "result",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@result"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"result",{},smalltalk.TestSuiteRunner)})},
+},
 args: [],
 source: "result\x0a\x09^ result",
 messageSends: [],
@@ -1203,9 +1183,8 @@ selector: "suite:",
 protocol: 'accessing',
 fn: function (aCollection){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@suite"]=aCollection;
-return self}, function($ctx1) {$ctx1.fill(self,"suite:",{aCollection:aCollection},smalltalk.TestSuiteRunner)})},
+return self},
 args: ["aCollection"],
 source: "suite: aCollection\x0a\x09suite := aCollection",
 messageSends: [],

+ 3 - 6
js/Spaces.js

@@ -99,11 +99,10 @@ selector: "frame",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 var $1;
 $1=self["@frame"];
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"frame",{},smalltalk.ObjectSpace)})},
+},
 args: [],
 source: "frame\x0a\x09^ frame",
 messageSends: [],
@@ -152,9 +151,8 @@ selector: "release",
 protocol: 'releasing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 self["@frame"]=nil;
-return self}, function($ctx1) {$ctx1.fill(self,"release",{},smalltalk.ObjectSpace)})},
+return self},
 args: [],
 source: "release\x0a\x09frame := nil",
 messageSends: [],
@@ -208,9 +206,8 @@ selector: "messageText",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return smalltalk.withContext(function($ctx1) { 
 return "The ObjectSpace is not connected";
-}, function($ctx1) {$ctx1.fill(self,"messageText",{},smalltalk.ObjectSpaceConnectionError)})},
+},
 args: [],
 source: "messageText\x0a\x09^ 'The ObjectSpace is not connected'",
 messageSends: [],

+ 16 - 0
st/Compiler-AST.st

@@ -162,6 +162,18 @@ isVariableNode
 	^ false
 !
 
+requiresSmalltalkContext
+	"Answer true if the receiver requires a smalltalk context.
+	Only send nodes require a context.
+	
+	If no node requires a context, the method will be compiled without one.
+	See `IRJSTranslator` and `JSStream` for context creation"
+	
+	^ (self nodes 
+		detect: [ :each | each requiresSmalltalkContext ]
+		ifNone: [ nil ]) notNil
+!
+
 stopOnStepping
 	^ false
 !
@@ -563,6 +575,10 @@ isSendNode
 	^ true
 !
 
+requiresSmalltalkContext
+	^ true
+!
+
 shouldBeAliased
 	"Because we keep track of send indexes, some send nodes need additional care for aliasing. 
 	See IRJSVisitor >> visitIRSend:"

+ 12 - 1
st/Compiler-IR.st

@@ -183,6 +183,7 @@ visitMethodNode: aNode
 		selector: aNode selector;
 		sendIndexes: aNode sendIndexes;
 		superSends: aNode superSends;
+		requiresSmalltalkContext: aNode requiresSmalltalkContext;
 		classReferences: aNode classReferences;
 		scope: aNode scope;
 		yourself).
@@ -473,7 +474,7 @@ accept: aVisitor
 ! !
 
 IRClosureInstruction subclass: #IRMethod
-	instanceVariableNames: 'theClass source selector classReferences sendIndexes superSends internalVariables'
+	instanceVariableNames: 'theClass source selector classReferences sendIndexes superSends requiresSmalltalkContext internalVariables'
 	package: 'Compiler-IR'!
 !IRMethod commentStamp!
 I am a method instruction!
@@ -504,6 +505,14 @@ method
 	^ self
 !
 
+requiresSmalltalkContext
+	^ requiresSmalltalkContext ifNil: [ false ]
+!
+
+requiresSmalltalkContext: anObject
+	requiresSmalltalkContext := anObject
+!
+
 selector
 	^ selector
 !
@@ -1147,6 +1156,8 @@ nextPutClosureWith: aBlock arguments: anArray
 !
 
 nextPutContextFor: aMethod during: aBlock
+	aMethod requiresSmalltalkContext ifFalse: [ ^ aBlock value ].
+	
 	self
 		nextPutAll: 'return smalltalk.withContext(function(', aMethod scope alias, ') { '; lf.
 	aBlock value.

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