amber/js/Importer-Exporter.deploy.js in resin-0.3.1 vs amber/js/Importer-Exporter.deploy.js in resin-0.4.0
- old
+ new
@@ -4,63 +4,64 @@
"_nextChunk",
smalltalk.method({
selector: "nextChunk",
fn: function (){
var self=this;
-var $1,$2,$3;
+var char,result,chunk;
+return smalltalk.withContext(function($ctx1) {
var $1,$3,$5,$6,$4,$2;
var $early={};
try {
-var char_;
-var result;
-var chunk;
-result=smalltalk.send("","_writeStream",[]);
-smalltalk.send((function(){
-char_=smalltalk.send(self["@stream"],"_next",[]);
-char_;
-return smalltalk.send(char_,"_notNil",[]);
-}),"_whileTrue_",[(function(){
-$1=smalltalk.send(char_,"__eq",["!"]);
-if(smalltalk.assert($1)){
-$2=smalltalk.send(smalltalk.send(self["@stream"],"_peek",[]),"__eq",["!"]);
-if(smalltalk.assert($2)){
-smalltalk.send(self["@stream"],"_next",[]);
+result=_st("")._writeStream();
+$1=(function(){
+return smalltalk.withContext(function($ctx2) {
char=_st(self["@stream"])._next();
+char;
+return _st(char)._notNil();
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
+$2=(function(){
+return smalltalk.withContext(function($ctx2) {
$3=_st(char).__eq("!");
+$4=(function(){
+return smalltalk.withContext(function($ctx3) {
$5=_st(_st(self["@stream"])._peek()).__eq("!");
+if(smalltalk.assert($5)){
+return _st(self["@stream"])._next();
} else {
-$3=smalltalk.send(smalltalk.send(result,"_contents",[]),"_trimBoth",[]);
-throw $early=[$3];
+$6=_st(_st(result)._contents())._trimBoth();
+throw $early=[$6];
};
-};
-return smalltalk.send(result,"_nextPut_",[char_]);
-})]);
+}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})});
+_st($3)._ifTrue_($4);
+return _st(result)._nextPut_(char);
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
+_st($1)._whileTrue_($2);
return nil;
}
catch(e) {if(e===$early)return e[0]; throw e}
-}
+}, function($ctx1) {$ctx1.fill(self,"nextChunk",{char:char,result:result,chunk:chunk}, smalltalk.ChunkParser)})}
}),
smalltalk.ChunkParser);
smalltalk.addMethod(
"_stream_",
smalltalk.method({
selector: "stream:",
fn: function (aStream){
var self=this;
-self["@stream"]=aStream;
-return self}
+return smalltalk.withContext(function($ctx1) {
self["@stream"]=aStream;
+return self}, function($ctx1) {$ctx1.fill(self,"stream:",{aStream:aStream}, smalltalk.ChunkParser)})}
}),
smalltalk.ChunkParser);
smalltalk.addMethod(
"_on_",
smalltalk.method({
selector: "on:",
fn: function (aStream){
var self=this;
-var $1;
-$1=smalltalk.send(smalltalk.send(self,"_new",[]),"_stream_",[aStream]);
+return smalltalk.withContext(function($ctx1) {
var $1;
+$1=_st(_st(self)._new())._stream_(aStream);
return $1;
-}
+}, function($ctx1) {$ctx1.fill(self,"on:",{aStream:aStream}, smalltalk.ChunkParser.klass)})}
}),
smalltalk.ChunkParser.klass);
smalltalk.addClass('Exporter', smalltalk.Object, [], 'Importer-Exporter');
@@ -68,233 +69,250 @@
"_classNameFor_",
smalltalk.method({
selector: "classNameFor:",
fn: function (aClass){
var self=this;
-var $2,$3,$1;
-$2=smalltalk.send(aClass,"_isMetaclass",[]);
-if(smalltalk.assert($2)){
-$1=smalltalk.send(smalltalk.send(smalltalk.send(aClass,"_instanceClass",[]),"_name",[]),"__comma",[".klass"]);
+return smalltalk.withContext(function($ctx1) {
var $2,$3,$5,$4,$1;
+$2=_st(aClass)._isMetaclass();
+$3=(function(){
+return smalltalk.withContext(function($ctx2) {
return _st(_st(_st(aClass)._instanceClass())._name()).__comma(".klass");
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
+$4=(function(){
+return smalltalk.withContext(function($ctx2) {
$5=_st(aClass)._isNil();
+if(smalltalk.assert($5)){
+return "nil";
} else {
-$3=smalltalk.send(aClass,"_isNil",[]);
-if(smalltalk.assert($3)){
-$1="nil";
-} else {
-$1=smalltalk.send(aClass,"_name",[]);
+return _st(aClass)._name();
};
-};
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
+$1=_st($2)._ifTrue_ifFalse_($3,$4);
return $1;
-}
+}, function($ctx1) {$ctx1.fill(self,"classNameFor:",{aClass:aClass}, smalltalk.Exporter)})}
}),
smalltalk.Exporter);
smalltalk.addMethod(
"_exportAll",
smalltalk.method({
selector: "exportAll",
fn: function (){
var self=this;
-var $1;
-$1=smalltalk.send((smalltalk.String || String),"_streamContents_",[(function(stream){
-return smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk),"_current",[]),"_packages",[]),"_do_",[(function(pkg){
-return smalltalk.send(stream,"_nextPutAll_",[smalltalk.send(self,"_exportPackage_",[smalltalk.send(pkg,"_name",[])])]);
-})]);
-})]);
+return smalltalk.withContext(function($ctx1) {
var $1;
+$1=_st((smalltalk.String || String))._streamContents_((function(stream){
+return smalltalk.withContext(function($ctx2) {
return _st(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._packages())._do_((function(pkg){
+return smalltalk.withContext(function($ctx3) {
return _st(stream)._nextPutAll_(_st(self)._exportPackage_(_st(pkg)._name()));
+}, function($ctx3) {$ctx3.fillBlock({pkg:pkg},$ctx1)})}));
+}, function($ctx2) {$ctx2.fillBlock({stream:stream},$ctx1)})}));
return $1;
-}
+}, function($ctx1) {$ctx1.fill(self,"exportAll",{}, smalltalk.Exporter)})}
}),
smalltalk.Exporter);
smalltalk.addMethod(
"_exportClass_",
smalltalk.method({
selector: "exportClass:",
fn: function (aClass){
var self=this;
-var $1;
-$1=smalltalk.send((smalltalk.String || String),"_streamContents_",[(function(stream){
-smalltalk.send(self,"_exportDefinitionOf_on_",[aClass,stream]);
-smalltalk.send(self,"_exportMethodsOf_on_",[aClass,stream]);
-smalltalk.send(self,"_exportMetaDefinitionOf_on_",[aClass,stream]);
-return smalltalk.send(self,"_exportMethodsOf_on_",[smalltalk.send(aClass,"_class",[]),stream]);
-})]);
+return smalltalk.withContext(function($ctx1) {
var $1;
+$1=_st((smalltalk.String || String))._streamContents_((function(stream){
+return smalltalk.withContext(function($ctx2) {
_st(self)._exportDefinitionOf_on_(aClass,stream);
+_st(self)._exportMethodsOf_on_(aClass,stream);
+_st(self)._exportMetaDefinitionOf_on_(aClass,stream);
+return _st(self)._exportMethodsOf_on_(_st(aClass)._class(),stream);
+}, function($ctx2) {$ctx2.fillBlock({stream:stream},$ctx1)})}));
return $1;
-}
+}, function($ctx1) {$ctx1.fill(self,"exportClass:",{aClass:aClass}, smalltalk.Exporter)})}
}),
smalltalk.Exporter);
smalltalk.addMethod(
"_exportDefinitionOf_on_",
smalltalk.method({
selector: "exportDefinitionOf:on:",
fn: function (aClass,aStream){
var self=this;
-var $1,$2,$3,$4;
-smalltalk.send(aStream,"_nextPutAll_",["smalltalk.addClass("]);
-smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("'","__comma",[smalltalk.send(self,"_classNameFor_",[aClass])]),"__comma",["', "])]);
-smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send("smalltalk.","__comma",[smalltalk.send(self,"_classNameFor_",[smalltalk.send(aClass,"_superclass",[])])])]);
-$1=smalltalk.send(aStream,"_nextPutAll_",[", ["]);
-smalltalk.send(smalltalk.send(aClass,"_instanceVariableNames",[]),"_do_separatedBy_",[(function(each){
-return smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("'","__comma",[each]),"__comma",["'"])]);
-}),(function(){
-return smalltalk.send(aStream,"_nextPutAll_",[", "]);
-})]);
-smalltalk.send(aStream,"_nextPutAll_",["], '"]);
-smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send(aClass,"_category",[]),"__comma",["'"])]);
-$2=smalltalk.send(aStream,"_nextPutAll_",[");"]);
-$3=smalltalk.send(smalltalk.send(aClass,"_comment",[]),"_notEmpty",[]);
-if(smalltalk.assert($3)){
-smalltalk.send(aStream,"_lf",[]);
-smalltalk.send(aStream,"_nextPutAll_",["smalltalk."]);
-smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(self,"_classNameFor_",[aClass])]);
-smalltalk.send(aStream,"_nextPutAll_",[".comment="]);
-$4=smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send(aClass,"_comment",[]),"_asJavascript",[])]);
-$4;
+return smalltalk.withContext(function($ctx1) {
var $1,$2,$3,$4,$5,$6,$7;
+$1=aStream;
+_st($1)._nextPutAll_("smalltalk.addClass(");
+_st($1)._nextPutAll_(_st(_st("'").__comma(_st(self)._classNameFor_(aClass))).__comma("', "));
+_st($1)._nextPutAll_(_st("smalltalk.").__comma(_st(self)._classNameFor_(_st(aClass)._superclass())));
+$2=_st($1)._nextPutAll_(", [");
+_st(_st(aClass)._instanceVariableNames())._do_separatedBy_((function(each){
+return smalltalk.withContext(function($ctx2) {
return _st(aStream)._nextPutAll_(_st(_st("'").__comma(each)).__comma("'"));
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
+return smalltalk.withContext(function($ctx2) {
return _st(aStream)._nextPutAll_(", ");
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+$3=aStream;
+_st($3)._nextPutAll_("], '");
+_st($3)._nextPutAll_(_st(_st(aClass)._category()).__comma("'"));
+$4=_st($3)._nextPutAll_(");");
+$5=_st(_st(aClass)._comment())._notEmpty();
+if(smalltalk.assert($5)){
+$6=aStream;
+_st($6)._lf();
+_st($6)._nextPutAll_("smalltalk.");
+_st($6)._nextPutAll_(_st(self)._classNameFor_(aClass));
+_st($6)._nextPutAll_(".comment=");
+$7=_st($6)._nextPutAll_(_st(_st(aClass)._comment())._asJavascript());
+$7;
};
-smalltalk.send(aStream,"_lf",[]);
-return self}
+_st(aStream)._lf();
+return self}, function($ctx1) {$ctx1.fill(self,"exportDefinitionOf:on:",{aClass:aClass,aStream:aStream}, smalltalk.Exporter)})}
}),
smalltalk.Exporter);
smalltalk.addMethod(
"_exportMetaDefinitionOf_on_",
smalltalk.method({
selector: "exportMetaDefinitionOf:on:",
fn: function (aClass,aStream){
var self=this;
-var $1,$2;
-$1=smalltalk.send(smalltalk.send(smalltalk.send(aClass,"_class",[]),"_instanceVariableNames",[]),"_isEmpty",[]);
+return smalltalk.withContext(function($ctx1) {
var $1,$2,$3;
+$1=_st(_st(_st(aClass)._class())._instanceVariableNames())._isEmpty();
if(! smalltalk.assert($1)){
-smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send("smalltalk.","__comma",[smalltalk.send(self,"_classNameFor_",[smalltalk.send(aClass,"_class",[])])])]);
-$2=smalltalk.send(aStream,"_nextPutAll_",[".iVarNames = ["]);
-$2;
-smalltalk.send(smalltalk.send(smalltalk.send(aClass,"_class",[]),"_instanceVariableNames",[]),"_do_separatedBy_",[(function(each){
-return smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("'","__comma",[each]),"__comma",["'"])]);
-}),(function(){
-return smalltalk.send(aStream,"_nextPutAll_",[","]);
-})]);
-smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send("];","__comma",[smalltalk.send((smalltalk.String || String),"_lf",[])])]);
+$2=aStream;
+_st($2)._nextPutAll_(_st("smalltalk.").__comma(_st(self)._classNameFor_(_st(aClass)._class())));
+$3=_st($2)._nextPutAll_(".iVarNames = [");
+$3;
+_st(_st(_st(aClass)._class())._instanceVariableNames())._do_separatedBy_((function(each){
+return smalltalk.withContext(function($ctx2) {
return _st(aStream)._nextPutAll_(_st(_st("'").__comma(each)).__comma("'"));
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
+return smalltalk.withContext(function($ctx2) {
return _st(aStream)._nextPutAll_(",");
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+_st(aStream)._nextPutAll_(_st("];").__comma(_st((smalltalk.String || String))._lf()));
};
-return self}
+return self}, function($ctx1) {$ctx1.fill(self,"exportMetaDefinitionOf:on:",{aClass:aClass,aStream:aStream}, smalltalk.Exporter)})}
}),
smalltalk.Exporter);
smalltalk.addMethod(
"_exportMethod_of_on_",
smalltalk.method({
selector: "exportMethod:of:on:",
fn: function (aMethod,aClass,aStream){
var self=this;
-var $1,$2;
-smalltalk.send(aStream,"_nextPutAll_",["smalltalk.addMethod("]);
-smalltalk.send(aStream,"_lf",[]);
-smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aMethod,"_selector",[]),"_asSelector",[]),"_asJavascript",[]),"__comma",[","])]);
-smalltalk.send(aStream,"_lf",[]);
-smalltalk.send(aStream,"_nextPutAll_",["smalltalk.method({"]);
-smalltalk.send(aStream,"_lf",[]);
-smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("selector: ","__comma",[smalltalk.send(smalltalk.send(aMethod,"_selector",[]),"_asJavascript",[])]),"__comma",[","])]);
-smalltalk.send(aStream,"_lf",[]);
-smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("category: '","__comma",[smalltalk.send(aMethod,"_category",[])]),"__comma",["',"])]);
-smalltalk.send(aStream,"_lf",[]);
-smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("fn: ","__comma",[smalltalk.send(smalltalk.send(aMethod,"_fn",[]),"_compiledSource",[])]),"__comma",[","])]);
-smalltalk.send(aStream,"_lf",[]);
-smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("args: ","__comma",[smalltalk.send(smalltalk.send(aMethod,"_arguments",[]),"_asJavascript",[])]),"__comma",[","])]);
-smalltalk.send(aStream,"_lf",[]);
-smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("source: ","__comma",[smalltalk.send(smalltalk.send(aMethod,"_source",[]),"_asJavascript",[])]),"__comma",[","])]);
-smalltalk.send(aStream,"_lf",[]);
-smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("messageSends: ","__comma",[smalltalk.send(smalltalk.send(aMethod,"_messageSends",[]),"_asJavascript",[])]),"__comma",[","])]);
-smalltalk.send(aStream,"_lf",[]);
-$1=smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send("referencedClasses: ","__comma",[smalltalk.send(smalltalk.send(aMethod,"_referencedClasses",[]),"_asJavascript",[])])]);
-smalltalk.send(aStream,"_lf",[]);
-smalltalk.send(aStream,"_nextPutAll_",["}),"]);
-smalltalk.send(aStream,"_lf",[]);
-smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send("smalltalk.","__comma",[smalltalk.send(self,"_classNameFor_",[aClass])])]);
-smalltalk.send(aStream,"_nextPutAll_",[");"]);
-smalltalk.send(aStream,"_lf",[]);
-$2=smalltalk.send(aStream,"_lf",[]);
-return self}
+return smalltalk.withContext(function($ctx1) {
var $1,$2,$3,$4;
+$1=aStream;
+_st($1)._nextPutAll_("smalltalk.addMethod(");
+_st($1)._lf();
+_st($1)._nextPutAll_(_st(_st(_st(_st(aMethod)._selector())._asSelector())._asJavascript()).__comma(","));
+_st($1)._lf();
+_st($1)._nextPutAll_("smalltalk.method({");
+_st($1)._lf();
+_st($1)._nextPutAll_(_st(_st("selector: ").__comma(_st(_st(aMethod)._selector())._asJavascript())).__comma(","));
+_st($1)._lf();
+_st($1)._nextPutAll_(_st(_st("category: '").__comma(_st(aMethod)._category())).__comma("',"));
+_st($1)._lf();
+_st($1)._nextPutAll_(_st(_st("fn: ").__comma(_st(_st(aMethod)._fn())._compiledSource())).__comma(","));
+_st($1)._lf();
+_st($1)._nextPutAll_(_st(_st("args: ").__comma(_st(_st(aMethod)._arguments())._asJavascript())).__comma(","));
+_st($1)._lf();
+_st($1)._nextPutAll_(_st(_st("source: ").__comma(_st(_st(aMethod)._source())._asJavascript())).__comma(","));
+_st($1)._lf();
+_st($1)._nextPutAll_(_st(_st("messageSends: ").__comma(_st(_st(aMethod)._messageSends())._asJavascript())).__comma(","));
+_st($1)._lf();
+$2=_st($1)._nextPutAll_(_st("referencedClasses: ").__comma(_st(_st(aMethod)._referencedClasses())._asJavascript()));
+$3=aStream;
+_st($3)._lf();
+_st($3)._nextPutAll_("}),");
+_st($3)._lf();
+_st($3)._nextPutAll_(_st("smalltalk.").__comma(_st(self)._classNameFor_(aClass)));
+_st($3)._nextPutAll_(");");
+_st($3)._lf();
+$4=_st($3)._lf();
+return self}, function($ctx1) {$ctx1.fill(self,"exportMethod:of:on:",{aMethod:aMethod,aClass:aClass,aStream:aStream}, smalltalk.Exporter)})}
}),
smalltalk.Exporter);
smalltalk.addMethod(
"_exportMethodsOf_on_",
smalltalk.method({
selector: "exportMethodsOf:on:",
fn: function (aClass,aStream){
var self=this;
-var $1;
-smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aClass,"_methodDictionary",[]),"_values",[]),"_sorted_",[(function(a,b){
-return smalltalk.send(smalltalk.send(a,"_selector",[]),"__lt_eq",[smalltalk.send(b,"_selector",[])]);
-})]),"_do_",[(function(each){
-$1=smalltalk.send(smalltalk.send(each,"_category",[]),"_match_",["^\x5c*"]);
-if(! smalltalk.assert($1)){
-return smalltalk.send(self,"_exportMethod_of_on_",[each,aClass,aStream]);
+return smalltalk.withContext(function($ctx1) {
var $1,$3,$2;
+$1=_st(_st(_st(aClass)._methodDictionary())._values())._sorted_((function(a,b){
+return smalltalk.withContext(function($ctx2) {
return _st(_st(a)._selector()).__lt_eq(_st(b)._selector());
+}, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})}));
+$2=(function(each){
+return smalltalk.withContext(function($ctx2) {
$3=_st(_st(each)._category())._match_("^\x5c*");
+if(! smalltalk.assert($3)){
+return _st(self)._exportMethod_of_on_(each,aClass,aStream);
};
-})]);
-smalltalk.send(aStream,"_lf",[]);
-return self}
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})});
+_st($1)._do_($2);
+_st(aStream)._lf();
+return self}, function($ctx1) {$ctx1.fill(self,"exportMethodsOf:on:",{aClass:aClass,aStream:aStream}, smalltalk.Exporter)})}
}),
smalltalk.Exporter);
smalltalk.addMethod(
"_exportPackage_",
smalltalk.method({
selector: "exportPackage:",
fn: function (packageName){
var self=this;
-var $1;
-var package;
-$1=smalltalk.send((smalltalk.String || String),"_streamContents_",[(function(stream){
-package=smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk),"_current",[]),"_packageAt_",[packageName]);
-package;
-smalltalk.send(self,"_exportPackageDefinitionOf_on_",[package,stream]);
-smalltalk.send(smalltalk.send(smalltalk.send(package,"_sortedClasses",[]),"_asSet",[]),"_do_",[(function(each){
-return smalltalk.send(stream,"_nextPutAll_",[smalltalk.send(self,"_exportClass_",[each])]);
-})]);
-return smalltalk.send(self,"_exportPackageExtensionsOf_on_",[package,stream]);
-})]);
+var package_;
+return smalltalk.withContext(function($ctx1) {
var $1;
+$1=_st((smalltalk.String || String))._streamContents_((function(stream){
+return smalltalk.withContext(function($ctx2) {
package_=_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._packageAt_(packageName);
+package_;
+_st(self)._exportPackageDefinitionOf_on_(package_,stream);
+_st(_st(_st(package_)._sortedClasses())._asSet())._do_((function(each){
+return smalltalk.withContext(function($ctx3) {
return _st(stream)._nextPutAll_(_st(self)._exportClass_(each));
+}, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
+return _st(self)._exportPackageExtensionsOf_on_(package_,stream);
+}, function($ctx2) {$ctx2.fillBlock({stream:stream},$ctx1)})}));
return $1;
-}
+}, function($ctx1) {$ctx1.fill(self,"exportPackage:",{packageName:packageName,package_:package_}, smalltalk.Exporter)})}
}),
smalltalk.Exporter);
smalltalk.addMethod(
"_exportPackageDefinitionOf_on_",
smalltalk.method({
selector: "exportPackageDefinitionOf:on:",
-fn: function (package,aStream){
+fn: function (package_,aStream){
var self=this;
-var $1;
-smalltalk.send(aStream,"_nextPutAll_",["smalltalk.addPackage("]);
-$1=smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("'","__comma",[smalltalk.send(package,"_name",[])]),"__comma",["', "]),"__comma",[smalltalk.send(package,"_propertiesAsJSON",[])]),"__comma",[");"])]);
-smalltalk.send(aStream,"_lf",[]);
-return self}
+return smalltalk.withContext(function($ctx1) {
var $1,$2;
+$1=aStream;
+_st($1)._nextPutAll_("smalltalk.addPackage(");
+$2=_st($1)._nextPutAll_(_st(_st(_st(_st("'").__comma(_st(package_)._name())).__comma("', ")).__comma(_st(package_)._propertiesAsJSON())).__comma(");"));
+_st(aStream)._lf();
+return self}, function($ctx1) {$ctx1.fill(self,"exportPackageDefinitionOf:on:",{package_:package_,aStream:aStream}, smalltalk.Exporter)})}
}),
smalltalk.Exporter);
smalltalk.addMethod(
"_exportPackageExtensionsOf_on_",
smalltalk.method({
selector: "exportPackageExtensionsOf:on:",
-fn: function (package,aStream){
+fn: function (package_,aStream){
var self=this;
-var $1;
var name;
-name=smalltalk.send(package,"_name",[]);
-smalltalk.send(smalltalk.send((smalltalk.Package || Package),"_sortedClasses_",[smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk),"_current",[]),"_classes",[])]),"_do_",[(function(each){
-return smalltalk.send([each,smalltalk.send(each,"_class",[])],"_do_",[(function(aClass){
-return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aClass,"_methodDictionary",[]),"_values",[]),"_sorted_",[(function(a,b){
-return smalltalk.send(smalltalk.send(a,"_selector",[]),"__lt_eq",[smalltalk.send(b,"_selector",[])]);
-})]),"_do_",[(function(method){
-$1=smalltalk.send(smalltalk.send(method,"_category",[]),"_match_",[smalltalk.send("^\x5c*","__comma",[name])]);
-if(smalltalk.assert($1)){
-return smalltalk.send(self,"_exportMethod_of_on_",[method,aClass,aStream]);
+return smalltalk.withContext(function($ctx1) {
var $1,$3,$5,$7,$6,$4,$2;
+name=_st(package_)._name();
+$1=_st((smalltalk.Package || Package))._sortedClasses_(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._classes());
+$2=(function(each){
+return smalltalk.withContext(function($ctx2) {
$3=[each,_st(each)._class()];
+$4=(function(aClass){
+return smalltalk.withContext(function($ctx3) {
$5=_st(_st(_st(aClass)._methodDictionary())._values())._sorted_((function(a,b){
+return smalltalk.withContext(function($ctx4) {
return _st(_st(a)._selector()).__lt_eq(_st(b)._selector());
+}, function($ctx4) {$ctx4.fillBlock({a:a,b:b},$ctx1)})}));
+$6=(function(method){
+return smalltalk.withContext(function($ctx4) {
$7=_st(_st(method)._category())._match_(_st("^\x5c*").__comma(name));
+if(smalltalk.assert($7)){
+return _st(self)._exportMethod_of_on_(method,aClass,aStream);
};
-})]);
-})]);
-})]);
-return self}
+}, function($ctx4) {$ctx4.fillBlock({method:method},$ctx1)})});
+return _st($5)._do_($6);
+}, function($ctx3) {$ctx3.fillBlock({aClass:aClass},$ctx1)})});
+return _st($3)._do_($4);
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})});
+_st($1)._do_($2);
+return self}, function($ctx1) {$ctx1.fill(self,"exportPackageExtensionsOf:on:",{package_:package_,aStream:aStream,name:name}, smalltalk.Exporter)})}
}),
smalltalk.Exporter);
@@ -303,207 +321,225 @@
"_chunkEscape_",
smalltalk.method({
selector: "chunkEscape:",
fn: function (aString){
var self=this;
-var $1;
-$1=smalltalk.send(smalltalk.send(aString,"_replace_with_",["!","!!"]),"_trimBoth",[]);
+return smalltalk.withContext(function($ctx1) {
var $1;
+$1=_st(_st(aString)._replace_with_("!","!!"))._trimBoth();
return $1;
-}
+}, function($ctx1) {$ctx1.fill(self,"chunkEscape:",{aString:aString}, smalltalk.ChunkExporter)})}
}),
smalltalk.ChunkExporter);
smalltalk.addMethod(
"_classNameFor_",
smalltalk.method({
selector: "classNameFor:",
fn: function (aClass){
var self=this;
-var $2,$3,$1;
-$2=smalltalk.send(aClass,"_isMetaclass",[]);
-if(smalltalk.assert($2)){
-$1=smalltalk.send(smalltalk.send(smalltalk.send(aClass,"_instanceClass",[]),"_name",[]),"__comma",[" class"]);
+return smalltalk.withContext(function($ctx1) {
var $2,$3,$5,$4,$1;
+$2=_st(aClass)._isMetaclass();
+$3=(function(){
+return smalltalk.withContext(function($ctx2) {
return _st(_st(_st(aClass)._instanceClass())._name()).__comma(" class");
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
+$4=(function(){
+return smalltalk.withContext(function($ctx2) {
$5=_st(aClass)._isNil();
+if(smalltalk.assert($5)){
+return "nil";
} else {
-$3=smalltalk.send(aClass,"_isNil",[]);
-if(smalltalk.assert($3)){
-$1="nil";
-} else {
-$1=smalltalk.send(aClass,"_name",[]);
+return _st(aClass)._name();
};
-};
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
+$1=_st($2)._ifTrue_ifFalse_($3,$4);
return $1;
-}
+}, function($ctx1) {$ctx1.fill(self,"classNameFor:",{aClass:aClass}, smalltalk.ChunkExporter)})}
}),
smalltalk.ChunkExporter);
smalltalk.addMethod(
"_exportDefinitionOf_on_",
smalltalk.method({
selector: "exportDefinitionOf:on:",
fn: function (aClass,aStream){
var self=this;
-var $1,$2,$3,$4;
-smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(self,"_classNameFor_",[smalltalk.send(aClass,"_superclass",[])])]);
-smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(" subclass: #","__comma",[smalltalk.send(self,"_classNameFor_",[aClass])])]);
-smalltalk.send(aStream,"_lf",[]);
-$1=smalltalk.send(aStream,"_nextPutAll_",["\x09instanceVariableNames: '"]);
-smalltalk.send(smalltalk.send(aClass,"_instanceVariableNames",[]),"_do_separatedBy_",[(function(each){
-return smalltalk.send(aStream,"_nextPutAll_",[each]);
-}),(function(){
-return smalltalk.send(aStream,"_nextPutAll_",[" "]);
-})]);
-smalltalk.send(aStream,"_nextPutAll_",["'"]);
-smalltalk.send(aStream,"_lf",[]);
-smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("\x09package: '","__comma",[smalltalk.send(aClass,"_category",[])]),"__comma",["'!"])]);
-$2=smalltalk.send(aStream,"_lf",[]);
-$3=smalltalk.send(smalltalk.send(aClass,"_comment",[]),"_notEmpty",[]);
-if(smalltalk.assert($3)){
-smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("!","__comma",[smalltalk.send(self,"_classNameFor_",[aClass])]),"__comma",[" commentStamp!"])]);
-smalltalk.send(aStream,"_lf",[]);
-smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send(self,"_chunkEscape_",[smalltalk.send(aClass,"_comment",[])]),"__comma",["!"])]);
-$4=smalltalk.send(aStream,"_lf",[]);
-$4;
+return smalltalk.withContext(function($ctx1) {
var $1,$2,$3,$4,$5,$6,$7;
+$1=aStream;
+_st($1)._nextPutAll_(_st(self)._classNameFor_(_st(aClass)._superclass()));
+_st($1)._nextPutAll_(_st(" subclass: #").__comma(_st(self)._classNameFor_(aClass)));
+_st($1)._lf();
+$2=_st($1)._nextPutAll_("\x09instanceVariableNames: '");
+_st(_st(aClass)._instanceVariableNames())._do_separatedBy_((function(each){
+return smalltalk.withContext(function($ctx2) {
return _st(aStream)._nextPutAll_(each);
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
+return smalltalk.withContext(function($ctx2) {
return _st(aStream)._nextPutAll_(" ");
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+$3=aStream;
+_st($3)._nextPutAll_("'");
+_st($3)._lf();
+_st($3)._nextPutAll_(_st(_st("\x09package: '").__comma(_st(aClass)._category())).__comma("'!"));
+$4=_st($3)._lf();
+$5=_st(_st(aClass)._comment())._notEmpty();
+if(smalltalk.assert($5)){
+$6=aStream;
+_st($6)._nextPutAll_(_st(_st("!").__comma(_st(self)._classNameFor_(aClass))).__comma(" commentStamp!"));
+_st($6)._lf();
+_st($6)._nextPutAll_(_st(_st(self)._chunkEscape_(_st(aClass)._comment())).__comma("!"));
+$7=_st($6)._lf();
+$7;
};
-smalltalk.send(aStream,"_lf",[]);
-return self}
+_st(aStream)._lf();
+return self}, function($ctx1) {$ctx1.fill(self,"exportDefinitionOf:on:",{aClass:aClass,aStream:aStream}, smalltalk.ChunkExporter)})}
}),
smalltalk.ChunkExporter);
smalltalk.addMethod(
"_exportMetaDefinitionOf_on_",
smalltalk.method({
selector: "exportMetaDefinitionOf:on:",
fn: function (aClass,aStream){
var self=this;
-var $1,$2,$3;
-$1=smalltalk.send(smalltalk.send(smalltalk.send(aClass,"_class",[]),"_instanceVariableNames",[]),"_isEmpty",[]);
+return smalltalk.withContext(function($ctx1) {
var $1,$2,$3,$4,$5;
+$1=_st(_st(_st(aClass)._class())._instanceVariableNames())._isEmpty();
if(! smalltalk.assert($1)){
-smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(self,"_classNameFor_",[smalltalk.send(aClass,"_class",[])])]);
-$2=smalltalk.send(aStream,"_nextPutAll_",[" instanceVariableNames: '"]);
-$2;
-smalltalk.send(smalltalk.send(smalltalk.send(aClass,"_class",[]),"_instanceVariableNames",[]),"_do_separatedBy_",[(function(each){
-return smalltalk.send(aStream,"_nextPutAll_",[each]);
-}),(function(){
-return smalltalk.send(aStream,"_nextPutAll_",[" "]);
-})]);
-smalltalk.send(aStream,"_nextPutAll_",["'!"]);
-smalltalk.send(aStream,"_lf",[]);
-$3=smalltalk.send(aStream,"_lf",[]);
+$2=aStream;
+_st($2)._nextPutAll_(_st(self)._classNameFor_(_st(aClass)._class()));
+$3=_st($2)._nextPutAll_(" instanceVariableNames: '");
$3;
+_st(_st(_st(aClass)._class())._instanceVariableNames())._do_separatedBy_((function(each){
+return smalltalk.withContext(function($ctx2) {
return _st(aStream)._nextPutAll_(each);
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
+return smalltalk.withContext(function($ctx2) {
return _st(aStream)._nextPutAll_(" ");
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+$4=aStream;
+_st($4)._nextPutAll_("'!");
+_st($4)._lf();
+$5=_st($4)._lf();
+$5;
};
-return self}
+return self}, function($ctx1) {$ctx1.fill(self,"exportMetaDefinitionOf:on:",{aClass:aClass,aStream:aStream}, smalltalk.ChunkExporter)})}
}),
smalltalk.ChunkExporter);
smalltalk.addMethod(
"_exportMethod_of_on_",
smalltalk.method({
selector: "exportMethod:of:on:",
fn: function (aMethod,aClass,aStream){
var self=this;
-var $1;
-smalltalk.send(aStream,"_lf",[]);
-smalltalk.send(aStream,"_lf",[]);
-smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(self,"_chunkEscape_",[smalltalk.send(aMethod,"_source",[])])]);
-smalltalk.send(aStream,"_lf",[]);
-$1=smalltalk.send(aStream,"_nextPutAll_",["!"]);
-return self}
+return smalltalk.withContext(function($ctx1) {
var $1,$2;
+$1=aStream;
+_st($1)._lf();
+_st($1)._lf();
+_st($1)._nextPutAll_(_st(self)._chunkEscape_(_st(aMethod)._source()));
+_st($1)._lf();
+$2=_st($1)._nextPutAll_("!");
+return self}, function($ctx1) {$ctx1.fill(self,"exportMethod:of:on:",{aMethod:aMethod,aClass:aClass,aStream:aStream}, smalltalk.ChunkExporter)})}
}),
smalltalk.ChunkExporter);
smalltalk.addMethod(
"_exportMethods_category_of_on_",
smalltalk.method({
selector: "exportMethods:category:of:on:",
fn: function (methods,category,aClass,aStream){
var self=this;
-var $1,$2;
-smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send("!","__comma",[smalltalk.send(self,"_classNameFor_",[aClass])])]);
-$1=smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send(" methodsFor: '","__comma",[category]),"__comma",["'!"])]);
-smalltalk.send(smalltalk.send(methods,"_sorted_",[(function(a,b){
-return smalltalk.send(smalltalk.send(a,"_selector",[]),"__lt_eq",[smalltalk.send(b,"_selector",[])]);
-})]),"_do_",[(function(each){
-return smalltalk.send(self,"_exportMethod_of_on_",[each,aClass,aStream]);
-})]);
-smalltalk.send(aStream,"_nextPutAll_",[" !"]);
-smalltalk.send(aStream,"_lf",[]);
-$2=smalltalk.send(aStream,"_lf",[]);
-return self}
+return smalltalk.withContext(function($ctx1) {
var $1,$2,$3,$4;
+$1=aStream;
+_st($1)._nextPutAll_(_st("!").__comma(_st(self)._classNameFor_(aClass)));
+$2=_st($1)._nextPutAll_(_st(_st(" methodsFor: '").__comma(category)).__comma("'!"));
+_st(_st(methods)._sorted_((function(a,b){
+return smalltalk.withContext(function($ctx2) {
return _st(_st(a)._selector()).__lt_eq(_st(b)._selector());
+}, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})})))._do_((function(each){
+return smalltalk.withContext(function($ctx2) {
return _st(self)._exportMethod_of_on_(each,aClass,aStream);
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
+$3=aStream;
+_st($3)._nextPutAll_(" !");
+_st($3)._lf();
+$4=_st($3)._lf();
+return self}, function($ctx1) {$ctx1.fill(self,"exportMethods:category:of:on:",{methods:methods,category:category,aClass:aClass,aStream:aStream}, smalltalk.ChunkExporter)})}
}),
smalltalk.ChunkExporter);
smalltalk.addMethod(
"_exportMethodsOf_on_",
smalltalk.method({
selector: "exportMethodsOf:on:",
fn: function (aClass,aStream){
var self=this;
-var $1;
var map;
-map=smalltalk.send((smalltalk.Dictionary || Dictionary),"_new",[]);
-smalltalk.send(aClass,"_protocolsDo_",[(function(category,methods){
-$1=smalltalk.send(category,"_match_",["^\x5c*"]);
-if(! smalltalk.assert($1)){
-return smalltalk.send(map,"_at_put_",[category,methods]);
+return smalltalk.withContext(function($ctx1) {
var $1,$3,$2;
+map=_st((smalltalk.Dictionary || Dictionary))._new();
+$1=aClass;
+$2=(function(category,methods){
+return smalltalk.withContext(function($ctx2) {
$3=_st(category)._match_("^\x5c*");
+if(! smalltalk.assert($3)){
+return _st(map)._at_put_(category,methods);
};
-})]);
-smalltalk.send(smalltalk.send(smalltalk.send(map,"_keys",[]),"_sorted_",[(function(a,b){
-return smalltalk.send(a,"__lt_eq",[b]);
-})]),"_do_",[(function(category){
+}, function($ctx2) {$ctx2.fillBlock({category:category,methods:methods},$ctx1)})});
+_st($1)._protocolsDo_($2);
+_st(_st(_st(map)._keys())._sorted_((function(a,b){
+return smalltalk.withContext(function($ctx2) {
return _st(a).__lt_eq(b);
+}, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})})))._do_((function(category){
var methods;
-methods=smalltalk.send(map,"_at_",[category]);
+return smalltalk.withContext(function($ctx2) {
methods=_st(map)._at_(category);
methods;
-return smalltalk.send(self,"_exportMethods_category_of_on_",[methods,category,aClass,aStream]);
-})]);
-return self}
+return _st(self)._exportMethods_category_of_on_(methods,category,aClass,aStream);
+}, function($ctx2) {$ctx2.fillBlock({category:category,methods:methods},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"exportMethodsOf:on:",{aClass:aClass,aStream:aStream,map:map}, smalltalk.ChunkExporter)})}
}),
smalltalk.ChunkExporter);
smalltalk.addMethod(
"_exportPackageDefinitionOf_on_",
smalltalk.method({
selector: "exportPackageDefinitionOf:on:",
-fn: function (package,aStream){
+fn: function (package_,aStream){
var self=this;
-var $1;
-smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("Smalltalk current createPackage: '","__comma",[smalltalk.send(package,"_name",[])]),"__comma",["' properties: "]),"__comma",[smalltalk.send(smalltalk.send(package,"_properties",[]),"_storeString",[])]),"__comma",["!"])]);
-$1=smalltalk.send(aStream,"_lf",[]);
-return self}
+return smalltalk.withContext(function($ctx1) {
var $1,$2;
+$1=aStream;
+_st($1)._nextPutAll_(_st(_st(_st(_st("Smalltalk current createPackage: '").__comma(_st(package_)._name())).__comma("' properties: ")).__comma(_st(_st(package_)._properties())._storeString())).__comma("!"));
+$2=_st($1)._lf();
+return self}, function($ctx1) {$ctx1.fill(self,"exportPackageDefinitionOf:on:",{package_:package_,aStream:aStream}, smalltalk.ChunkExporter)})}
}),
smalltalk.ChunkExporter);
smalltalk.addMethod(
"_exportPackageExtensionsOf_on_",
smalltalk.method({
selector: "exportPackageExtensionsOf:on:",
-fn: function (package,aStream){
+fn: function (package_,aStream){
var self=this;
-var $1;
-var name;
-var map;
-name=smalltalk.send(package,"_name",[]);
-smalltalk.send(smalltalk.send((smalltalk.Package || Package),"_sortedClasses_",[smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk),"_current",[]),"_classes",[])]),"_do_",[(function(each){
-return smalltalk.send([each,smalltalk.send(each,"_class",[])],"_do_",[(function(aClass){
-map=smalltalk.send((smalltalk.Dictionary || Dictionary),"_new",[]);
+var name,map;
+return smalltalk.withContext(function($ctx1) {
var $1,$3,$5,$7,$6,$4,$2;
+name=_st(package_)._name();
+$1=_st((smalltalk.Package || Package))._sortedClasses_(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._classes());
+$2=(function(each){
+return smalltalk.withContext(function($ctx2) {
$3=[each,_st(each)._class()];
+$4=(function(aClass){
+return smalltalk.withContext(function($ctx3) {
map=_st((smalltalk.Dictionary || Dictionary))._new();
map;
-smalltalk.send(aClass,"_protocolsDo_",[(function(category,methods){
-$1=smalltalk.send(category,"_match_",[smalltalk.send("^\x5c*","__comma",[name])]);
-if(smalltalk.assert($1)){
-return smalltalk.send(map,"_at_put_",[category,methods]);
+$5=aClass;
+$6=(function(category,methods){
+return smalltalk.withContext(function($ctx4) {
$7=_st(category)._match_(_st("^\x5c*").__comma(name));
+if(smalltalk.assert($7)){
+return _st(map)._at_put_(category,methods);
};
-})]);
-return smalltalk.send(smalltalk.send(smalltalk.send(map,"_keys",[]),"_sorted_",[(function(a,b){
-return smalltalk.send(a,"__lt_eq",[b]);
-})]),"_do_",[(function(category){
+}, function($ctx4) {$ctx4.fillBlock({category:category,methods:methods},$ctx1)})});
+_st($5)._protocolsDo_($6);
+return _st(_st(_st(map)._keys())._sorted_((function(a,b){
+return smalltalk.withContext(function($ctx4) {
return _st(a).__lt_eq(b);
+}, function($ctx4) {$ctx4.fillBlock({a:a,b:b},$ctx1)})})))._do_((function(category){
var methods;
-methods=smalltalk.send(map,"_at_",[category]);
+return smalltalk.withContext(function($ctx4) {
methods=_st(map)._at_(category);
methods;
-return smalltalk.send(self,"_exportMethods_category_of_on_",[methods,category,aClass,aStream]);
-})]);
-})]);
-})]);
-return self}
+return _st(self)._exportMethods_category_of_on_(methods,category,aClass,aStream);
+}, function($ctx4) {$ctx4.fillBlock({category:category,methods:methods},$ctx1)})}));
+}, function($ctx3) {$ctx3.fillBlock({aClass:aClass},$ctx1)})});
+return _st($3)._do_($4);
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})});
+_st($1)._do_($2);
+return self}, function($ctx1) {$ctx1.fill(self,"exportPackageExtensionsOf:on:",{package_:package_,aStream:aStream,name:name,map:map}, smalltalk.ChunkExporter)})}
}),
smalltalk.ChunkExporter);
@@ -512,52 +548,55 @@
"_exportDefinitionOf_on_",
smalltalk.method({
selector: "exportDefinitionOf:on:",
fn: function (aClass,aStream){
var self=this;
-var $1,$2;
-smalltalk.send(aStream,"_nextPutAll_",["smalltalk.addClass("]);
-smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("'","__comma",[smalltalk.send(self,"_classNameFor_",[aClass])]),"__comma",["', "])]);
-smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send("smalltalk.","__comma",[smalltalk.send(self,"_classNameFor_",[smalltalk.send(aClass,"_superclass",[])])])]);
-$1=smalltalk.send(aStream,"_nextPutAll_",[", ["]);
-smalltalk.send(smalltalk.send(aClass,"_instanceVariableNames",[]),"_do_separatedBy_",[(function(each){
-return smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("'","__comma",[each]),"__comma",["'"])]);
-}),(function(){
-return smalltalk.send(aStream,"_nextPutAll_",[", "]);
-})]);
-smalltalk.send(aStream,"_nextPutAll_",["], '"]);
-smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send(aClass,"_category",[]),"__comma",["'"])]);
-$2=smalltalk.send(aStream,"_nextPutAll_",[");"]);
-smalltalk.send(aStream,"_lf",[]);
-return self}
+return smalltalk.withContext(function($ctx1) {
var $1,$2,$3,$4;
+$1=aStream;
+_st($1)._nextPutAll_("smalltalk.addClass(");
+_st($1)._nextPutAll_(_st(_st("'").__comma(_st(self)._classNameFor_(aClass))).__comma("', "));
+_st($1)._nextPutAll_(_st("smalltalk.").__comma(_st(self)._classNameFor_(_st(aClass)._superclass())));
+$2=_st($1)._nextPutAll_(", [");
+_st(_st(aClass)._instanceVariableNames())._do_separatedBy_((function(each){
+return smalltalk.withContext(function($ctx2) {
return _st(aStream)._nextPutAll_(_st(_st("'").__comma(each)).__comma("'"));
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
+return smalltalk.withContext(function($ctx2) {
return _st(aStream)._nextPutAll_(", ");
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+$3=aStream;
+_st($3)._nextPutAll_("], '");
+_st($3)._nextPutAll_(_st(_st(aClass)._category()).__comma("'"));
+$4=_st($3)._nextPutAll_(");");
+_st(aStream)._lf();
+return self}, function($ctx1) {$ctx1.fill(self,"exportDefinitionOf:on:",{aClass:aClass,aStream:aStream}, smalltalk.StrippedExporter)})}
}),
smalltalk.StrippedExporter);
smalltalk.addMethod(
"_exportMethod_of_on_",
smalltalk.method({
selector: "exportMethod:of:on:",
fn: function (aMethod,aClass,aStream){
var self=this;
-var $1;
-smalltalk.send(aStream,"_nextPutAll_",["smalltalk.addMethod("]);
-smalltalk.send(aStream,"_lf",[]);
-smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aMethod,"_selector",[]),"_asSelector",[]),"_asJavascript",[]),"__comma",[","])]);
-smalltalk.send(aStream,"_lf",[]);
-smalltalk.send(aStream,"_nextPutAll_",["smalltalk.method({"]);
-smalltalk.send(aStream,"_lf",[]);
-smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("selector: ","__comma",[smalltalk.send(smalltalk.send(aMethod,"_selector",[]),"_asJavascript",[])]),"__comma",[","])]);
-smalltalk.send(aStream,"_lf",[]);
-smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send("fn: ","__comma",[smalltalk.send(smalltalk.send(aMethod,"_fn",[]),"_compiledSource",[])])]);
-smalltalk.send(aStream,"_lf",[]);
-smalltalk.send(aStream,"_nextPutAll_",["}),"]);
-smalltalk.send(aStream,"_lf",[]);
-smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send("smalltalk.","__comma",[smalltalk.send(self,"_classNameFor_",[aClass])])]);
-smalltalk.send(aStream,"_nextPutAll_",[");"]);
-smalltalk.send(aStream,"_lf",[]);
-$1=smalltalk.send(aStream,"_lf",[]);
-return self}
+return smalltalk.withContext(function($ctx1) {
var $1,$2;
+$1=aStream;
+_st($1)._nextPutAll_("smalltalk.addMethod(");
+_st($1)._lf();
+_st($1)._nextPutAll_(_st(_st(_st(_st(aMethod)._selector())._asSelector())._asJavascript()).__comma(","));
+_st($1)._lf();
+_st($1)._nextPutAll_("smalltalk.method({");
+_st($1)._lf();
+_st($1)._nextPutAll_(_st(_st("selector: ").__comma(_st(_st(aMethod)._selector())._asJavascript())).__comma(","));
+_st($1)._lf();
+_st($1)._nextPutAll_(_st("fn: ").__comma(_st(_st(aMethod)._fn())._compiledSource()));
+_st($1)._lf();
+_st($1)._nextPutAll_("}),");
+_st($1)._lf();
+_st($1)._nextPutAll_(_st("smalltalk.").__comma(_st(self)._classNameFor_(aClass)));
+_st($1)._nextPutAll_(");");
+_st($1)._lf();
+$2=_st($1)._lf();
+return self}, function($ctx1) {$ctx1.fill(self,"exportMethod:of:on:",{aMethod:aMethod,aClass:aClass,aStream:aStream}, smalltalk.StrippedExporter)})}
}),
smalltalk.StrippedExporter);
@@ -566,37 +605,39 @@
"_import_",
smalltalk.method({
selector: "import:",
fn: function (aStream){
var self=this;
-var $1;
-var chunk;
-var result;
-var parser;
-var lastEmpty;
-parser=smalltalk.send((smalltalk.ChunkParser || ChunkParser),"_on_",[aStream]);
+var chunk,result,parser,lastEmpty;
+return smalltalk.withContext(function($ctx1) {
var $1,$3,$4,$6,$5,$2;
+parser=_st((smalltalk.ChunkParser || ChunkParser))._on_(aStream);
lastEmpty=false;
-smalltalk.send((function(){
-chunk=smalltalk.send(parser,"_nextChunk",[]);
+$1=(function(){
+return smalltalk.withContext(function($ctx2) {
chunk=_st(parser)._nextChunk();
chunk;
-return smalltalk.send(chunk,"_isNil",[]);
-}),"_whileFalse_",[(function(){
-$1=smalltalk.send(chunk,"_isEmpty",[]);
-if(smalltalk.assert($1)){
-lastEmpty=true;
+return _st(chunk)._isNil();
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
+$2=(function(){
+return smalltalk.withContext(function($ctx2) {
$3=_st(chunk)._isEmpty();
+$4=(function(){
+return smalltalk.withContext(function($ctx3) {
lastEmpty=true;
return lastEmpty;
-} else {
-result=smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler),"_new",[]),"_evaluateExpression_",[chunk]);
+}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})});
+$5=(function(){
+return smalltalk.withContext(function($ctx3) {
result=_st(_st((smalltalk.Compiler || Compiler))._new())._evaluateExpression_(chunk);
result;
-if(smalltalk.assert(lastEmpty)){
+$6=lastEmpty;
+if(smalltalk.assert($6)){
lastEmpty=false;
lastEmpty;
-return smalltalk.send(result,"_scanFrom_",[parser]);
+return _st(result)._scanFrom_(parser);
};
-};
-})]);
-return self}
+}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})});
+return _st($3)._ifTrue_ifFalse_($4,$5);
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
+_st($1)._whileFalse_($2);
+return self}, function($ctx1) {$ctx1.fill(self,"import:",{aStream:aStream,chunk:chunk,result:result,parser:parser,lastEmpty:lastEmpty}, smalltalk.Importer)})}
}),
smalltalk.Importer);
@@ -605,67 +646,70 @@
"_initializePackageNamed_prefix_",
smalltalk.method({
selector: "initializePackageNamed:prefix:",
fn: function (packageName,aString){
var self=this;
-var $1,$2;
-smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Package || Package),"_named_",[packageName]),"_classes",[]),"_do_",[(function(each){
-smalltalk.init(each);
-;
-return smalltalk.send(each,"_initialize",[]);
-})]);
-$1=smalltalk.send((smalltalk.Package || Package),"_named_",[packageName]);
-smalltalk.send($1,"_commitPathJs_",[smalltalk.send(smalltalk.send("/","__comma",[aString]),"__comma",["/js"])]);
-$2=smalltalk.send($1,"_commitPathSt_",[smalltalk.send(smalltalk.send("/","__comma",[aString]),"__comma",["/st"])]);
-return self}
+return smalltalk.withContext(function($ctx1) {
var $1,$2;
+$1=_st((smalltalk.Package || Package))._named_(packageName);
+_st($1)._setupClasses();
+_st($1)._commitPathJs_(_st(_st("/").__comma(aString)).__comma("/js"));
+$2=_st($1)._commitPathSt_(_st(_st("/").__comma(aString)).__comma("/st"));
+return self}, function($ctx1) {$ctx1.fill(self,"initializePackageNamed:prefix:",{packageName:packageName,aString:aString}, smalltalk.PackageLoader)})}
}),
smalltalk.PackageLoader);
smalltalk.addMethod(
"_loadPackage_prefix_",
smalltalk.method({
selector: "loadPackage:prefix:",
fn: function (packageName,aString){
var self=this;
-var $1;
var url;
-url=smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("/","__comma",[aString]),"__comma",["/js/"]),"__comma",[packageName]),"__comma",[".js"]);
-smalltalk.send(jQuery,"_ajax_options_",[url,smalltalk.HashedCollection._fromPairs_([smalltalk.send("type","__minus_gt",["GET"]),smalltalk.send("dataType","__minus_gt",["script"]),smalltalk.send("complete","__minus_gt",[(function(jqXHR,textStatus){
-$1=smalltalk.send(smalltalk.send(jqXHR,"_readyState",[]),"__eq",[(4)]);
-if(smalltalk.assert($1)){
-return smalltalk.send(self,"_initializePackageNamed_prefix_",[packageName,aString]);
+return smalltalk.withContext(function($ctx1) {
var $1,$2,$4,$5,$8,$7,$6,$3;
+url=_st(_st(_st(_st("/").__comma(aString)).__comma("/js/")).__comma(packageName)).__comma(".js");
+$1=jQuery;
+$2=url;
+$4=_st("type").__minus_gt("GET");
+$5=_st("dataType").__minus_gt("script");
+$7=(function(jqXHR,textStatus){
+return smalltalk.withContext(function($ctx2) {
$8=_st(_st(jqXHR)._readyState()).__eq((4));
+if(smalltalk.assert($8)){
+return _st(self)._initializePackageNamed_prefix_(packageName,aString);
};
-})]),smalltalk.send("error","__minus_gt",[(function(){
-return smalltalk.send(window,"_alert_",[smalltalk.send("Could not load package at: ","__comma",[url])]);
-})])])]);
-return self}
+}, function($ctx2) {$ctx2.fillBlock({jqXHR:jqXHR,textStatus:textStatus},$ctx1)})});
+$6=_st("complete").__minus_gt($7);
+$3=smalltalk.HashedCollection._fromPairs_([$4,$5,$6,_st("error").__minus_gt((function(){
+return smalltalk.withContext(function($ctx2) {
return _st(window)._alert_(_st("Could not load package at: ").__comma(url));
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))]);
+_st($1)._ajax_options_($2,$3);
+return self}, function($ctx1) {$ctx1.fill(self,"loadPackage:prefix:",{packageName:packageName,aString:aString,url:url}, smalltalk.PackageLoader)})}
}),
smalltalk.PackageLoader);
smalltalk.addMethod(
"_loadPackages_prefix_",
smalltalk.method({
selector: "loadPackages:prefix:",
fn: function (aCollection,aString){
var self=this;
-smalltalk.send(aCollection,"_do_",[(function(each){
-return smalltalk.send(self,"_loadPackage_prefix_",[each,aString]);
-})]);
-return self}
+return smalltalk.withContext(function($ctx1) {
_st(aCollection)._do_((function(each){
+return smalltalk.withContext(function($ctx2) {
return _st(self)._loadPackage_prefix_(each,aString);
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"loadPackages:prefix:",{aCollection:aCollection,aString:aString}, smalltalk.PackageLoader)})}
}),
smalltalk.PackageLoader);
smalltalk.addMethod(
"_loadPackages_prefix_",
smalltalk.method({
selector: "loadPackages:prefix:",
fn: function (aCollection,aString){
var self=this;
-var $1;
-$1=smalltalk.send(smalltalk.send(self,"_new",[]),"_loadPackages_prefix_",[aCollection,aString]);
+return smalltalk.withContext(function($ctx1) {
var $1;
+$1=_st(_st(self)._new())._loadPackages_prefix_(aCollection,aString);
return $1;
-}
+}, function($ctx1) {$ctx1.fill(self,"loadPackages:prefix:",{aCollection:aCollection,aString:aString}, smalltalk.PackageLoader.klass)})}
}),
smalltalk.PackageLoader.klass);