Browse Source

Amber with new compiler; adapted and recompiled.

Herbert Vojčík 11 năm trước cách đây
mục cha
commit
412b599cd3

+ 1 - 1
demo.html

@@ -14,7 +14,7 @@
             $(function() {
                 smalltalk.Browser._openOn_(smalltalk.App);
                 AppEntity = smalltalk.App._new();
-                smalltalk.Trapped._start_(AppEntity); // any number of args
+                smalltalk.Trapped._start_([AppEntity]);
             });
         }
     });

+ 221 - 193
lib/js/Trapped-Backend.deploy.js

@@ -6,8 +6,8 @@ smalltalk.method({
 selector: "getBlock:",
 fn: function (aBlock){
 var self=this;
-self["@getBlock"]=aBlock;
-return self}
+return smalltalk.withContext(function($ctx1) { 
self["@getBlock"]=aBlock;
+return self}, function($ctx1) {$ctx1.fill(self,"getBlock:",{aBlock:aBlock}, smalltalk.EavModel)})}
 }),
 smalltalk.EavModel);
 
@@ -17,14 +17,14 @@ smalltalk.method({
 selector: "initialize",
 fn: function (){
 var self=this;
-smalltalk.send(self,"_initialize",[],smalltalk.Object);
+return smalltalk.withContext(function($ctx1) { 
smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
 self["@getBlock"]=(function(){
-return smalltalk.send(self,"_error_",["No getter block."]);
-});
+return smalltalk.withContext(function($ctx2) {
return _st(self)._error_("No getter block.");
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
 self["@putBlock"]=(function(){
-return smalltalk.send(self,"_error_",["No putter block."]);
-});
-return self}
+return smalltalk.withContext(function($ctx2) {
return _st(self)._error_("No putter block.");
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
+return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.EavModel)})}
 }),
 smalltalk.EavModel);
 
@@ -34,10 +34,10 @@ smalltalk.method({
 selector: "on:",
 fn: function (anObject){
 var self=this;
-var $1;
-$1=smalltalk.send(self["@getBlock"],"_value_",[anObject]);
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=_st(self["@getBlock"])._value_(anObject);
 return $1;
-}
+}, function($ctx1) {$ctx1.fill(self,"on:",{anObject:anObject}, smalltalk.EavModel)})}
 }),
 smalltalk.EavModel);
 
@@ -47,10 +47,10 @@ smalltalk.method({
 selector: "on:put:",
 fn: function (anObject,anObject2){
 var self=this;
-var $1;
-$1=smalltalk.send(self["@putBlock"],"_value_value_",[anObject,anObject2]);
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=_st(self["@putBlock"])._value_value_(anObject,anObject2);
 return $1;
-}
+}, function($ctx1) {$ctx1.fill(self,"on:put:",{anObject:anObject,anObject2:anObject2}, smalltalk.EavModel)})}
 }),
 smalltalk.EavModel);
 
@@ -60,8 +60,8 @@ smalltalk.method({
 selector: "putBlock:",
 fn: function (aBlock){
 var self=this;
-self["@putBlock"]=aBlock;
-return self}
+return smalltalk.withContext(function($ctx1) { 
self["@putBlock"]=aBlock;
+return self}, function($ctx1) {$ctx1.fill(self,"putBlock:",{aBlock:aBlock}, smalltalk.EavModel)})}
 }),
 smalltalk.EavModel);
 
@@ -75,9 +75,9 @@ selector: "model:modify:",
 fn: function (anEavModel,aBlock){
 var self=this;
 var newValue;
-newValue=smalltalk.send(aBlock,"_value_",[smalltalk.send(anEavModel,"_on_",[self])]);
-smalltalk.send(anEavModel,"_on_put_",[self,smalltalk.send(newValue,"_deepCopy",[])]);
-return self}
+return smalltalk.withContext(function($ctx1) { 
newValue=_st(aBlock)._value_(_st(anEavModel)._on_(self));
+_st(anEavModel)._on_put_(self,_st(newValue)._deepCopy());
+return self}, function($ctx1) {$ctx1.fill(self,"model:modify:",{anEavModel:anEavModel,aBlock:aBlock,newValue:newValue}, smalltalk.Isolator)})}
 }),
 smalltalk.Isolator);
 
@@ -87,8 +87,8 @@ smalltalk.method({
 selector: "model:read:",
 fn: function (anEavModel,aBlock){
 var self=this;
-smalltalk.send(aBlock,"_value_",[smalltalk.send(smalltalk.send(anEavModel,"_on_",[self]),"_deepCopy",[])]);
-return self}
+return smalltalk.withContext(function($ctx1) { 
_st(aBlock)._value_(_st(_st(anEavModel)._on_(self))._deepCopy());
+return self}, function($ctx1) {$ctx1.fill(self,"model:read:",{anEavModel:anEavModel,aBlock:aBlock}, smalltalk.Isolator)})}
 }),
 smalltalk.Isolator);
 
@@ -98,8 +98,10 @@ smalltalk.method({
 selector: "root",
 fn: function (){
 var self=this;
-return self["@root"];
-}
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=self["@root"];
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"root",{}, smalltalk.Isolator)})}
 }),
 smalltalk.Isolator);
 
@@ -109,8 +111,8 @@ smalltalk.method({
 selector: "root:",
 fn: function (anObject){
 var self=this;
-self["@root"]=anObject;
-return self}
+return smalltalk.withContext(function($ctx1) { 
self["@root"]=anObject;
+return self}, function($ctx1) {$ctx1.fill(self,"root:",{anObject:anObject}, smalltalk.Isolator)})}
 }),
 smalltalk.Isolator);
 
@@ -121,10 +123,10 @@ smalltalk.method({
 selector: "on:",
 fn: function (anObject){
 var self=this;
-var $1;
-$1=smalltalk.send(smalltalk.send(self,"_new",[]),"_root_",[anObject]);
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=_st(_st(self)._new())._root_(anObject);
 return $1;
-}
+}, function($ctx1) {$ctx1.fill(self,"on:",{anObject:anObject}, smalltalk.Isolator.klass)})}
 }),
 smalltalk.Isolator.klass);
 
@@ -136,19 +138,21 @@ smalltalk.method({
 selector: "changed:",
 fn: function (key){
 var self=this;
-var $1;
 var needsToRun;
+return smalltalk.withContext(function($ctx1) { 
var $1,$3,$2;
 needsToRun=false;
-smalltalk.send(self,"_do_",[(function(each){
-$1=smalltalk.send(each,"_accepts_",[key]);
-if(smalltalk.assert($1)){
-smalltalk.send(each,"_flag",[]);
+$1=self;
+$2=(function(each){
+return smalltalk.withContext(function($ctx2) {
$3=_st(each)._accepts_(key);
+if(smalltalk.assert($3)){
+_st(each)._flag();
 needsToRun=true;
 return needsToRun;
 };
-})]);
-smalltalk.send(self,"_dirty_",[needsToRun]);
-return self}
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})});
+_st($1)._do_($2);
+_st(self)._dirty_(needsToRun);
+return self}, function($ctx1) {$ctx1.fill(self,"changed:",{key:key,needsToRun:needsToRun}, smalltalk.KeyedPubSubBase)})}
 }),
 smalltalk.KeyedPubSubBase);
 
@@ -158,12 +162,14 @@ smalltalk.method({
 selector: "dirty:",
 fn: function (aBoolean){
 var self=this;
-if(smalltalk.assert(aBoolean)){
-smalltalk.send((function(){
-return smalltalk.send(self,"_run",[]);
-}),"_fork",[]);
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=aBoolean;
+if(smalltalk.assert($1)){
+_st((function(){
+return smalltalk.withContext(function($ctx2) {
return _st(self)._run();
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._fork();
 };
-return self}
+return self}, function($ctx1) {$ctx1.fill(self,"dirty:",{aBoolean:aBoolean}, smalltalk.KeyedPubSubBase)})}
 }),
 smalltalk.KeyedPubSubBase);
 
@@ -173,9 +179,9 @@ smalltalk.method({
 selector: "on:hook:",
 fn: function (key,aBlock){
 var self=this;
-smalltalk.send(self,"_add_",[smalltalk.send(smalltalk.send(self["@factory"],"_value_value_",[key,aBlock]),"_flag",[])]);
-smalltalk.send(self,"_dirty_",[true]);
-return self}
+return smalltalk.withContext(function($ctx1) { 
_st(self)._add_(_st(_st(self["@factory"])._value_value_(key,aBlock))._flag());
+_st(self)._dirty_(true);
+return self}, function($ctx1) {$ctx1.fill(self,"on:hook:",{key:key,aBlock:aBlock}, smalltalk.KeyedPubSubBase)})}
 }),
 smalltalk.KeyedPubSubBase);
 
@@ -185,24 +191,28 @@ smalltalk.method({
 selector: "run",
 fn: function (){
 var self=this;
-var $1,$2;
 var needsClean;
+return smalltalk.withContext(function($ctx1) { 
var $1,$3,$5,$4,$2,$6;
 needsClean=false;
-smalltalk.send(self,"_do_",[(function(each){
-$1=smalltalk.send(each,"_isFlagged",[]);
-if(smalltalk.assert($1)){
-smalltalk.send(each,"_run",[]);
-$2=smalltalk.send(each,"_isEnabled",[]);
-if(! smalltalk.assert($2)){
+$1=self;
+$2=(function(each){
+return smalltalk.withContext(function($ctx2) {
$3=_st(each)._isFlagged();
+$4=(function(){
+return smalltalk.withContext(function($ctx3) {
_st(each)._run();
+$5=_st(each)._isEnabled();
+if(! smalltalk.assert($5)){
 needsClean=true;
 return needsClean;
 };
+}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})});
+return _st($3)._ifTrue_($4);
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})});
+_st($1)._do_($2);
+$6=needsClean;
+if(smalltalk.assert($6)){
+_st(self)._clean();
 };
-})]);
-if(smalltalk.assert(needsClean)){
-smalltalk.send(self,"_clean",[]);
-};
-return self}
+return self}, function($ctx1) {$ctx1.fill(self,"run",{needsClean:needsClean}, smalltalk.KeyedPubSubBase)})}
 }),
 smalltalk.KeyedPubSubBase);
 
@@ -212,8 +222,8 @@ smalltalk.method({
 selector: "subscriptionFactory:",
 fn: function (aBlock){
 var self=this;
-self["@factory"]=aBlock;
-return self}
+return smalltalk.withContext(function($ctx1) { 
self["@factory"]=aBlock;
+return self}, function($ctx1) {$ctx1.fill(self,"subscriptionFactory:",{aBlock:aBlock}, smalltalk.KeyedPubSubBase)})}
 }),
 smalltalk.KeyedPubSubBase);
 
@@ -226,8 +236,8 @@ smalltalk.method({
 selector: "add:",
 fn: function (aSubscription){
 var self=this;
-smalltalk.send(self["@queue"],"_add_",[aSubscription]);
-return self}
+return smalltalk.withContext(function($ctx1) { 
_st(self["@queue"])._add_(aSubscription);
+return self}, function($ctx1) {$ctx1.fill(self,"add:",{aSubscription:aSubscription}, smalltalk.SimpleKeyedPubSub)})}
 }),
 smalltalk.SimpleKeyedPubSub);
 
@@ -237,10 +247,10 @@ smalltalk.method({
 selector: "clean",
 fn: function (){
 var self=this;
-self["@queue"]=smalltalk.send(self["@queue"],"_select_",[(function(each){
-return smalltalk.send(each,"_isEnabled",[]);
-})]);
-return self}
+return smalltalk.withContext(function($ctx1) { 
self["@queue"]=_st(self["@queue"])._select_((function(each){
+return smalltalk.withContext(function($ctx2) {
return _st(each)._isEnabled();
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"clean",{}, smalltalk.SimpleKeyedPubSub)})}
 }),
 smalltalk.SimpleKeyedPubSub);
 
@@ -250,8 +260,8 @@ smalltalk.method({
 selector: "do:",
 fn: function (aBlock){
 var self=this;
-smalltalk.send(self["@queue"],"_do_",[aBlock]);
-return self}
+return smalltalk.withContext(function($ctx1) { 
_st(self["@queue"])._do_(aBlock);
+return self}, function($ctx1) {$ctx1.fill(self,"do:",{aBlock:aBlock}, smalltalk.SimpleKeyedPubSub)})}
 }),
 smalltalk.SimpleKeyedPubSub);
 
@@ -261,9 +271,9 @@ smalltalk.method({
 selector: "initialize",
 fn: function (){
 var self=this;
-smalltalk.send(self,"_initialize",[],smalltalk.KeyedPubSubBase);
-self["@queue"]=smalltalk.send((smalltalk.OrderedCollection || OrderedCollection),"_new",[]);
-return self}
+return smalltalk.withContext(function($ctx1) { 
smalltalk.KeyedPubSubBase.fn.prototype._initialize.apply(_st(self), []);
+self["@queue"]=_st((smalltalk.OrderedCollection || OrderedCollection))._new();
+return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.SimpleKeyedPubSub)})}
 }),
 smalltalk.SimpleKeyedPubSub);
 
@@ -279,8 +289,8 @@ smalltalk.method({
 selector: "accepts:",
 fn: function (aKey){
 var self=this;
-smalltalk.send(self,"_subclassResponsibility",[]);
-return self}
+return smalltalk.withContext(function($ctx1) { 
_st(self)._subclassResponsibility();
+return self}, function($ctx1) {$ctx1.fill(self,"accepts:",{aKey:aKey}, smalltalk.KeyedSubscriptionBase)})}
 }),
 smalltalk.KeyedSubscriptionBase);
 
@@ -290,8 +300,8 @@ smalltalk.method({
 selector: "flag",
 fn: function (){
 var self=this;
-self["@flagged"]=true;
-return self}
+return smalltalk.withContext(function($ctx1) { 
self["@flagged"]=true;
+return self}, function($ctx1) {$ctx1.fill(self,"flag",{}, smalltalk.KeyedSubscriptionBase)})}
 }),
 smalltalk.KeyedSubscriptionBase);
 
@@ -301,11 +311,11 @@ smalltalk.method({
 selector: "initialize",
 fn: function (){
 var self=this;
-smalltalk.send(self,"_initialize",[],smalltalk.Object);
+return smalltalk.withContext(function($ctx1) { 
smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
 self["@key"]=nil;
 self["@actionBlock"]=nil;
 self["@flagged"]=false;
-return self}
+return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.KeyedSubscriptionBase)})}
 }),
 smalltalk.KeyedSubscriptionBase);
 
@@ -315,10 +325,10 @@ smalltalk.method({
 selector: "isEnabled",
 fn: function (){
 var self=this;
-var $1;
-$1=smalltalk.send(self["@actionBlock"],"_notNil",[]);
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=_st(self["@actionBlock"])._notNil();
 return $1;
-}
+}, function($ctx1) {$ctx1.fill(self,"isEnabled",{}, smalltalk.KeyedSubscriptionBase)})}
 }),
 smalltalk.KeyedSubscriptionBase);
 
@@ -328,8 +338,10 @@ smalltalk.method({
 selector: "isFlagged",
 fn: function (){
 var self=this;
-return self["@flagged"];
-}
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=self["@flagged"];
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"isFlagged",{}, smalltalk.KeyedSubscriptionBase)})}
 }),
 smalltalk.KeyedSubscriptionBase);
 
@@ -339,9 +351,9 @@ smalltalk.method({
 selector: "key:block:",
 fn: function (anObject,aBlock){
 var self=this;
-self["@key"]=anObject;
+return smalltalk.withContext(function($ctx1) { 
self["@key"]=anObject;
 self["@actionBlock"]=aBlock;
-return self}
+return self}, function($ctx1) {$ctx1.fill(self,"key:block:",{anObject:anObject,aBlock:aBlock}, smalltalk.KeyedSubscriptionBase)})}
 }),
 smalltalk.KeyedSubscriptionBase);
 
@@ -351,18 +363,18 @@ smalltalk.method({
 selector: "run",
 fn: function (){
 var self=this;
-smalltalk.send((function(){
-return smalltalk.send((function(){
-return smalltalk.send(self["@actionBlock"],"_value",[]);
-}),"_ensure_",[(function(){
-self["@flagged"]=false;
+return smalltalk.withContext(function($ctx1) { 
_st((function(){
+return smalltalk.withContext(function($ctx2) {
return _st((function(){
+return smalltalk.withContext(function($ctx3) {
return _st(self["@actionBlock"])._value();
+}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}))._ensure_((function(){
+return smalltalk.withContext(function($ctx3) {
self["@flagged"]=false;
 return self["@flagged"];
-})]);
-}),"_on_do_",[(smalltalk.KeyedPubSubUnsubscribe || KeyedPubSubUnsubscribe),(function(){
-self["@actionBlock"]=nil;
+}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._on_do_((smalltalk.KeyedPubSubUnsubscribe || KeyedPubSubUnsubscribe),(function(){
+return smalltalk.withContext(function($ctx2) {
self["@actionBlock"]=nil;
 return self["@actionBlock"];
-})]);
-return self}
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"run",{}, smalltalk.KeyedSubscriptionBase)})}
 }),
 smalltalk.KeyedSubscriptionBase);
 
@@ -375,12 +387,12 @@ smalltalk.method({
 selector: "accepts:",
 fn: function (aKey){
 var self=this;
-var $1;
-$1=smalltalk.send(smalltalk.send(smalltalk.send(aKey,"_size",[]),"__lt_eq",[smalltalk.send(self["@key"],"_size",[])]),"_and_",[(function(){
-return smalltalk.send(aKey,"__eq",[smalltalk.send(self["@key"],"_copyFrom_to_",[(1),smalltalk.send(aKey,"_size",[])])]);
-})]);
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=_st(_st(_st(aKey)._size()).__lt_eq(_st(self["@key"])._size()))._and_((function(){
+return smalltalk.withContext(function($ctx2) {
return _st(aKey).__eq(_st(self["@key"])._copyFrom_to_((1),_st(aKey)._size()));
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
 return $1;
-}
+}, function($ctx1) {$ctx1.fill(self,"accepts:",{aKey:aKey}, smalltalk.ListKeyedSubscription)})}
 }),
 smalltalk.ListKeyedSubscription);
 
@@ -393,8 +405,10 @@ smalltalk.method({
 selector: "dispatcher",
 fn: function (){
 var self=this;
-return self["@dispatcher"];
-}
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=self["@dispatcher"];
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"dispatcher",{}, smalltalk.ListKeyedEntity)})}
 }),
 smalltalk.ListKeyedEntity);
 
@@ -404,16 +418,17 @@ smalltalk.method({
 selector: "dispatcher:",
 fn: function (aDispatcher){
 var self=this;
-var $1,$2,$3;
-smalltalk.send(aDispatcher,"_subscriptionFactory_",[(function(key,block){
-$1=smalltalk.send((smalltalk.ListKeyedSubscription || ListKeyedSubscription),"_new",[]);
-smalltalk.send($1,"_key_block_",[key,block]);
-$2=smalltalk.send($1,"_yourself",[]);
-return $2;
-})]);
-$3=smalltalk.send(aDispatcher,"_yourself",[]);
-self["@dispatcher"]=$3;
-return self}
+return smalltalk.withContext(function($ctx1) { 
var $1,$2,$3,$4;
+$1=aDispatcher;
+_st($1)._subscriptionFactory_((function(key,block){
+return smalltalk.withContext(function($ctx2) {
$2=_st((smalltalk.ListKeyedSubscription || ListKeyedSubscription))._new();
+_st($2)._key_block_(key,block);
+$3=_st($2)._yourself();
+return $3;
+}, function($ctx2) {$ctx2.fillBlock({key:key,block:block},$ctx1)})}));
+$4=_st($1)._yourself();
+self["@dispatcher"]=$4;
+return self}, function($ctx1) {$ctx1.fill(self,"dispatcher:",{aDispatcher:aDispatcher}, smalltalk.ListKeyedEntity)})}
 }),
 smalltalk.ListKeyedEntity);
 
@@ -423,9 +438,9 @@ smalltalk.method({
 selector: "model:",
 fn: function (anObject){
 var self=this;
-self["@payload"]=anObject;
-smalltalk.send(smalltalk.send(self,"_dispatcher",[]),"_changed_",[[]]);
-return self}
+return smalltalk.withContext(function($ctx1) { 
self["@payload"]=anObject;
+_st(_st(self)._dispatcher())._changed_([]);
+return self}, function($ctx1) {$ctx1.fill(self,"model:",{anObject:anObject}, smalltalk.ListKeyedEntity)})}
 }),
 smalltalk.ListKeyedEntity);
 
@@ -435,10 +450,10 @@ smalltalk.method({
 selector: "watch:do:",
 fn: function (path,aBlock){
 var self=this;
-smalltalk.send(smalltalk.send(self,"_dispatcher",[]),"_on_hook_",[path,(function(){
-return smalltalk.send(self,"_read_do_",[path,aBlock]);
-})]);
-return self}
+return smalltalk.withContext(function($ctx1) { 
_st(_st(self)._dispatcher())._on_hook_(path,(function(){
+return smalltalk.withContext(function($ctx2) {
return _st(self)._read_do_(path,aBlock);
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"watch:do:",{path:path,aBlock:aBlock}, smalltalk.ListKeyedEntity)})}
 }),
 smalltalk.ListKeyedEntity);
 
@@ -451,16 +466,15 @@ smalltalk.method({
 selector: "modify:do:",
 fn: function (path,aBlock){
 var self=this;
-var newValue;
-var eavModel;
-eavModel=smalltalk.send(path,"_asEavModel",[]);
-newValue=smalltalk.send(aBlock,"_value_",[smalltalk.send(eavModel,"_on_",[self["@payload"]])]);
-smalltalk.send((function(){
-return smalltalk.send(eavModel,"_on_put_",[self["@payload"],newValue]);
-}),"_ensure_",[(function(){
-return smalltalk.send(smalltalk.send(self,"_dispatcher",[]),"_changed_",[path]);
-})]);
-return self}
+var newValue,eavModel;
+return smalltalk.withContext(function($ctx1) { 
eavModel=_st(path)._asEavModel();
+newValue=_st(aBlock)._value_(_st(eavModel)._on_(self["@payload"]));
+_st((function(){
+return smalltalk.withContext(function($ctx2) {
return _st(eavModel)._on_put_(self["@payload"],newValue);
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._ensure_((function(){
+return smalltalk.withContext(function($ctx2) {
return _st(_st(self)._dispatcher())._changed_(path);
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"modify:do:",{path:path,aBlock:aBlock,newValue:newValue,eavModel:eavModel}, smalltalk.ListKeyedDirectEntity)})}
 }),
 smalltalk.ListKeyedDirectEntity);
 
@@ -471,9 +485,9 @@ selector: "read:do:",
 fn: function (path,aBlock){
 var self=this;
 var eavModel;
-eavModel=smalltalk.send(path,"_asEavModel",[]);
-smalltalk.send(aBlock,"_value_",[smalltalk.send(eavModel,"_on_",[self["@payload"]])]);
-return self}
+return smalltalk.withContext(function($ctx1) { 
eavModel=_st(path)._asEavModel();
+_st(aBlock)._value_(_st(eavModel)._on_(self["@payload"]));
+return self}, function($ctx1) {$ctx1.fill(self,"read:do:",{path:path,aBlock:aBlock,eavModel:eavModel}, smalltalk.ListKeyedDirectEntity)})}
 }),
 smalltalk.ListKeyedDirectEntity);
 
@@ -486,8 +500,8 @@ smalltalk.method({
 selector: "model:",
 fn: function (anObject){
 var self=this;
-smalltalk.send(self,"_model_",[smalltalk.send((smalltalk.Isolator || Isolator),"_on_",[anObject])],smalltalk.ListKeyedEntity);
-return self}
+return smalltalk.withContext(function($ctx1) { 
smalltalk.ListKeyedEntity.fn.prototype._model_.apply(_st(self), [_st((smalltalk.Isolator || Isolator))._on_(anObject)]);
+return self}, function($ctx1) {$ctx1.fill(self,"model:",{anObject:anObject}, smalltalk.ListKeyedIsolatedEntity)})}
 }),
 smalltalk.ListKeyedIsolatedEntity);
 
@@ -498,13 +512,13 @@ selector: "modify:do:",
 fn: function (path,aBlock){
 var self=this;
 var eavModel;
-eavModel=smalltalk.send(smalltalk.send([smalltalk.symbolFor("root")],"__comma",[path]),"_asEavModel",[]);
-smalltalk.send((function(){
-return smalltalk.send(self["@payload"],"_model_modify_",[eavModel,aBlock]);
-}),"_ensure_",[(function(){
-return smalltalk.send(smalltalk.send(self,"_dispatcher",[]),"_changed_",[path]);
-})]);
-return self}
+return smalltalk.withContext(function($ctx1) { 
eavModel=_st(_st([smalltalk.symbolFor("root")]).__comma(path))._asEavModel();
+_st((function(){
+return smalltalk.withContext(function($ctx2) {
return _st(self["@payload"])._model_modify_(eavModel,aBlock);
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._ensure_((function(){
+return smalltalk.withContext(function($ctx2) {
return _st(_st(self)._dispatcher())._changed_(path);
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"modify:do:",{path:path,aBlock:aBlock,eavModel:eavModel}, smalltalk.ListKeyedIsolatedEntity)})}
 }),
 smalltalk.ListKeyedIsolatedEntity);
 
@@ -515,9 +529,9 @@ selector: "read:do:",
 fn: function (path,aBlock){
 var self=this;
 var eavModel;
-eavModel=smalltalk.send(smalltalk.send([smalltalk.symbolFor("root")],"__comma",[path]),"_asEavModel",[]);
-smalltalk.send(self["@payload"],"_model_read_",[eavModel,aBlock]);
-return self}
+return smalltalk.withContext(function($ctx1) { 
eavModel=_st(_st([smalltalk.symbolFor("root")]).__comma(path))._asEavModel();
+_st(self["@payload"])._model_read_(eavModel,aBlock);
+return self}, function($ctx1) {$ctx1.fill(self,"read:do:",{path:path,aBlock:aBlock,eavModel:eavModel}, smalltalk.ListKeyedIsolatedEntity)})}
 }),
 smalltalk.ListKeyedIsolatedEntity);
 
@@ -529,8 +543,8 @@ smalltalk.method({
 selector: "reverseTrapAt:",
 fn: function (anObject){
 var self=this;
-return nil;
-}
+return smalltalk.withContext(function($ctx1) { 
return nil;
+}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:",{anObject:anObject}, smalltalk.Object)})}
 }),
 smalltalk.Object);
 
@@ -540,8 +554,8 @@ smalltalk.method({
 selector: "reverseTrapAt:put:",
 fn: function (anObject,value){
 var self=this;
-smalltalk.send(self,"_error_",[smalltalk.send(smalltalk.send("Trapped cannot put at ","__comma",[smalltalk.send(smalltalk.send(self,"_class",[]),"_name",[])]),"__comma",[" type key."])]);
-return self}
+return smalltalk.withContext(function($ctx1) { 
_st(self)._error_(_st(_st("Trapped cannot put at ").__comma(_st(_st(self)._class())._name())).__comma(" type key."));
+return self}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:put:",{anObject:anObject,value:value}, smalltalk.Object)})}
 }),
 smalltalk.Object);
 
@@ -551,35 +565,49 @@ smalltalk.method({
 selector: "asEavModel",
 fn: function (){
 var self=this;
-var $1;
 var model;
-model=smalltalk.send((smalltalk.EavModel || EavModel),"_new",[]);
-smalltalk.send(model,"_getBlock_",[(function(anObject){
-return smalltalk.send(self,"_inject_into_",[anObject,(function(soFar,segment){
-if(($receiver = soFar) == nil || $receiver == undefined){
-return soFar;
+return smalltalk.withContext(function($ctx1) { 
var $1,$3,$4,$6,$5,$2,$7,$9,$11,$12,$14,$13,$10,$8,$15;
+model=_st((smalltalk.EavModel || EavModel))._new();
+$1=model;
+$2=(function(anObject){
+return smalltalk.withContext(function($ctx2) {
$3=self;
+$4=anObject;
+$5=(function(soFar,segment){
+return smalltalk.withContext(function($ctx3) {
$6=soFar;
+if(($receiver = $6) == nil || $receiver == undefined){
+return $6;
 } else {
-return smalltalk.send(segment,"_reverseTrapAt_",[soFar]);
+return _st(segment)._reverseTrapAt_(soFar);
 };
-})]);
-})]);
-$1=smalltalk.send(self,"_isEmpty",[]);
-if(! smalltalk.assert($1)){
-smalltalk.send(model,"_putBlock_",[(function(anObject,value){
+}, function($ctx3) {$ctx3.fillBlock({soFar:soFar,segment:segment},$ctx1)})});
+return _st($3)._inject_into_($4,$5);
+}, function($ctx2) {$ctx2.fillBlock({anObject:anObject},$ctx1)})});
+_st($1)._getBlock_($2);
+$7=_st(self)._isEmpty();
+$8=(function(){
+return smalltalk.withContext(function($ctx2) {
$9=model;
+$10=(function(anObject,value){
 var penultimate;
-penultimate=smalltalk.send(smalltalk.send(self,"_allButLast",[]),"_inject_into_",[anObject,(function(soFar,segment){
-if(($receiver = soFar) == nil || $receiver == undefined){
-return soFar;
+return smalltalk.withContext(function($ctx3) {
$11=_st(self)._allButLast();
+$12=anObject;
+$13=(function(soFar,segment){
+return smalltalk.withContext(function($ctx4) {
$14=soFar;
+if(($receiver = $14) == nil || $receiver == undefined){
+return $14;
 } else {
-return smalltalk.send(segment,"_reverseTrapAt_",[soFar]);
+return _st(segment)._reverseTrapAt_(soFar);
 };
-})]);
+}, function($ctx4) {$ctx4.fillBlock({soFar:soFar,segment:segment},$ctx1)})});
+penultimate=_st($11)._inject_into_($12,$13);
 penultimate;
-return smalltalk.send(smalltalk.send(self,"_last",[]),"_reverseTrapAt_put_",[penultimate,value]);
-})]);
-};
-return model;
-}
+return _st(_st(self)._last())._reverseTrapAt_put_(penultimate,value);
+}, function($ctx3) {$ctx3.fillBlock({anObject:anObject,value:value,penultimate:penultimate},$ctx1)})});
+return _st($9)._putBlock_($10);
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
+_st($7)._ifFalse_($8);
+$15=model;
+return $15;
+}, function($ctx1) {$ctx1.fill(self,"asEavModel",{model:model}, smalltalk.SequenceableCollection)})}
 }),
 smalltalk.SequenceableCollection);
 
@@ -589,12 +617,12 @@ smalltalk.method({
 selector: "reverseTrapAt:",
 fn: function (anObject){
 var self=this;
-var $1;
-$1=smalltalk.send(anObject,"_at_ifAbsent_",[self,(function(){
-return nil;
-})]);
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=_st(anObject)._at_ifAbsent_(self,(function(){
+return smalltalk.withContext(function($ctx2) {
return nil;
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
 return $1;
-}
+}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:",{anObject:anObject}, smalltalk.String)})}
 }),
 smalltalk.String);
 
@@ -604,10 +632,10 @@ smalltalk.method({
 selector: "reverseTrapAt:put:",
 fn: function (anObject,value){
 var self=this;
-var $1;
-$1=smalltalk.send(anObject,"_at_put_",[self,value]);
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=_st(anObject)._at_put_(self,value);
 return $1;
-}
+}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:put:",{anObject:anObject,value:value}, smalltalk.String)})}
 }),
 smalltalk.String);
 
@@ -617,18 +645,18 @@ smalltalk.method({
 selector: "reverseTrapAt:",
 fn: function (anObject){
 var self=this;
-var $1;
+return smalltalk.withContext(function($ctx1) { 
var $1;
 var $early={};
 try {
-$1=smalltalk.send((function(){
-return smalltalk.send(anObject,"_perform_",[self]);
-}),"_on_do_",[(smalltalk.MessageNotUnderstood || MessageNotUnderstood),(function(){
-throw $early=[nil];
-})]);
+$1=_st((function(){
+return smalltalk.withContext(function($ctx2) {
return _st(anObject)._perform_(self);
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._on_do_((smalltalk.MessageNotUnderstood || MessageNotUnderstood),(function(){
+return smalltalk.withContext(function($ctx2) {
throw $early=[nil];
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
 return $1;
 }
 catch(e) {if(e===$early)return e[0]; throw e}
-}
+}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:",{anObject:anObject}, smalltalk.Symbol)})}
 }),
 smalltalk.Symbol);
 
@@ -638,10 +666,10 @@ smalltalk.method({
 selector: "reverseTrapAt:put:",
 fn: function (anObject,value){
 var self=this;
-var $1;
-$1=smalltalk.send(anObject,"_perform_withArguments_",[smalltalk.send(smalltalk.send(self,"__comma",[":"]),"_asSymbol",[]),[value]]);
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=_st(anObject)._perform_withArguments_(_st(_st(self).__comma(":"))._asSymbol(),[value]);
 return $1;
-}
+}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:put:",{anObject:anObject,value:value}, smalltalk.Symbol)})}
 }),
 smalltalk.Symbol);
 
@@ -651,12 +679,12 @@ smalltalk.method({
 selector: "reverseTrapAt:",
 fn: function (anObject){
 var self=this;
-var $1;
-$1=smalltalk.send(anObject,"_at_ifAbsent_",[self,(function(){
-return nil;
-})]);
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=_st(anObject)._at_ifAbsent_(self,(function(){
+return smalltalk.withContext(function($ctx2) {
return nil;
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
 return $1;
-}
+}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:",{anObject:anObject}, smalltalk.Number)})}
 }),
 smalltalk.Number);
 
@@ -666,10 +694,10 @@ smalltalk.method({
 selector: "reverseTrapAt:put:",
 fn: function (anObject,value){
 var self=this;
-var $1;
-$1=smalltalk.send(anObject,"_at_put_",[self,value]);
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=_st(anObject)._at_put_(self,value);
 return $1;
-}
+}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:put:",{anObject:anObject,value:value}, smalltalk.Number)})}
 }),
 smalltalk.Number);
 

+ 221 - 193
lib/js/Trapped-Backend.js

@@ -8,8 +8,8 @@ selector: "getBlock:",
 category: 'accessing',
 fn: function (aBlock){
 var self=this;
-self["@getBlock"]=aBlock;
-return self},
+return smalltalk.withContext(function($ctx1) { 
self["@getBlock"]=aBlock;
+return self}, function($ctx1) {$ctx1.fill(self,"getBlock:",{aBlock:aBlock}, smalltalk.EavModel)})},
 args: ["aBlock"],
 source: "getBlock: aBlock\x0a\x0agetBlock := aBlock",
 messageSends: [],
@@ -24,14 +24,14 @@ selector: "initialize",
 category: 'initialization',
 fn: function (){
 var self=this;
-smalltalk.send(self,"_initialize",[],smalltalk.Object);
+return smalltalk.withContext(function($ctx1) { 
smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
 self["@getBlock"]=(function(){
-return smalltalk.send(self,"_error_",["No getter block."]);
-});
+return smalltalk.withContext(function($ctx2) {
return _st(self)._error_("No getter block.");
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
 self["@putBlock"]=(function(){
-return smalltalk.send(self,"_error_",["No putter block."]);
-});
-return self},
+return smalltalk.withContext(function($ctx2) {
return _st(self)._error_("No putter block.");
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
+return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.EavModel)})},
 args: [],
 source: "initialize\x0a\x09super initialize.\x0a\x09getBlock := [ self error: 'No getter block.' ].\x0a\x09putBlock := [ self error: 'No putter block.' ].",
 messageSends: ["initialize", "error:"],
@@ -46,10 +46,10 @@ selector: "on:",
 category: 'accessing',
 fn: function (anObject){
 var self=this;
-var $1;
-$1=smalltalk.send(self["@getBlock"],"_value_",[anObject]);
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=_st(self["@getBlock"])._value_(anObject);
 return $1;
-},
+}, function($ctx1) {$ctx1.fill(self,"on:",{anObject:anObject}, smalltalk.EavModel)})},
 args: ["anObject"],
 source: "on: anObject\x0a\x22Returns value of model applied on object\x22\x0a\x0a^getBlock value: anObject",
 messageSends: ["value:"],
@@ -64,10 +64,10 @@ selector: "on:put:",
 category: 'accessing',
 fn: function (anObject,anObject2){
 var self=this;
-var $1;
-$1=smalltalk.send(self["@putBlock"],"_value_value_",[anObject,anObject2]);
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=_st(self["@putBlock"])._value_value_(anObject,anObject2);
 return $1;
-},
+}, function($ctx1) {$ctx1.fill(self,"on:put:",{anObject:anObject,anObject2:anObject2}, smalltalk.EavModel)})},
 args: ["anObject", "anObject2"],
 source: "on: anObject put: anObject2\x0a\x22Puts a value via model applied on object\x22\x0a\x0a^putBlock value: anObject value: anObject2",
 messageSends: ["value:value:"],
@@ -82,8 +82,8 @@ selector: "putBlock:",
 category: 'accessing',
 fn: function (aBlock){
 var self=this;
-self["@putBlock"]=aBlock;
-return self},
+return smalltalk.withContext(function($ctx1) { 
self["@putBlock"]=aBlock;
+return self}, function($ctx1) {$ctx1.fill(self,"putBlock:",{aBlock:aBlock}, smalltalk.EavModel)})},
 args: ["aBlock"],
 source: "putBlock: aBlock\x0a\x0aputBlock := aBlock",
 messageSends: [],
@@ -102,9 +102,9 @@ category: 'action',
 fn: function (anEavModel,aBlock){
 var self=this;
 var newValue;
-newValue=smalltalk.send(aBlock,"_value_",[smalltalk.send(anEavModel,"_on_",[self])]);
-smalltalk.send(anEavModel,"_on_put_",[self,smalltalk.send(newValue,"_deepCopy",[])]);
-return self},
+return smalltalk.withContext(function($ctx1) { 
newValue=_st(aBlock)._value_(_st(anEavModel)._on_(self));
+_st(anEavModel)._on_put_(self,_st(newValue)._deepCopy());
+return self}, function($ctx1) {$ctx1.fill(self,"model:modify:",{anEavModel:anEavModel,aBlock:aBlock,newValue:newValue}, smalltalk.Isolator)})},
 args: ["anEavModel", "aBlock"],
 source: "model: anEavModel modify: aBlock\x0a\x0a| newValue |\x0anewValue := aBlock value: (anEavModel on: self).\x0aanEavModel on: self put: newValue deepCopy\x0a",
 messageSends: ["value:", "on:", "on:put:", "deepCopy"],
@@ -119,8 +119,8 @@ selector: "model:read:",
 category: 'action',
 fn: function (anEavModel,aBlock){
 var self=this;
-smalltalk.send(aBlock,"_value_",[smalltalk.send(smalltalk.send(anEavModel,"_on_",[self]),"_deepCopy",[])]);
-return self},
+return smalltalk.withContext(function($ctx1) { 
_st(aBlock)._value_(_st(_st(anEavModel)._on_(self))._deepCopy());
+return self}, function($ctx1) {$ctx1.fill(self,"model:read:",{anEavModel:anEavModel,aBlock:aBlock}, smalltalk.Isolator)})},
 args: ["anEavModel", "aBlock"],
 source: "model: anEavModel read: aBlock\x0a\x0aaBlock value: (anEavModel on: self) deepCopy",
 messageSends: ["value:", "deepCopy", "on:"],
@@ -135,8 +135,10 @@ selector: "root",
 category: 'accessing',
 fn: function (){
 var self=this;
-return self["@root"];
-},
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=self["@root"];
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"root",{}, smalltalk.Isolator)})},
 args: [],
 source: "root\x0a\x0a^root\x0a",
 messageSends: [],
@@ -151,8 +153,8 @@ selector: "root:",
 category: 'accessing',
 fn: function (anObject){
 var self=this;
-self["@root"]=anObject;
-return self},
+return smalltalk.withContext(function($ctx1) { 
self["@root"]=anObject;
+return self}, function($ctx1) {$ctx1.fill(self,"root:",{anObject:anObject}, smalltalk.Isolator)})},
 args: ["anObject"],
 source: "root: anObject\x0a\x0aroot := anObject",
 messageSends: [],
@@ -168,10 +170,10 @@ selector: "on:",
 category: 'instance creation',
 fn: function (anObject){
 var self=this;
-var $1;
-$1=smalltalk.send(smalltalk.send(self,"_new",[]),"_root_",[anObject]);
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=_st(_st(self)._new())._root_(anObject);
 return $1;
-},
+}, function($ctx1) {$ctx1.fill(self,"on:",{anObject:anObject}, smalltalk.Isolator.klass)})},
 args: ["anObject"],
 source: "on: anObject\x0a^self new root: anObject",
 messageSends: ["root:", "new"],
@@ -189,19 +191,21 @@ selector: "changed:",
 category: 'action',
 fn: function (key){
 var self=this;
-var $1;
 var needsToRun;
+return smalltalk.withContext(function($ctx1) { 
var $1,$3,$2;
 needsToRun=false;
-smalltalk.send(self,"_do_",[(function(each){
-$1=smalltalk.send(each,"_accepts_",[key]);
-if(smalltalk.assert($1)){
-smalltalk.send(each,"_flag",[]);
+$1=self;
+$2=(function(each){
+return smalltalk.withContext(function($ctx2) {
$3=_st(each)._accepts_(key);
+if(smalltalk.assert($3)){
+_st(each)._flag();
 needsToRun=true;
 return needsToRun;
 };
-})]);
-smalltalk.send(self,"_dirty_",[needsToRun]);
-return self},
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})});
+_st($1)._do_($2);
+_st(self)._dirty_(needsToRun);
+return self}, function($ctx1) {$ctx1.fill(self,"changed:",{key:key,needsToRun:needsToRun}, smalltalk.KeyedPubSubBase)})},
 args: ["key"],
 source: "changed: key\x0a\x09| needsToRun |\x0a    needsToRun := false.\x0a\x09self do: [ :each |\x0a\x09\x09(each accepts: key) ifTrue: [\x0a\x09\x09\x09each flag.\x0a            needsToRun := true.\x0a\x09\x09]\x0a\x09].\x0a\x09self dirty: needsToRun",
 messageSends: ["do:", "ifTrue:", "flag", "accepts:", "dirty:"],
@@ -216,12 +220,14 @@ selector: "dirty:",
 category: 'action',
 fn: function (aBoolean){
 var self=this;
-if(smalltalk.assert(aBoolean)){
-smalltalk.send((function(){
-return smalltalk.send(self,"_run",[]);
-}),"_fork",[]);
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=aBoolean;
+if(smalltalk.assert($1)){
+_st((function(){
+return smalltalk.withContext(function($ctx2) {
return _st(self)._run();
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._fork();
 };
-return self},
+return self}, function($ctx1) {$ctx1.fill(self,"dirty:",{aBoolean:aBoolean}, smalltalk.KeyedPubSubBase)})},
 args: ["aBoolean"],
 source: "dirty: aBoolean\x0a\x09aBoolean ifTrue: [[ self run ] fork]",
 messageSends: ["ifTrue:", "fork", "run"],
@@ -236,9 +242,9 @@ selector: "on:hook:",
 category: 'action',
 fn: function (key,aBlock){
 var self=this;
-smalltalk.send(self,"_add_",[smalltalk.send(smalltalk.send(self["@factory"],"_value_value_",[key,aBlock]),"_flag",[])]);
-smalltalk.send(self,"_dirty_",[true]);
-return self},
+return smalltalk.withContext(function($ctx1) { 
_st(self)._add_(_st(_st(self["@factory"])._value_value_(key,aBlock))._flag());
+_st(self)._dirty_(true);
+return self}, function($ctx1) {$ctx1.fill(self,"on:hook:",{key:key,aBlock:aBlock}, smalltalk.KeyedPubSubBase)})},
 args: ["key", "aBlock"],
 source: "on: key hook: aBlock\x0a\x09self add: (factory value: key value: aBlock) flag.\x0a   \x09self dirty: true",
 messageSends: ["add:", "flag", "value:value:", "dirty:"],
@@ -253,24 +259,28 @@ selector: "run",
 category: 'action',
 fn: function (){
 var self=this;
-var $1,$2;
 var needsClean;
+return smalltalk.withContext(function($ctx1) { 
var $1,$3,$5,$4,$2,$6;
 needsClean=false;
-smalltalk.send(self,"_do_",[(function(each){
-$1=smalltalk.send(each,"_isFlagged",[]);
-if(smalltalk.assert($1)){
-smalltalk.send(each,"_run",[]);
-$2=smalltalk.send(each,"_isEnabled",[]);
-if(! smalltalk.assert($2)){
+$1=self;
+$2=(function(each){
+return smalltalk.withContext(function($ctx2) {
$3=_st(each)._isFlagged();
+$4=(function(){
+return smalltalk.withContext(function($ctx3) {
_st(each)._run();
+$5=_st(each)._isEnabled();
+if(! smalltalk.assert($5)){
 needsClean=true;
 return needsClean;
 };
+}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})});
+return _st($3)._ifTrue_($4);
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})});
+_st($1)._do_($2);
+$6=needsClean;
+if(smalltalk.assert($6)){
+_st(self)._clean();
 };
-})]);
-if(smalltalk.assert(needsClean)){
-smalltalk.send(self,"_clean",[]);
-};
-return self},
+return self}, function($ctx1) {$ctx1.fill(self,"run",{needsClean:needsClean}, smalltalk.KeyedPubSubBase)})},
 args: [],
 source: "run\x0a\x09| needsClean |\x0a    needsClean := false.\x0a\x09self do: [ :each |\x0a\x09\x09each isFlagged ifTrue: [\x0a            each run.\x0a            each isEnabled ifFalse: [ needsClean := true ]\x0a        ]\x0a\x09].\x0a    needsClean ifTrue: [ self clean ]",
 messageSends: ["do:", "ifTrue:", "run", "ifFalse:", "isEnabled", "isFlagged", "clean"],
@@ -285,8 +295,8 @@ selector: "subscriptionFactory:",
 category: 'action',
 fn: function (aBlock){
 var self=this;
-self["@factory"]=aBlock;
-return self},
+return smalltalk.withContext(function($ctx1) { 
self["@factory"]=aBlock;
+return self}, function($ctx1) {$ctx1.fill(self,"subscriptionFactory:",{aBlock:aBlock}, smalltalk.KeyedPubSubBase)})},
 args: ["aBlock"],
 source: "subscriptionFactory: aBlock\x0a    factory := aBlock",
 messageSends: [],
@@ -304,8 +314,8 @@ selector: "add:",
 category: 'accessing',
 fn: function (aSubscription){
 var self=this;
-smalltalk.send(self["@queue"],"_add_",[aSubscription]);
-return self},
+return smalltalk.withContext(function($ctx1) { 
_st(self["@queue"])._add_(aSubscription);
+return self}, function($ctx1) {$ctx1.fill(self,"add:",{aSubscription:aSubscription}, smalltalk.SimpleKeyedPubSub)})},
 args: ["aSubscription"],
 source: "add: aSubscription\x0a\x09queue add: aSubscription.\x0a",
 messageSends: ["add:"],
@@ -320,10 +330,10 @@ selector: "clean",
 category: 'bookkeeping',
 fn: function (){
 var self=this;
-self["@queue"]=smalltalk.send(self["@queue"],"_select_",[(function(each){
-return smalltalk.send(each,"_isEnabled",[]);
-})]);
-return self},
+return smalltalk.withContext(function($ctx1) { 
self["@queue"]=_st(self["@queue"])._select_((function(each){
+return smalltalk.withContext(function($ctx2) {
return _st(each)._isEnabled();
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"clean",{}, smalltalk.SimpleKeyedPubSub)})},
 args: [],
 source: "clean\x0a\x09queue := queue select: [ :each | each isEnabled ]",
 messageSends: ["select:", "isEnabled"],
@@ -338,8 +348,8 @@ selector: "do:",
 category: 'enumeration',
 fn: function (aBlock){
 var self=this;
-smalltalk.send(self["@queue"],"_do_",[aBlock]);
-return self},
+return smalltalk.withContext(function($ctx1) { 
_st(self["@queue"])._do_(aBlock);
+return self}, function($ctx1) {$ctx1.fill(self,"do:",{aBlock:aBlock}, smalltalk.SimpleKeyedPubSub)})},
 args: ["aBlock"],
 source: "do: aBlock\x0a\x09queue do: aBlock",
 messageSends: ["do:"],
@@ -354,9 +364,9 @@ selector: "initialize",
 category: 'initialization',
 fn: function (){
 var self=this;
-smalltalk.send(self,"_initialize",[],smalltalk.KeyedPubSubBase);
-self["@queue"]=smalltalk.send((smalltalk.OrderedCollection || OrderedCollection),"_new",[]);
-return self},
+return smalltalk.withContext(function($ctx1) { 
smalltalk.KeyedPubSubBase.fn.prototype._initialize.apply(_st(self), []);
+self["@queue"]=_st((smalltalk.OrderedCollection || OrderedCollection))._new();
+return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.SimpleKeyedPubSub)})},
 args: [],
 source: "initialize\x0a    super initialize.\x0a\x09queue := OrderedCollection new",
 messageSends: ["initialize", "new"],
@@ -378,8 +388,8 @@ selector: "accepts:",
 category: 'testing',
 fn: function (aKey){
 var self=this;
-smalltalk.send(self,"_subclassResponsibility",[]);
-return self},
+return smalltalk.withContext(function($ctx1) { 
_st(self)._subclassResponsibility();
+return self}, function($ctx1) {$ctx1.fill(self,"accepts:",{aKey:aKey}, smalltalk.KeyedSubscriptionBase)})},
 args: ["aKey"],
 source: "accepts: aKey\x0a    \x22Should return true if change for aKey is relevant for this subscription\x22\x0a    self subclassResponsibility",
 messageSends: ["subclassResponsibility"],
@@ -394,8 +404,8 @@ selector: "flag",
 category: 'accessing',
 fn: function (){
 var self=this;
-self["@flagged"]=true;
-return self},
+return smalltalk.withContext(function($ctx1) { 
self["@flagged"]=true;
+return self}, function($ctx1) {$ctx1.fill(self,"flag",{}, smalltalk.KeyedSubscriptionBase)})},
 args: [],
 source: "flag\x0a\x09flagged := true",
 messageSends: [],
@@ -410,11 +420,11 @@ selector: "initialize",
 category: 'initialization',
 fn: function (){
 var self=this;
-smalltalk.send(self,"_initialize",[],smalltalk.Object);
+return smalltalk.withContext(function($ctx1) { 
smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
 self["@key"]=nil;
 self["@actionBlock"]=nil;
 self["@flagged"]=false;
-return self},
+return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.KeyedSubscriptionBase)})},
 args: [],
 source: "initialize\x0a\x09super initialize.\x0a    key := nil.\x0a    actionBlock := nil.\x0a    flagged := false.",
 messageSends: ["initialize"],
@@ -429,10 +439,10 @@ selector: "isEnabled",
 category: 'testing',
 fn: function (){
 var self=this;
-var $1;
-$1=smalltalk.send(self["@actionBlock"],"_notNil",[]);
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=_st(self["@actionBlock"])._notNil();
 return $1;
-},
+}, function($ctx1) {$ctx1.fill(self,"isEnabled",{}, smalltalk.KeyedSubscriptionBase)})},
 args: [],
 source: "isEnabled\x0a\x09^actionBlock notNil",
 messageSends: ["notNil"],
@@ -447,8 +457,10 @@ selector: "isFlagged",
 category: 'testing',
 fn: function (){
 var self=this;
-return self["@flagged"];
-},
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=self["@flagged"];
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"isFlagged",{}, smalltalk.KeyedSubscriptionBase)})},
 args: [],
 source: "isFlagged\x0a\x09^flagged",
 messageSends: [],
@@ -463,9 +475,9 @@ selector: "key:block:",
 category: 'accessing',
 fn: function (anObject,aBlock){
 var self=this;
-self["@key"]=anObject;
+return smalltalk.withContext(function($ctx1) { 
self["@key"]=anObject;
 self["@actionBlock"]=aBlock;
-return self},
+return self}, function($ctx1) {$ctx1.fill(self,"key:block:",{anObject:anObject,aBlock:aBlock}, smalltalk.KeyedSubscriptionBase)})},
 args: ["anObject", "aBlock"],
 source: "key: anObject block: aBlock\x0a\x09key := anObject.\x0a    actionBlock := aBlock",
 messageSends: [],
@@ -480,18 +492,18 @@ selector: "run",
 category: 'action',
 fn: function (){
 var self=this;
-smalltalk.send((function(){
-return smalltalk.send((function(){
-return smalltalk.send(self["@actionBlock"],"_value",[]);
-}),"_ensure_",[(function(){
-self["@flagged"]=false;
+return smalltalk.withContext(function($ctx1) { 
_st((function(){
+return smalltalk.withContext(function($ctx2) {
return _st((function(){
+return smalltalk.withContext(function($ctx3) {
return _st(self["@actionBlock"])._value();
+}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}))._ensure_((function(){
+return smalltalk.withContext(function($ctx3) {
self["@flagged"]=false;
 return self["@flagged"];
-})]);
-}),"_on_do_",[(smalltalk.KeyedPubSubUnsubscribe || KeyedPubSubUnsubscribe),(function(){
-self["@actionBlock"]=nil;
+}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._on_do_((smalltalk.KeyedPubSubUnsubscribe || KeyedPubSubUnsubscribe),(function(){
+return smalltalk.withContext(function($ctx2) {
self["@actionBlock"]=nil;
 return self["@actionBlock"];
-})]);
-return self},
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"run",{}, smalltalk.KeyedSubscriptionBase)})},
 args: [],
 source: "run\x0a\x09[[ actionBlock value ] ensure: [ flagged := false ]]\x0a    on: KeyedPubSubUnsubscribe do: [ actionBlock := nil ]",
 messageSends: ["on:do:", "ensure:", "value"],
@@ -509,12 +521,12 @@ selector: "accepts:",
 category: 'testing',
 fn: function (aKey){
 var self=this;
-var $1;
-$1=smalltalk.send(smalltalk.send(smalltalk.send(aKey,"_size",[]),"__lt_eq",[smalltalk.send(self["@key"],"_size",[])]),"_and_",[(function(){
-return smalltalk.send(aKey,"__eq",[smalltalk.send(self["@key"],"_copyFrom_to_",[(1),smalltalk.send(aKey,"_size",[])])]);
-})]);
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=_st(_st(_st(aKey)._size()).__lt_eq(_st(self["@key"])._size()))._and_((function(){
+return smalltalk.withContext(function($ctx2) {
return _st(aKey).__eq(_st(self["@key"])._copyFrom_to_((1),_st(aKey)._size()));
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
 return $1;
-},
+}, function($ctx1) {$ctx1.fill(self,"accepts:",{aKey:aKey}, smalltalk.ListKeyedSubscription)})},
 args: ["aKey"],
 source: "accepts: aKey\x0a    ^aKey size <= key size and: [aKey = (key copyFrom: 1 to: aKey size)]",
 messageSends: ["and:", "=", "copyFrom:to:", "size", "<="],
@@ -533,8 +545,10 @@ selector: "dispatcher",
 category: 'accessing',
 fn: function (){
 var self=this;
-return self["@dispatcher"];
-},
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=self["@dispatcher"];
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"dispatcher",{}, smalltalk.ListKeyedEntity)})},
 args: [],
 source: "dispatcher\x0a\x09^dispatcher",
 messageSends: [],
@@ -549,16 +563,17 @@ selector: "dispatcher:",
 category: 'accessing',
 fn: function (aDispatcher){
 var self=this;
-var $1,$2,$3;
-smalltalk.send(aDispatcher,"_subscriptionFactory_",[(function(key,block){
-$1=smalltalk.send((smalltalk.ListKeyedSubscription || ListKeyedSubscription),"_new",[]);
-smalltalk.send($1,"_key_block_",[key,block]);
-$2=smalltalk.send($1,"_yourself",[]);
-return $2;
-})]);
-$3=smalltalk.send(aDispatcher,"_yourself",[]);
-self["@dispatcher"]=$3;
-return self},
+return smalltalk.withContext(function($ctx1) { 
var $1,$2,$3,$4;
+$1=aDispatcher;
+_st($1)._subscriptionFactory_((function(key,block){
+return smalltalk.withContext(function($ctx2) {
$2=_st((smalltalk.ListKeyedSubscription || ListKeyedSubscription))._new();
+_st($2)._key_block_(key,block);
+$3=_st($2)._yourself();
+return $3;
+}, function($ctx2) {$ctx2.fillBlock({key:key,block:block},$ctx1)})}));
+$4=_st($1)._yourself();
+self["@dispatcher"]=$4;
+return self}, function($ctx1) {$ctx1.fill(self,"dispatcher:",{aDispatcher:aDispatcher}, smalltalk.ListKeyedEntity)})},
 args: ["aDispatcher"],
 source: "dispatcher: aDispatcher\x0a\x09dispatcher := aDispatcher\x0a        subscriptionFactory: [ :key :block | ListKeyedSubscription new key: key block: block; yourself ];\x0a        yourself",
 messageSends: ["subscriptionFactory:", "key:block:", "new", "yourself"],
@@ -573,9 +588,9 @@ selector: "model:",
 category: 'accessing',
 fn: function (anObject){
 var self=this;
-self["@payload"]=anObject;
-smalltalk.send(smalltalk.send(self,"_dispatcher",[]),"_changed_",[[]]);
-return self},
+return smalltalk.withContext(function($ctx1) { 
self["@payload"]=anObject;
+_st(_st(self)._dispatcher())._changed_([]);
+return self}, function($ctx1) {$ctx1.fill(self,"model:",{anObject:anObject}, smalltalk.ListKeyedEntity)})},
 args: ["anObject"],
 source: "model: anObject\x0a\x09payload := anObject.\x0a    self dispatcher changed: #()",
 messageSends: ["changed:", "dispatcher"],
@@ -590,10 +605,10 @@ selector: "watch:do:",
 category: 'action',
 fn: function (path,aBlock){
 var self=this;
-smalltalk.send(smalltalk.send(self,"_dispatcher",[]),"_on_hook_",[path,(function(){
-return smalltalk.send(self,"_read_do_",[path,aBlock]);
-})]);
-return self},
+return smalltalk.withContext(function($ctx1) { 
_st(_st(self)._dispatcher())._on_hook_(path,(function(){
+return smalltalk.withContext(function($ctx2) {
return _st(self)._read_do_(path,aBlock);
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"watch:do:",{path:path,aBlock:aBlock}, smalltalk.ListKeyedEntity)})},
 args: ["path", "aBlock"],
 source: "watch: path do: aBlock\x0a\x09self dispatcher on: path hook: [ self read: path do: aBlock ]\x0a",
 messageSends: ["on:hook:", "read:do:", "dispatcher"],
@@ -612,16 +627,15 @@ selector: "modify:do:",
 category: 'action',
 fn: function (path,aBlock){
 var self=this;
-var newValue;
-var eavModel;
-eavModel=smalltalk.send(path,"_asEavModel",[]);
-newValue=smalltalk.send(aBlock,"_value_",[smalltalk.send(eavModel,"_on_",[self["@payload"]])]);
-smalltalk.send((function(){
-return smalltalk.send(eavModel,"_on_put_",[self["@payload"],newValue]);
-}),"_ensure_",[(function(){
-return smalltalk.send(smalltalk.send(self,"_dispatcher",[]),"_changed_",[path]);
-})]);
-return self},
+var newValue,eavModel;
+return smalltalk.withContext(function($ctx1) { 
eavModel=_st(path)._asEavModel();
+newValue=_st(aBlock)._value_(_st(eavModel)._on_(self["@payload"]));
+_st((function(){
+return smalltalk.withContext(function($ctx2) {
return _st(eavModel)._on_put_(self["@payload"],newValue);
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._ensure_((function(){
+return smalltalk.withContext(function($ctx2) {
return _st(_st(self)._dispatcher())._changed_(path);
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"modify:do:",{path:path,aBlock:aBlock,newValue:newValue,eavModel:eavModel}, smalltalk.ListKeyedDirectEntity)})},
 args: ["path", "aBlock"],
 source: "modify: path do: aBlock\x0a    | newValue eavModel |\x0a    eavModel := path asEavModel.\x0a    newValue := aBlock value: (eavModel on: payload).\x0a    [ eavModel on: payload put: newValue ] ensure: [ self dispatcher changed: path ]\x0a",
 messageSends: ["asEavModel", "value:", "on:", "ensure:", "changed:", "dispatcher", "on:put:"],
@@ -637,9 +651,9 @@ category: 'action',
 fn: function (path,aBlock){
 var self=this;
 var eavModel;
-eavModel=smalltalk.send(path,"_asEavModel",[]);
-smalltalk.send(aBlock,"_value_",[smalltalk.send(eavModel,"_on_",[self["@payload"]])]);
-return self},
+return smalltalk.withContext(function($ctx1) { 
eavModel=_st(path)._asEavModel();
+_st(aBlock)._value_(_st(eavModel)._on_(self["@payload"]));
+return self}, function($ctx1) {$ctx1.fill(self,"read:do:",{path:path,aBlock:aBlock,eavModel:eavModel}, smalltalk.ListKeyedDirectEntity)})},
 args: ["path", "aBlock"],
 source: "read: path do: aBlock\x0a    | eavModel |\x0a    eavModel := path asEavModel.\x0a    aBlock value: (eavModel on: payload)\x0a",
 messageSends: ["asEavModel", "value:", "on:"],
@@ -658,8 +672,8 @@ selector: "model:",
 category: 'accessing',
 fn: function (anObject){
 var self=this;
-smalltalk.send(self,"_model_",[smalltalk.send((smalltalk.Isolator || Isolator),"_on_",[anObject])],smalltalk.ListKeyedEntity);
-return self},
+return smalltalk.withContext(function($ctx1) { 
smalltalk.ListKeyedEntity.fn.prototype._model_.apply(_st(self), [_st((smalltalk.Isolator || Isolator))._on_(anObject)]);
+return self}, function($ctx1) {$ctx1.fill(self,"model:",{anObject:anObject}, smalltalk.ListKeyedIsolatedEntity)})},
 args: ["anObject"],
 source: "model: anObject\x0a\x09super model: (Isolator on: anObject)",
 messageSends: ["model:", "on:"],
@@ -675,13 +689,13 @@ category: 'action',
 fn: function (path,aBlock){
 var self=this;
 var eavModel;
-eavModel=smalltalk.send(smalltalk.send([smalltalk.symbolFor("root")],"__comma",[path]),"_asEavModel",[]);
-smalltalk.send((function(){
-return smalltalk.send(self["@payload"],"_model_modify_",[eavModel,aBlock]);
-}),"_ensure_",[(function(){
-return smalltalk.send(smalltalk.send(self,"_dispatcher",[]),"_changed_",[path]);
-})]);
-return self},
+return smalltalk.withContext(function($ctx1) { 
eavModel=_st(_st([smalltalk.symbolFor("root")]).__comma(path))._asEavModel();
+_st((function(){
+return smalltalk.withContext(function($ctx2) {
return _st(self["@payload"])._model_modify_(eavModel,aBlock);
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._ensure_((function(){
+return smalltalk.withContext(function($ctx2) {
return _st(_st(self)._dispatcher())._changed_(path);
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"modify:do:",{path:path,aBlock:aBlock,eavModel:eavModel}, smalltalk.ListKeyedIsolatedEntity)})},
 args: ["path", "aBlock"],
 source: "modify: path do: aBlock\x0a    | eavModel |\x0a    eavModel := ({#root},path) asEavModel.\x0a    [ payload model: eavModel modify: aBlock ] ensure: [ self dispatcher changed: path ]\x0a",
 messageSends: ["asEavModel", ",", "ensure:", "changed:", "dispatcher", "model:modify:"],
@@ -697,9 +711,9 @@ category: 'action',
 fn: function (path,aBlock){
 var self=this;
 var eavModel;
-eavModel=smalltalk.send(smalltalk.send([smalltalk.symbolFor("root")],"__comma",[path]),"_asEavModel",[]);
-smalltalk.send(self["@payload"],"_model_read_",[eavModel,aBlock]);
-return self},
+return smalltalk.withContext(function($ctx1) { 
eavModel=_st(_st([smalltalk.symbolFor("root")]).__comma(path))._asEavModel();
+_st(self["@payload"])._model_read_(eavModel,aBlock);
+return self}, function($ctx1) {$ctx1.fill(self,"read:do:",{path:path,aBlock:aBlock,eavModel:eavModel}, smalltalk.ListKeyedIsolatedEntity)})},
 args: ["path", "aBlock"],
 source: "read: path do: aBlock\x0a    | eavModel |\x0a    eavModel := ({#root},path) asEavModel.\x0a    payload model: eavModel read: aBlock\x0a",
 messageSends: ["asEavModel", ",", "model:read:"],
@@ -716,8 +730,8 @@ selector: "reverseTrapAt:",
 category: '*Trapped-Backend',
 fn: function (anObject){
 var self=this;
-return nil;
-},
+return smalltalk.withContext(function($ctx1) { 
return nil;
+}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:",{anObject:anObject}, smalltalk.Object)})},
 args: ["anObject"],
 source: "reverseTrapAt: anObject\x0a\x09^nil",
 messageSends: [],
@@ -732,8 +746,8 @@ selector: "reverseTrapAt:put:",
 category: '*Trapped-Backend',
 fn: function (anObject,value){
 var self=this;
-smalltalk.send(self,"_error_",[smalltalk.send(smalltalk.send("Trapped cannot put at ","__comma",[smalltalk.send(smalltalk.send(self,"_class",[]),"_name",[])]),"__comma",[" type key."])]);
-return self},
+return smalltalk.withContext(function($ctx1) { 
_st(self)._error_(_st(_st("Trapped cannot put at ").__comma(_st(_st(self)._class())._name())).__comma(" type key."));
+return self}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:put:",{anObject:anObject,value:value}, smalltalk.Object)})},
 args: ["anObject", "value"],
 source: "reverseTrapAt: anObject put: value\x0a\x09self error: 'Trapped cannot put at ', self class name, ' type key.'",
 messageSends: ["error:", ",", "name", "class"],
@@ -748,35 +762,49 @@ selector: "asEavModel",
 category: '*Trapped-Backend',
 fn: function (){
 var self=this;
-var $1;
 var model;
-model=smalltalk.send((smalltalk.EavModel || EavModel),"_new",[]);
-smalltalk.send(model,"_getBlock_",[(function(anObject){
-return smalltalk.send(self,"_inject_into_",[anObject,(function(soFar,segment){
-if(($receiver = soFar) == nil || $receiver == undefined){
-return soFar;
+return smalltalk.withContext(function($ctx1) { 
var $1,$3,$4,$6,$5,$2,$7,$9,$11,$12,$14,$13,$10,$8,$15;
+model=_st((smalltalk.EavModel || EavModel))._new();
+$1=model;
+$2=(function(anObject){
+return smalltalk.withContext(function($ctx2) {
$3=self;
+$4=anObject;
+$5=(function(soFar,segment){
+return smalltalk.withContext(function($ctx3) {
$6=soFar;
+if(($receiver = $6) == nil || $receiver == undefined){
+return $6;
 } else {
-return smalltalk.send(segment,"_reverseTrapAt_",[soFar]);
+return _st(segment)._reverseTrapAt_(soFar);
 };
-})]);
-})]);
-$1=smalltalk.send(self,"_isEmpty",[]);
-if(! smalltalk.assert($1)){
-smalltalk.send(model,"_putBlock_",[(function(anObject,value){
+}, function($ctx3) {$ctx3.fillBlock({soFar:soFar,segment:segment},$ctx1)})});
+return _st($3)._inject_into_($4,$5);
+}, function($ctx2) {$ctx2.fillBlock({anObject:anObject},$ctx1)})});
+_st($1)._getBlock_($2);
+$7=_st(self)._isEmpty();
+$8=(function(){
+return smalltalk.withContext(function($ctx2) {
$9=model;
+$10=(function(anObject,value){
 var penultimate;
-penultimate=smalltalk.send(smalltalk.send(self,"_allButLast",[]),"_inject_into_",[anObject,(function(soFar,segment){
-if(($receiver = soFar) == nil || $receiver == undefined){
-return soFar;
+return smalltalk.withContext(function($ctx3) {
$11=_st(self)._allButLast();
+$12=anObject;
+$13=(function(soFar,segment){
+return smalltalk.withContext(function($ctx4) {
$14=soFar;
+if(($receiver = $14) == nil || $receiver == undefined){
+return $14;
 } else {
-return smalltalk.send(segment,"_reverseTrapAt_",[soFar]);
+return _st(segment)._reverseTrapAt_(soFar);
 };
-})]);
+}, function($ctx4) {$ctx4.fillBlock({soFar:soFar,segment:segment},$ctx1)})});
+penultimate=_st($11)._inject_into_($12,$13);
 penultimate;
-return smalltalk.send(smalltalk.send(self,"_last",[]),"_reverseTrapAt_put_",[penultimate,value]);
-})]);
-};
-return model;
-},
+return _st(_st(self)._last())._reverseTrapAt_put_(penultimate,value);
+}, function($ctx3) {$ctx3.fillBlock({anObject:anObject,value:value,penultimate:penultimate},$ctx1)})});
+return _st($9)._putBlock_($10);
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
+_st($7)._ifFalse_($8);
+$15=model;
+return $15;
+}, function($ctx1) {$ctx1.fill(self,"asEavModel",{model:model}, smalltalk.SequenceableCollection)})},
 args: [],
 source: "asEavModel\x0a    | model |\x0a    model := EavModel new.\x0a    model getBlock: [ :anObject |\x0a        self inject: anObject into: [ :soFar :segment |\x0a            soFar ifNotNil: [ segment reverseTrapAt: soFar ]]].\x0a    self isEmpty ifFalse: [\x0a        model putBlock: [ :anObject :value | | penultimate |\x0a            penultimate :=  self allButLast inject: anObject into: [ :soFar :segment |\x0a                soFar ifNotNil: [ segment reverseTrapAt: soFar ]].\x0a            self last reverseTrapAt: penultimate put: value ]].\x0a    ^model",
 messageSends: ["new", "getBlock:", "inject:into:", "ifNotNil:", "reverseTrapAt:", "ifFalse:", "putBlock:", "allButLast", "reverseTrapAt:put:", "last", "isEmpty"],
@@ -791,12 +819,12 @@ selector: "reverseTrapAt:",
 category: '*Trapped-Backend',
 fn: function (anObject){
 var self=this;
-var $1;
-$1=smalltalk.send(anObject,"_at_ifAbsent_",[self,(function(){
-return nil;
-})]);
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=_st(anObject)._at_ifAbsent_(self,(function(){
+return smalltalk.withContext(function($ctx2) {
return nil;
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
 return $1;
-},
+}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:",{anObject:anObject}, smalltalk.String)})},
 args: ["anObject"],
 source: "reverseTrapAt: anObject\x0a\x09^anObject at: self ifAbsent: [nil]",
 messageSends: ["at:ifAbsent:"],
@@ -811,10 +839,10 @@ selector: "reverseTrapAt:put:",
 category: '*Trapped-Backend',
 fn: function (anObject,value){
 var self=this;
-var $1;
-$1=smalltalk.send(anObject,"_at_put_",[self,value]);
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=_st(anObject)._at_put_(self,value);
 return $1;
-},
+}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:put:",{anObject:anObject,value:value}, smalltalk.String)})},
 args: ["anObject", "value"],
 source: "reverseTrapAt: anObject put: value\x0a\x09^anObject at: self put: value",
 messageSends: ["at:put:"],
@@ -829,18 +857,18 @@ selector: "reverseTrapAt:",
 category: '*Trapped-Backend',
 fn: function (anObject){
 var self=this;
-var $1;
+return smalltalk.withContext(function($ctx1) { 
var $1;
 var $early={};
 try {
-$1=smalltalk.send((function(){
-return smalltalk.send(anObject,"_perform_",[self]);
-}),"_on_do_",[(smalltalk.MessageNotUnderstood || MessageNotUnderstood),(function(){
-throw $early=[nil];
-})]);
+$1=_st((function(){
+return smalltalk.withContext(function($ctx2) {
return _st(anObject)._perform_(self);
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._on_do_((smalltalk.MessageNotUnderstood || MessageNotUnderstood),(function(){
+return smalltalk.withContext(function($ctx2) {
throw $early=[nil];
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
 return $1;
 }
 catch(e) {if(e===$early)return e[0]; throw e}
-},
+}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:",{anObject:anObject}, smalltalk.Symbol)})},
 args: ["anObject"],
 source: "reverseTrapAt: anObject\x0a\x09^[anObject perform: self] on: MessageNotUnderstood do: [^nil]",
 messageSends: ["on:do:", "perform:"],
@@ -855,10 +883,10 @@ selector: "reverseTrapAt:put:",
 category: '*Trapped-Backend',
 fn: function (anObject,value){
 var self=this;
-var $1;
-$1=smalltalk.send(anObject,"_perform_withArguments_",[smalltalk.send(smalltalk.send(self,"__comma",[":"]),"_asSymbol",[]),[value]]);
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=_st(anObject)._perform_withArguments_(_st(_st(self).__comma(":"))._asSymbol(),[value]);
 return $1;
-},
+}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:put:",{anObject:anObject,value:value}, smalltalk.Symbol)})},
 args: ["anObject", "value"],
 source: "reverseTrapAt: anObject put: value\x0a    ^anObject perform: (self, ':') asSymbol withArguments: { value }",
 messageSends: ["perform:withArguments:", "asSymbol", ","],
@@ -873,12 +901,12 @@ selector: "reverseTrapAt:",
 category: '*Trapped-Backend',
 fn: function (anObject){
 var self=this;
-var $1;
-$1=smalltalk.send(anObject,"_at_ifAbsent_",[self,(function(){
-return nil;
-})]);
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=_st(anObject)._at_ifAbsent_(self,(function(){
+return smalltalk.withContext(function($ctx2) {
return nil;
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
 return $1;
-},
+}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:",{anObject:anObject}, smalltalk.Number)})},
 args: ["anObject"],
 source: "reverseTrapAt: anObject\x0a\x09^anObject at: self ifAbsent: [nil]",
 messageSends: ["at:ifAbsent:"],
@@ -893,10 +921,10 @@ selector: "reverseTrapAt:put:",
 category: '*Trapped-Backend',
 fn: function (anObject,value){
 var self=this;
-var $1;
-$1=smalltalk.send(anObject,"_at_put_",[self,value]);
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=_st(anObject)._at_put_(self,value);
 return $1;
-},
+}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:put:",{anObject:anObject,value:value}, smalltalk.Number)})},
 args: ["anObject", "value"],
 source: "reverseTrapAt: anObject put: value\x0a\x09^anObject at: self put: value",
 messageSends: ["at:put:"],

+ 96 - 90
lib/js/Trapped-Demo.deploy.js

@@ -6,15 +6,15 @@ smalltalk.method({
 selector: "initialize",
 fn: function (){
 var self=this;
-smalltalk.send(self,"_initialize",[],smalltalk.ListKeyedIsolatedEntity);
-smalltalk.send(self,"_dispatcher_",[smalltalk.send((smalltalk.SimpleKeyedPubSub || SimpleKeyedPubSub),"_new",[])]);
-smalltalk.send(self,"_model_",[smalltalk.send(smalltalk.send((smalltalk.AppModel || AppModel),"_new",[]),"_title_",["Todo"])]);
-smalltalk.send((function(){
-return smalltalk.send(self,"_modify_do_",[[smalltalk.symbolFor("todos")],(function(){
-return [smalltalk.HashedCollection._fromPairs_([smalltalk.send("text","__minus_gt",["learn trapped"]),smalltalk.send("done","__minus_gt",[true])]),smalltalk.HashedCollection._fromPairs_([smalltalk.send("text","__minus_gt",["build a trapped app"]),smalltalk.send("done","__minus_gt",[false])])];
-})]);
-}),"_valueWithTimeout_",[(2000)]);
-return self}
+return smalltalk.withContext(function($ctx1) { 
smalltalk.ListKeyedIsolatedEntity.fn.prototype._initialize.apply(_st(self), []);
+_st(self)._dispatcher_(_st((smalltalk.SimpleKeyedPubSub || SimpleKeyedPubSub))._new());
+_st(self)._model_(_st(_st((smalltalk.AppModel || AppModel))._new())._title_("Todo"));
+_st((function(){
+return smalltalk.withContext(function($ctx2) {
return _st(self)._modify_do_([smalltalk.symbolFor("todos")],(function(){
+return smalltalk.withContext(function($ctx3) {
return [smalltalk.HashedCollection._fromPairs_([_st("text").__minus_gt("learn trapped"),_st("done").__minus_gt(true)]),smalltalk.HashedCollection._fromPairs_([_st("text").__minus_gt("build a trapped app"),_st("done").__minus_gt(false)])];
+}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._valueWithTimeout_((2000));
+return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.App)})}
 }),
 smalltalk.App);
 
@@ -27,9 +27,9 @@ smalltalk.method({
 selector: "addTodo",
 fn: function (){
 var self=this;
-smalltalk.send(smalltalk.send(self,"_todos",[]),"_add_",[smalltalk.HashedCollection._fromPairs_([smalltalk.send("text","__minus_gt",[smalltalk.send(self,"_todoText",[])]),smalltalk.send("done","__minus_gt",[false])])]);
-smalltalk.send(self,"_todoText_",[""]);
-return self}
+return smalltalk.withContext(function($ctx1) { 
_st(_st(self)._todos())._add_(smalltalk.HashedCollection._fromPairs_([_st("text").__minus_gt(_st(self)._todoText()),_st("done").__minus_gt(false)]));
+_st(self)._todoText_("");
+return self}, function($ctx1) {$ctx1.fill(self,"addTodo",{}, smalltalk.AppModel)})}
 }),
 smalltalk.AppModel);
 
@@ -39,8 +39,8 @@ smalltalk.method({
 selector: "archive",
 fn: function (){
 var self=this;
-smalltalk.send(self,"_todos_",[smalltalk.send(self,"_todosNotDone",[])]);
-return self}
+return smalltalk.withContext(function($ctx1) { 
_st(self)._todos_(_st(self)._todosNotDone());
+return self}, function($ctx1) {$ctx1.fill(self,"archive",{}, smalltalk.AppModel)})}
 }),
 smalltalk.AppModel);
 
@@ -50,10 +50,10 @@ smalltalk.method({
 selector: "remaining",
 fn: function (){
 var self=this;
-var $1;
-$1=smalltalk.send(smalltalk.send(self,"_todosNotDone",[]),"_size",[]);
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=_st(_st(self)._todosNotDone())._size();
 return $1;
-}
+}, function($ctx1) {$ctx1.fill(self,"remaining",{}, smalltalk.AppModel)})}
 }),
 smalltalk.AppModel);
 
@@ -63,8 +63,10 @@ smalltalk.method({
 selector: "title",
 fn: function (){
 var self=this;
-return self["@title"];
-}
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=self["@title"];
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"title",{}, smalltalk.AppModel)})}
 }),
 smalltalk.AppModel);
 
@@ -74,8 +76,8 @@ smalltalk.method({
 selector: "title:",
 fn: function (aString){
 var self=this;
-self["@title"]=aString;
-return self}
+return smalltalk.withContext(function($ctx1) { 
self["@title"]=aString;
+return self}, function($ctx1) {$ctx1.fill(self,"title:",{aString:aString}, smalltalk.AppModel)})}
 }),
 smalltalk.AppModel);
 
@@ -85,8 +87,10 @@ smalltalk.method({
 selector: "todoText",
 fn: function (){
 var self=this;
-return self["@todoText"];
-}
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=self["@todoText"];
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"todoText",{}, smalltalk.AppModel)})}
 }),
 smalltalk.AppModel);
 
@@ -96,8 +100,8 @@ smalltalk.method({
 selector: "todoText:",
 fn: function (aString){
 var self=this;
-self["@todoText"]=aString;
-return self}
+return smalltalk.withContext(function($ctx1) { 
self["@todoText"]=aString;
+return self}, function($ctx1) {$ctx1.fill(self,"todoText:",{aString:aString}, smalltalk.AppModel)})}
 }),
 smalltalk.AppModel);
 
@@ -107,8 +111,10 @@ smalltalk.method({
 selector: "todos",
 fn: function (){
 var self=this;
-return self["@todos"];
-}
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=self["@todos"];
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"todos",{}, smalltalk.AppModel)})}
 }),
 smalltalk.AppModel);
 
@@ -118,8 +124,8 @@ smalltalk.method({
 selector: "todos:",
 fn: function (anArray){
 var self=this;
-self["@todos"]=anArray;
-return self}
+return smalltalk.withContext(function($ctx1) { 
self["@todos"]=anArray;
+return self}, function($ctx1) {$ctx1.fill(self,"todos:",{anArray:anArray}, smalltalk.AppModel)})}
 }),
 smalltalk.AppModel);
 
@@ -129,12 +135,12 @@ smalltalk.method({
 selector: "todosNotDone",
 fn: function (){
 var self=this;
-var $1;
-$1=smalltalk.send(smalltalk.send(self,"_todos",[]),"_reject_",[(function(each){
-return smalltalk.send(each,"_at_",["done"]);
-})]);
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=_st(_st(self)._todos())._reject_((function(each){
+return smalltalk.withContext(function($ctx2) {
return _st(each)._at_("done");
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
 return $1;
-}
+}, function($ctx1) {$ctx1.fill(self,"todosNotDone",{}, smalltalk.AppModel)})}
 }),
 smalltalk.AppModel);
 
@@ -147,70 +153,70 @@ smalltalk.method({
 selector: "renderOn:",
 fn: function (html){
 var self=this;
-var $1,$2,$3,$4,$5,$6,$7,$9,$10,$11,$12,$8;
-smalltalk.send([],"_trapDescend_",[(function(snap){
-smalltalk.send(smalltalk.send(html,"_h2",[]),"_trap_",[[smalltalk.symbolFor("title")]]);
-return smalltalk.send(smalltalk.send(html,"_div",[]),"_trap_toggle_ifNotPresent_",[[smalltalk.symbolFor("todos")],(function(){
-return smalltalk.send(snap,"_do_",[(function(){
-smalltalk.send(smalltalk.send(html,"_span",[]),"_trap_",[[smalltalk.symbolFor("remaining")]]);
-smalltalk.send(html,"_with_",[" of "]);
-smalltalk.send(smalltalk.send(html,"_span",[]),"_trap_",[[smalltalk.symbolFor("todos"), smalltalk.symbolFor("size")]]);
-smalltalk.send(html,"_with_",[" remaining [ "]);
-$1=smalltalk.send(html,"_a",[]);
-smalltalk.send($1,"_href_",[""]);
-smalltalk.send($1,"_onClick_",[(function(){
-return smalltalk.send((function(){
-smalltalk.send(snap,"_modify_",[(function(model){
-return smalltalk.send(model,"_archive",[]);
-})]);
+return smalltalk.withContext(function($ctx1) { 
var $1,$2,$3,$4,$5,$6,$7,$9,$10,$11,$12,$8;
+_st([])._trapDescend_((function(snap){
+return smalltalk.withContext(function($ctx2) {
_st(_st(html)._h2())._trap_([smalltalk.symbolFor("title")]);
+return _st(_st(html)._div())._trap_toggle_ifNotPresent_([smalltalk.symbolFor("todos")],(function(){
+return smalltalk.withContext(function($ctx3) {
return _st(snap)._do_((function(){
+return smalltalk.withContext(function($ctx4) {
_st(_st(html)._span())._trap_([smalltalk.symbolFor("remaining")]);
+_st(html)._with_(" of ");
+_st(_st(html)._span())._trap_([smalltalk.symbolFor("todos"), smalltalk.symbolFor("size")]);
+_st(html)._with_(" remaining [ ");
+$1=_st(html)._a();
+_st($1)._href_("");
+_st($1)._onClick_((function(){
+return smalltalk.withContext(function($ctx5) {
return _st((function(){
+return smalltalk.withContext(function($ctx6) {
_st(snap)._modify_((function(model){
+return smalltalk.withContext(function($ctx7) {
return _st(model)._archive();
+}, function($ctx7) {$ctx7.fillBlock({model:model},$ctx1)})}));
 return false;
-}),"_value",[]);
-})]);
-$2=smalltalk.send($1,"_with_",["archive"]);
+}, function($ctx6) {$ctx6.fillBlock({},$ctx1)})}))._value();
+}, function($ctx5) {$ctx5.fillBlock({},$ctx1)})}));
+$2=_st($1)._with_("archive");
 $2;
-smalltalk.send(html,"_with_",[" ]"]);
-smalltalk.send(smalltalk.send(html,"_ul",[]),"_trapIter_tag_do_",[[smalltalk.symbolFor("todos")],smalltalk.symbolFor("li"),(function(each){
-smalltalk.send(smalltalk.send(html,"_root",[]),"_empty",[]);
-$3=smalltalk.send(html,"_input",[]);
-smalltalk.send($3,"_type_",["checkbox"]);
-$4=smalltalk.send($3,"_trap_",[["done"]]);
+_st(html)._with_(" ]");
+_st(_st(html)._ul())._trapIter_tag_do_([smalltalk.symbolFor("todos")],smalltalk.symbolFor("li"),(function(each){
+return smalltalk.withContext(function($ctx5) {
_st(_st(html)._root())._empty();
+$3=_st(html)._input();
+_st($3)._type_("checkbox");
+$4=_st($3)._trap_(["done"]);
 $4;
-$5=smalltalk.send(html,"_span",[]);
-smalltalk.send($5,"_trap_read_",[["done"],(function(model){
-return smalltalk.send(smalltalk.send(html,"_root",[]),"_class_",[smalltalk.send("done-","__comma",[model])]);
-})]);
-$6=smalltalk.send($5,"_trap_",[["text"]]);
+$5=_st(html)._span();
+_st($5)._trap_read_(["done"],(function(model){
+return smalltalk.withContext(function($ctx6) {
return _st(_st(html)._root())._class_(_st("done-").__comma(model));
+}, function($ctx6) {$ctx6.fillBlock({model:model},$ctx1)})}));
+$6=_st($5)._trap_(["text"]);
 return $6;
-})]);
-$7=smalltalk.send(html,"_form",[]);
-smalltalk.send($7,"_onSubmit_",[(function(){
-return smalltalk.send((function(){
-smalltalk.send(snap,"_modify_",[(function(model){
-return smalltalk.send(model,"_addTodo",[]);
-})]);
+}, function($ctx5) {$ctx5.fillBlock({each:each},$ctx1)})}));
+$7=_st(html)._form();
+_st($7)._onSubmit_((function(){
+return smalltalk.withContext(function($ctx5) {
return _st((function(){
+return smalltalk.withContext(function($ctx6) {
_st(snap)._modify_((function(model){
+return smalltalk.withContext(function($ctx7) {
return _st(model)._addTodo();
+}, function($ctx7) {$ctx7.fillBlock({model:model},$ctx1)})}));
 return false;
-}),"_value",[]);
-})]);
-$8=smalltalk.send($7,"_with_",[(function(){
-$9=smalltalk.send(html,"_input",[]);
-smalltalk.send($9,"_type_",["text"]);
-smalltalk.send($9,"_trap_",[[smalltalk.symbolFor("todoText")]]);
-smalltalk.send($9,"_at_put_",["size",(30)]);
-$10=smalltalk.send($9,"_placeholder_",["add new todo here"]);
+}, function($ctx6) {$ctx6.fillBlock({},$ctx1)})}))._value();
+}, function($ctx5) {$ctx5.fillBlock({},$ctx1)})}));
+$8=_st($7)._with_((function(){
+return smalltalk.withContext(function($ctx5) {
$9=_st(html)._input();
+_st($9)._type_("text");
+_st($9)._trap_([smalltalk.symbolFor("todoText")]);
+_st($9)._at_put_("size",(30));
+$10=_st($9)._placeholder_("add new todo here");
 $10;
-$11=smalltalk.send(html,"_input",[]);
-smalltalk.send($11,"_class_",["btn-primary"]);
-smalltalk.send($11,"_type_",["submit"]);
-$12=smalltalk.send($11,"_value_",["add"]);
+$11=_st(html)._input();
+_st($11)._class_("btn-primary");
+_st($11)._type_("submit");
+$12=_st($11)._value_("add");
 return $12;
-})]);
+}, function($ctx5) {$ctx5.fillBlock({},$ctx1)})}));
 return $8;
-})]);
-}),(function(){
-return smalltalk.send(html,"_with_",["Loading ..."]);
-})]);
-})]);
-return self}
+}, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
+}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}),(function(){
+return smalltalk.withContext(function($ctx3) {
return _st(html)._with_("Loading ...");
+}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
+}, function($ctx2) {$ctx2.fillBlock({snap:snap},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html}, smalltalk.AppView)})}
 }),
 smalltalk.AppView);
 

+ 96 - 90
lib/js/Trapped-Demo.js

@@ -8,15 +8,15 @@ selector: "initialize",
 category: 'initialization',
 fn: function (){
 var self=this;
-smalltalk.send(self,"_initialize",[],smalltalk.ListKeyedIsolatedEntity);
-smalltalk.send(self,"_dispatcher_",[smalltalk.send((smalltalk.SimpleKeyedPubSub || SimpleKeyedPubSub),"_new",[])]);
-smalltalk.send(self,"_model_",[smalltalk.send(smalltalk.send((smalltalk.AppModel || AppModel),"_new",[]),"_title_",["Todo"])]);
-smalltalk.send((function(){
-return smalltalk.send(self,"_modify_do_",[[smalltalk.symbolFor("todos")],(function(){
-return [smalltalk.HashedCollection._fromPairs_([smalltalk.send("text","__minus_gt",["learn trapped"]),smalltalk.send("done","__minus_gt",[true])]),smalltalk.HashedCollection._fromPairs_([smalltalk.send("text","__minus_gt",["build a trapped app"]),smalltalk.send("done","__minus_gt",[false])])];
-})]);
-}),"_valueWithTimeout_",[(2000)]);
-return self},
+return smalltalk.withContext(function($ctx1) { 
smalltalk.ListKeyedIsolatedEntity.fn.prototype._initialize.apply(_st(self), []);
+_st(self)._dispatcher_(_st((smalltalk.SimpleKeyedPubSub || SimpleKeyedPubSub))._new());
+_st(self)._model_(_st(_st((smalltalk.AppModel || AppModel))._new())._title_("Todo"));
+_st((function(){
+return smalltalk.withContext(function($ctx2) {
return _st(self)._modify_do_([smalltalk.symbolFor("todos")],(function(){
+return smalltalk.withContext(function($ctx3) {
return [smalltalk.HashedCollection._fromPairs_([_st("text").__minus_gt("learn trapped"),_st("done").__minus_gt(true)]),smalltalk.HashedCollection._fromPairs_([_st("text").__minus_gt("build a trapped app"),_st("done").__minus_gt(false)])];
+}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._valueWithTimeout_((2000));
+return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.App)})},
 args: [],
 source: "initialize\x0a\x09super initialize.\x0a    self dispatcher: SimpleKeyedPubSub new.\x0a    self model: (AppModel new title: 'Todo').\x0a    [ self modify: #(#todos) do: [{\x0a        #{'text'->'learn trapped'. 'done'->true}.\x0a        #{'text'->'build a trapped app'. 'done'->false}\x0a    }]] valueWithTimeout: 2000\x0a",
 messageSends: ["initialize", "dispatcher:", "new", "model:", "title:", "valueWithTimeout:", "modify:do:", "->"],
@@ -35,9 +35,9 @@ selector: "addTodo",
 category: 'action',
 fn: function (){
 var self=this;
-smalltalk.send(smalltalk.send(self,"_todos",[]),"_add_",[smalltalk.HashedCollection._fromPairs_([smalltalk.send("text","__minus_gt",[smalltalk.send(self,"_todoText",[])]),smalltalk.send("done","__minus_gt",[false])])]);
-smalltalk.send(self,"_todoText_",[""]);
-return self},
+return smalltalk.withContext(function($ctx1) { 
_st(_st(self)._todos())._add_(smalltalk.HashedCollection._fromPairs_([_st("text").__minus_gt(_st(self)._todoText()),_st("done").__minus_gt(false)]));
+_st(self)._todoText_("");
+return self}, function($ctx1) {$ctx1.fill(self,"addTodo",{}, smalltalk.AppModel)})},
 args: [],
 source: "addTodo\x0a    self todos add: #{'text'->self todoText. 'done'->false}.\x0a    self todoText: ''",
 messageSends: ["add:", "->", "todoText", "todos", "todoText:"],
@@ -52,8 +52,8 @@ selector: "archive",
 category: 'action',
 fn: function (){
 var self=this;
-smalltalk.send(self,"_todos_",[smalltalk.send(self,"_todosNotDone",[])]);
-return self},
+return smalltalk.withContext(function($ctx1) { 
_st(self)._todos_(_st(self)._todosNotDone());
+return self}, function($ctx1) {$ctx1.fill(self,"archive",{}, smalltalk.AppModel)})},
 args: [],
 source: "archive\x0a    self todos: self todosNotDone",
 messageSends: ["todos:", "todosNotDone"],
@@ -68,10 +68,10 @@ selector: "remaining",
 category: 'accessing',
 fn: function (){
 var self=this;
-var $1;
-$1=smalltalk.send(smalltalk.send(self,"_todosNotDone",[]),"_size",[]);
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=_st(_st(self)._todosNotDone())._size();
 return $1;
-},
+}, function($ctx1) {$ctx1.fill(self,"remaining",{}, smalltalk.AppModel)})},
 args: [],
 source: "remaining\x0a    ^self todosNotDone size",
 messageSends: ["size", "todosNotDone"],
@@ -86,8 +86,10 @@ selector: "title",
 category: 'accessing',
 fn: function (){
 var self=this;
-return self["@title"];
-},
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=self["@title"];
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"title",{}, smalltalk.AppModel)})},
 args: [],
 source: "title\x0a\x09^title",
 messageSends: [],
@@ -102,8 +104,8 @@ selector: "title:",
 category: 'accessing',
 fn: function (aString){
 var self=this;
-self["@title"]=aString;
-return self},
+return smalltalk.withContext(function($ctx1) { 
self["@title"]=aString;
+return self}, function($ctx1) {$ctx1.fill(self,"title:",{aString:aString}, smalltalk.AppModel)})},
 args: ["aString"],
 source: "title: aString\x0a\x09title := aString",
 messageSends: [],
@@ -118,8 +120,10 @@ selector: "todoText",
 category: 'accessing',
 fn: function (){
 var self=this;
-return self["@todoText"];
-},
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=self["@todoText"];
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"todoText",{}, smalltalk.AppModel)})},
 args: [],
 source: "todoText\x0a\x09^todoText",
 messageSends: [],
@@ -134,8 +138,8 @@ selector: "todoText:",
 category: 'accessing',
 fn: function (aString){
 var self=this;
-self["@todoText"]=aString;
-return self},
+return smalltalk.withContext(function($ctx1) { 
self["@todoText"]=aString;
+return self}, function($ctx1) {$ctx1.fill(self,"todoText:",{aString:aString}, smalltalk.AppModel)})},
 args: ["aString"],
 source: "todoText: aString\x0a\x09todoText := aString",
 messageSends: [],
@@ -150,8 +154,10 @@ selector: "todos",
 category: 'accessing',
 fn: function (){
 var self=this;
-return self["@todos"];
-},
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=self["@todos"];
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"todos",{}, smalltalk.AppModel)})},
 args: [],
 source: "todos\x0a\x09^todos",
 messageSends: [],
@@ -166,8 +172,8 @@ selector: "todos:",
 category: 'accessing',
 fn: function (anArray){
 var self=this;
-self["@todos"]=anArray;
-return self},
+return smalltalk.withContext(function($ctx1) { 
self["@todos"]=anArray;
+return self}, function($ctx1) {$ctx1.fill(self,"todos:",{anArray:anArray}, smalltalk.AppModel)})},
 args: ["anArray"],
 source: "todos: anArray\x0a\x09todos := anArray",
 messageSends: [],
@@ -182,12 +188,12 @@ selector: "todosNotDone",
 category: 'accessing',
 fn: function (){
 var self=this;
-var $1;
-$1=smalltalk.send(smalltalk.send(self,"_todos",[]),"_reject_",[(function(each){
-return smalltalk.send(each,"_at_",["done"]);
-})]);
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=_st(_st(self)._todos())._reject_((function(each){
+return smalltalk.withContext(function($ctx2) {
return _st(each)._at_("done");
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
 return $1;
-},
+}, function($ctx1) {$ctx1.fill(self,"todosNotDone",{}, smalltalk.AppModel)})},
 args: [],
 source: "todosNotDone\x0a    ^self todos reject: [ :each | each at: 'done' ]",
 messageSends: ["reject:", "at:", "todos"],
@@ -206,70 +212,70 @@ selector: "renderOn:",
 category: 'rendering',
 fn: function (html){
 var self=this;
-var $1,$2,$3,$4,$5,$6,$7,$9,$10,$11,$12,$8;
-smalltalk.send([],"_trapDescend_",[(function(snap){
-smalltalk.send(smalltalk.send(html,"_h2",[]),"_trap_",[[smalltalk.symbolFor("title")]]);
-return smalltalk.send(smalltalk.send(html,"_div",[]),"_trap_toggle_ifNotPresent_",[[smalltalk.symbolFor("todos")],(function(){
-return smalltalk.send(snap,"_do_",[(function(){
-smalltalk.send(smalltalk.send(html,"_span",[]),"_trap_",[[smalltalk.symbolFor("remaining")]]);
-smalltalk.send(html,"_with_",[" of "]);
-smalltalk.send(smalltalk.send(html,"_span",[]),"_trap_",[[smalltalk.symbolFor("todos"), smalltalk.symbolFor("size")]]);
-smalltalk.send(html,"_with_",[" remaining [ "]);
-$1=smalltalk.send(html,"_a",[]);
-smalltalk.send($1,"_href_",[""]);
-smalltalk.send($1,"_onClick_",[(function(){
-return smalltalk.send((function(){
-smalltalk.send(snap,"_modify_",[(function(model){
-return smalltalk.send(model,"_archive",[]);
-})]);
+return smalltalk.withContext(function($ctx1) { 
var $1,$2,$3,$4,$5,$6,$7,$9,$10,$11,$12,$8;
+_st([])._trapDescend_((function(snap){
+return smalltalk.withContext(function($ctx2) {
_st(_st(html)._h2())._trap_([smalltalk.symbolFor("title")]);
+return _st(_st(html)._div())._trap_toggle_ifNotPresent_([smalltalk.symbolFor("todos")],(function(){
+return smalltalk.withContext(function($ctx3) {
return _st(snap)._do_((function(){
+return smalltalk.withContext(function($ctx4) {
_st(_st(html)._span())._trap_([smalltalk.symbolFor("remaining")]);
+_st(html)._with_(" of ");
+_st(_st(html)._span())._trap_([smalltalk.symbolFor("todos"), smalltalk.symbolFor("size")]);
+_st(html)._with_(" remaining [ ");
+$1=_st(html)._a();
+_st($1)._href_("");
+_st($1)._onClick_((function(){
+return smalltalk.withContext(function($ctx5) {
return _st((function(){
+return smalltalk.withContext(function($ctx6) {
_st(snap)._modify_((function(model){
+return smalltalk.withContext(function($ctx7) {
return _st(model)._archive();
+}, function($ctx7) {$ctx7.fillBlock({model:model},$ctx1)})}));
 return false;
-}),"_value",[]);
-})]);
-$2=smalltalk.send($1,"_with_",["archive"]);
+}, function($ctx6) {$ctx6.fillBlock({},$ctx1)})}))._value();
+}, function($ctx5) {$ctx5.fillBlock({},$ctx1)})}));
+$2=_st($1)._with_("archive");
 $2;
-smalltalk.send(html,"_with_",[" ]"]);
-smalltalk.send(smalltalk.send(html,"_ul",[]),"_trapIter_tag_do_",[[smalltalk.symbolFor("todos")],smalltalk.symbolFor("li"),(function(each){
-smalltalk.send(smalltalk.send(html,"_root",[]),"_empty",[]);
-$3=smalltalk.send(html,"_input",[]);
-smalltalk.send($3,"_type_",["checkbox"]);
-$4=smalltalk.send($3,"_trap_",[["done"]]);
+_st(html)._with_(" ]");
+_st(_st(html)._ul())._trapIter_tag_do_([smalltalk.symbolFor("todos")],smalltalk.symbolFor("li"),(function(each){
+return smalltalk.withContext(function($ctx5) {
_st(_st(html)._root())._empty();
+$3=_st(html)._input();
+_st($3)._type_("checkbox");
+$4=_st($3)._trap_(["done"]);
 $4;
-$5=smalltalk.send(html,"_span",[]);
-smalltalk.send($5,"_trap_read_",[["done"],(function(model){
-return smalltalk.send(smalltalk.send(html,"_root",[]),"_class_",[smalltalk.send("done-","__comma",[model])]);
-})]);
-$6=smalltalk.send($5,"_trap_",[["text"]]);
+$5=_st(html)._span();
+_st($5)._trap_read_(["done"],(function(model){
+return smalltalk.withContext(function($ctx6) {
return _st(_st(html)._root())._class_(_st("done-").__comma(model));
+}, function($ctx6) {$ctx6.fillBlock({model:model},$ctx1)})}));
+$6=_st($5)._trap_(["text"]);
 return $6;
-})]);
-$7=smalltalk.send(html,"_form",[]);
-smalltalk.send($7,"_onSubmit_",[(function(){
-return smalltalk.send((function(){
-smalltalk.send(snap,"_modify_",[(function(model){
-return smalltalk.send(model,"_addTodo",[]);
-})]);
+}, function($ctx5) {$ctx5.fillBlock({each:each},$ctx1)})}));
+$7=_st(html)._form();
+_st($7)._onSubmit_((function(){
+return smalltalk.withContext(function($ctx5) {
return _st((function(){
+return smalltalk.withContext(function($ctx6) {
_st(snap)._modify_((function(model){
+return smalltalk.withContext(function($ctx7) {
return _st(model)._addTodo();
+}, function($ctx7) {$ctx7.fillBlock({model:model},$ctx1)})}));
 return false;
-}),"_value",[]);
-})]);
-$8=smalltalk.send($7,"_with_",[(function(){
-$9=smalltalk.send(html,"_input",[]);
-smalltalk.send($9,"_type_",["text"]);
-smalltalk.send($9,"_trap_",[[smalltalk.symbolFor("todoText")]]);
-smalltalk.send($9,"_at_put_",["size",(30)]);
-$10=smalltalk.send($9,"_placeholder_",["add new todo here"]);
+}, function($ctx6) {$ctx6.fillBlock({},$ctx1)})}))._value();
+}, function($ctx5) {$ctx5.fillBlock({},$ctx1)})}));
+$8=_st($7)._with_((function(){
+return smalltalk.withContext(function($ctx5) {
$9=_st(html)._input();
+_st($9)._type_("text");
+_st($9)._trap_([smalltalk.symbolFor("todoText")]);
+_st($9)._at_put_("size",(30));
+$10=_st($9)._placeholder_("add new todo here");
 $10;
-$11=smalltalk.send(html,"_input",[]);
-smalltalk.send($11,"_class_",["btn-primary"]);
-smalltalk.send($11,"_type_",["submit"]);
-$12=smalltalk.send($11,"_value_",["add"]);
+$11=_st(html)._input();
+_st($11)._class_("btn-primary");
+_st($11)._type_("submit");
+$12=_st($11)._value_("add");
 return $12;
-})]);
+}, function($ctx5) {$ctx5.fillBlock({},$ctx1)})}));
 return $8;
-})]);
-}),(function(){
-return smalltalk.send(html,"_with_",["Loading ..."]);
-})]);
-})]);
-return self},
+}, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
+}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}),(function(){
+return smalltalk.withContext(function($ctx3) {
return _st(html)._with_("Loading ...");
+}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
+}, function($ctx2) {$ctx2.fillBlock({snap:snap},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html}, smalltalk.AppView)})},
 args: ["html"],
 source: "renderOn: html\x0a    #() trapDescend: [ :snap |\x0a\x09html h2 trap: #(#title).\x0a    html div trap: #(#todos) toggle: [ snap do: [\x0a        html span trap:#(#remaining).\x0a        html with: ' of '.\x0a        html span trap: #(#todos #size).\x0a        html with: ' remaining [ '.\x0a        html a href:''; onClick: [[\x0a            snap modify: [ :model | model archive ].\x0a            false\x0a        ] value \x22amber GH-314 workaround\x22]; with: 'archive'.\x0a        html with: ' ]'.\x0a        html ul trapIter: #(#todos) tag: #li do: [ :each |\x0a            html root empty.\x0a            html input type: 'checkbox'; trap: #('done').\x0a            html span trap: #('done') read: [ :model | html root class: 'done-', model ]; trap: #('text').\x0a        ].\x0a        html form onSubmit: [[\x0a            snap modify: [ :model | model addTodo ].\x0a            false\x0a        ] value \x22amber GH-314 workaround\x22]; with: [\x0a            html input type: 'text'; trap: #(#todoText); at: 'size' put: 30; placeholder: 'add new todo here'.\x0a            html input class: 'btn-primary'; type: 'submit'; value: 'add'.\x0a        ].\x0a    ]] ifNotPresent: [ html with: 'Loading ...' ]]",
 messageSends: ["trapDescend:", "trap:", "h2", "trap:toggle:ifNotPresent:", "do:", "span", "with:", "href:", "a", "onClick:", "value", "modify:", "archive", "trapIter:tag:do:", "empty", "root", "type:", "input", "trap:read:", "class:", ",", "ul", "onSubmit:", "addTodo", "form", "at:put:", "placeholder:", "value:", "div"],

+ 247 - 236
lib/js/Trapped-Frontend.deploy.js

@@ -6,8 +6,8 @@ smalltalk.method({
 selector: "brush:",
 fn: function (aTagBrush){
 var self=this;
-self["@brush"]=aTagBrush;
-return self}
+return smalltalk.withContext(function($ctx1) { 
self["@brush"]=aTagBrush;
+return self}, function($ctx1) {$ctx1.fill(self,"brush:",{aTagBrush:aTagBrush}, smalltalk.TrappedBinder)})}
 }),
 smalltalk.TrappedBinder);
 
@@ -17,8 +17,8 @@ smalltalk.method({
 selector: "installFor:",
 fn: function (path){
 var self=this;
-smalltalk.send(self["@brush"],"_trap_read_",[path,smalltalk.send(self,"_showBlock",[])]);
-return self}
+return smalltalk.withContext(function($ctx1) { 
_st(self["@brush"])._trap_read_(path,_st(self)._showBlock());
+return self}, function($ctx1) {$ctx1.fill(self,"installFor:",{path:path}, smalltalk.TrappedBinder)})}
 }),
 smalltalk.TrappedBinder);
 
@@ -28,9 +28,8 @@ smalltalk.method({
 selector: "prim:",
 fn: function (anObject){
 var self=this;
-return anObject.valueOf();
-;
-return self}
+return smalltalk.withContext(function($ctx1) { 
return anObject.valueOf();
+return self}, function($ctx1) {$ctx1.fill(self,"prim:",{anObject:anObject}, smalltalk.TrappedBinder)})}
 }),
 smalltalk.TrappedBinder);
 
@@ -40,20 +39,23 @@ smalltalk.method({
 selector: "showBlock",
 fn: function (){
 var self=this;
-var $3,$2,$1;
+return smalltalk.withContext(function($ctx1) { 
var $2,$4,$6,$5,$3,$1;
 $1=(function(model){
-smalltalk.send(self["@brush"],"_empty",[]);
-if(($receiver = model) == nil || $receiver == undefined){
-$3=(function(){
-});
+return smalltalk.withContext(function($ctx2) {
$2=self["@brush"];
+_st($2)._empty();
+$4=$2;
+$6=model;
+if(($receiver = $6) == nil || $receiver == undefined){
+$5=(function(){
+return smalltalk.withContext(function($ctx3) {
}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})});
 } else {
-$3=model;
+$5=$6;
 };
-$2=smalltalk.send(self["@brush"],"_with_",[$3]);
-return $2;
-});
+$3=_st($4)._with_($5);
+return $3;
+}, function($ctx2) {$ctx2.fillBlock({model:model},$ctx1)})});
 return $1;
-}
+}, function($ctx1) {$ctx1.fill(self,"showBlock",{}, smalltalk.TrappedBinder)})}
 }),
 smalltalk.TrappedBinder);
 
@@ -66,15 +68,15 @@ smalltalk.method({
 selector: "installFor:",
 fn: function (path){
 var self=this;
-smalltalk.send(self,"_installFor_",[path],smalltalk.TrappedBinder);
-smalltalk.send(path,"_trapDescend_",[(function(snap){
-return smalltalk.send(self["@brush"],"_onChange_",[(function(){
-return smalltalk.send(snap,"_modify_",[(function(){
-return smalltalk.send(smalltalk.send(smalltalk.send(self["@brush"],"_asJQuery",[]),"_attr_",["checked"]),"_notNil",[]);
-})]);
-})]);
-})]);
-return self}
+return smalltalk.withContext(function($ctx1) { 
smalltalk.TrappedBinder.fn.prototype._installFor_.apply(_st(self), [path]);
+_st(path)._trapDescend_((function(snap){
+return smalltalk.withContext(function($ctx2) {
return _st(self["@brush"])._onChange_((function(){
+return smalltalk.withContext(function($ctx3) {
return _st(snap)._modify_((function(){
+return smalltalk.withContext(function($ctx4) {
return _st(_st(_st(self["@brush"])._asJQuery())._attr_("checked"))._notNil();
+}, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
+}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
+}, function($ctx2) {$ctx2.fillBlock({snap:snap},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"installFor:",{path:path}, smalltalk.TrappedCheckedBinder)})}
 }),
 smalltalk.TrappedCheckedBinder);
 
@@ -84,16 +86,16 @@ smalltalk.method({
 selector: "showBlock",
 fn: function (){
 var self=this;
-var $1;
+return smalltalk.withContext(function($ctx1) { 
var $1;
 $1=(function(model){
-return smalltalk.send(smalltalk.send(self["@brush"],"_asJQuery",[]),"_attr_put_",["checked",smalltalk.send(model,"_ifNotNil_ifNil_",[(function(){
-return smalltalk.send(self,"_prim_",[model]);
-}),(function(){
-return false;
-})])]);
-});
+return smalltalk.withContext(function($ctx2) {
return _st(_st(self["@brush"])._asJQuery())._attr_put_("checked",_st(model)._ifNotNil_ifNil_((function(){
+return smalltalk.withContext(function($ctx3) {
return _st(self)._prim_(model);
+}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}),(function(){
+return smalltalk.withContext(function($ctx3) {
return false;
+}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})})));
+}, function($ctx2) {$ctx2.fillBlock({model:model},$ctx1)})});
 return $1;
-}
+}, function($ctx1) {$ctx1.fill(self,"showBlock",{}, smalltalk.TrappedCheckedBinder)})}
 }),
 smalltalk.TrappedCheckedBinder);
 
@@ -106,15 +108,15 @@ smalltalk.method({
 selector: "installFor:",
 fn: function (path){
 var self=this;
-smalltalk.send(self,"_installFor_",[path],smalltalk.TrappedBinder);
-smalltalk.send(path,"_trapDescend_",[(function(snap){
-return smalltalk.send(self["@brush"],"_onChange_",[(function(){
-return smalltalk.send(snap,"_modify_",[(function(){
-return smalltalk.send(smalltalk.send(self["@brush"],"_asJQuery",[]),"_val",[]);
-})]);
-})]);
-})]);
-return self}
+return smalltalk.withContext(function($ctx1) { 
smalltalk.TrappedBinder.fn.prototype._installFor_.apply(_st(self), [path]);
+_st(path)._trapDescend_((function(snap){
+return smalltalk.withContext(function($ctx2) {
return _st(self["@brush"])._onChange_((function(){
+return smalltalk.withContext(function($ctx3) {
return _st(snap)._modify_((function(){
+return smalltalk.withContext(function($ctx4) {
return _st(_st(self["@brush"])._asJQuery())._val();
+}, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
+}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
+}, function($ctx2) {$ctx2.fillBlock({snap:snap},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"installFor:",{path:path}, smalltalk.TrappedValBinder)})}
 }),
 smalltalk.TrappedValBinder);
 
@@ -124,17 +126,17 @@ smalltalk.method({
 selector: "showBlock",
 fn: function (){
 var self=this;
-var $1;
+return smalltalk.withContext(function($ctx1) { 
var $1;
 $1=(function(model){
-return smalltalk.send(smalltalk.send(self["@brush"],"_asJQuery",[]),"_val_",[smalltalk.send(model,"_ifNotNil_ifNil_",[(function(){
-return smalltalk.send(self,"_prim_",[model]);
-}),(function(){
-return (function(){
-});
-})])]);
-});
+return smalltalk.withContext(function($ctx2) {
return _st(_st(self["@brush"])._asJQuery())._val_(_st(model)._ifNotNil_ifNil_((function(){
+return smalltalk.withContext(function($ctx3) {
return _st(self)._prim_(model);
+}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}),(function(){
+return smalltalk.withContext(function($ctx3) {
return (function(){
+return smalltalk.withContext(function($ctx4) {
}, function($ctx4) {$ctx4.fillBlock({},$ctx1)})});
+}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})})));
+}, function($ctx2) {$ctx2.fillBlock({model:model},$ctx1)})});
 return $1;
-}
+}, function($ctx1) {$ctx1.fill(self,"showBlock",{}, smalltalk.TrappedValBinder)})}
 }),
 smalltalk.TrappedValBinder);
 
@@ -147,8 +149,8 @@ smalltalk.method({
 selector: "renderOn:",
 fn: function (html){
 var self=this;
-smalltalk.send(smalltalk.send(html,"_root",[]),"_trap_",[[]]);
-return self}
+return smalltalk.withContext(function($ctx1) { 
_st(_st(html)._root())._trap_([]);
+return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html}, smalltalk.TrappedDumbView)})}
 }),
 smalltalk.TrappedDumbView);
 
@@ -161,10 +163,10 @@ smalltalk.method({
 selector: "start:",
 fn: function (args){
 var self=this;
-var $1;
-$1=smalltalk.send(self,"_subclassResponsibility",[]);
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=_st(self)._subclassResponsibility();
 return $1;
-}
+}, function($ctx1) {$ctx1.fill(self,"start:",{args:args}, smalltalk.TrappedSingleton)})}
 }),
 smalltalk.TrappedSingleton);
 
@@ -176,15 +178,16 @@ smalltalk.method({
 selector: "current",
 fn: function (){
 var self=this;
-var $1;
-if(($receiver = self["@current"]) == nil || $receiver == undefined){
-self["@current"]=smalltalk.send(self,"_new",[]);
+return smalltalk.withContext(function($ctx1) { 
var $2,$1;
+$2=self["@current"];
+if(($receiver = $2) == nil || $receiver == undefined){
+self["@current"]=_st(self)._new();
 $1=self["@current"];
 } else {
-$1=self["@current"];
+$1=$2;
 };
 return $1;
-}
+}, function($ctx1) {$ctx1.fill(self,"current",{}, smalltalk.TrappedSingleton.klass)})}
 }),
 smalltalk.TrappedSingleton.klass);
 
@@ -192,10 +195,10 @@ smalltalk.addMethod(
 "_start_",
 smalltalk.method({
 selector: "start:",
-fn: function (zzz){
+fn: function (args){
 var self=this;
-smalltalk.send(smalltalk.send(self,"_current",[]),"_perform_withArguments_",[smalltalk.symbolFor("start:"),arguments]);
-return self}
+return smalltalk.withContext(function($ctx1) { 
_st(_st(self)._current())._start_(args);
+return self}, function($ctx1) {$ctx1.fill(self,"start:",{args:args}, smalltalk.TrappedSingleton.klass)})}
 }),
 smalltalk.TrappedSingleton.klass);
 
@@ -207,37 +210,39 @@ smalltalk.method({
 selector: "binder:",
 fn: function (aTagBrush){
 var self=this;
-var $1,$2,$3,$5,$4;
-var binder;
-var tag;
-tag=smalltalk.send(smalltalk.send(aTagBrush,"_element",[]),"_nodeName",[]);
-$1=smalltalk.send(tag,"__eq",["INPUT"]);
-if(smalltalk.assert($1)){
+var binder,tag;
+return smalltalk.withContext(function($ctx1) { 
var $1,$3,$4,$2,$5,$7,$8,$6;
+tag=_st(_st(aTagBrush)._element())._nodeName();
+$1=_st(tag).__eq("INPUT");
+$2=(function(){
 var type;
-type=smalltalk.send(smalltalk.send(aTagBrush,"_asJQuery",[]),"_attr_",["type"]);
+return smalltalk.withContext(function($ctx2) {
type=_st(_st(aTagBrush)._asJQuery())._attr_("type");
 type;
-$2=smalltalk.send(type,"__eq",["checkbox"]);
-if(smalltalk.assert($2)){
-binder=smalltalk.send((smalltalk.TrappedCheckedBinder || TrappedCheckedBinder),"_new",[]);
-binder;
-};
-$3=smalltalk.send(type,"__eq",["text"]);
+$3=_st(type).__eq("checkbox");
 if(smalltalk.assert($3)){
-binder=smalltalk.send((smalltalk.TrappedValBinder || TrappedValBinder),"_new",[]);
+binder=_st((smalltalk.TrappedCheckedBinder || TrappedCheckedBinder))._new();
 binder;
 };
+$4=_st(type).__eq("text");
+if(smalltalk.assert($4)){
+binder=_st((smalltalk.TrappedValBinder || TrappedValBinder))._new();
+return binder;
 };
-if(($receiver = binder) == nil || $receiver == undefined){
-binder=smalltalk.send((smalltalk.TrappedBinder || TrappedBinder),"_new",[]);
+}, function($ctx2) {$ctx2.fillBlock({type:type},$ctx1)})});
+_st($1)._ifTrue_($2);
+$5=binder;
+if(($receiver = $5) == nil || $receiver == undefined){
+binder=_st((smalltalk.TrappedBinder || TrappedBinder))._new();
 binder;
 } else {
-binder;
+$5;
 };
-smalltalk.send(binder,"_brush_",[aTagBrush]);
-$5=smalltalk.send(binder,"_yourself",[]);
-$4=$5;
-return $4;
-}
+$7=binder;
+_st($7)._brush_(aTagBrush);
+$8=_st($7)._yourself();
+$6=$8;
+return $6;
+}, function($ctx1) {$ctx1.fill(self,"binder:",{aTagBrush:aTagBrush,binder:binder,tag:tag}, smalltalk.Trapped)})}
 }),
 smalltalk.Trapped);
 
@@ -247,10 +252,10 @@ smalltalk.method({
 selector: "byName:",
 fn: function (aString){
 var self=this;
-var $1;
-$1=smalltalk.send(self["@registry"],"_at_",[aString]);
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=_st(self["@registry"])._at_(aString);
 return $1;
-}
+}, function($ctx1) {$ctx1.fill(self,"byName:",{aString:aString}, smalltalk.Trapped)})}
 }),
 smalltalk.Trapped);
 
@@ -261,17 +266,16 @@ selector: "descend:snapshotDo:",
 fn: function (anArray,aBlock){
 var self=this;
 var tpsc;
-tpsc=smalltalk.send((smalltalk.TrappedPathStack || TrappedPathStack),"_current",[]);
-smalltalk.send(tpsc,"_append_do_",[anArray,(function(){
-var path;
-var model;
-path=smalltalk.send(smalltalk.send(tpsc,"_elements",[]),"_copy",[]);
+return smalltalk.withContext(function($ctx1) { 
tpsc=_st((smalltalk.TrappedPathStack || TrappedPathStack))._current();
+_st(tpsc)._append_do_(anArray,(function(){
+var path,model;
+return smalltalk.withContext(function($ctx2) {
path=_st(_st(tpsc)._elements())._copy();
 path;
-model=smalltalk.send(self,"_byName_",[smalltalk.send(path,"_first",[])]);
+model=_st(self)._byName_(_st(path)._first());
 model;
-return smalltalk.send(aBlock,"_value_",[smalltalk.send(smalltalk.send((smalltalk.TrappedSnapshot || TrappedSnapshot),"_new",[]),"_path_model_",[path,model])]);
-})]);
-return self}
+return _st(aBlock)._value_(_st(_st((smalltalk.TrappedSnapshot || TrappedSnapshot))._new())._path_model_(path,model));
+}, function($ctx2) {$ctx2.fillBlock({path:path,model:model},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"descend:snapshotDo:",{anArray:anArray,aBlock:aBlock,tpsc:tpsc}, smalltalk.Trapped)})}
 }),
 smalltalk.Trapped);
 
@@ -281,9 +285,9 @@ smalltalk.method({
 selector: "initialize",
 fn: function (){
 var self=this;
-smalltalk.send(self,"_initialize",[],smalltalk.TrappedSingleton);
+return smalltalk.withContext(function($ctx1) { 
smalltalk.TrappedSingleton.fn.prototype._initialize.apply(_st(self), []);
 self["@registry"]=smalltalk.HashedCollection._fromPairs_([]);
-return self}
+return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.Trapped)})}
 }),
 smalltalk.Trapped);
 
@@ -293,8 +297,8 @@ smalltalk.method({
 selector: "register:",
 fn: function (aListKeyedEntity){
 var self=this;
-smalltalk.send(self,"_register_name_",[aListKeyedEntity,smalltalk.send(smalltalk.send(aListKeyedEntity,"_class",[]),"_name",[])]);
-return self}
+return smalltalk.withContext(function($ctx1) { 
_st(self)._register_name_(aListKeyedEntity,_st(_st(aListKeyedEntity)._class())._name());
+return self}, function($ctx1) {$ctx1.fill(self,"register:",{aListKeyedEntity:aListKeyedEntity}, smalltalk.Trapped)})}
 }),
 smalltalk.Trapped);
 
@@ -304,8 +308,8 @@ smalltalk.method({
 selector: "register:name:",
 fn: function (aListKeyedEntity,aString){
 var self=this;
-smalltalk.send(self["@registry"],"_at_put_",[aString,aListKeyedEntity]);
-return self}
+return smalltalk.withContext(function($ctx1) { 
_st(self["@registry"])._at_put_(aString,aListKeyedEntity);
+return self}, function($ctx1) {$ctx1.fill(self,"register:name:",{aListKeyedEntity:aListKeyedEntity,aString:aString}, smalltalk.Trapped)})}
 }),
 smalltalk.Trapped);
 
@@ -313,48 +317,42 @@ smalltalk.addMethod(
 "_start_",
 smalltalk.method({
 selector: "start:",
-fn: function (zzz){
-var self=this;
-var $1;
-var args;
-args = [].slice.call(arguments);
-;
-smalltalk.send(args,"_do_",[(function(each){
-return smalltalk.send(self,"_register_",[each]);
-})]);
-smalltalk.send(smalltalk.send("[data-trap]","_asJQuery",[]),"_each_",[(function(index,elem){
-var trap;
-var jq;
-var viewName;
-var modelName;
-var tokens;
-var path;
-jq=smalltalk.send(elem,"_asJQuery",[]);
+fn: function (args){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
var $1,$3,$2;
+_st(args)._do_((function(each){
+return smalltalk.withContext(function($ctx2) {
return _st(self)._register_(each);
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
+$1=_st("[data-trap]")._asJQuery();
+$2=(function(index,elem){
+var trap,jq,viewName,modelName,tokens,path;
+return smalltalk.withContext(function($ctx2) {
jq=_st(elem)._asJQuery();
 jq;
-trap=smalltalk.send(jq,"_attr_",["data-trap"]);
+trap=_st(jq)._attr_("data-trap");
 trap;
-tokens=smalltalk.send(trap,"_tokenize_",[":"]);
+tokens=_st(trap)._tokenize_(":");
 tokens;
-$1=smalltalk.send(smalltalk.send(tokens,"_size",[]),"__eq",[(1)]);
-if(smalltalk.assert($1)){
-tokens=smalltalk.send(["TrappedDumbView"],"__comma",[tokens]);
+$3=_st(_st(tokens)._size()).__eq((1));
+if(smalltalk.assert($3)){
+tokens=_st(["TrappedDumbView"]).__comma(tokens);
 tokens;
 };
-viewName=smalltalk.send(tokens,"_first",[]);
+viewName=_st(tokens)._first();
 viewName;
-tokens=smalltalk.send(smalltalk.send(smalltalk.send(tokens,"_second",[]),"_tokenize_",[" "]),"_select_",[(function(each){
-return smalltalk.send(each,"_notEmpty",[]);
-})]);
+tokens=_st(_st(_st(tokens)._second())._tokenize_(" "))._select_((function(each){
+return smalltalk.withContext(function($ctx3) {
return _st(each)._notEmpty();
+}, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
 tokens;
-modelName=smalltalk.send(tokens,"_first",[]);
+modelName=_st(tokens)._first();
 modelName;
-path=smalltalk.send((smalltalk.Trapped || Trapped),"_parse_",[smalltalk.send(tokens,"_allButFirst",[])]);
+path=_st((smalltalk.Trapped || Trapped))._parse_(_st(tokens)._allButFirst());
 path;
-return smalltalk.send(smalltalk.send([modelName],"__comma",[path]),"_trapDescend_",[(function(){
-return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk),"_current",[]),"_at_",[viewName]),"_new",[]),"_appendToJQuery_",[jq]);
-})]);
-})]);
-return self}
+return _st(_st([modelName]).__comma(path))._trapDescend_((function(){
+return smalltalk.withContext(function($ctx3) {
return _st(_st(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._at_(viewName))._new())._appendToJQuery_(jq);
+}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
+}, function($ctx2) {$ctx2.fillBlock({index:index,elem:elem,trap:trap,jq:jq,viewName:viewName,modelName:modelName,tokens:tokens,path:path},$ctx1)})});
+_st($1)._each_($2);
+return self}, function($ctx1) {$ctx1.fill(self,"start:",{args:args}, smalltalk.Trapped)})}
 }),
 smalltalk.Trapped);
 
@@ -365,25 +363,28 @@ smalltalk.method({
 selector: "parse:",
 fn: function (anArray){
 var self=this;
-var $2,$3,$1;
-$1=smalltalk.send(anArray,"_collect_",[(function(each){
+return smalltalk.withContext(function($ctx1) { 
var $2,$4,$5,$7,$6,$3,$1;
+$2=anArray;
+$3=(function(each){
 var asNum;
-asNum = parseInt(each);
-;
-$2=smalltalk.send(asNum,"__eq",[asNum]);
-if(smalltalk.assert($2)){
-return asNum;
-} else {
-$3=smalltalk.send(smalltalk.send(each,"_first",[]),"__eq",["#"]);
-if(smalltalk.assert($3)){
-return smalltalk.send(smalltalk.send(each,"_allButFirst",[]),"_asSymbol",[]);
+return smalltalk.withContext(function($ctx2) {
_st(asNum).__eq(_st(each)._asNumber());
+$4=_st(asNum).__eq(asNum);
+$5=(function(){
+return smalltalk.withContext(function($ctx3) {
return asNum;
+}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})});
+$6=(function(){
+return smalltalk.withContext(function($ctx3) {
$7=_st(_st(each)._first()).__eq("#");
+if(smalltalk.assert($7)){
+return _st(_st(each)._allButFirst())._asSymbol();
 } else {
 return each;
 };
-};
-})]);
+}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})});
+return _st($4)._ifTrue_ifFalse_($5,$6);
+}, function($ctx2) {$ctx2.fillBlock({each:each,asNum:asNum},$ctx1)})});
+$1=_st($2)._collect_($3);
 return $1;
-}
+}, function($ctx1) {$ctx1.fill(self,"parse:",{anArray:anArray}, smalltalk.Trapped.klass)})}
 }),
 smalltalk.Trapped.klass);
 
@@ -395,8 +396,8 @@ smalltalk.method({
 selector: "append:do:",
 fn: function (anArray,aBlock){
 var self=this;
-smalltalk.send(self,"_with_do_",[smalltalk.send(self["@elements"],"__comma",[anArray]),aBlock]);
-return self}
+return smalltalk.withContext(function($ctx1) { 
_st(self)._with_do_(_st(self["@elements"]).__comma(anArray),aBlock);
+return self}, function($ctx1) {$ctx1.fill(self,"append:do:",{anArray:anArray,aBlock:aBlock}, smalltalk.TrappedPathStack)})}
 }),
 smalltalk.TrappedPathStack);
 
@@ -406,8 +407,10 @@ smalltalk.method({
 selector: "elements",
 fn: function (){
 var self=this;
-return self["@elements"];
-}
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=self["@elements"];
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"elements",{}, smalltalk.TrappedPathStack)})}
 }),
 smalltalk.TrappedPathStack);
 
@@ -417,9 +420,9 @@ smalltalk.method({
 selector: "initialize",
 fn: function (){
 var self=this;
-smalltalk.send(self,"_initialize",[],smalltalk.TrappedSingleton);
+return smalltalk.withContext(function($ctx1) { 
smalltalk.TrappedSingleton.fn.prototype._initialize.apply(_st(self), []);
 self["@elements"]=[];
-return self}
+return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.TrappedPathStack)})}
 }),
 smalltalk.TrappedPathStack);
 
@@ -430,16 +433,16 @@ selector: "with:do:",
 fn: function (anArray,aBlock){
 var self=this;
 var old;
-old=self["@elements"];
-smalltalk.send((function(){
-self["@elements"]=anArray;
+return smalltalk.withContext(function($ctx1) { 
old=self["@elements"];
+_st((function(){
+return smalltalk.withContext(function($ctx2) {
self["@elements"]=anArray;
 self["@elements"];
-return smalltalk.send(aBlock,"_value",[]);
-}),"_ensure_",[(function(){
-self["@elements"]=old;
+return _st(aBlock)._value();
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._ensure_((function(){
+return smalltalk.withContext(function($ctx2) {
self["@elements"]=old;
 return self["@elements"];
-})]);
-return self}
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"with:do:",{anArray:anArray,aBlock:aBlock,old:old}, smalltalk.TrappedPathStack)})}
 }),
 smalltalk.TrappedPathStack);
 
@@ -452,10 +455,10 @@ smalltalk.method({
 selector: "do:",
 fn: function (aBlock){
 var self=this;
-smalltalk.send(smalltalk.send((smalltalk.TrappedPathStack || TrappedPathStack),"_current",[]),"_with_do_",[self["@path"],(function(){
-return smalltalk.send(aBlock,"_value_",[self["@model"]]);
-})]);
-return self}
+return smalltalk.withContext(function($ctx1) { 
_st(_st((smalltalk.TrappedPathStack || TrappedPathStack))._current())._with_do_(self["@path"],(function(){
+return smalltalk.withContext(function($ctx2) {
return _st(aBlock)._value_(self["@model"]);
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"do:",{aBlock:aBlock}, smalltalk.TrappedSnapshot)})}
 }),
 smalltalk.TrappedSnapshot);
 
@@ -465,8 +468,10 @@ smalltalk.method({
 selector: "model",
 fn: function (){
 var self=this;
-return self["@model"];
-}
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=self["@model"];
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"model",{}, smalltalk.TrappedSnapshot)})}
 }),
 smalltalk.TrappedSnapshot);
 
@@ -476,8 +481,8 @@ smalltalk.method({
 selector: "modify:",
 fn: function (aBlock){
 var self=this;
-smalltalk.send(smalltalk.send(self,"_model",[]),"_modify_do_",[smalltalk.send(smalltalk.send(self,"_path",[]),"_allButFirst",[]),aBlock]);
-return self}
+return smalltalk.withContext(function($ctx1) { 
_st(_st(self)._model())._modify_do_(_st(_st(self)._path())._allButFirst(),aBlock);
+return self}, function($ctx1) {$ctx1.fill(self,"modify:",{aBlock:aBlock}, smalltalk.TrappedSnapshot)})}
 }),
 smalltalk.TrappedSnapshot);
 
@@ -487,8 +492,10 @@ smalltalk.method({
 selector: "path",
 fn: function (){
 var self=this;
-return self["@path"];
-}
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=self["@path"];
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"path",{}, smalltalk.TrappedSnapshot)})}
 }),
 smalltalk.TrappedSnapshot);
 
@@ -498,9 +505,9 @@ smalltalk.method({
 selector: "path:model:",
 fn: function (anArray,aTrappedMW){
 var self=this;
-self["@path"]=anArray;
+return smalltalk.withContext(function($ctx1) { 
self["@path"]=anArray;
 self["@model"]=aTrappedMW;
-return self}
+return self}, function($ctx1) {$ctx1.fill(self,"path:model:",{anArray:anArray,aTrappedMW:aTrappedMW}, smalltalk.TrappedSnapshot)})}
 }),
 smalltalk.TrappedSnapshot);
 
@@ -512,19 +519,8 @@ smalltalk.method({
 selector: "trapDescend:",
 fn: function (aBlock){
 var self=this;
-smalltalk.send(smalltalk.send((smalltalk.Trapped || Trapped),"_current",[]),"_descend_snapshotDo_",[self,aBlock]);
-return self}
-}),
-smalltalk.Array);
-
-smalltalk.addMethod(
-"_trapDescend_",
-smalltalk.method({
-selector: "trapDescend:",
-fn: function (aBlock){
-var self=this;
-smalltalk.send(smalltalk.send((smalltalk.Trapped || Trapped),"_current",[]),"_descend_snapshotDo_",[self,aBlock]);
-return self}
+return smalltalk.withContext(function($ctx1) { 
_st(_st((smalltalk.Trapped || Trapped))._current())._descend_snapshotDo_(self,aBlock);
+return self}, function($ctx1) {$ctx1.fill(self,"trapDescend:",{aBlock:aBlock}, smalltalk.Array)})}
 }),
 smalltalk.Array);
 
@@ -534,8 +530,8 @@ smalltalk.method({
 selector: "trap:",
 fn: function (path){
 var self=this;
-smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Trapped || Trapped),"_current",[]),"_binder_",[self]),"_installFor_",[path]);
-return self}
+return smalltalk.withContext(function($ctx1) { 
_st(_st(_st((smalltalk.Trapped || Trapped))._current())._binder_(self))._installFor_(path);
+return self}, function($ctx1) {$ctx1.fill(self,"trap:",{path:path}, smalltalk.TagBrush)})}
 }),
 smalltalk.TagBrush);
 
@@ -545,21 +541,26 @@ smalltalk.method({
 selector: "trap:read:",
 fn: function (path,aBlock){
 var self=this;
-var $1;
-smalltalk.send(path,"_trapDescend_",[(function(snap){
-return smalltalk.send(smalltalk.send(snap,"_model",[]),"_watch_do_",[smalltalk.send(smalltalk.send(snap,"_path",[]),"_allButFirst",[]),(function(data){
-$1=smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self,"_asJQuery",[]),"_closest_",["html"]),"_toArray",[]),"_isEmpty",[]);
-if(smalltalk.assert($1)){
-smalltalk.send((smalltalk.KeyedPubSubUnsubscribe || KeyedPubSubUnsubscribe),"_signal",[]);
+return smalltalk.withContext(function($ctx1) { 
var $1,$3,$4,$6,$5,$2;
+$1=path;
+$2=(function(snap){
+return smalltalk.withContext(function($ctx2) {
$3=_st(snap)._model();
+$4=_st(_st(snap)._path())._allButFirst();
+$5=(function(data){
+return smalltalk.withContext(function($ctx3) {
$6=_st(_st(_st(_st(self)._asJQuery())._closest_("html"))._toArray())._isEmpty();
+if(smalltalk.assert($6)){
+_st((smalltalk.KeyedPubSubUnsubscribe || KeyedPubSubUnsubscribe))._signal();
 };
-return smalltalk.send(snap,"_do_",[(function(){
-return smalltalk.send(self,"_with_",[(function(html){
-return smalltalk.send(aBlock,"_value_value_",[data,html]);
-})]);
-})]);
-})]);
-})]);
-return self}
+return _st(snap)._do_((function(){
+return smalltalk.withContext(function($ctx4) {
return _st(self)._with_((function(html){
+return smalltalk.withContext(function($ctx5) {
return _st(aBlock)._value_value_(data,html);
+}, function($ctx5) {$ctx5.fillBlock({html:html},$ctx1)})}));
+}, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
+}, function($ctx3) {$ctx3.fillBlock({data:data},$ctx1)})});
+return _st($3)._watch_do_($4,$5);
+}, function($ctx2) {$ctx2.fillBlock({snap:snap},$ctx1)})});
+_st($1)._trapDescend_($2);
+return self}, function($ctx1) {$ctx1.fill(self,"trap:read:",{path:path,aBlock:aBlock}, smalltalk.TagBrush)})}
 }),
 smalltalk.TagBrush);
 
@@ -569,10 +570,10 @@ smalltalk.method({
 selector: "trap:toggle:",
 fn: function (path,aBlock){
 var self=this;
-smalltalk.send(self,"_trap_toggle_ifNotPresent_",[path,aBlock,(function(){
-return smalltalk.send(smalltalk.send(self,"_asJQuery",[]),"_hide",[]);
-})]);
-return self}
+return smalltalk.withContext(function($ctx1) { 
_st(self)._trap_toggle_ifNotPresent_(path,aBlock,(function(){
+return smalltalk.withContext(function($ctx2) {
return _st(_st(self)._asJQuery())._hide();
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"trap:toggle:",{path:path,aBlock:aBlock}, smalltalk.TagBrush)})}
 }),
 smalltalk.TagBrush);
 
@@ -582,27 +583,32 @@ smalltalk.method({
 selector: "trap:toggle:ifNotPresent:",
 fn: function (path,aBlock,anotherBlock){
 var self=this;
-var $1,$2,$3,$4;
 var shown;
+return smalltalk.withContext(function($ctx1) { 
var $1,$2,$4,$6,$7,$9,$8,$5,$3;
 shown=nil;
-smalltalk.send(self,"_trap_read_",[path,(function(data,html){
-$1=smalltalk.send(shown,"__eq",[smalltalk.send(data,"_notNil",[])]);
-if(! smalltalk.assert($1)){
-shown=smalltalk.send(data,"_notNil",[]);
+$1=self;
+$2=path;
+$3=(function(data,html){
+return smalltalk.withContext(function($ctx2) {
$4=_st(shown).__eq(_st(data)._notNil());
+$5=(function(){
+return smalltalk.withContext(function($ctx3) {
shown=_st(data)._notNil();
 shown;
-$2=smalltalk.send(self,"_asJQuery",[]);
-smalltalk.send($2,"_empty",[]);
-$3=smalltalk.send($2,"_show",[]);
-$3;
-if(smalltalk.assert(shown)){
-$4=aBlock;
+$6=_st(self)._asJQuery();
+_st($6)._empty();
+$7=_st($6)._show();
+$7;
+$9=shown;
+if(smalltalk.assert($9)){
+$8=aBlock;
 } else {
-$4=anotherBlock;
-};
-return smalltalk.send($4,"_value_value_",[data,html]);
+$8=anotherBlock;
 };
-})]);
-return self}
+return _st($8)._value_value_(data,html);
+}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})});
+return _st($4)._ifFalse_($5);
+}, function($ctx2) {$ctx2.fillBlock({data:data,html:html},$ctx1)})});
+_st($1)._trap_read_($2,$3);
+return self}, function($ctx1) {$ctx1.fill(self,"trap:toggle:ifNotPresent:",{path:path,aBlock:aBlock,anotherBlock:anotherBlock,shown:shown}, smalltalk.TagBrush)})}
 }),
 smalltalk.TagBrush);
 
@@ -612,17 +618,22 @@ smalltalk.method({
 selector: "trapIter:tag:do:",
 fn: function (path,aSymbol,aBlock){
 var self=this;
-smalltalk.send(self,"_trap_read_",[path,(function(model,html){
-smalltalk.send(smalltalk.send(html,"_root",[]),"_empty",[]);
-if(($receiver = model) == nil || $receiver == undefined){
-return model;
+return smalltalk.withContext(function($ctx1) { 
var $1,$2,$4,$3;
+$1=self;
+$2=path;
+$3=(function(model,html){
+return smalltalk.withContext(function($ctx2) {
_st(_st(html)._root())._empty();
+$4=model;
+if(($receiver = $4) == nil || $receiver == undefined){
+return $4;
 } else {
-return smalltalk.send(model,"_withIndexDo_",[(function(item,i){
-return smalltalk.send(smalltalk.send(html,"_perform_",[aSymbol]),"_trap_read_",[[i],aBlock]);
-})]);
+return _st(model)._withIndexDo_((function(item,i){
+return smalltalk.withContext(function($ctx3) {
return _st(_st(html)._perform_(aSymbol))._trap_read_([i],aBlock);
+}, function($ctx3) {$ctx3.fillBlock({item:item,i:i},$ctx1)})}));
 };
-})]);
-return self}
+}, function($ctx2) {$ctx2.fillBlock({model:model,html:html},$ctx1)})});
+_st($1)._trap_read_($2,$3);
+return self}, function($ctx1) {$ctx1.fill(self,"trapIter:tag:do:",{path:path,aSymbol:aSymbol,aBlock:aBlock}, smalltalk.TagBrush)})}
 }),
 smalltalk.TagBrush);
 

+ 254 - 248
lib/js/Trapped-Frontend.js

@@ -7,8 +7,8 @@ selector: "brush:",
 category: 'accessing',
 fn: function (aTagBrush){
 var self=this;
-self["@brush"]=aTagBrush;
-return self},
+return smalltalk.withContext(function($ctx1) { 
self["@brush"]=aTagBrush;
+return self}, function($ctx1) {$ctx1.fill(self,"brush:",{aTagBrush:aTagBrush}, smalltalk.TrappedBinder)})},
 args: ["aTagBrush"],
 source: "brush: aTagBrush\x0a\x09brush := aTagBrush",
 messageSends: [],
@@ -23,8 +23,8 @@ selector: "installFor:",
 category: 'action',
 fn: function (path){
 var self=this;
-smalltalk.send(self["@brush"],"_trap_read_",[path,smalltalk.send(self,"_showBlock",[])]);
-return self},
+return smalltalk.withContext(function($ctx1) { 
_st(self["@brush"])._trap_read_(path,_st(self)._showBlock());
+return self}, function($ctx1) {$ctx1.fill(self,"installFor:",{path:path}, smalltalk.TrappedBinder)})},
 args: ["path"],
 source: "installFor: path\x0a\x09brush trap: path read: self showBlock",
 messageSends: ["trap:read:", "showBlock"],
@@ -39,9 +39,8 @@ selector: "prim:",
 category: 'converting',
 fn: function (anObject){
 var self=this;
-return anObject.valueOf();
-;
-return self},
+return smalltalk.withContext(function($ctx1) { 
return anObject.valueOf();
+return self}, function($ctx1) {$ctx1.fill(self,"prim:",{anObject:anObject}, smalltalk.TrappedBinder)})},
 args: ["anObject"],
 source: "prim: anObject\x0a\x09<return anObject.valueOf()>",
 messageSends: [],
@@ -56,20 +55,23 @@ selector: "showBlock",
 category: 'action',
 fn: function (){
 var self=this;
-var $3,$2,$1;
+return smalltalk.withContext(function($ctx1) { 
var $2,$4,$6,$5,$3,$1;
 $1=(function(model){
-smalltalk.send(self["@brush"],"_empty",[]);
-if(($receiver = model) == nil || $receiver == undefined){
-$3=(function(){
-});
+return smalltalk.withContext(function($ctx2) {
$2=self["@brush"];
+_st($2)._empty();
+$4=$2;
+$6=model;
+if(($receiver = $6) == nil || $receiver == undefined){
+$5=(function(){
+return smalltalk.withContext(function($ctx3) {
}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})});
 } else {
-$3=model;
+$5=$6;
 };
-$2=smalltalk.send(self["@brush"],"_with_",[$3]);
-return $2;
-});
+$3=_st($4)._with_($5);
+return $3;
+}, function($ctx2) {$ctx2.fillBlock({model:model},$ctx1)})});
 return $1;
-},
+}, function($ctx1) {$ctx1.fill(self,"showBlock",{}, smalltalk.TrappedBinder)})},
 args: [],
 source: "showBlock\x0a\x09^[ :model | brush empty; with: (model ifNil: [[]]) ]",
 messageSends: ["empty", "with:", "ifNil:"],
@@ -87,15 +89,15 @@ selector: "installFor:",
 category: 'action',
 fn: function (path){
 var self=this;
-smalltalk.send(self,"_installFor_",[path],smalltalk.TrappedBinder);
-smalltalk.send(path,"_trapDescend_",[(function(snap){
-return smalltalk.send(self["@brush"],"_onChange_",[(function(){
-return smalltalk.send(snap,"_modify_",[(function(){
-return smalltalk.send(smalltalk.send(smalltalk.send(self["@brush"],"_asJQuery",[]),"_attr_",["checked"]),"_notNil",[]);
-})]);
-})]);
-})]);
-return self},
+return smalltalk.withContext(function($ctx1) { 
smalltalk.TrappedBinder.fn.prototype._installFor_.apply(_st(self), [path]);
+_st(path)._trapDescend_((function(snap){
+return smalltalk.withContext(function($ctx2) {
return _st(self["@brush"])._onChange_((function(){
+return smalltalk.withContext(function($ctx3) {
return _st(snap)._modify_((function(){
+return smalltalk.withContext(function($ctx4) {
return _st(_st(_st(self["@brush"])._asJQuery())._attr_("checked"))._notNil();
+}, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
+}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
+}, function($ctx2) {$ctx2.fillBlock({snap:snap},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"installFor:",{path:path}, smalltalk.TrappedCheckedBinder)})},
 args: ["path"],
 source: "installFor: path\x0a\x09super installFor: path.\x0a    path trapDescend: [ :snap |\x0a\x09    brush onChange: [ snap modify: [\x0a            (brush asJQuery attr: 'checked') notNil\x0a        ]]\x0a    ]",
 messageSends: ["installFor:", "trapDescend:", "onChange:", "modify:", "notNil", "attr:", "asJQuery"],
@@ -110,16 +112,16 @@ selector: "showBlock",
 category: 'action',
 fn: function (){
 var self=this;
-var $1;
+return smalltalk.withContext(function($ctx1) { 
var $1;
 $1=(function(model){
-return smalltalk.send(smalltalk.send(self["@brush"],"_asJQuery",[]),"_attr_put_",["checked",smalltalk.send(model,"_ifNotNil_ifNil_",[(function(){
-return smalltalk.send(self,"_prim_",[model]);
-}),(function(){
-return false;
-})])]);
-});
+return smalltalk.withContext(function($ctx2) {
return _st(_st(self["@brush"])._asJQuery())._attr_put_("checked",_st(model)._ifNotNil_ifNil_((function(){
+return smalltalk.withContext(function($ctx3) {
return _st(self)._prim_(model);
+}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}),(function(){
+return smalltalk.withContext(function($ctx3) {
return false;
+}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})})));
+}, function($ctx2) {$ctx2.fillBlock({model:model},$ctx1)})});
 return $1;
-},
+}, function($ctx1) {$ctx1.fill(self,"showBlock",{}, smalltalk.TrappedCheckedBinder)})},
 args: [],
 source: "showBlock\x0a\x09^[ :model | brush asJQuery attr: 'checked' put: (model ifNotNil: [ self prim: model ] ifNil: [ false ]) ]",
 messageSends: ["attr:put:", "ifNotNil:ifNil:", "prim:", "asJQuery"],
@@ -137,15 +139,15 @@ selector: "installFor:",
 category: 'action',
 fn: function (path){
 var self=this;
-smalltalk.send(self,"_installFor_",[path],smalltalk.TrappedBinder);
-smalltalk.send(path,"_trapDescend_",[(function(snap){
-return smalltalk.send(self["@brush"],"_onChange_",[(function(){
-return smalltalk.send(snap,"_modify_",[(function(){
-return smalltalk.send(smalltalk.send(self["@brush"],"_asJQuery",[]),"_val",[]);
-})]);
-})]);
-})]);
-return self},
+return smalltalk.withContext(function($ctx1) { 
smalltalk.TrappedBinder.fn.prototype._installFor_.apply(_st(self), [path]);
+_st(path)._trapDescend_((function(snap){
+return smalltalk.withContext(function($ctx2) {
return _st(self["@brush"])._onChange_((function(){
+return smalltalk.withContext(function($ctx3) {
return _st(snap)._modify_((function(){
+return smalltalk.withContext(function($ctx4) {
return _st(_st(self["@brush"])._asJQuery())._val();
+}, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
+}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
+}, function($ctx2) {$ctx2.fillBlock({snap:snap},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"installFor:",{path:path}, smalltalk.TrappedValBinder)})},
 args: ["path"],
 source: "installFor: path\x0a\x09super installFor: path.\x0a    path trapDescend: [ :snap |\x0a\x09    brush onChange: [ snap modify: [\x0a            brush asJQuery val\x0a        ]]\x0a    ]",
 messageSends: ["installFor:", "trapDescend:", "onChange:", "modify:", "val", "asJQuery"],
@@ -160,17 +162,17 @@ selector: "showBlock",
 category: 'action',
 fn: function (){
 var self=this;
-var $1;
+return smalltalk.withContext(function($ctx1) { 
var $1;
 $1=(function(model){
-return smalltalk.send(smalltalk.send(self["@brush"],"_asJQuery",[]),"_val_",[smalltalk.send(model,"_ifNotNil_ifNil_",[(function(){
-return smalltalk.send(self,"_prim_",[model]);
-}),(function(){
-return (function(){
-});
-})])]);
-});
+return smalltalk.withContext(function($ctx2) {
return _st(_st(self["@brush"])._asJQuery())._val_(_st(model)._ifNotNil_ifNil_((function(){
+return smalltalk.withContext(function($ctx3) {
return _st(self)._prim_(model);
+}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}),(function(){
+return smalltalk.withContext(function($ctx3) {
return (function(){
+return smalltalk.withContext(function($ctx4) {
}, function($ctx4) {$ctx4.fillBlock({},$ctx1)})});
+}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})})));
+}, function($ctx2) {$ctx2.fillBlock({model:model},$ctx1)})});
 return $1;
-},
+}, function($ctx1) {$ctx1.fill(self,"showBlock",{}, smalltalk.TrappedValBinder)})},
 args: [],
 source: "showBlock\x0a\x09^[ :model | brush asJQuery val: (model ifNotNil: [self prim: model] ifNil: [[]]) ]",
 messageSends: ["val:", "ifNotNil:ifNil:", "prim:", "asJQuery"],
@@ -189,8 +191,8 @@ selector: "renderOn:",
 category: 'rendering',
 fn: function (html){
 var self=this;
-smalltalk.send(smalltalk.send(html,"_root",[]),"_trap_",[[]]);
-return self},
+return smalltalk.withContext(function($ctx1) { 
_st(_st(html)._root())._trap_([]);
+return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html}, smalltalk.TrappedDumbView)})},
 args: ["html"],
 source: "renderOn: html\x0a\x09html root trap: #()",
 messageSends: ["trap:", "root"],
@@ -208,10 +210,10 @@ selector: "start:",
 category: 'action',
 fn: function (args){
 var self=this;
-var $1;
-$1=smalltalk.send(self,"_subclassResponsibility",[]);
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=_st(self)._subclassResponsibility();
 return $1;
-},
+}, function($ctx1) {$ctx1.fill(self,"start:",{args:args}, smalltalk.TrappedSingleton)})},
 args: ["args"],
 source: "start: args\x0a\x09^ self subclassResponsibility",
 messageSends: ["subclassResponsibility"],
@@ -228,15 +230,16 @@ selector: "current",
 category: 'accessing',
 fn: function (){
 var self=this;
-var $1;
-if(($receiver = self["@current"]) == nil || $receiver == undefined){
-self["@current"]=smalltalk.send(self,"_new",[]);
+return smalltalk.withContext(function($ctx1) { 
var $2,$1;
+$2=self["@current"];
+if(($receiver = $2) == nil || $receiver == undefined){
+self["@current"]=_st(self)._new();
 $1=self["@current"];
 } else {
-$1=self["@current"];
+$1=$2;
 };
 return $1;
-},
+}, function($ctx1) {$ctx1.fill(self,"current",{}, smalltalk.TrappedSingleton.klass)})},
 args: [],
 source: "current\x0a\x09^ current ifNil: [ current := self new ]",
 messageSends: ["ifNil:", "new"],
@@ -249,13 +252,13 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "start:",
 category: 'action',
-fn: function (zzz){
+fn: function (args){
 var self=this;
-smalltalk.send(smalltalk.send(self,"_current",[]),"_perform_withArguments_",[smalltalk.symbolFor("start:"),arguments]);
-return self},
-args: ["zzz"],
-source: "start: zzz\x0a\x09self current perform: #start: withArguments: arguments",
-messageSends: ["perform:withArguments:", "current"],
+return smalltalk.withContext(function($ctx1) { 
_st(_st(self)._current())._start_(args);
+return self}, function($ctx1) {$ctx1.fill(self,"start:",{args:args}, smalltalk.TrappedSingleton.klass)})},
+args: ["args"],
+source: "start: args\x0a\x09self current start: args",
+messageSends: ["start:", "current"],
 referencedClasses: []
 }),
 smalltalk.TrappedSingleton.klass);
@@ -269,37 +272,39 @@ selector: "binder:",
 category: 'binders',
 fn: function (aTagBrush){
 var self=this;
-var $1,$2,$3,$5,$4;
-var binder;
-var tag;
-tag=smalltalk.send(smalltalk.send(aTagBrush,"_element",[]),"_nodeName",[]);
-$1=smalltalk.send(tag,"__eq",["INPUT"]);
-if(smalltalk.assert($1)){
+var binder,tag;
+return smalltalk.withContext(function($ctx1) { 
var $1,$3,$4,$2,$5,$7,$8,$6;
+tag=_st(_st(aTagBrush)._element())._nodeName();
+$1=_st(tag).__eq("INPUT");
+$2=(function(){
 var type;
-type=smalltalk.send(smalltalk.send(aTagBrush,"_asJQuery",[]),"_attr_",["type"]);
+return smalltalk.withContext(function($ctx2) {
type=_st(_st(aTagBrush)._asJQuery())._attr_("type");
 type;
-$2=smalltalk.send(type,"__eq",["checkbox"]);
-if(smalltalk.assert($2)){
-binder=smalltalk.send((smalltalk.TrappedCheckedBinder || TrappedCheckedBinder),"_new",[]);
-binder;
-};
-$3=smalltalk.send(type,"__eq",["text"]);
+$3=_st(type).__eq("checkbox");
 if(smalltalk.assert($3)){
-binder=smalltalk.send((smalltalk.TrappedValBinder || TrappedValBinder),"_new",[]);
+binder=_st((smalltalk.TrappedCheckedBinder || TrappedCheckedBinder))._new();
 binder;
 };
+$4=_st(type).__eq("text");
+if(smalltalk.assert($4)){
+binder=_st((smalltalk.TrappedValBinder || TrappedValBinder))._new();
+return binder;
 };
-if(($receiver = binder) == nil || $receiver == undefined){
-binder=smalltalk.send((smalltalk.TrappedBinder || TrappedBinder),"_new",[]);
+}, function($ctx2) {$ctx2.fillBlock({type:type},$ctx1)})});
+_st($1)._ifTrue_($2);
+$5=binder;
+if(($receiver = $5) == nil || $receiver == undefined){
+binder=_st((smalltalk.TrappedBinder || TrappedBinder))._new();
 binder;
 } else {
-binder;
+$5;
 };
-smalltalk.send(binder,"_brush_",[aTagBrush]);
-$5=smalltalk.send(binder,"_yourself",[]);
-$4=$5;
-return $4;
-},
+$7=binder;
+_st($7)._brush_(aTagBrush);
+$8=_st($7)._yourself();
+$6=$8;
+return $6;
+}, function($ctx1) {$ctx1.fill(self,"binder:",{aTagBrush:aTagBrush,binder:binder,tag:tag}, smalltalk.Trapped)})},
 args: ["aTagBrush"],
 source: "binder: aTagBrush\x0a    \x22Prototype; will select based on tag etc.\x22\x0a    | binder tag |\x0a    tag := aTagBrush element nodeName.\x0a    tag = 'INPUT' ifTrue: [\x0a        | type |\x0a        type := aTagBrush asJQuery attr: 'type'.\x0a        type = 'checkbox' ifTrue: [ binder := TrappedCheckedBinder new ].\x0a        type = 'text' ifTrue: [ binder := TrappedValBinder new ]\x0a    ].\x0a    binder ifNil: [ binder := TrappedBinder new ].\x0a    ^ binder brush: aTagBrush; yourself",
 messageSends: ["nodeName", "element", "ifTrue:", "attr:", "asJQuery", "new", "=", "ifNil:", "brush:", "yourself"],
@@ -314,10 +319,10 @@ selector: "byName:",
 category: 'accessing',
 fn: function (aString){
 var self=this;
-var $1;
-$1=smalltalk.send(self["@registry"],"_at_",[aString]);
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=_st(self["@registry"])._at_(aString);
 return $1;
-},
+}, function($ctx1) {$ctx1.fill(self,"byName:",{aString:aString}, smalltalk.Trapped)})},
 args: ["aString"],
 source: "byName: aString\x0a\x09^ registry at: aString",
 messageSends: ["at:"],
@@ -333,17 +338,16 @@ category: 'action',
 fn: function (anArray,aBlock){
 var self=this;
 var tpsc;
-tpsc=smalltalk.send((smalltalk.TrappedPathStack || TrappedPathStack),"_current",[]);
-smalltalk.send(tpsc,"_append_do_",[anArray,(function(){
-var path;
-var model;
-path=smalltalk.send(smalltalk.send(tpsc,"_elements",[]),"_copy",[]);
+return smalltalk.withContext(function($ctx1) { 
tpsc=_st((smalltalk.TrappedPathStack || TrappedPathStack))._current();
+_st(tpsc)._append_do_(anArray,(function(){
+var path,model;
+return smalltalk.withContext(function($ctx2) {
path=_st(_st(tpsc)._elements())._copy();
 path;
-model=smalltalk.send(self,"_byName_",[smalltalk.send(path,"_first",[])]);
+model=_st(self)._byName_(_st(path)._first());
 model;
-return smalltalk.send(aBlock,"_value_",[smalltalk.send(smalltalk.send((smalltalk.TrappedSnapshot || TrappedSnapshot),"_new",[]),"_path_model_",[path,model])]);
-})]);
-return self},
+return _st(aBlock)._value_(_st(_st((smalltalk.TrappedSnapshot || TrappedSnapshot))._new())._path_model_(path,model));
+}, function($ctx2) {$ctx2.fillBlock({path:path,model:model},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"descend:snapshotDo:",{anArray:anArray,aBlock:aBlock,tpsc:tpsc}, smalltalk.Trapped)})},
 args: ["anArray", "aBlock"],
 source: "descend: anArray snapshotDo: aBlock\x0a\x09| tpsc |\x0a    tpsc := TrappedPathStack current.\x0a    tpsc append: anArray do: [\x0a        | path model |\x0a        path := tpsc elements copy.\x0a   \x09    model := self byName: path first.\x0a        aBlock value: (TrappedSnapshot new path: path model: model)\x0a    ]",
 messageSends: ["current", "append:do:", "copy", "elements", "byName:", "first", "value:", "path:model:", "new"],
@@ -358,9 +362,9 @@ selector: "initialize",
 category: 'initialization',
 fn: function (){
 var self=this;
-smalltalk.send(self,"_initialize",[],smalltalk.TrappedSingleton);
+return smalltalk.withContext(function($ctx1) { 
smalltalk.TrappedSingleton.fn.prototype._initialize.apply(_st(self), []);
 self["@registry"]=smalltalk.HashedCollection._fromPairs_([]);
-return self},
+return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.Trapped)})},
 args: [],
 source: "initialize\x0a\x09super initialize.\x0a\x09registry := #{}.",
 messageSends: ["initialize"],
@@ -375,8 +379,8 @@ selector: "register:",
 category: 'accessing',
 fn: function (aListKeyedEntity){
 var self=this;
-smalltalk.send(self,"_register_name_",[aListKeyedEntity,smalltalk.send(smalltalk.send(aListKeyedEntity,"_class",[]),"_name",[])]);
-return self},
+return smalltalk.withContext(function($ctx1) { 
_st(self)._register_name_(aListKeyedEntity,_st(_st(aListKeyedEntity)._class())._name());
+return self}, function($ctx1) {$ctx1.fill(self,"register:",{aListKeyedEntity:aListKeyedEntity}, smalltalk.Trapped)})},
 args: ["aListKeyedEntity"],
 source: "register: aListKeyedEntity\x0a\x09self register: aListKeyedEntity name: aListKeyedEntity class name",
 messageSends: ["register:name:", "name", "class"],
@@ -391,8 +395,8 @@ selector: "register:name:",
 category: 'accessing',
 fn: function (aListKeyedEntity,aString){
 var self=this;
-smalltalk.send(self["@registry"],"_at_put_",[aString,aListKeyedEntity]);
-return self},
+return smalltalk.withContext(function($ctx1) { 
_st(self["@registry"])._at_put_(aString,aListKeyedEntity);
+return self}, function($ctx1) {$ctx1.fill(self,"register:name:",{aListKeyedEntity:aListKeyedEntity,aString:aString}, smalltalk.Trapped)})},
 args: ["aListKeyedEntity", "aString"],
 source: "register: aListKeyedEntity name: aString\x0a\x09registry at: aString put: aListKeyedEntity",
 messageSends: ["at:put:"],
@@ -405,50 +409,44 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "start:",
 category: 'action',
-fn: function (zzz){
-var self=this;
-var $1;
-var args;
-args = [].slice.call(arguments);
-;
-smalltalk.send(args,"_do_",[(function(each){
-return smalltalk.send(self,"_register_",[each]);
-})]);
-smalltalk.send(smalltalk.send("[data-trap]","_asJQuery",[]),"_each_",[(function(index,elem){
-var trap;
-var jq;
-var viewName;
-var modelName;
-var tokens;
-var path;
-jq=smalltalk.send(elem,"_asJQuery",[]);
+fn: function (args){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
var $1,$3,$2;
+_st(args)._do_((function(each){
+return smalltalk.withContext(function($ctx2) {
return _st(self)._register_(each);
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
+$1=_st("[data-trap]")._asJQuery();
+$2=(function(index,elem){
+var trap,jq,viewName,modelName,tokens,path;
+return smalltalk.withContext(function($ctx2) {
jq=_st(elem)._asJQuery();
 jq;
-trap=smalltalk.send(jq,"_attr_",["data-trap"]);
+trap=_st(jq)._attr_("data-trap");
 trap;
-tokens=smalltalk.send(trap,"_tokenize_",[":"]);
+tokens=_st(trap)._tokenize_(":");
 tokens;
-$1=smalltalk.send(smalltalk.send(tokens,"_size",[]),"__eq",[(1)]);
-if(smalltalk.assert($1)){
-tokens=smalltalk.send(["TrappedDumbView"],"__comma",[tokens]);
+$3=_st(_st(tokens)._size()).__eq((1));
+if(smalltalk.assert($3)){
+tokens=_st(["TrappedDumbView"]).__comma(tokens);
 tokens;
 };
-viewName=smalltalk.send(tokens,"_first",[]);
+viewName=_st(tokens)._first();
 viewName;
-tokens=smalltalk.send(smalltalk.send(smalltalk.send(tokens,"_second",[]),"_tokenize_",[" "]),"_select_",[(function(each){
-return smalltalk.send(each,"_notEmpty",[]);
-})]);
+tokens=_st(_st(_st(tokens)._second())._tokenize_(" "))._select_((function(each){
+return smalltalk.withContext(function($ctx3) {
return _st(each)._notEmpty();
+}, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
 tokens;
-modelName=smalltalk.send(tokens,"_first",[]);
+modelName=_st(tokens)._first();
 modelName;
-path=smalltalk.send((smalltalk.Trapped || Trapped),"_parse_",[smalltalk.send(tokens,"_allButFirst",[])]);
+path=_st((smalltalk.Trapped || Trapped))._parse_(_st(tokens)._allButFirst());
 path;
-return smalltalk.send(smalltalk.send([modelName],"__comma",[path]),"_trapDescend_",[(function(){
-return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk),"_current",[]),"_at_",[viewName]),"_new",[]),"_appendToJQuery_",[jq]);
-})]);
-})]);
-return self},
-args: ["zzz"],
-source: "start: zzz\x0a\x09| args |\x0a    <args = [].slice.call(arguments)>.\x0a    args do: [ :each | self register: each ].\x0a\x09'[data-trap]' asJQuery each: [ :index :elem |\x0a    \x09| trap jq viewName modelName tokens path |\x0a        jq := elem asJQuery.\x0a        trap := jq attr: 'data-trap'.\x0a        tokens := trap tokenize: ':'.\x0a        tokens size = 1 ifTrue: [ tokens := { 'TrappedDumbView' }, tokens ].\x0a        viewName := tokens first.\x0a        tokens := (tokens second tokenize: ' ') select: [ :each | each notEmpty ].\x0a        modelName := tokens first.\x0a        path := Trapped parse: tokens allButFirst.\x0a        { modelName }, path trapDescend: [(Smalltalk current at: viewName) new appendToJQuery: jq].\x0a    ]",
+return _st(_st([modelName]).__comma(path))._trapDescend_((function(){
+return smalltalk.withContext(function($ctx3) {
return _st(_st(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._at_(viewName))._new())._appendToJQuery_(jq);
+}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
+}, function($ctx2) {$ctx2.fillBlock({index:index,elem:elem,trap:trap,jq:jq,viewName:viewName,modelName:modelName,tokens:tokens,path:path},$ctx1)})});
+_st($1)._each_($2);
+return self}, function($ctx1) {$ctx1.fill(self,"start:",{args:args}, smalltalk.Trapped)})},
+args: ["args"],
+source: "start: args\x0a    args do: [ :each | self register: each ].\x0a\x09'[data-trap]' asJQuery each: [ :index :elem |\x0a    \x09| trap jq viewName modelName tokens path |\x0a        jq := elem asJQuery.\x0a        trap := jq attr: 'data-trap'.\x0a        tokens := trap tokenize: ':'.\x0a        tokens size = 1 ifTrue: [ tokens := { 'TrappedDumbView' }, tokens ].\x0a        viewName := tokens first.\x0a        tokens := (tokens second tokenize: ' ') select: [ :each | each notEmpty ].\x0a        modelName := tokens first.\x0a        path := Trapped parse: tokens allButFirst.\x0a        { modelName }, path trapDescend: [(Smalltalk current at: viewName) new appendToJQuery: jq].\x0a    ]",
 messageSends: ["do:", "register:", "each:", "asJQuery", "attr:", "tokenize:", "ifTrue:", ",", "=", "size", "first", "select:", "notEmpty", "second", "parse:", "allButFirst", "trapDescend:", "appendToJQuery:", "new", "at:", "current"],
 referencedClasses: ["Trapped", "Smalltalk"]
 }),
@@ -462,28 +460,31 @@ selector: "parse:",
 category: 'accessing',
 fn: function (anArray){
 var self=this;
-var $2,$3,$1;
-$1=smalltalk.send(anArray,"_collect_",[(function(each){
+return smalltalk.withContext(function($ctx1) { 
var $2,$4,$5,$7,$6,$3,$1;
+$2=anArray;
+$3=(function(each){
 var asNum;
-asNum = parseInt(each);
-;
-$2=smalltalk.send(asNum,"__eq",[asNum]);
-if(smalltalk.assert($2)){
-return asNum;
-} else {
-$3=smalltalk.send(smalltalk.send(each,"_first",[]),"__eq",["#"]);
-if(smalltalk.assert($3)){
-return smalltalk.send(smalltalk.send(each,"_allButFirst",[]),"_asSymbol",[]);
+return smalltalk.withContext(function($ctx2) {
_st(asNum).__eq(_st(each)._asNumber());
+$4=_st(asNum).__eq(asNum);
+$5=(function(){
+return smalltalk.withContext(function($ctx3) {
return asNum;
+}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})});
+$6=(function(){
+return smalltalk.withContext(function($ctx3) {
$7=_st(_st(each)._first()).__eq("#");
+if(smalltalk.assert($7)){
+return _st(_st(each)._allButFirst())._asSymbol();
 } else {
 return each;
 };
-};
-})]);
+}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})});
+return _st($4)._ifTrue_ifFalse_($5,$6);
+}, function($ctx2) {$ctx2.fillBlock({each:each,asNum:asNum},$ctx1)})});
+$1=_st($2)._collect_($3);
 return $1;
-},
+}, function($ctx1) {$ctx1.fill(self,"parse:",{anArray:anArray}, smalltalk.Trapped.klass)})},
 args: ["anArray"],
-source: "parse: anArray\x0a\x09^anArray collect: [ :each |\x0a    \x09| asNum |\x0a       \x09<asNum = parseInt(each)>.\x0a        asNum = asNum ifTrue: [ asNum ] ifFalse: [\x0a\x09\x09\x09each first = '#' ifTrue: [ each allButFirst asSymbol ] ifFalse: [ each ]]]",
-messageSends: ["collect:", "ifTrue:ifFalse:", "asSymbol", "allButFirst", "=", "first"],
+source: "parse: anArray\x0a\x09^anArray collect: [ :each |\x0a    \x09| asNum |\x0a       \x09asNum = each asNumber.\x0a        asNum = asNum ifTrue: [ asNum ] ifFalse: [\x0a\x09\x09\x09each first = '#' ifTrue: [ each allButFirst asSymbol ] ifFalse: [ each ]]]",
+messageSends: ["collect:", "=", "asNumber", "ifTrue:ifFalse:", "asSymbol", "allButFirst", "first"],
 referencedClasses: []
 }),
 smalltalk.Trapped.klass);
@@ -497,8 +498,8 @@ selector: "append:do:",
 category: 'descending',
 fn: function (anArray,aBlock){
 var self=this;
-smalltalk.send(self,"_with_do_",[smalltalk.send(self["@elements"],"__comma",[anArray]),aBlock]);
-return self},
+return smalltalk.withContext(function($ctx1) { 
_st(self)._with_do_(_st(self["@elements"]).__comma(anArray),aBlock);
+return self}, function($ctx1) {$ctx1.fill(self,"append:do:",{anArray:anArray,aBlock:aBlock}, smalltalk.TrappedPathStack)})},
 args: ["anArray", "aBlock"],
 source: "append: anArray do: aBlock\x0a    self with: elements, anArray do: aBlock",
 messageSends: ["with:do:", ","],
@@ -513,8 +514,10 @@ selector: "elements",
 category: 'accessing',
 fn: function (){
 var self=this;
-return self["@elements"];
-},
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=self["@elements"];
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"elements",{}, smalltalk.TrappedPathStack)})},
 args: [],
 source: "elements\x0a\x09^elements",
 messageSends: [],
@@ -529,9 +532,9 @@ selector: "initialize",
 category: 'initialization',
 fn: function (){
 var self=this;
-smalltalk.send(self,"_initialize",[],smalltalk.TrappedSingleton);
+return smalltalk.withContext(function($ctx1) { 
smalltalk.TrappedSingleton.fn.prototype._initialize.apply(_st(self), []);
 self["@elements"]=[];
-return self},
+return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.TrappedPathStack)})},
 args: [],
 source: "initialize\x0a    super initialize.\x0a\x09elements := #().",
 messageSends: ["initialize"],
@@ -547,16 +550,16 @@ category: 'descending',
 fn: function (anArray,aBlock){
 var self=this;
 var old;
-old=self["@elements"];
-smalltalk.send((function(){
-self["@elements"]=anArray;
+return smalltalk.withContext(function($ctx1) { 
old=self["@elements"];
+_st((function(){
+return smalltalk.withContext(function($ctx2) {
self["@elements"]=anArray;
 self["@elements"];
-return smalltalk.send(aBlock,"_value",[]);
-}),"_ensure_",[(function(){
-self["@elements"]=old;
+return _st(aBlock)._value();
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._ensure_((function(){
+return smalltalk.withContext(function($ctx2) {
self["@elements"]=old;
 return self["@elements"];
-})]);
-return self},
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"with:do:",{anArray:anArray,aBlock:aBlock,old:old}, smalltalk.TrappedPathStack)})},
 args: ["anArray", "aBlock"],
 source: "with: anArray do: aBlock\x0a\x09| old |\x0a    old := elements.\x0a    [ elements := anArray.\x0a\x09aBlock value ] ensure: [ elements := old ]",
 messageSends: ["ensure:", "value"],
@@ -574,10 +577,10 @@ selector: "do:",
 category: 'action',
 fn: function (aBlock){
 var self=this;
-smalltalk.send(smalltalk.send((smalltalk.TrappedPathStack || TrappedPathStack),"_current",[]),"_with_do_",[self["@path"],(function(){
-return smalltalk.send(aBlock,"_value_",[self["@model"]]);
-})]);
-return self},
+return smalltalk.withContext(function($ctx1) { 
_st(_st((smalltalk.TrappedPathStack || TrappedPathStack))._current())._with_do_(self["@path"],(function(){
+return smalltalk.withContext(function($ctx2) {
return _st(aBlock)._value_(self["@model"]);
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"do:",{aBlock:aBlock}, smalltalk.TrappedSnapshot)})},
 args: ["aBlock"],
 source: "do: aBlock\x0a\x09TrappedPathStack current with: path do: [ aBlock value: model ]",
 messageSends: ["with:do:", "value:", "current"],
@@ -592,8 +595,10 @@ selector: "model",
 category: 'accessing',
 fn: function (){
 var self=this;
-return self["@model"];
-},
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=self["@model"];
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"model",{}, smalltalk.TrappedSnapshot)})},
 args: [],
 source: "model\x0a\x09^model",
 messageSends: [],
@@ -608,8 +613,8 @@ selector: "modify:",
 category: 'action',
 fn: function (aBlock){
 var self=this;
-smalltalk.send(smalltalk.send(self,"_model",[]),"_modify_do_",[smalltalk.send(smalltalk.send(self,"_path",[]),"_allButFirst",[]),aBlock]);
-return self},
+return smalltalk.withContext(function($ctx1) { 
_st(_st(self)._model())._modify_do_(_st(_st(self)._path())._allButFirst(),aBlock);
+return self}, function($ctx1) {$ctx1.fill(self,"modify:",{aBlock:aBlock}, smalltalk.TrappedSnapshot)})},
 args: ["aBlock"],
 source: "modify: aBlock\x0a\x09self model modify: self path allButFirst do: aBlock",
 messageSends: ["modify:do:", "allButFirst", "path", "model"],
@@ -624,8 +629,10 @@ selector: "path",
 category: 'accessing',
 fn: function (){
 var self=this;
-return self["@path"];
-},
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=self["@path"];
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"path",{}, smalltalk.TrappedSnapshot)})},
 args: [],
 source: "path\x0a\x09^path",
 messageSends: [],
@@ -640,9 +647,9 @@ selector: "path:model:",
 category: 'accessing',
 fn: function (anArray,aTrappedMW){
 var self=this;
-self["@path"]=anArray;
+return smalltalk.withContext(function($ctx1) { 
self["@path"]=anArray;
 self["@model"]=aTrappedMW;
-return self},
+return self}, function($ctx1) {$ctx1.fill(self,"path:model:",{anArray:anArray,aTrappedMW:aTrappedMW}, smalltalk.TrappedSnapshot)})},
 args: ["anArray", "aTrappedMW"],
 source: "path: anArray model: aTrappedMW\x0a\x09path := anArray.\x0a    model := aTrappedMW",
 messageSends: [],
@@ -659,24 +666,8 @@ selector: "trapDescend:",
 category: '*Trapped-Frontend',
 fn: function (aBlock){
 var self=this;
-smalltalk.send(smalltalk.send((smalltalk.Trapped || Trapped),"_current",[]),"_descend_snapshotDo_",[self,aBlock]);
-return self},
-args: ["aBlock"],
-source: "trapDescend: aBlock\x0a\x09Trapped current descend: self snapshotDo: aBlock",
-messageSends: ["descend:snapshotDo:", "current"],
-referencedClasses: ["Trapped"]
-}),
-smalltalk.Array);
-
-smalltalk.addMethod(
-"_trapDescend_",
-smalltalk.method({
-selector: "trapDescend:",
-category: '*Trapped-Frontend',
-fn: function (aBlock){
-var self=this;
-smalltalk.send(smalltalk.send((smalltalk.Trapped || Trapped),"_current",[]),"_descend_snapshotDo_",[self,aBlock]);
-return self},
+return smalltalk.withContext(function($ctx1) { 
_st(_st((smalltalk.Trapped || Trapped))._current())._descend_snapshotDo_(self,aBlock);
+return self}, function($ctx1) {$ctx1.fill(self,"trapDescend:",{aBlock:aBlock}, smalltalk.Array)})},
 args: ["aBlock"],
 source: "trapDescend: aBlock\x0a\x09Trapped current descend: self snapshotDo: aBlock",
 messageSends: ["descend:snapshotDo:", "current"],
@@ -691,8 +682,8 @@ selector: "trap:",
 category: '*Trapped-Frontend',
 fn: function (path){
 var self=this;
-smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Trapped || Trapped),"_current",[]),"_binder_",[self]),"_installFor_",[path]);
-return self},
+return smalltalk.withContext(function($ctx1) { 
_st(_st(_st((smalltalk.Trapped || Trapped))._current())._binder_(self))._installFor_(path);
+return self}, function($ctx1) {$ctx1.fill(self,"trap:",{path:path}, smalltalk.TagBrush)})},
 args: ["path"],
 source: "trap: path\x0a\x09(Trapped current binder: self) installFor: path",
 messageSends: ["installFor:", "binder:", "current"],
@@ -707,21 +698,26 @@ selector: "trap:read:",
 category: '*Trapped-Frontend',
 fn: function (path,aBlock){
 var self=this;
-var $1;
-smalltalk.send(path,"_trapDescend_",[(function(snap){
-return smalltalk.send(smalltalk.send(snap,"_model",[]),"_watch_do_",[smalltalk.send(smalltalk.send(snap,"_path",[]),"_allButFirst",[]),(function(data){
-$1=smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self,"_asJQuery",[]),"_closest_",["html"]),"_toArray",[]),"_isEmpty",[]);
-if(smalltalk.assert($1)){
-smalltalk.send((smalltalk.KeyedPubSubUnsubscribe || KeyedPubSubUnsubscribe),"_signal",[]);
+return smalltalk.withContext(function($ctx1) { 
var $1,$3,$4,$6,$5,$2;
+$1=path;
+$2=(function(snap){
+return smalltalk.withContext(function($ctx2) {
$3=_st(snap)._model();
+$4=_st(_st(snap)._path())._allButFirst();
+$5=(function(data){
+return smalltalk.withContext(function($ctx3) {
$6=_st(_st(_st(_st(self)._asJQuery())._closest_("html"))._toArray())._isEmpty();
+if(smalltalk.assert($6)){
+_st((smalltalk.KeyedPubSubUnsubscribe || KeyedPubSubUnsubscribe))._signal();
 };
-return smalltalk.send(snap,"_do_",[(function(){
-return smalltalk.send(self,"_with_",[(function(html){
-return smalltalk.send(aBlock,"_value_value_",[data,html]);
-})]);
-})]);
-})]);
-})]);
-return self},
+return _st(snap)._do_((function(){
+return smalltalk.withContext(function($ctx4) {
return _st(self)._with_((function(html){
+return smalltalk.withContext(function($ctx5) {
return _st(aBlock)._value_value_(data,html);
+}, function($ctx5) {$ctx5.fillBlock({html:html},$ctx1)})}));
+}, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
+}, function($ctx3) {$ctx3.fillBlock({data:data},$ctx1)})});
+return _st($3)._watch_do_($4,$5);
+}, function($ctx2) {$ctx2.fillBlock({snap:snap},$ctx1)})});
+_st($1)._trapDescend_($2);
+return self}, function($ctx1) {$ctx1.fill(self,"trap:read:",{path:path,aBlock:aBlock}, smalltalk.TagBrush)})},
 args: ["path", "aBlock"],
 source: "trap: path read: aBlock\x0a\x09path trapDescend: [ :snap |\x0a        snap model watch: snap path allButFirst do: [ :data |\x0a            (self asJQuery closest: 'html') toArray isEmpty ifTrue: [ KeyedPubSubUnsubscribe signal ].\x0a        \x09snap do: [ self with: [ :html | aBlock value: data value: html ] ]\x0a    \x09]\x0a    ]",
 messageSends: ["trapDescend:", "watch:do:", "allButFirst", "path", "ifTrue:", "signal", "isEmpty", "toArray", "closest:", "asJQuery", "do:", "with:", "value:value:", "model"],
@@ -736,10 +732,10 @@ selector: "trap:toggle:",
 category: '*Trapped-Frontend',
 fn: function (path,aBlock){
 var self=this;
-smalltalk.send(self,"_trap_toggle_ifNotPresent_",[path,aBlock,(function(){
-return smalltalk.send(smalltalk.send(self,"_asJQuery",[]),"_hide",[]);
-})]);
-return self},
+return smalltalk.withContext(function($ctx1) { 
_st(self)._trap_toggle_ifNotPresent_(path,aBlock,(function(){
+return smalltalk.withContext(function($ctx2) {
return _st(_st(self)._asJQuery())._hide();
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"trap:toggle:",{path:path,aBlock:aBlock}, smalltalk.TagBrush)})},
 args: ["path", "aBlock"],
 source: "trap: path toggle: aBlock\x0a    self trap: path toggle: aBlock ifNotPresent: [ self asJQuery hide ]",
 messageSends: ["trap:toggle:ifNotPresent:", "hide", "asJQuery"],
@@ -754,27 +750,32 @@ selector: "trap:toggle:ifNotPresent:",
 category: '*Trapped-Frontend',
 fn: function (path,aBlock,anotherBlock){
 var self=this;
-var $1,$2,$3,$4;
 var shown;
+return smalltalk.withContext(function($ctx1) { 
var $1,$2,$4,$6,$7,$9,$8,$5,$3;
 shown=nil;
-smalltalk.send(self,"_trap_read_",[path,(function(data,html){
-$1=smalltalk.send(shown,"__eq",[smalltalk.send(data,"_notNil",[])]);
-if(! smalltalk.assert($1)){
-shown=smalltalk.send(data,"_notNil",[]);
+$1=self;
+$2=path;
+$3=(function(data,html){
+return smalltalk.withContext(function($ctx2) {
$4=_st(shown).__eq(_st(data)._notNil());
+$5=(function(){
+return smalltalk.withContext(function($ctx3) {
shown=_st(data)._notNil();
 shown;
-$2=smalltalk.send(self,"_asJQuery",[]);
-smalltalk.send($2,"_empty",[]);
-$3=smalltalk.send($2,"_show",[]);
-$3;
-if(smalltalk.assert(shown)){
-$4=aBlock;
+$6=_st(self)._asJQuery();
+_st($6)._empty();
+$7=_st($6)._show();
+$7;
+$9=shown;
+if(smalltalk.assert($9)){
+$8=aBlock;
 } else {
-$4=anotherBlock;
+$8=anotherBlock;
 };
-return smalltalk.send($4,"_value_value_",[data,html]);
-};
-})]);
-return self},
+return _st($8)._value_value_(data,html);
+}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})});
+return _st($4)._ifFalse_($5);
+}, function($ctx2) {$ctx2.fillBlock({data:data,html:html},$ctx1)})});
+_st($1)._trap_read_($2,$3);
+return self}, function($ctx1) {$ctx1.fill(self,"trap:toggle:ifNotPresent:",{path:path,aBlock:aBlock,anotherBlock:anotherBlock,shown:shown}, smalltalk.TagBrush)})},
 args: ["path", "aBlock", "anotherBlock"],
 source: "trap: path toggle: aBlock ifNotPresent: anotherBlock\x0a    | shown |\x0a    shown := nil.\x0a    self trap: path read: [ :data : html |\x0a        shown = data notNil ifFalse: [\x0a            shown := data notNil.\x0a            self asJQuery empty; show.\x0a            (shown ifTrue: [aBlock] ifFalse: [anotherBlock]) value: data value: html.\x0a        ]\x0a    ]",
 messageSends: ["trap:read:", "ifFalse:", "notNil", "empty", "asJQuery", "show", "value:value:", "ifTrue:ifFalse:", "="],
@@ -789,17 +790,22 @@ selector: "trapIter:tag:do:",
 category: '*Trapped-Frontend',
 fn: function (path,aSymbol,aBlock){
 var self=this;
-smalltalk.send(self,"_trap_read_",[path,(function(model,html){
-smalltalk.send(smalltalk.send(html,"_root",[]),"_empty",[]);
-if(($receiver = model) == nil || $receiver == undefined){
-return model;
+return smalltalk.withContext(function($ctx1) { 
var $1,$2,$4,$3;
+$1=self;
+$2=path;
+$3=(function(model,html){
+return smalltalk.withContext(function($ctx2) {
_st(_st(html)._root())._empty();
+$4=model;
+if(($receiver = $4) == nil || $receiver == undefined){
+return $4;
 } else {
-return smalltalk.send(model,"_withIndexDo_",[(function(item,i){
-return smalltalk.send(smalltalk.send(html,"_perform_",[aSymbol]),"_trap_read_",[[i],aBlock]);
-})]);
+return _st(model)._withIndexDo_((function(item,i){
+return smalltalk.withContext(function($ctx3) {
return _st(_st(html)._perform_(aSymbol))._trap_read_([i],aBlock);
+}, function($ctx3) {$ctx3.fillBlock({item:item,i:i},$ctx1)})}));
 };
-})]);
-return self},
+}, function($ctx2) {$ctx2.fillBlock({model:model,html:html},$ctx1)})});
+_st($1)._trap_read_($2,$3);
+return self}, function($ctx1) {$ctx1.fill(self,"trapIter:tag:do:",{path:path,aSymbol:aSymbol,aBlock:aBlock}, smalltalk.TagBrush)})},
 args: ["path", "aSymbol", "aBlock"],
 source: "trapIter: path tag: aSymbol do: aBlock\x0a    self trap: path read: [ :model :html |\x0a        html root empty.\x0a        model ifNotNil: [ model withIndexDo: [ :item :i |\x0a            (html perform: aSymbol) trap: {i} read: aBlock\x0a        ]]\x0a    ]",
 messageSends: ["trap:read:", "empty", "root", "ifNotNil:", "withIndexDo:", "perform:"],

+ 159 - 177
lib/js/Trapped-Tests.deploy.js

@@ -6,16 +6,16 @@ smalltalk.method({
 selector: "setUp",
 fn: function (){
 var self=this;
-var $1,$2;
-$1=smalltalk.send((smalltalk.EavModel || EavModel),"_new",[]);
-smalltalk.send($1,"_getBlock_",[(function(x){
-return smalltalk.send(x,"_root",[]);
-})]);
-$2=smalltalk.send($1,"_putBlock_",[(function(x,y){
-return smalltalk.send(x,"_root_",[y]);
-})]);
+return smalltalk.withContext(function($ctx1) { 
var $1,$2;
+$1=_st((smalltalk.EavModel || EavModel))._new();
+_st($1)._getBlock_((function(x){
+return smalltalk.withContext(function($ctx2) {
return _st(x)._root();
+}, function($ctx2) {$ctx2.fillBlock({x:x},$ctx1)})}));
+$2=_st($1)._putBlock_((function(x,y){
+return smalltalk.withContext(function($ctx2) {
return _st(x)._root_(y);
+}, function($ctx2) {$ctx2.fillBlock({x:x,y:y},$ctx1)})}));
 self["@rootModel"]=$2;
-return self}
+return self}, function($ctx1) {$ctx1.fill(self,"setUp",{}, smalltalk.IsolatorTest)})}
 }),
 smalltalk.IsolatorTest);
 
@@ -25,26 +25,24 @@ smalltalk.method({
 selector: "testNontrivialModelGetsAppropriateValueForModification",
 fn: function (){
 var self=this;
-var $1,$2;
-var isolator;
-var model;
-var result;
+var isolator,model,result;
+return smalltalk.withContext(function($ctx1) { 
var $1,$2;
 result=nil;
-isolator=smalltalk.send((smalltalk.Isolator || Isolator),"_on_",[smalltalk.HashedCollection._fromPairs_([smalltalk.send("foo","__minus_gt",[["bar", [(1), [(2), (5)]], "baz"]]),smalltalk.send("moo","__minus_gt",["zoo"])])]);
-$1=smalltalk.send((smalltalk.EavModel || EavModel),"_new",[]);
-smalltalk.send($1,"_getBlock_",[(function(x){
-return smalltalk.send(smalltalk.send(smalltalk.send(x,"_root",[]),"_at_",["foo"]),"_at_",[(2)]);
-})]);
-$2=smalltalk.send($1,"_putBlock_",[(function(x,y){
-return smalltalk.send(smalltalk.send(smalltalk.send(x,"_root",[]),"_at_",["foo"]),"_at_put_",[(2),y]);
-})]);
+isolator=_st((smalltalk.Isolator || Isolator))._on_(smalltalk.HashedCollection._fromPairs_([_st("foo").__minus_gt(["bar", [(1), [(2), (5)]], "baz"]),_st("moo").__minus_gt("zoo")]));
+$1=_st((smalltalk.EavModel || EavModel))._new();
+_st($1)._getBlock_((function(x){
+return smalltalk.withContext(function($ctx2) {
return _st(_st(_st(x)._root())._at_("foo"))._at_((2));
+}, function($ctx2) {$ctx2.fillBlock({x:x},$ctx1)})}));
+$2=_st($1)._putBlock_((function(x,y){
+return smalltalk.withContext(function($ctx2) {
return _st(_st(_st(x)._root())._at_("foo"))._at_put_((2),y);
+}, function($ctx2) {$ctx2.fillBlock({x:x,y:y},$ctx1)})}));
 model=$2;
-smalltalk.send(isolator,"_model_modify_",[model,(function(r){
-result=r;
+_st(isolator)._model_modify_(model,(function(r){
+return smalltalk.withContext(function($ctx2) {
result=r;
 return result;
-})]);
-smalltalk.send(self,"_assert_equals_",[[(1), [(2), (5)]],result]);
-return self}
+}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
+_st(self)._assert_equals_([(1), [(2), (5)]],result);
+return self}, function($ctx1) {$ctx1.fill(self,"testNontrivialModelGetsAppropriateValueForModification",{isolator:isolator,model:model,result:result}, smalltalk.IsolatorTest)})}
 }),
 smalltalk.IsolatorTest);
 
@@ -54,34 +52,32 @@ smalltalk.method({
 selector: "testNontrivialModelModifiesAppropriateValue",
 fn: function (){
 var self=this;
-var $1,$2;
-var isolator;
-var model;
-var result;
+var isolator,model,result;
+return smalltalk.withContext(function($ctx1) { 
var $1,$2;
 result=nil;
-isolator=smalltalk.send((smalltalk.Isolator || Isolator),"_on_",[smalltalk.HashedCollection._fromPairs_([smalltalk.send("foo","__minus_gt",[["bar", [(1), [(2), (3)]], "baz"]]),smalltalk.send("moo","__minus_gt",["zoo"])])]);
-$1=smalltalk.send((smalltalk.EavModel || EavModel),"_new",[]);
-smalltalk.send($1,"_getBlock_",[(function(x){
-return smalltalk.send(smalltalk.send(smalltalk.send(x,"_root",[]),"_at_",["foo"]),"_at_",[(2)]);
-})]);
-$2=smalltalk.send($1,"_putBlock_",[(function(x,y){
-return smalltalk.send(smalltalk.send(smalltalk.send(x,"_root",[]),"_at_",["foo"]),"_at_put_",[(2),y]);
-})]);
+isolator=_st((smalltalk.Isolator || Isolator))._on_(smalltalk.HashedCollection._fromPairs_([_st("foo").__minus_gt(["bar", [(1), [(2), (3)]], "baz"]),_st("moo").__minus_gt("zoo")]));
+$1=_st((smalltalk.EavModel || EavModel))._new();
+_st($1)._getBlock_((function(x){
+return smalltalk.withContext(function($ctx2) {
return _st(_st(_st(x)._root())._at_("foo"))._at_((2));
+}, function($ctx2) {$ctx2.fillBlock({x:x},$ctx1)})}));
+$2=_st($1)._putBlock_((function(x,y){
+return smalltalk.withContext(function($ctx2) {
return _st(_st(_st(x)._root())._at_("foo"))._at_put_((2),y);
+}, function($ctx2) {$ctx2.fillBlock({x:x,y:y},$ctx1)})}));
 model=$2;
-smalltalk.send(isolator,"_model_modify_",[model,(function(r){
-return smalltalk.symbolFor("new");
-})]);
-smalltalk.send(isolator,"_model_read_",[model,(function(r){
-result=r;
+_st(isolator)._model_modify_(model,(function(r){
+return smalltalk.withContext(function($ctx2) {
return smalltalk.symbolFor("new");
+}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
+_st(isolator)._model_read_(model,(function(r){
+return smalltalk.withContext(function($ctx2) {
result=r;
 return result;
-})]);
-smalltalk.send(self,"_assert_equals_",[smalltalk.symbolFor("new"),result]);
-smalltalk.send(isolator,"_model_read_",[self["@rootModel"],(function(r){
-result=r;
+}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
+_st(self)._assert_equals_(smalltalk.symbolFor("new"),result);
+_st(isolator)._model_read_(self["@rootModel"],(function(r){
+return smalltalk.withContext(function($ctx2) {
result=r;
 return result;
-})]);
-smalltalk.send(self,"_assert_equals_",[smalltalk.HashedCollection._fromPairs_([smalltalk.send("foo","__minus_gt",[["bar", smalltalk.symbolFor("new"), "baz"]]),smalltalk.send("moo","__minus_gt",["zoo"])]),result]);
-return self}
+}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
+_st(self)._assert_equals_(smalltalk.HashedCollection._fromPairs_([_st("foo").__minus_gt(["bar", smalltalk.symbolFor("new"), "baz"]),_st("moo").__minus_gt("zoo")]),result);
+return self}, function($ctx1) {$ctx1.fill(self,"testNontrivialModelModifiesAppropriateValue",{isolator:isolator,model:model,result:result}, smalltalk.IsolatorTest)})}
 }),
 smalltalk.IsolatorTest);
 
@@ -91,20 +87,18 @@ smalltalk.method({
 selector: "testNontrivialModelReturnsAppropriateValue",
 fn: function (){
 var self=this;
-var isolator;
-var model;
-var result;
-result=nil;
-isolator=smalltalk.send((smalltalk.Isolator || Isolator),"_on_",[smalltalk.HashedCollection._fromPairs_([smalltalk.send("foo","__minus_gt",[["bar", [(1), [(2), (3)]], "baz"]]),smalltalk.send("moo","__minus_gt",["zoo"])])]);
-model=smalltalk.send(smalltalk.send((smalltalk.EavModel || EavModel),"_new",[]),"_getBlock_",[(function(x){
-return smalltalk.send(smalltalk.send(smalltalk.send(x,"_root",[]),"_at_",["foo"]),"_at_",[(2)]);
-})]);
-smalltalk.send(isolator,"_model_read_",[model,(function(r){
-result=r;
+var isolator,model,result;
+return smalltalk.withContext(function($ctx1) { 
result=nil;
+isolator=_st((smalltalk.Isolator || Isolator))._on_(smalltalk.HashedCollection._fromPairs_([_st("foo").__minus_gt(["bar", [(1), [(2), (3)]], "baz"]),_st("moo").__minus_gt("zoo")]));
+model=_st(_st((smalltalk.EavModel || EavModel))._new())._getBlock_((function(x){
+return smalltalk.withContext(function($ctx2) {
return _st(_st(_st(x)._root())._at_("foo"))._at_((2));
+}, function($ctx2) {$ctx2.fillBlock({x:x},$ctx1)})}));
+_st(isolator)._model_read_(model,(function(r){
+return smalltalk.withContext(function($ctx2) {
result=r;
 return result;
-})]);
-smalltalk.send(self,"_assert_equals_",[[(1), [(2), (3)]],result]);
-return self}
+}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
+_st(self)._assert_equals_([(1), [(2), (3)]],result);
+return self}, function($ctx1) {$ctx1.fill(self,"testNontrivialModelReturnsAppropriateValue",{isolator:isolator,model:model,result:result}, smalltalk.IsolatorTest)})}
 }),
 smalltalk.IsolatorTest);
 
@@ -114,19 +108,18 @@ smalltalk.method({
 selector: "testRootModelExaminesThenModifiesRoot",
 fn: function (){
 var self=this;
-var isolator;
-var result;
-result=nil;
-isolator=smalltalk.send((smalltalk.Isolator || Isolator),"_on_",[[(1), [(2), (3)]]]);
-smalltalk.send(isolator,"_model_modify_",[self["@rootModel"],(function(r){
-return smalltalk.send(r,"_second",[]);
-})]);
-smalltalk.send(isolator,"_model_read_",[self["@rootModel"],(function(r){
-result=r;
+var isolator,result;
+return smalltalk.withContext(function($ctx1) { 
result=nil;
+isolator=_st((smalltalk.Isolator || Isolator))._on_([(1), [(2), (3)]]);
+_st(isolator)._model_modify_(self["@rootModel"],(function(r){
+return smalltalk.withContext(function($ctx2) {
return _st(r)._second();
+}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
+_st(isolator)._model_read_(self["@rootModel"],(function(r){
+return smalltalk.withContext(function($ctx2) {
result=r;
 return result;
-})]);
-smalltalk.send(self,"_assert_equals_",[[(2), (3)],result]);
-return self}
+}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
+_st(self)._assert_equals_([(2), (3)],result);
+return self}, function($ctx1) {$ctx1.fill(self,"testRootModelExaminesThenModifiesRoot",{isolator:isolator,result:result}, smalltalk.IsolatorTest)})}
 }),
 smalltalk.IsolatorTest);
 
@@ -136,16 +129,15 @@ smalltalk.method({
 selector: "testRootModelGetsRootForModification",
 fn: function (){
 var self=this;
-var isolator;
-var result;
-result=nil;
-isolator=smalltalk.send((smalltalk.Isolator || Isolator),"_on_",[[(2), [(1), (0)]]]);
-smalltalk.send(isolator,"_model_modify_",[self["@rootModel"],(function(r){
-result=r;
+var isolator,result;
+return smalltalk.withContext(function($ctx1) { 
result=nil;
+isolator=_st((smalltalk.Isolator || Isolator))._on_([(2), [(1), (0)]]);
+_st(isolator)._model_modify_(self["@rootModel"],(function(r){
+return smalltalk.withContext(function($ctx2) {
result=r;
 return result;
-})]);
-smalltalk.send(self,"_assert_equals_",[[(2), [(1), (0)]],result]);
-return self}
+}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
+_st(self)._assert_equals_([(2), [(1), (0)]],result);
+return self}, function($ctx1) {$ctx1.fill(self,"testRootModelGetsRootForModification",{isolator:isolator,result:result}, smalltalk.IsolatorTest)})}
 }),
 smalltalk.IsolatorTest);
 
@@ -155,26 +147,24 @@ smalltalk.method({
 selector: "testRootModelModifiesAndDeeplyIsolatesInPlaceModifiedRoot",
 fn: function (){
 var self=this;
-var isolator;
-var result;
-var newValue;
-result=nil;
+var isolator,result,newValue;
+return smalltalk.withContext(function($ctx1) { 
result=nil;
 newValue=nil;
-isolator=smalltalk.send((smalltalk.Isolator || Isolator),"_on_",[[(1), [(2), (3)]]]);
-smalltalk.send(isolator,"_model_modify_",[self["@rootModel"],(function(r){
-newValue=r;
+isolator=_st((smalltalk.Isolator || Isolator))._on_([(1), [(2), (3)]]);
+_st(isolator)._model_modify_(self["@rootModel"],(function(r){
+return smalltalk.withContext(function($ctx2) {
newValue=r;
 newValue;
-smalltalk.send(r,"_at_put_",[(1),(4)]);
+_st(r)._at_put_((1),(4));
 return r;
-})]);
-smalltalk.send(newValue,"_at_put_",[(2),"bar"]);
-smalltalk.send(isolator,"_model_read_",[self["@rootModel"],(function(r){
-result=r;
+}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
+_st(newValue)._at_put_((2),"bar");
+_st(isolator)._model_read_(self["@rootModel"],(function(r){
+return smalltalk.withContext(function($ctx2) {
result=r;
 return result;
-})]);
-smalltalk.send(newValue,"_at_put_",[(2),"baz"]);
-smalltalk.send(self,"_assert_equals_",[[(4), [(2), (3)]],result]);
-return self}
+}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
+_st(newValue)._at_put_((2),"baz");
+_st(self)._assert_equals_([(4), [(2), (3)]],result);
+return self}, function($ctx1) {$ctx1.fill(self,"testRootModelModifiesAndDeeplyIsolatesInPlaceModifiedRoot",{isolator:isolator,result:result,newValue:newValue}, smalltalk.IsolatorTest)})}
 }),
 smalltalk.IsolatorTest);
 
@@ -184,23 +174,21 @@ smalltalk.method({
 selector: "testRootModelModifiesAndDeeplyIsolatesRoot",
 fn: function (){
 var self=this;
-var isolator;
-var result;
-var newValue;
-result=nil;
-isolator=smalltalk.send((smalltalk.Isolator || Isolator),"_on_",[[(1), [(2), (3)]]]);
-newValue=smalltalk.HashedCollection._fromPairs_([smalltalk.send("foo","__minus_gt",[[(4), (5), (6)]])]);
-smalltalk.send(isolator,"_model_modify_",[self["@rootModel"],(function(r){
-return newValue;
-})]);
-smalltalk.send(smalltalk.send(newValue,"_at_",["foo"]),"_at_put_",[(1),"bar"]);
-smalltalk.send(isolator,"_model_read_",[self["@rootModel"],(function(r){
-result=r;
+var isolator,result,newValue;
+return smalltalk.withContext(function($ctx1) { 
result=nil;
+isolator=_st((smalltalk.Isolator || Isolator))._on_([(1), [(2), (3)]]);
+newValue=smalltalk.HashedCollection._fromPairs_([_st("foo").__minus_gt([(4), (5), (6)])]);
+_st(isolator)._model_modify_(self["@rootModel"],(function(r){
+return smalltalk.withContext(function($ctx2) {
return newValue;
+}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
+_st(_st(newValue)._at_("foo"))._at_put_((1),"bar");
+_st(isolator)._model_read_(self["@rootModel"],(function(r){
+return smalltalk.withContext(function($ctx2) {
result=r;
 return result;
-})]);
-smalltalk.send(smalltalk.send(newValue,"_at_",["foo"]),"_at_put_",[(3),"baz"]);
-smalltalk.send(self,"_assert_equals_",[smalltalk.HashedCollection._fromPairs_([smalltalk.send("foo","__minus_gt",[[(4), (5), (6)]])]),result]);
-return self}
+}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
+_st(_st(newValue)._at_("foo"))._at_put_((3),"baz");
+_st(self)._assert_equals_(smalltalk.HashedCollection._fromPairs_([_st("foo").__minus_gt([(4), (5), (6)])]),result);
+return self}, function($ctx1) {$ctx1.fill(self,"testRootModelModifiesAndDeeplyIsolatesRoot",{isolator:isolator,result:result,newValue:newValue}, smalltalk.IsolatorTest)})}
 }),
 smalltalk.IsolatorTest);
 
@@ -210,23 +198,21 @@ smalltalk.method({
 selector: "testRootModelModifiesAndIsolatesRoot",
 fn: function (){
 var self=this;
-var isolator;
-var result;
-var newValue;
-result=nil;
-isolator=smalltalk.send((smalltalk.Isolator || Isolator),"_on_",[[(1), [(2), (3)]]]);
-newValue=smalltalk.HashedCollection._fromPairs_([smalltalk.send("foo","__minus_gt",[[(4), (5), (6)]])]);
-smalltalk.send(isolator,"_model_modify_",[self["@rootModel"],(function(r){
-return newValue;
-})]);
-smalltalk.send(newValue,"_at_put_",["foo","bar"]);
-smalltalk.send(isolator,"_model_read_",[self["@rootModel"],(function(r){
-result=r;
+var isolator,result,newValue;
+return smalltalk.withContext(function($ctx1) { 
result=nil;
+isolator=_st((smalltalk.Isolator || Isolator))._on_([(1), [(2), (3)]]);
+newValue=smalltalk.HashedCollection._fromPairs_([_st("foo").__minus_gt([(4), (5), (6)])]);
+_st(isolator)._model_modify_(self["@rootModel"],(function(r){
+return smalltalk.withContext(function($ctx2) {
return newValue;
+}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
+_st(newValue)._at_put_("foo","bar");
+_st(isolator)._model_read_(self["@rootModel"],(function(r){
+return smalltalk.withContext(function($ctx2) {
result=r;
 return result;
-})]);
-smalltalk.send(newValue,"_at_put_",["foo","baz"]);
-smalltalk.send(self,"_assert_equals_",[smalltalk.HashedCollection._fromPairs_([smalltalk.send("foo","__minus_gt",[[(4), (5), (6)]])]),result]);
-return self}
+}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
+_st(newValue)._at_put_("foo","baz");
+_st(self)._assert_equals_(smalltalk.HashedCollection._fromPairs_([_st("foo").__minus_gt([(4), (5), (6)])]),result);
+return self}, function($ctx1) {$ctx1.fill(self,"testRootModelModifiesAndIsolatesRoot",{isolator:isolator,result:result,newValue:newValue}, smalltalk.IsolatorTest)})}
 }),
 smalltalk.IsolatorTest);
 
@@ -236,19 +222,18 @@ smalltalk.method({
 selector: "testRootModelModifiesRoot",
 fn: function (){
 var self=this;
-var isolator;
-var result;
-result=nil;
-isolator=smalltalk.send((smalltalk.Isolator || Isolator),"_on_",[[(1), [(2), (3)]]]);
-smalltalk.send(isolator,"_model_modify_",[self["@rootModel"],(function(r){
-return smalltalk.HashedCollection._fromPairs_([smalltalk.send("foo","__minus_gt",[[(4), (5), (6)]])]);
-})]);
-smalltalk.send(isolator,"_model_read_",[self["@rootModel"],(function(r){
-result=r;
+var isolator,result;
+return smalltalk.withContext(function($ctx1) { 
result=nil;
+isolator=_st((smalltalk.Isolator || Isolator))._on_([(1), [(2), (3)]]);
+_st(isolator)._model_modify_(self["@rootModel"],(function(r){
+return smalltalk.withContext(function($ctx2) {
return smalltalk.HashedCollection._fromPairs_([_st("foo").__minus_gt([(4), (5), (6)])]);
+}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
+_st(isolator)._model_read_(self["@rootModel"],(function(r){
+return smalltalk.withContext(function($ctx2) {
result=r;
 return result;
-})]);
-smalltalk.send(self,"_assert_equals_",[smalltalk.HashedCollection._fromPairs_([smalltalk.send("foo","__minus_gt",[[(4), (5), (6)]])]),result]);
-return self}
+}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
+_st(self)._assert_equals_(smalltalk.HashedCollection._fromPairs_([_st("foo").__minus_gt([(4), (5), (6)])]),result);
+return self}, function($ctx1) {$ctx1.fill(self,"testRootModelModifiesRoot",{isolator:isolator,result:result}, smalltalk.IsolatorTest)})}
 }),
 smalltalk.IsolatorTest);
 
@@ -258,19 +243,18 @@ smalltalk.method({
 selector: "testRootModelReturnsDeeplyIsolatedRoot",
 fn: function (){
 var self=this;
-var isolator;
-var result;
-result=nil;
-isolator=smalltalk.send((smalltalk.Isolator || Isolator),"_on_",[[(1), [(2), (3)]]]);
-smalltalk.send(isolator,"_model_read_",[self["@rootModel"],(function(r){
-return smalltalk.send(smalltalk.send(r,"_at_",[(2)]),"_at_put_",[(1),(0)]);
-})]);
-smalltalk.send(isolator,"_model_read_",[self["@rootModel"],(function(r){
-result=r;
+var isolator,result;
+return smalltalk.withContext(function($ctx1) { 
result=nil;
+isolator=_st((smalltalk.Isolator || Isolator))._on_([(1), [(2), (3)]]);
+_st(isolator)._model_read_(self["@rootModel"],(function(r){
+return smalltalk.withContext(function($ctx2) {
return _st(_st(r)._at_((2)))._at_put_((1),(0));
+}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
+_st(isolator)._model_read_(self["@rootModel"],(function(r){
+return smalltalk.withContext(function($ctx2) {
result=r;
 return result;
-})]);
-smalltalk.send(self,"_assert_equals_",[[(1), [(2), (3)]],result]);
-return self}
+}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
+_st(self)._assert_equals_([(1), [(2), (3)]],result);
+return self}, function($ctx1) {$ctx1.fill(self,"testRootModelReturnsDeeplyIsolatedRoot",{isolator:isolator,result:result}, smalltalk.IsolatorTest)})}
 }),
 smalltalk.IsolatorTest);
 
@@ -280,19 +264,18 @@ smalltalk.method({
 selector: "testRootModelReturnsIsolatedRoot",
 fn: function (){
 var self=this;
-var isolator;
-var result;
-result=nil;
-isolator=smalltalk.send((smalltalk.Isolator || Isolator),"_on_",[[(1), [(2), (4)]]]);
-smalltalk.send(isolator,"_model_read_",[self["@rootModel"],(function(r){
-return smalltalk.send(r,"_at_put_",[(2),nil]);
-})]);
-smalltalk.send(isolator,"_model_read_",[self["@rootModel"],(function(r){
-result=r;
+var isolator,result;
+return smalltalk.withContext(function($ctx1) { 
result=nil;
+isolator=_st((smalltalk.Isolator || Isolator))._on_([(1), [(2), (4)]]);
+_st(isolator)._model_read_(self["@rootModel"],(function(r){
+return smalltalk.withContext(function($ctx2) {
return _st(r)._at_put_((2),nil);
+}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
+_st(isolator)._model_read_(self["@rootModel"],(function(r){
+return smalltalk.withContext(function($ctx2) {
result=r;
 return result;
-})]);
-smalltalk.send(self,"_assert_equals_",[[(1), [(2), (4)]],result]);
-return self}
+}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
+_st(self)._assert_equals_([(1), [(2), (4)]],result);
+return self}, function($ctx1) {$ctx1.fill(self,"testRootModelReturnsIsolatedRoot",{isolator:isolator,result:result}, smalltalk.IsolatorTest)})}
 }),
 smalltalk.IsolatorTest);
 
@@ -302,16 +285,15 @@ smalltalk.method({
 selector: "testRootModelReturnsRoot",
 fn: function (){
 var self=this;
-var isolator;
-var result;
-result=nil;
-isolator=smalltalk.send((smalltalk.Isolator || Isolator),"_on_",[[(1), [(2), (3)]]]);
-smalltalk.send(isolator,"_model_read_",[self["@rootModel"],(function(r){
-result=r;
+var isolator,result;
+return smalltalk.withContext(function($ctx1) { 
result=nil;
+isolator=_st((smalltalk.Isolator || Isolator))._on_([(1), [(2), (3)]]);
+_st(isolator)._model_read_(self["@rootModel"],(function(r){
+return smalltalk.withContext(function($ctx2) {
result=r;
 return result;
-})]);
-smalltalk.send(self,"_assert_equals_",[[(1), [(2), (3)]],result]);
-return self}
+}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
+_st(self)._assert_equals_([(1), [(2), (3)]],result);
+return self}, function($ctx1) {$ctx1.fill(self,"testRootModelReturnsRoot",{isolator:isolator,result:result}, smalltalk.IsolatorTest)})}
 }),
 smalltalk.IsolatorTest);
 

+ 159 - 177
lib/js/Trapped-Tests.js

@@ -7,16 +7,16 @@ selector: "setUp",
 category: 'running',
 fn: function (){
 var self=this;
-var $1,$2;
-$1=smalltalk.send((smalltalk.EavModel || EavModel),"_new",[]);
-smalltalk.send($1,"_getBlock_",[(function(x){
-return smalltalk.send(x,"_root",[]);
-})]);
-$2=smalltalk.send($1,"_putBlock_",[(function(x,y){
-return smalltalk.send(x,"_root_",[y]);
-})]);
+return smalltalk.withContext(function($ctx1) { 
var $1,$2;
+$1=_st((smalltalk.EavModel || EavModel))._new();
+_st($1)._getBlock_((function(x){
+return smalltalk.withContext(function($ctx2) {
return _st(x)._root();
+}, function($ctx2) {$ctx2.fillBlock({x:x},$ctx1)})}));
+$2=_st($1)._putBlock_((function(x,y){
+return smalltalk.withContext(function($ctx2) {
return _st(x)._root_(y);
+}, function($ctx2) {$ctx2.fillBlock({x:x,y:y},$ctx1)})}));
 self["@rootModel"]=$2;
-return self},
+return self}, function($ctx1) {$ctx1.fill(self,"setUp",{}, smalltalk.IsolatorTest)})},
 args: [],
 source: "setUp\x0a\x0arootModel := EavModel new\x0a\x09getBlock: [:x | x root];\x0a    putBlock: [:x :y | x root: y].\x0a",
 messageSends: ["getBlock:", "root", "new", "putBlock:", "root:"],
@@ -31,26 +31,24 @@ selector: "testNontrivialModelGetsAppropriateValueForModification",
 category: 'tests',
 fn: function (){
 var self=this;
-var $1,$2;
-var isolator;
-var model;
-var result;
+var isolator,model,result;
+return smalltalk.withContext(function($ctx1) { 
var $1,$2;
 result=nil;
-isolator=smalltalk.send((smalltalk.Isolator || Isolator),"_on_",[smalltalk.HashedCollection._fromPairs_([smalltalk.send("foo","__minus_gt",[["bar", [(1), [(2), (5)]], "baz"]]),smalltalk.send("moo","__minus_gt",["zoo"])])]);
-$1=smalltalk.send((smalltalk.EavModel || EavModel),"_new",[]);
-smalltalk.send($1,"_getBlock_",[(function(x){
-return smalltalk.send(smalltalk.send(smalltalk.send(x,"_root",[]),"_at_",["foo"]),"_at_",[(2)]);
-})]);
-$2=smalltalk.send($1,"_putBlock_",[(function(x,y){
-return smalltalk.send(smalltalk.send(smalltalk.send(x,"_root",[]),"_at_",["foo"]),"_at_put_",[(2),y]);
-})]);
+isolator=_st((smalltalk.Isolator || Isolator))._on_(smalltalk.HashedCollection._fromPairs_([_st("foo").__minus_gt(["bar", [(1), [(2), (5)]], "baz"]),_st("moo").__minus_gt("zoo")]));
+$1=_st((smalltalk.EavModel || EavModel))._new();
+_st($1)._getBlock_((function(x){
+return smalltalk.withContext(function($ctx2) {
return _st(_st(_st(x)._root())._at_("foo"))._at_((2));
+}, function($ctx2) {$ctx2.fillBlock({x:x},$ctx1)})}));
+$2=_st($1)._putBlock_((function(x,y){
+return smalltalk.withContext(function($ctx2) {
return _st(_st(_st(x)._root())._at_("foo"))._at_put_((2),y);
+}, function($ctx2) {$ctx2.fillBlock({x:x,y:y},$ctx1)})}));
 model=$2;
-smalltalk.send(isolator,"_model_modify_",[model,(function(r){
-result=r;
+_st(isolator)._model_modify_(model,(function(r){
+return smalltalk.withContext(function($ctx2) {
result=r;
 return result;
-})]);
-smalltalk.send(self,"_assert_equals_",[[(1), [(2), (5)]],result]);
-return self},
+}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
+_st(self)._assert_equals_([(1), [(2), (5)]],result);
+return self}, function($ctx1) {$ctx1.fill(self,"testNontrivialModelGetsAppropriateValueForModification",{isolator:isolator,model:model,result:result}, smalltalk.IsolatorTest)})},
 args: [],
 source: "testNontrivialModelGetsAppropriateValueForModification\x0a| isolator model result |\x0aresult := nil.\x0aisolator := Isolator on: #{ 'foo' -> #('bar' #(1 #(2 5)) 'baz'). 'moo' -> 'zoo' }.\x0amodel := EavModel new\x0a\x09getBlock: [ :x | (x root at: 'foo') at: 2 ];\x0a\x09putBlock: [ :x :y | (x root at: 'foo') at: 2 put: y].\x0aisolator model: model modify: [:r|result := r].\x0aself assert: #(1 #(2 5)) equals: result\x0a",
 messageSends: ["on:", "->", "getBlock:", "at:", "root", "new", "putBlock:", "at:put:", "model:modify:", "assert:equals:"],
@@ -65,34 +63,32 @@ selector: "testNontrivialModelModifiesAppropriateValue",
 category: 'tests',
 fn: function (){
 var self=this;
-var $1,$2;
-var isolator;
-var model;
-var result;
+var isolator,model,result;
+return smalltalk.withContext(function($ctx1) { 
var $1,$2;
 result=nil;
-isolator=smalltalk.send((smalltalk.Isolator || Isolator),"_on_",[smalltalk.HashedCollection._fromPairs_([smalltalk.send("foo","__minus_gt",[["bar", [(1), [(2), (3)]], "baz"]]),smalltalk.send("moo","__minus_gt",["zoo"])])]);
-$1=smalltalk.send((smalltalk.EavModel || EavModel),"_new",[]);
-smalltalk.send($1,"_getBlock_",[(function(x){
-return smalltalk.send(smalltalk.send(smalltalk.send(x,"_root",[]),"_at_",["foo"]),"_at_",[(2)]);
-})]);
-$2=smalltalk.send($1,"_putBlock_",[(function(x,y){
-return smalltalk.send(smalltalk.send(smalltalk.send(x,"_root",[]),"_at_",["foo"]),"_at_put_",[(2),y]);
-})]);
+isolator=_st((smalltalk.Isolator || Isolator))._on_(smalltalk.HashedCollection._fromPairs_([_st("foo").__minus_gt(["bar", [(1), [(2), (3)]], "baz"]),_st("moo").__minus_gt("zoo")]));
+$1=_st((smalltalk.EavModel || EavModel))._new();
+_st($1)._getBlock_((function(x){
+return smalltalk.withContext(function($ctx2) {
return _st(_st(_st(x)._root())._at_("foo"))._at_((2));
+}, function($ctx2) {$ctx2.fillBlock({x:x},$ctx1)})}));
+$2=_st($1)._putBlock_((function(x,y){
+return smalltalk.withContext(function($ctx2) {
return _st(_st(_st(x)._root())._at_("foo"))._at_put_((2),y);
+}, function($ctx2) {$ctx2.fillBlock({x:x,y:y},$ctx1)})}));
 model=$2;
-smalltalk.send(isolator,"_model_modify_",[model,(function(r){
-return smalltalk.symbolFor("new");
-})]);
-smalltalk.send(isolator,"_model_read_",[model,(function(r){
-result=r;
+_st(isolator)._model_modify_(model,(function(r){
+return smalltalk.withContext(function($ctx2) {
return smalltalk.symbolFor("new");
+}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
+_st(isolator)._model_read_(model,(function(r){
+return smalltalk.withContext(function($ctx2) {
result=r;
 return result;
-})]);
-smalltalk.send(self,"_assert_equals_",[smalltalk.symbolFor("new"),result]);
-smalltalk.send(isolator,"_model_read_",[self["@rootModel"],(function(r){
-result=r;
+}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
+_st(self)._assert_equals_(smalltalk.symbolFor("new"),result);
+_st(isolator)._model_read_(self["@rootModel"],(function(r){
+return smalltalk.withContext(function($ctx2) {
result=r;
 return result;
-})]);
-smalltalk.send(self,"_assert_equals_",[smalltalk.HashedCollection._fromPairs_([smalltalk.send("foo","__minus_gt",[["bar", smalltalk.symbolFor("new"), "baz"]]),smalltalk.send("moo","__minus_gt",["zoo"])]),result]);
-return self},
+}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
+_st(self)._assert_equals_(smalltalk.HashedCollection._fromPairs_([_st("foo").__minus_gt(["bar", smalltalk.symbolFor("new"), "baz"]),_st("moo").__minus_gt("zoo")]),result);
+return self}, function($ctx1) {$ctx1.fill(self,"testNontrivialModelModifiesAppropriateValue",{isolator:isolator,model:model,result:result}, smalltalk.IsolatorTest)})},
 args: [],
 source: "testNontrivialModelModifiesAppropriateValue\x0a| isolator model result |\x0aresult := nil.\x0aisolator := Isolator on: #{ 'foo' -> #('bar' #(1 #(2 3)) 'baz'). 'moo' -> 'zoo' }.\x0amodel := EavModel new\x0a\x09getBlock: [ :x | (x root at: 'foo') at: 2 ];\x0a\x09putBlock: [ :x :y | (x root at: 'foo') at: 2 put: y].\x0aisolator model: model modify: [:r|#new].\x0aisolator model: model read: [:r|result := r].\x0aself assert: #new equals: result.\x0aisolator model: rootModel read: [:r|result := r].\x0aself assert: #{ 'foo' -> #('bar' #new 'baz'). 'moo' -> 'zoo' } equals: result\x0a",
 messageSends: ["on:", "->", "getBlock:", "at:", "root", "new", "putBlock:", "at:put:", "model:modify:", "model:read:", "assert:equals:"],
@@ -107,20 +103,18 @@ selector: "testNontrivialModelReturnsAppropriateValue",
 category: 'tests',
 fn: function (){
 var self=this;
-var isolator;
-var model;
-var result;
-result=nil;
-isolator=smalltalk.send((smalltalk.Isolator || Isolator),"_on_",[smalltalk.HashedCollection._fromPairs_([smalltalk.send("foo","__minus_gt",[["bar", [(1), [(2), (3)]], "baz"]]),smalltalk.send("moo","__minus_gt",["zoo"])])]);
-model=smalltalk.send(smalltalk.send((smalltalk.EavModel || EavModel),"_new",[]),"_getBlock_",[(function(x){
-return smalltalk.send(smalltalk.send(smalltalk.send(x,"_root",[]),"_at_",["foo"]),"_at_",[(2)]);
-})]);
-smalltalk.send(isolator,"_model_read_",[model,(function(r){
-result=r;
+var isolator,model,result;
+return smalltalk.withContext(function($ctx1) { 
result=nil;
+isolator=_st((smalltalk.Isolator || Isolator))._on_(smalltalk.HashedCollection._fromPairs_([_st("foo").__minus_gt(["bar", [(1), [(2), (3)]], "baz"]),_st("moo").__minus_gt("zoo")]));
+model=_st(_st((smalltalk.EavModel || EavModel))._new())._getBlock_((function(x){
+return smalltalk.withContext(function($ctx2) {
return _st(_st(_st(x)._root())._at_("foo"))._at_((2));
+}, function($ctx2) {$ctx2.fillBlock({x:x},$ctx1)})}));
+_st(isolator)._model_read_(model,(function(r){
+return smalltalk.withContext(function($ctx2) {
result=r;
 return result;
-})]);
-smalltalk.send(self,"_assert_equals_",[[(1), [(2), (3)]],result]);
-return self},
+}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
+_st(self)._assert_equals_([(1), [(2), (3)]],result);
+return self}, function($ctx1) {$ctx1.fill(self,"testNontrivialModelReturnsAppropriateValue",{isolator:isolator,model:model,result:result}, smalltalk.IsolatorTest)})},
 args: [],
 source: "testNontrivialModelReturnsAppropriateValue\x0a| isolator model result |\x0aresult := nil.\x0aisolator := Isolator on: #{ 'foo' -> #('bar' #(1 #(2 3)) 'baz'). 'moo' -> 'zoo' }.\x0amodel := EavModel new getBlock: [ :x | (x root at: 'foo') at: 2 ].\x0aisolator model: model read: [:r|result := r].\x0aself assert: #(1 #(2 3)) equals: result\x0a",
 messageSends: ["on:", "->", "getBlock:", "at:", "root", "new", "model:read:", "assert:equals:"],
@@ -135,19 +129,18 @@ selector: "testRootModelExaminesThenModifiesRoot",
 category: 'tests',
 fn: function (){
 var self=this;
-var isolator;
-var result;
-result=nil;
-isolator=smalltalk.send((smalltalk.Isolator || Isolator),"_on_",[[(1), [(2), (3)]]]);
-smalltalk.send(isolator,"_model_modify_",[self["@rootModel"],(function(r){
-return smalltalk.send(r,"_second",[]);
-})]);
-smalltalk.send(isolator,"_model_read_",[self["@rootModel"],(function(r){
-result=r;
+var isolator,result;
+return smalltalk.withContext(function($ctx1) { 
result=nil;
+isolator=_st((smalltalk.Isolator || Isolator))._on_([(1), [(2), (3)]]);
+_st(isolator)._model_modify_(self["@rootModel"],(function(r){
+return smalltalk.withContext(function($ctx2) {
return _st(r)._second();
+}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
+_st(isolator)._model_read_(self["@rootModel"],(function(r){
+return smalltalk.withContext(function($ctx2) {
result=r;
 return result;
-})]);
-smalltalk.send(self,"_assert_equals_",[[(2), (3)],result]);
-return self},
+}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
+_st(self)._assert_equals_([(2), (3)],result);
+return self}, function($ctx1) {$ctx1.fill(self,"testRootModelExaminesThenModifiesRoot",{isolator:isolator,result:result}, smalltalk.IsolatorTest)})},
 args: [],
 source: "testRootModelExaminesThenModifiesRoot\x0a| isolator result |\x0aresult := nil.\x0aisolator := Isolator on: #(1 #(2 3)).\x0aisolator model: rootModel modify: [:r|r second].\x0aisolator model: rootModel read: [:r|result := r].\x0aself assert: #(2 3) equals: result\x0a",
 messageSends: ["on:", "model:modify:", "second", "model:read:", "assert:equals:"],
@@ -162,16 +155,15 @@ selector: "testRootModelGetsRootForModification",
 category: 'tests',
 fn: function (){
 var self=this;
-var isolator;
-var result;
-result=nil;
-isolator=smalltalk.send((smalltalk.Isolator || Isolator),"_on_",[[(2), [(1), (0)]]]);
-smalltalk.send(isolator,"_model_modify_",[self["@rootModel"],(function(r){
-result=r;
+var isolator,result;
+return smalltalk.withContext(function($ctx1) { 
result=nil;
+isolator=_st((smalltalk.Isolator || Isolator))._on_([(2), [(1), (0)]]);
+_st(isolator)._model_modify_(self["@rootModel"],(function(r){
+return smalltalk.withContext(function($ctx2) {
result=r;
 return result;
-})]);
-smalltalk.send(self,"_assert_equals_",[[(2), [(1), (0)]],result]);
-return self},
+}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
+_st(self)._assert_equals_([(2), [(1), (0)]],result);
+return self}, function($ctx1) {$ctx1.fill(self,"testRootModelGetsRootForModification",{isolator:isolator,result:result}, smalltalk.IsolatorTest)})},
 args: [],
 source: "testRootModelGetsRootForModification\x0a| isolator result |\x0aresult := nil.\x0aisolator := Isolator on: #(2 #(1 0)).\x0aisolator model: rootModel modify: [:r|result := r].\x0aself assert: #(2 #(1 0)) equals: result\x0a",
 messageSends: ["on:", "model:modify:", "assert:equals:"],
@@ -186,26 +178,24 @@ selector: "testRootModelModifiesAndDeeplyIsolatesInPlaceModifiedRoot",
 category: 'tests',
 fn: function (){
 var self=this;
-var isolator;
-var result;
-var newValue;
-result=nil;
+var isolator,result,newValue;
+return smalltalk.withContext(function($ctx1) { 
result=nil;
 newValue=nil;
-isolator=smalltalk.send((smalltalk.Isolator || Isolator),"_on_",[[(1), [(2), (3)]]]);
-smalltalk.send(isolator,"_model_modify_",[self["@rootModel"],(function(r){
-newValue=r;
+isolator=_st((smalltalk.Isolator || Isolator))._on_([(1), [(2), (3)]]);
+_st(isolator)._model_modify_(self["@rootModel"],(function(r){
+return smalltalk.withContext(function($ctx2) {
newValue=r;
 newValue;
-smalltalk.send(r,"_at_put_",[(1),(4)]);
+_st(r)._at_put_((1),(4));
 return r;
-})]);
-smalltalk.send(newValue,"_at_put_",[(2),"bar"]);
-smalltalk.send(isolator,"_model_read_",[self["@rootModel"],(function(r){
-result=r;
+}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
+_st(newValue)._at_put_((2),"bar");
+_st(isolator)._model_read_(self["@rootModel"],(function(r){
+return smalltalk.withContext(function($ctx2) {
result=r;
 return result;
-})]);
-smalltalk.send(newValue,"_at_put_",[(2),"baz"]);
-smalltalk.send(self,"_assert_equals_",[[(4), [(2), (3)]],result]);
-return self},
+}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
+_st(newValue)._at_put_((2),"baz");
+_st(self)._assert_equals_([(4), [(2), (3)]],result);
+return self}, function($ctx1) {$ctx1.fill(self,"testRootModelModifiesAndDeeplyIsolatesInPlaceModifiedRoot",{isolator:isolator,result:result,newValue:newValue}, smalltalk.IsolatorTest)})},
 args: [],
 source: "testRootModelModifiesAndDeeplyIsolatesInPlaceModifiedRoot\x0a| isolator result newValue |\x0aresult := nil. newValue := nil.\x0aisolator := Isolator on: #(1 #(2 3)).\x0aisolator model: rootModel modify: [:r|newValue := r. r at: 1 put: 4. r].\x0anewValue at: 2 put: 'bar'.\x0aisolator model: rootModel read: [:r|result := r].\x0anewValue at: 2 put: 'baz'.\x0aself assert: #(4 #(2 3)) equals: result\x0a",
 messageSends: ["on:", "model:modify:", "at:put:", "model:read:", "assert:equals:"],
@@ -220,23 +210,21 @@ selector: "testRootModelModifiesAndDeeplyIsolatesRoot",
 category: 'tests',
 fn: function (){
 var self=this;
-var isolator;
-var result;
-var newValue;
-result=nil;
-isolator=smalltalk.send((smalltalk.Isolator || Isolator),"_on_",[[(1), [(2), (3)]]]);
-newValue=smalltalk.HashedCollection._fromPairs_([smalltalk.send("foo","__minus_gt",[[(4), (5), (6)]])]);
-smalltalk.send(isolator,"_model_modify_",[self["@rootModel"],(function(r){
-return newValue;
-})]);
-smalltalk.send(smalltalk.send(newValue,"_at_",["foo"]),"_at_put_",[(1),"bar"]);
-smalltalk.send(isolator,"_model_read_",[self["@rootModel"],(function(r){
-result=r;
+var isolator,result,newValue;
+return smalltalk.withContext(function($ctx1) { 
result=nil;
+isolator=_st((smalltalk.Isolator || Isolator))._on_([(1), [(2), (3)]]);
+newValue=smalltalk.HashedCollection._fromPairs_([_st("foo").__minus_gt([(4), (5), (6)])]);
+_st(isolator)._model_modify_(self["@rootModel"],(function(r){
+return smalltalk.withContext(function($ctx2) {
return newValue;
+}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
+_st(_st(newValue)._at_("foo"))._at_put_((1),"bar");
+_st(isolator)._model_read_(self["@rootModel"],(function(r){
+return smalltalk.withContext(function($ctx2) {
result=r;
 return result;
-})]);
-smalltalk.send(smalltalk.send(newValue,"_at_",["foo"]),"_at_put_",[(3),"baz"]);
-smalltalk.send(self,"_assert_equals_",[smalltalk.HashedCollection._fromPairs_([smalltalk.send("foo","__minus_gt",[[(4), (5), (6)]])]),result]);
-return self},
+}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
+_st(_st(newValue)._at_("foo"))._at_put_((3),"baz");
+_st(self)._assert_equals_(smalltalk.HashedCollection._fromPairs_([_st("foo").__minus_gt([(4), (5), (6)])]),result);
+return self}, function($ctx1) {$ctx1.fill(self,"testRootModelModifiesAndDeeplyIsolatesRoot",{isolator:isolator,result:result,newValue:newValue}, smalltalk.IsolatorTest)})},
 args: [],
 source: "testRootModelModifiesAndDeeplyIsolatesRoot\x0a| isolator result newValue |\x0aresult := nil.\x0aisolator := Isolator on: #(1 #(2 3)).\x0anewValue := #{'foo'->#(4 5 6)}.\x0aisolator model: rootModel modify: [:r|newValue].\x0a(newValue at: 'foo') at: 1 put: 'bar'.\x0aisolator model: rootModel read: [:r|result := r].\x0a(newValue at: 'foo') at: 3 put: 'baz'.\x0aself assert: #{'foo'->#(4 5 6)} equals: result\x0a",
 messageSends: ["on:", "->", "model:modify:", "at:put:", "at:", "model:read:", "assert:equals:"],
@@ -251,23 +239,21 @@ selector: "testRootModelModifiesAndIsolatesRoot",
 category: 'tests',
 fn: function (){
 var self=this;
-var isolator;
-var result;
-var newValue;
-result=nil;
-isolator=smalltalk.send((smalltalk.Isolator || Isolator),"_on_",[[(1), [(2), (3)]]]);
-newValue=smalltalk.HashedCollection._fromPairs_([smalltalk.send("foo","__minus_gt",[[(4), (5), (6)]])]);
-smalltalk.send(isolator,"_model_modify_",[self["@rootModel"],(function(r){
-return newValue;
-})]);
-smalltalk.send(newValue,"_at_put_",["foo","bar"]);
-smalltalk.send(isolator,"_model_read_",[self["@rootModel"],(function(r){
-result=r;
+var isolator,result,newValue;
+return smalltalk.withContext(function($ctx1) { 
result=nil;
+isolator=_st((smalltalk.Isolator || Isolator))._on_([(1), [(2), (3)]]);
+newValue=smalltalk.HashedCollection._fromPairs_([_st("foo").__minus_gt([(4), (5), (6)])]);
+_st(isolator)._model_modify_(self["@rootModel"],(function(r){
+return smalltalk.withContext(function($ctx2) {
return newValue;
+}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
+_st(newValue)._at_put_("foo","bar");
+_st(isolator)._model_read_(self["@rootModel"],(function(r){
+return smalltalk.withContext(function($ctx2) {
result=r;
 return result;
-})]);
-smalltalk.send(newValue,"_at_put_",["foo","baz"]);
-smalltalk.send(self,"_assert_equals_",[smalltalk.HashedCollection._fromPairs_([smalltalk.send("foo","__minus_gt",[[(4), (5), (6)]])]),result]);
-return self},
+}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
+_st(newValue)._at_put_("foo","baz");
+_st(self)._assert_equals_(smalltalk.HashedCollection._fromPairs_([_st("foo").__minus_gt([(4), (5), (6)])]),result);
+return self}, function($ctx1) {$ctx1.fill(self,"testRootModelModifiesAndIsolatesRoot",{isolator:isolator,result:result,newValue:newValue}, smalltalk.IsolatorTest)})},
 args: [],
 source: "testRootModelModifiesAndIsolatesRoot\x0a| isolator result newValue |\x0aresult := nil.\x0aisolator := Isolator on: #(1 #(2 3)).\x0anewValue := #{'foo'->#(4 5 6)}.\x0aisolator model: rootModel modify: [:r|newValue].\x0anewValue at: 'foo' put: 'bar'.\x0aisolator model: rootModel read: [:r|result := r].\x0anewValue at: 'foo' put: 'baz'.\x0aself assert: #{'foo'->#(4 5 6)} equals: result\x0a",
 messageSends: ["on:", "->", "model:modify:", "at:put:", "model:read:", "assert:equals:"],
@@ -282,19 +268,18 @@ selector: "testRootModelModifiesRoot",
 category: 'tests',
 fn: function (){
 var self=this;
-var isolator;
-var result;
-result=nil;
-isolator=smalltalk.send((smalltalk.Isolator || Isolator),"_on_",[[(1), [(2), (3)]]]);
-smalltalk.send(isolator,"_model_modify_",[self["@rootModel"],(function(r){
-return smalltalk.HashedCollection._fromPairs_([smalltalk.send("foo","__minus_gt",[[(4), (5), (6)]])]);
-})]);
-smalltalk.send(isolator,"_model_read_",[self["@rootModel"],(function(r){
-result=r;
+var isolator,result;
+return smalltalk.withContext(function($ctx1) { 
result=nil;
+isolator=_st((smalltalk.Isolator || Isolator))._on_([(1), [(2), (3)]]);
+_st(isolator)._model_modify_(self["@rootModel"],(function(r){
+return smalltalk.withContext(function($ctx2) {
return smalltalk.HashedCollection._fromPairs_([_st("foo").__minus_gt([(4), (5), (6)])]);
+}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
+_st(isolator)._model_read_(self["@rootModel"],(function(r){
+return smalltalk.withContext(function($ctx2) {
result=r;
 return result;
-})]);
-smalltalk.send(self,"_assert_equals_",[smalltalk.HashedCollection._fromPairs_([smalltalk.send("foo","__minus_gt",[[(4), (5), (6)]])]),result]);
-return self},
+}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
+_st(self)._assert_equals_(smalltalk.HashedCollection._fromPairs_([_st("foo").__minus_gt([(4), (5), (6)])]),result);
+return self}, function($ctx1) {$ctx1.fill(self,"testRootModelModifiesRoot",{isolator:isolator,result:result}, smalltalk.IsolatorTest)})},
 args: [],
 source: "testRootModelModifiesRoot\x0a| isolator result |\x0aresult := nil.\x0aisolator := Isolator on: #(1 #(2 3)).\x0aisolator model: rootModel modify: [:r|#{'foo'->#(4 5 6)}].\x0aisolator model: rootModel read: [:r|result := r].\x0aself assert: #{'foo'->#(4 5 6)} equals: result\x0a",
 messageSends: ["on:", "model:modify:", "->", "model:read:", "assert:equals:"],
@@ -309,19 +294,18 @@ selector: "testRootModelReturnsDeeplyIsolatedRoot",
 category: 'tests',
 fn: function (){
 var self=this;
-var isolator;
-var result;
-result=nil;
-isolator=smalltalk.send((smalltalk.Isolator || Isolator),"_on_",[[(1), [(2), (3)]]]);
-smalltalk.send(isolator,"_model_read_",[self["@rootModel"],(function(r){
-return smalltalk.send(smalltalk.send(r,"_at_",[(2)]),"_at_put_",[(1),(0)]);
-})]);
-smalltalk.send(isolator,"_model_read_",[self["@rootModel"],(function(r){
-result=r;
+var isolator,result;
+return smalltalk.withContext(function($ctx1) { 
result=nil;
+isolator=_st((smalltalk.Isolator || Isolator))._on_([(1), [(2), (3)]]);
+_st(isolator)._model_read_(self["@rootModel"],(function(r){
+return smalltalk.withContext(function($ctx2) {
return _st(_st(r)._at_((2)))._at_put_((1),(0));
+}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
+_st(isolator)._model_read_(self["@rootModel"],(function(r){
+return smalltalk.withContext(function($ctx2) {
result=r;
 return result;
-})]);
-smalltalk.send(self,"_assert_equals_",[[(1), [(2), (3)]],result]);
-return self},
+}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
+_st(self)._assert_equals_([(1), [(2), (3)]],result);
+return self}, function($ctx1) {$ctx1.fill(self,"testRootModelReturnsDeeplyIsolatedRoot",{isolator:isolator,result:result}, smalltalk.IsolatorTest)})},
 args: [],
 source: "testRootModelReturnsDeeplyIsolatedRoot\x0a| isolator result |\x0aresult := nil.\x0aisolator := Isolator on: #(1 #(2 3)).\x0aisolator model: rootModel read: [:r|(r at: 2) at: 1 put: 0].\x0aisolator model: rootModel read: [:r|result := r].\x0aself assert: #(1 #(2 3)) equals: result\x0a",
 messageSends: ["on:", "model:read:", "at:put:", "at:", "assert:equals:"],
@@ -336,19 +320,18 @@ selector: "testRootModelReturnsIsolatedRoot",
 category: 'tests',
 fn: function (){
 var self=this;
-var isolator;
-var result;
-result=nil;
-isolator=smalltalk.send((smalltalk.Isolator || Isolator),"_on_",[[(1), [(2), (4)]]]);
-smalltalk.send(isolator,"_model_read_",[self["@rootModel"],(function(r){
-return smalltalk.send(r,"_at_put_",[(2),nil]);
-})]);
-smalltalk.send(isolator,"_model_read_",[self["@rootModel"],(function(r){
-result=r;
+var isolator,result;
+return smalltalk.withContext(function($ctx1) { 
result=nil;
+isolator=_st((smalltalk.Isolator || Isolator))._on_([(1), [(2), (4)]]);
+_st(isolator)._model_read_(self["@rootModel"],(function(r){
+return smalltalk.withContext(function($ctx2) {
return _st(r)._at_put_((2),nil);
+}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
+_st(isolator)._model_read_(self["@rootModel"],(function(r){
+return smalltalk.withContext(function($ctx2) {
result=r;
 return result;
-})]);
-smalltalk.send(self,"_assert_equals_",[[(1), [(2), (4)]],result]);
-return self},
+}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
+_st(self)._assert_equals_([(1), [(2), (4)]],result);
+return self}, function($ctx1) {$ctx1.fill(self,"testRootModelReturnsIsolatedRoot",{isolator:isolator,result:result}, smalltalk.IsolatorTest)})},
 args: [],
 source: "testRootModelReturnsIsolatedRoot\x0a| isolator result |\x0aresult := nil.\x0aisolator := Isolator on: #(1 #(2 4)).\x0aisolator model: rootModel read: [:r|r at: 2 put: nil].\x0aisolator model: rootModel read: [:r|result := r].\x0aself assert: #(1 #(2 4)) equals: result\x0a",
 messageSends: ["on:", "model:read:", "at:put:", "assert:equals:"],
@@ -363,16 +346,15 @@ selector: "testRootModelReturnsRoot",
 category: 'tests',
 fn: function (){
 var self=this;
-var isolator;
-var result;
-result=nil;
-isolator=smalltalk.send((smalltalk.Isolator || Isolator),"_on_",[[(1), [(2), (3)]]]);
-smalltalk.send(isolator,"_model_read_",[self["@rootModel"],(function(r){
-result=r;
+var isolator,result;
+return smalltalk.withContext(function($ctx1) { 
result=nil;
+isolator=_st((smalltalk.Isolator || Isolator))._on_([(1), [(2), (3)]]);
+_st(isolator)._model_read_(self["@rootModel"],(function(r){
+return smalltalk.withContext(function($ctx2) {
result=r;
 return result;
-})]);
-smalltalk.send(self,"_assert_equals_",[[(1), [(2), (3)]],result]);
-return self},
+}, function($ctx2) {$ctx2.fillBlock({r:r},$ctx1)})}));
+_st(self)._assert_equals_([(1), [(2), (3)]],result);
+return self}, function($ctx1) {$ctx1.fill(self,"testRootModelReturnsRoot",{isolator:isolator,result:result}, smalltalk.IsolatorTest)})},
 args: [],
 source: "testRootModelReturnsRoot\x0a| isolator result |\x0aresult := nil.\x0aisolator := Isolator on: #(1 #(2 3)).\x0aisolator model: rootModel read: [:r|result := r].\x0aself assert: #(1 #(2 3)) equals: result\x0a",
 messageSends: ["on:", "model:read:", "assert:equals:"],

+ 4 - 12
lib/st/Trapped-Frontend.st

@@ -95,8 +95,8 @@ current
 
 !TrappedSingleton class methodsFor: 'action'!
 
-start: zzz
-	self current perform: #start: withArguments: arguments
+start: args
+	self current start: args
 ! !
 
 TrappedSingleton subclass: #Trapped
@@ -130,9 +130,7 @@ descend: anArray snapshotDo: aBlock
     ]
 !
 
-start: zzz
-	| args |
-    <args = [].slice.call(arguments)>.
+start: args
     args do: [ :each | self register: each ].
 	'[data-trap]' asJQuery each: [ :index :elem |
     	| trap jq viewName modelName tokens path |
@@ -176,7 +174,7 @@ initialize
 parse: anArray
 	^anArray collect: [ :each |
     	| asNum |
-       	<asNum = parseInt(each)>.
+       	asNum = each asNumber.
         asNum = asNum ifTrue: [ asNum ] ifFalse: [
 			each first = '#' ifTrue: [ each allButFirst asSymbol ] ifFalse: [ each ]]]
 ! !
@@ -246,12 +244,6 @@ trapDescend: aBlock
 	Trapped current descend: self snapshotDo: aBlock
 ! !
 
-!Array methodsFor: '*Trapped-Frontend'!
-
-trapDescend: aBlock
-	Trapped current descend: self snapshotDo: aBlock
-! !
-
 !TagBrush methodsFor: '*Trapped-Frontend'!
 
 trap: path

+ 1 - 1
vendor/amber

@@ -1 +1 @@
-Subproject commit 650463f3fa155da3c3b6db05194f97326700bc0a
+Subproject commit fa5b0144d83c03eaacd07791e5b0632263843aba