|
@@ -29,13 +29,15 @@ category: 'convenience',
|
|
fn: function (aClass){
|
|
fn: function (aClass){
|
|
var self=this;
|
|
var self=this;
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
-var $2,$3,$1;
|
|
|
|
|
|
+var $2,$3,$4,$1;
|
|
$2=_st(aClass)._isMetaclass();
|
|
$2=_st(aClass)._isMetaclass();
|
|
if(smalltalk.assert($2)){
|
|
if(smalltalk.assert($2)){
|
|
-$1=_st(_st(_st(aClass)._instanceClass())._name()).__comma(" class");
|
|
|
|
|
|
+$3=_st(_st(aClass)._instanceClass())._name();
|
|
|
|
+$ctx1.sendIdx["name"]=1;
|
|
|
|
+$1=_st($3).__comma(" class");
|
|
} else {
|
|
} else {
|
|
-$3=_st(aClass)._isNil();
|
|
|
|
-if(smalltalk.assert($3)){
|
|
|
|
|
|
+$4=_st(aClass)._isNil();
|
|
|
|
+if(smalltalk.assert($4)){
|
|
$1="nil";
|
|
$1="nil";
|
|
} else {
|
|
} else {
|
|
$1=_st(aClass)._name();
|
|
$1=_st(aClass)._name();
|
|
@@ -102,21 +104,22 @@ function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof Ordere
|
|
function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
|
|
function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
|
|
function $ExportMethodProtocol(){return smalltalk.ExportMethodProtocol||(typeof ExportMethodProtocol=="undefined"?nil:ExportMethodProtocol)}
|
|
function $ExportMethodProtocol(){return smalltalk.ExportMethodProtocol||(typeof ExportMethodProtocol=="undefined"?nil:ExportMethodProtocol)}
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
-var $1,$2;
|
|
|
|
|
|
+var $2,$1,$3;
|
|
extensionName="*".__comma(_st(aPackage)._name());
|
|
extensionName="*".__comma(_st(aPackage)._name());
|
|
result=_st($OrderedCollection())._new();
|
|
result=_st($OrderedCollection())._new();
|
|
-_st(_st(_st($Smalltalk())._current())._classes())._do_((function(each){
|
|
|
|
|
|
+$1=_st(_st(_st($Smalltalk())._current())._classes())._do_((function(each){
|
|
return smalltalk.withContext(function($ctx2) {
|
|
return smalltalk.withContext(function($ctx2) {
|
|
return _st([each,_st(each)._class()])._do_((function(behavior){
|
|
return _st([each,_st(each)._class()])._do_((function(behavior){
|
|
return smalltalk.withContext(function($ctx3) {
|
|
return smalltalk.withContext(function($ctx3) {
|
|
-$1=_st(_st(behavior)._protocols())._includes_(extensionName);
|
|
|
|
-if(smalltalk.assert($1)){
|
|
|
|
|
|
+$2=_st(_st(behavior)._protocols())._includes_(extensionName);
|
|
|
|
+if(smalltalk.assert($2)){
|
|
return _st(result)._add_(_st($ExportMethodProtocol())._name_theClass_(extensionName,behavior));
|
|
return _st(result)._add_(_st($ExportMethodProtocol())._name_theClass_(extensionName,behavior));
|
|
};
|
|
};
|
|
}, function($ctx3) {$ctx3.fillBlock({behavior:behavior},$ctx2,2)})}));
|
|
}, function($ctx3) {$ctx3.fillBlock({behavior:behavior},$ctx2,2)})}));
|
|
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
|
|
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
|
|
-$2=result;
|
|
|
|
-return $2;
|
|
|
|
|
|
+$ctx1.sendIdx["do:"]=1;
|
|
|
|
+$3=result;
|
|
|
|
+return $3;
|
|
}, function($ctx1) {$ctx1.fill(self,"extensionProtocolsOfPackage:",{aPackage:aPackage,extensionName:extensionName,result:result},smalltalk.AbstractExporter)})},
|
|
}, function($ctx1) {$ctx1.fill(self,"extensionProtocolsOfPackage:",{aPackage:aPackage,extensionName:extensionName,result:result},smalltalk.AbstractExporter)})},
|
|
args: ["aPackage"],
|
|
args: ["aPackage"],
|
|
source: "extensionProtocolsOfPackage: aPackage\x0a\x09| extensionName result |\x0a\x09\x0a\x09extensionName := '*', aPackage name.\x0a\x09result := OrderedCollection new.\x0a\x09\x0a\x09\x22The classes must be loaded since it is extensions only.\x0a\x09Therefore sorting (dependency resolution) does not matter here.\x0a\x09Not sorting improves the speed by a number of magnitude.\x22\x0a\x09\x0a\x09Smalltalk current classes do: [ :each |\x0a\x09\x09{each. each class} do: [ :behavior |\x0a\x09\x09\x09(behavior protocols includes: extensionName) ifTrue: [\x0a\x09\x09\x09\x09result add: (ExportMethodProtocol name: extensionName theClass: behavior) ] ] ].\x0a\x0a\x09^result",
|
|
source: "extensionProtocolsOfPackage: aPackage\x0a\x09| extensionName result |\x0a\x09\x0a\x09extensionName := '*', aPackage name.\x0a\x09result := OrderedCollection new.\x0a\x09\x0a\x09\x22The classes must be loaded since it is extensions only.\x0a\x09Therefore sorting (dependency resolution) does not matter here.\x0a\x09Not sorting improves the speed by a number of magnitude.\x22\x0a\x09\x0a\x09Smalltalk current classes do: [ :each |\x0a\x09\x09{each. each class} do: [ :behavior |\x0a\x09\x09\x09(behavior protocols includes: extensionName) ifTrue: [\x0a\x09\x09\x09\x09result add: (ExportMethodProtocol name: extensionName theClass: behavior) ] ] ].\x0a\x0a\x09^result",
|
|
@@ -140,6 +143,7 @@ var $1,$2;
|
|
$1=aStream;
|
|
$1=aStream;
|
|
_st($1)._nextPutAll_(" !");
|
|
_st($1)._nextPutAll_(" !");
|
|
_st($1)._lf();
|
|
_st($1)._lf();
|
|
|
|
+$ctx1.sendIdx["lf"]=1;
|
|
$2=_st($1)._lf();
|
|
$2=_st($1)._lf();
|
|
return self}, function($ctx1) {$ctx1.fill(self,"exportCategoryEpilogueOf:on:",{aCategory:aCategory,aStream:aStream},smalltalk.ChunkExporter)})},
|
|
return self}, function($ctx1) {$ctx1.fill(self,"exportCategoryEpilogueOf:on:",{aCategory:aCategory,aStream:aStream},smalltalk.ChunkExporter)})},
|
|
args: ["aCategory", "aStream"],
|
|
args: ["aCategory", "aStream"],
|
|
@@ -156,10 +160,18 @@ category: 'output',
|
|
fn: function (aCategory,aStream){
|
|
fn: function (aCategory,aStream){
|
|
var self=this;
|
|
var self=this;
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
-var $1,$2;
|
|
|
|
|
|
+var $1,$2,$3,$5,$7,$6,$4;
|
|
$1=aStream;
|
|
$1=aStream;
|
|
-_st($1)._nextPutAll_("!".__comma(self._classNameFor_(_st(aCategory)._theClass())));
|
|
|
|
-$2=_st($1)._nextPutAll_(_st(" methodsFor: '".__comma(_st(aCategory)._name())).__comma("'!"));
|
|
|
|
|
|
+$2=$1;
|
|
|
|
+$3="!".__comma(self._classNameFor_(_st(aCategory)._theClass()));
|
|
|
|
+$ctx1.sendIdx[","]=1;
|
|
|
|
+_st($2)._nextPutAll_($3);
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=1;
|
|
|
|
+$5=$1;
|
|
|
|
+$7=" methodsFor: '".__comma(_st(aCategory)._name());
|
|
|
|
+$6=_st($7).__comma("'!");
|
|
|
|
+$ctx1.sendIdx[","]=2;
|
|
|
|
+$4=_st($5)._nextPutAll_($6);
|
|
return self}, function($ctx1) {$ctx1.fill(self,"exportCategoryPrologueOf:on:",{aCategory:aCategory,aStream:aStream},smalltalk.ChunkExporter)})},
|
|
return self}, function($ctx1) {$ctx1.fill(self,"exportCategoryPrologueOf:on:",{aCategory:aCategory,aStream:aStream},smalltalk.ChunkExporter)})},
|
|
args: ["aCategory", "aStream"],
|
|
args: ["aCategory", "aStream"],
|
|
source: "exportCategoryPrologueOf: aCategory on: aStream\x0a\x09aStream\x0a\x09\x09nextPutAll: '!', (self classNameFor: aCategory theClass);\x0a\x09\x09nextPutAll: ' methodsFor: ''', aCategory name, '''!'",
|
|
source: "exportCategoryPrologueOf: aCategory on: aStream\x0a\x09aStream\x0a\x09\x09nextPutAll: '!', (self classNameFor: aCategory theClass);\x0a\x09\x09nextPutAll: ' methodsFor: ''', aCategory name, '''!'",
|
|
@@ -175,36 +187,75 @@ category: 'output',
|
|
fn: function (aClass,aStream){
|
|
fn: function (aClass,aStream){
|
|
var self=this;
|
|
var self=this;
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
-var $1,$2,$3,$4,$5,$6,$7;
|
|
|
|
|
|
+var $1,$2,$3,$4,$6,$5,$7,$8,$9,$11,$10,$12,$14,$13,$15,$16,$19,$18,$17,$20,$23,$22,$21,$24,$25;
|
|
$1=aStream;
|
|
$1=aStream;
|
|
-_st($1)._nextPutAll_(self._classNameFor_(_st(aClass)._superclass()));
|
|
|
|
-_st($1)._nextPutAll_(" subclass: #".__comma(self._classNameFor_(aClass)));
|
|
|
|
|
|
+$2=$1;
|
|
|
|
+$3=self._classNameFor_(_st(aClass)._superclass());
|
|
|
|
+$ctx1.sendIdx["classNameFor:"]=1;
|
|
|
|
+_st($2)._nextPutAll_($3);
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=1;
|
|
|
|
+$4=$1;
|
|
|
|
+$6=self._classNameFor_(aClass);
|
|
|
|
+$ctx1.sendIdx["classNameFor:"]=2;
|
|
|
|
+$5=" subclass: #".__comma($6);
|
|
|
|
+$ctx1.sendIdx[","]=1;
|
|
|
|
+_st($4)._nextPutAll_($5);
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=2;
|
|
_st($1)._lf();
|
|
_st($1)._lf();
|
|
|
|
+$ctx1.sendIdx["lf"]=1;
|
|
_st($1)._tab();
|
|
_st($1)._tab();
|
|
-$2=_st($1)._nextPutAll_("instanceVariableNames: '");
|
|
|
|
|
|
+$ctx1.sendIdx["tab"]=1;
|
|
|
|
+$7=_st($1)._nextPutAll_("instanceVariableNames: '");
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=3;
|
|
_st(_st(aClass)._instanceVariableNames())._do_separatedBy_((function(each){
|
|
_st(_st(aClass)._instanceVariableNames())._do_separatedBy_((function(each){
|
|
return smalltalk.withContext(function($ctx2) {
|
|
return smalltalk.withContext(function($ctx2) {
|
|
return _st(aStream)._nextPutAll_(each);
|
|
return _st(aStream)._nextPutAll_(each);
|
|
|
|
+$ctx2.sendIdx["nextPutAll:"]=4;
|
|
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}),(function(){
|
|
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}),(function(){
|
|
return smalltalk.withContext(function($ctx2) {
|
|
return smalltalk.withContext(function($ctx2) {
|
|
return _st(aStream)._nextPutAll_(" ");
|
|
return _st(aStream)._nextPutAll_(" ");
|
|
|
|
+$ctx2.sendIdx["nextPutAll:"]=5;
|
|
}, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
|
|
}, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
|
|
-$3=aStream;
|
|
|
|
-_st($3)._nextPutAll_("'");
|
|
|
|
-_st($3)._lf();
|
|
|
|
-_st($3)._tab();
|
|
|
|
-_st($3)._nextPutAll_(_st("package: '".__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("!".__comma(self._classNameFor_(aClass))).__comma(" commentStamp!"));
|
|
|
|
-_st($6)._lf();
|
|
|
|
-_st($6)._nextPutAll_(_st(self._chunkEscape_(_st(aClass)._comment())).__comma("!"));
|
|
|
|
-$7=_st($6)._lf();
|
|
|
|
-$7;
|
|
|
|
|
|
+$8=aStream;
|
|
|
|
+_st($8)._nextPutAll_("'");
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=6;
|
|
|
|
+_st($8)._lf();
|
|
|
|
+$ctx1.sendIdx["lf"]=2;
|
|
|
|
+_st($8)._tab();
|
|
|
|
+$9=$8;
|
|
|
|
+$11="package: '".__comma(_st(aClass)._category());
|
|
|
|
+$ctx1.sendIdx[","]=3;
|
|
|
|
+$10=_st($11).__comma("'!");
|
|
|
|
+$ctx1.sendIdx[","]=2;
|
|
|
|
+_st($9)._nextPutAll_($10);
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=7;
|
|
|
|
+$12=_st($8)._lf();
|
|
|
|
+$ctx1.sendIdx["lf"]=3;
|
|
|
|
+$14=_st(aClass)._comment();
|
|
|
|
+$ctx1.sendIdx["comment"]=1;
|
|
|
|
+$13=_st($14)._notEmpty();
|
|
|
|
+if(smalltalk.assert($13)){
|
|
|
|
+$15=aStream;
|
|
|
|
+$16=$15;
|
|
|
|
+$19=self._classNameFor_(aClass);
|
|
|
|
+$18="!".__comma($19);
|
|
|
|
+$ctx1.sendIdx[","]=5;
|
|
|
|
+$17=_st($18).__comma(" commentStamp!");
|
|
|
|
+$ctx1.sendIdx[","]=4;
|
|
|
|
+_st($16)._nextPutAll_($17);
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=8;
|
|
|
|
+_st($15)._lf();
|
|
|
|
+$ctx1.sendIdx["lf"]=4;
|
|
|
|
+$20=$15;
|
|
|
|
+$23=_st(aClass)._comment();
|
|
|
|
+$22=self._chunkEscape_($23);
|
|
|
|
+$21=_st($22).__comma("!");
|
|
|
|
+_st($20)._nextPutAll_($21);
|
|
|
|
+$24=_st($15)._lf();
|
|
|
|
+$ctx1.sendIdx["lf"]=5;
|
|
|
|
+$24;
|
|
};
|
|
};
|
|
-_st(aStream)._lf();
|
|
|
|
|
|
+$25=_st(aStream)._lf();
|
|
return self}, function($ctx1) {$ctx1.fill(self,"exportDefinitionOf:on:",{aClass:aClass,aStream:aStream},smalltalk.ChunkExporter)})},
|
|
return self}, function($ctx1) {$ctx1.fill(self,"exportDefinitionOf:on:",{aClass:aClass,aStream:aStream},smalltalk.ChunkExporter)})},
|
|
args: ["aClass", "aStream"],
|
|
args: ["aClass", "aStream"],
|
|
source: "exportDefinitionOf: aClass on: aStream\x0a\x09\x22Chunk format.\x22\x0a\x0a\x09aStream\x0a\x09\x09nextPutAll: (self classNameFor: aClass superclass);\x0a\x09\x09nextPutAll: ' subclass: #', (self classNameFor: aClass); lf;\x0a\x09\x09tab; nextPutAll: 'instanceVariableNames: '''.\x0a\x09aClass instanceVariableNames\x0a\x09\x09do: [:each | aStream nextPutAll: each]\x0a\x09\x09separatedBy: [aStream nextPutAll: ' '].\x0a\x09aStream\x0a\x09\x09nextPutAll: ''''; lf;\x0a\x09\x09tab; nextPutAll: 'package: ''', aClass category, '''!'; lf.\x0a\x09aClass comment notEmpty ifTrue: [\x0a\x09\x09aStream\x0a\x09\x09nextPutAll: '!', (self classNameFor: aClass), ' commentStamp!';lf;\x0a\x09\x09nextPutAll: (self chunkEscape: aClass comment), '!';lf].\x0a\x09aStream lf",
|
|
source: "exportDefinitionOf: aClass on: aStream\x0a\x09\x22Chunk format.\x22\x0a\x0a\x09aStream\x0a\x09\x09nextPutAll: (self classNameFor: aClass superclass);\x0a\x09\x09nextPutAll: ' subclass: #', (self classNameFor: aClass); lf;\x0a\x09\x09tab; nextPutAll: 'instanceVariableNames: '''.\x0a\x09aClass instanceVariableNames\x0a\x09\x09do: [:each | aStream nextPutAll: each]\x0a\x09\x09separatedBy: [aStream nextPutAll: ' '].\x0a\x09aStream\x0a\x09\x09nextPutAll: ''''; lf;\x0a\x09\x09tab; nextPutAll: 'package: ''', aClass category, '''!'; lf.\x0a\x09aClass comment notEmpty ifTrue: [\x0a\x09\x09aStream\x0a\x09\x09nextPutAll: '!', (self classNameFor: aClass), ' commentStamp!';lf;\x0a\x09\x09nextPutAll: (self chunkEscape: aClass comment), '!';lf].\x0a\x09aStream lf",
|
|
@@ -220,25 +271,40 @@ category: 'output',
|
|
fn: function (aClass,aStream){
|
|
fn: function (aClass,aStream){
|
|
var self=this;
|
|
var self=this;
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
-var $1,$2,$3,$4,$5;
|
|
|
|
-$1=_st(_st(_st(aClass)._class())._instanceVariableNames())._isEmpty();
|
|
|
|
|
|
+var $3,$2,$1,$4,$5,$7,$6,$8,$10,$9,$11,$12;
|
|
|
|
+$3=_st(aClass)._class();
|
|
|
|
+$ctx1.sendIdx["class"]=1;
|
|
|
|
+$2=_st($3)._instanceVariableNames();
|
|
|
|
+$ctx1.sendIdx["instanceVariableNames"]=1;
|
|
|
|
+$1=_st($2)._isEmpty();
|
|
if(! smalltalk.assert($1)){
|
|
if(! smalltalk.assert($1)){
|
|
-$2=aStream;
|
|
|
|
-_st($2)._nextPutAll_(self._classNameFor_(_st(aClass)._class()));
|
|
|
|
-$3=_st($2)._nextPutAll_(" instanceVariableNames: '");
|
|
|
|
-$3;
|
|
|
|
-_st(_st(_st(aClass)._class())._instanceVariableNames())._do_separatedBy_((function(each){
|
|
|
|
|
|
+$4=aStream;
|
|
|
|
+$5=$4;
|
|
|
|
+$7=_st(aClass)._class();
|
|
|
|
+$ctx1.sendIdx["class"]=2;
|
|
|
|
+$6=self._classNameFor_($7);
|
|
|
|
+_st($5)._nextPutAll_($6);
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=1;
|
|
|
|
+$8=_st($4)._nextPutAll_(" instanceVariableNames: '");
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=2;
|
|
|
|
+$8;
|
|
|
|
+$10=_st(aClass)._class();
|
|
|
|
+$9=_st($10)._instanceVariableNames();
|
|
|
|
+_st($9)._do_separatedBy_((function(each){
|
|
return smalltalk.withContext(function($ctx2) {
|
|
return smalltalk.withContext(function($ctx2) {
|
|
return _st(aStream)._nextPutAll_(each);
|
|
return _st(aStream)._nextPutAll_(each);
|
|
|
|
+$ctx2.sendIdx["nextPutAll:"]=3;
|
|
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}),(function(){
|
|
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}),(function(){
|
|
return smalltalk.withContext(function($ctx2) {
|
|
return smalltalk.withContext(function($ctx2) {
|
|
return _st(aStream)._nextPutAll_(" ");
|
|
return _st(aStream)._nextPutAll_(" ");
|
|
|
|
+$ctx2.sendIdx["nextPutAll:"]=4;
|
|
}, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
|
|
}, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
|
|
-$4=aStream;
|
|
|
|
-_st($4)._nextPutAll_("'!");
|
|
|
|
-_st($4)._lf();
|
|
|
|
-$5=_st($4)._lf();
|
|
|
|
-$5;
|
|
|
|
|
|
+$11=aStream;
|
|
|
|
+_st($11)._nextPutAll_("'!");
|
|
|
|
+_st($11)._lf();
|
|
|
|
+$ctx1.sendIdx["lf"]=1;
|
|
|
|
+$12=_st($11)._lf();
|
|
|
|
+$12;
|
|
};
|
|
};
|
|
return self}, function($ctx1) {$ctx1.fill(self,"exportMetaDefinitionOf:on:",{aClass:aClass,aStream:aStream},smalltalk.ChunkExporter)})},
|
|
return self}, function($ctx1) {$ctx1.fill(self,"exportMetaDefinitionOf:on:",{aClass:aClass,aStream:aStream},smalltalk.ChunkExporter)})},
|
|
args: ["aClass", "aStream"],
|
|
args: ["aClass", "aStream"],
|
|
@@ -258,8 +324,11 @@ return smalltalk.withContext(function($ctx1) {
|
|
var $1,$2;
|
|
var $1,$2;
|
|
$1=aStream;
|
|
$1=aStream;
|
|
_st($1)._lf();
|
|
_st($1)._lf();
|
|
|
|
+$ctx1.sendIdx["lf"]=1;
|
|
_st($1)._lf();
|
|
_st($1)._lf();
|
|
|
|
+$ctx1.sendIdx["lf"]=2;
|
|
_st($1)._nextPutAll_(self._chunkEscape_(_st(aMethod)._source()));
|
|
_st($1)._nextPutAll_(self._chunkEscape_(_st(aMethod)._source()));
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=1;
|
|
_st($1)._lf();
|
|
_st($1)._lf();
|
|
$2=_st($1)._nextPutAll_("!");
|
|
$2=_st($1)._nextPutAll_("!");
|
|
return self}, function($ctx1) {$ctx1.fill(self,"exportMethod:on:",{aMethod:aMethod,aStream:aStream},smalltalk.ChunkExporter)})},
|
|
return self}, function($ctx1) {$ctx1.fill(self,"exportMethod:on:",{aMethod:aMethod,aStream:aStream},smalltalk.ChunkExporter)})},
|
|
@@ -277,15 +346,21 @@ category: 'output',
|
|
fn: function (aPackage,aStream){
|
|
fn: function (aPackage,aStream){
|
|
var self=this;
|
|
var self=this;
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
|
|
+var $1,$2,$3;
|
|
self._exportPackageDefinitionOf_on_(aPackage,aStream);
|
|
self._exportPackageDefinitionOf_on_(aPackage,aStream);
|
|
_st(_st(aPackage)._sortedClasses())._do_((function(each){
|
|
_st(_st(aPackage)._sortedClasses())._do_((function(each){
|
|
return smalltalk.withContext(function($ctx2) {
|
|
return smalltalk.withContext(function($ctx2) {
|
|
self._exportDefinitionOf_on_(each,aStream);
|
|
self._exportDefinitionOf_on_(each,aStream);
|
|
-self._exportProtocols_on_(self._ownMethodProtocolsOfClass_(each),aStream);
|
|
|
|
|
|
+$1=self._ownMethodProtocolsOfClass_(each);
|
|
|
|
+$ctx2.sendIdx["ownMethodProtocolsOfClass:"]=1;
|
|
|
|
+self._exportProtocols_on_($1,aStream);
|
|
|
|
+$ctx2.sendIdx["exportProtocols:on:"]=1;
|
|
self._exportMetaDefinitionOf_on_(each,aStream);
|
|
self._exportMetaDefinitionOf_on_(each,aStream);
|
|
-return self._exportProtocols_on_(self._ownMethodProtocolsOfClass_(_st(each)._class()),aStream);
|
|
|
|
|
|
+$2=self._ownMethodProtocolsOfClass_(_st(each)._class());
|
|
|
|
+return self._exportProtocols_on_($2,aStream);
|
|
|
|
+$ctx2.sendIdx["exportProtocols:on:"]=2;
|
|
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
|
|
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
|
|
-self._exportProtocols_on_(self._extensionProtocolsOfPackage_(aPackage),aStream);
|
|
|
|
|
|
+$3=self._exportProtocols_on_(self._extensionProtocolsOfPackage_(aPackage),aStream);
|
|
return self}, function($ctx1) {$ctx1.fill(self,"exportPackage:on:",{aPackage:aPackage,aStream:aStream},smalltalk.ChunkExporter)})},
|
|
return self}, function($ctx1) {$ctx1.fill(self,"exportPackage:on:",{aPackage:aPackage,aStream:aStream},smalltalk.ChunkExporter)})},
|
|
args: ["aPackage", "aStream"],
|
|
args: ["aPackage", "aStream"],
|
|
source: "exportPackage: aPackage on: aStream\x0a\x0a\x09self exportPackageDefinitionOf: aPackage on: aStream.\x0a\x09\x0a\x09aPackage sortedClasses do: [ :each |\x0a\x09\x09self exportDefinitionOf: each on: aStream.\x0a\x09\x09\x0a\x09\x09self \x0a\x09\x09\x09exportProtocols: (self ownMethodProtocolsOfClass: each)\x0a\x09\x09\x09on: aStream.\x0a\x09\x09\x09\x0a\x09\x09self exportMetaDefinitionOf: each on: aStream.\x0a\x09\x09\x0a\x09\x09self \x0a\x09\x09\x09exportProtocols: (self ownMethodProtocolsOfClass: each class)\x0a\x09\x09\x09on: aStream ].\x0a\x09\x09\x09\x0a\x09self \x0a\x09\x09exportProtocols: (self extensionProtocolsOfPackage: aPackage)\x0a\x09\x09on: aStream",
|
|
source: "exportPackage: aPackage on: aStream\x0a\x0a\x09self exportPackageDefinitionOf: aPackage on: aStream.\x0a\x09\x0a\x09aPackage sortedClasses do: [ :each |\x0a\x09\x09self exportDefinitionOf: each on: aStream.\x0a\x09\x09\x0a\x09\x09self \x0a\x09\x09\x09exportProtocols: (self ownMethodProtocolsOfClass: each)\x0a\x09\x09\x09on: aStream.\x0a\x09\x09\x09\x0a\x09\x09self exportMetaDefinitionOf: each on: aStream.\x0a\x09\x09\x0a\x09\x09self \x0a\x09\x09\x09exportProtocols: (self ownMethodProtocolsOfClass: each class)\x0a\x09\x09\x09on: aStream ].\x0a\x09\x09\x09\x0a\x09self \x0a\x09\x09exportProtocols: (self extensionProtocolsOfPackage: aPackage)\x0a\x09\x09on: aStream",
|
|
@@ -301,10 +376,14 @@ category: 'output',
|
|
fn: function (aPackage,aStream){
|
|
fn: function (aPackage,aStream){
|
|
var self=this;
|
|
var self=this;
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
-var $1,$2;
|
|
|
|
|
|
+var $1,$2,$4,$3,$5;
|
|
$1=aStream;
|
|
$1=aStream;
|
|
-_st($1)._nextPutAll_(_st("Smalltalk current createPackage: '".__comma(_st(aPackage)._name())).__comma("'!"));
|
|
|
|
-$2=_st($1)._lf();
|
|
|
|
|
|
+$2=$1;
|
|
|
|
+$4="Smalltalk current createPackage: '".__comma(_st(aPackage)._name());
|
|
|
|
+$3=_st($4).__comma("'!");
|
|
|
|
+$ctx1.sendIdx[","]=1;
|
|
|
|
+_st($2)._nextPutAll_($3);
|
|
|
|
+$5=_st($1)._lf();
|
|
return self}, function($ctx1) {$ctx1.fill(self,"exportPackageDefinitionOf:on:",{aPackage:aPackage,aStream:aStream},smalltalk.ChunkExporter)})},
|
|
return self}, function($ctx1) {$ctx1.fill(self,"exportPackageDefinitionOf:on:",{aPackage:aPackage,aStream:aStream},smalltalk.ChunkExporter)})},
|
|
args: ["aPackage", "aStream"],
|
|
args: ["aPackage", "aStream"],
|
|
source: "exportPackageDefinitionOf: aPackage on: aStream\x0a\x09aStream\x0a\x09\x09nextPutAll: 'Smalltalk current createPackage: ''', aPackage name, '''!';\x0a\x09\x09lf",
|
|
source: "exportPackageDefinitionOf: aPackage on: aStream\x0a\x09aStream\x0a\x09\x09nextPutAll: 'Smalltalk current createPackage: ''', aPackage name, '''!';\x0a\x09\x09lf",
|
|
@@ -345,6 +424,7 @@ var $1,$2;
|
|
$1=aStream;
|
|
$1=aStream;
|
|
_st($1)._nextPutAll_(" !");
|
|
_st($1)._nextPutAll_(" !");
|
|
_st($1)._lf();
|
|
_st($1)._lf();
|
|
|
|
+$ctx1.sendIdx["lf"]=1;
|
|
$2=_st($1)._lf();
|
|
$2=_st($1)._lf();
|
|
return self}, function($ctx1) {$ctx1.fill(self,"exportProtocolEpilogueOf:on:",{aProtocol:aProtocol,aStream:aStream},smalltalk.ChunkExporter)})},
|
|
return self}, function($ctx1) {$ctx1.fill(self,"exportProtocolEpilogueOf:on:",{aProtocol:aProtocol,aStream:aStream},smalltalk.ChunkExporter)})},
|
|
args: ["aProtocol", "aStream"],
|
|
args: ["aProtocol", "aStream"],
|
|
@@ -361,10 +441,18 @@ category: 'output',
|
|
fn: function (aProtocol,aStream){
|
|
fn: function (aProtocol,aStream){
|
|
var self=this;
|
|
var self=this;
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
-var $1,$2;
|
|
|
|
|
|
+var $1,$2,$3,$5,$7,$6,$4;
|
|
$1=aStream;
|
|
$1=aStream;
|
|
-_st($1)._nextPutAll_("!".__comma(self._classNameFor_(_st(aProtocol)._theClass())));
|
|
|
|
-$2=_st($1)._nextPutAll_(_st(" methodsFor: '".__comma(_st(aProtocol)._name())).__comma("'!"));
|
|
|
|
|
|
+$2=$1;
|
|
|
|
+$3="!".__comma(self._classNameFor_(_st(aProtocol)._theClass()));
|
|
|
|
+$ctx1.sendIdx[","]=1;
|
|
|
|
+_st($2)._nextPutAll_($3);
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=1;
|
|
|
|
+$5=$1;
|
|
|
|
+$7=" methodsFor: '".__comma(_st(aProtocol)._name());
|
|
|
|
+$6=_st($7).__comma("'!");
|
|
|
|
+$ctx1.sendIdx[","]=2;
|
|
|
|
+$4=_st($5)._nextPutAll_($6);
|
|
return self}, function($ctx1) {$ctx1.fill(self,"exportProtocolPrologueOf:on:",{aProtocol:aProtocol,aStream:aStream},smalltalk.ChunkExporter)})},
|
|
return self}, function($ctx1) {$ctx1.fill(self,"exportProtocolPrologueOf:on:",{aProtocol:aProtocol,aStream:aStream},smalltalk.ChunkExporter)})},
|
|
args: ["aProtocol", "aStream"],
|
|
args: ["aProtocol", "aStream"],
|
|
source: "exportProtocolPrologueOf: aProtocol on: aStream\x0a\x09aStream\x0a\x09\x09nextPutAll: '!', (self classNameFor: aProtocol theClass);\x0a\x09\x09nextPutAll: ' methodsFor: ''', aProtocol name, '''!'",
|
|
source: "exportProtocolPrologueOf: aProtocol on: aStream\x0a\x09aStream\x0a\x09\x09nextPutAll: '!', (self classNameFor: aProtocol theClass);\x0a\x09\x09nextPutAll: ' methodsFor: ''', aProtocol name, '''!'",
|
|
@@ -405,10 +493,11 @@ function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"
|
|
function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
|
|
function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
|
|
function $MethodCategory(){return smalltalk.MethodCategory||(typeof MethodCategory=="undefined"?nil:MethodCategory)}
|
|
function $MethodCategory(){return smalltalk.MethodCategory||(typeof MethodCategory=="undefined"?nil:MethodCategory)}
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
-var $1,$2;
|
|
|
|
|
|
+var $2,$1,$3;
|
|
name=_st(aPackage)._name();
|
|
name=_st(aPackage)._name();
|
|
result=_st($OrderedCollection())._new();
|
|
result=_st($OrderedCollection())._new();
|
|
-_st(_st($Package())._sortedClasses_(_st(_st($Smalltalk())._current())._classes()))._do_((function(each){
|
|
|
|
|
|
+$ctx1.sendIdx["new"]=1;
|
|
|
|
+$1=_st(_st($Package())._sortedClasses_(_st(_st($Smalltalk())._current())._classes()))._do_((function(each){
|
|
return smalltalk.withContext(function($ctx2) {
|
|
return smalltalk.withContext(function($ctx2) {
|
|
return _st([each,_st(each)._class()])._do_((function(aClass){
|
|
return _st([each,_st(each)._class()])._do_((function(aClass){
|
|
return smalltalk.withContext(function($ctx3) {
|
|
return smalltalk.withContext(function($ctx3) {
|
|
@@ -416,8 +505,8 @@ map=_st($Dictionary())._new();
|
|
map;
|
|
map;
|
|
_st(aClass)._protocolsDo_((function(category,methods){
|
|
_st(aClass)._protocolsDo_((function(category,methods){
|
|
return smalltalk.withContext(function($ctx4) {
|
|
return smalltalk.withContext(function($ctx4) {
|
|
-$1=_st(category).__eq("*".__comma(name));
|
|
|
|
-if(smalltalk.assert($1)){
|
|
|
|
|
|
+$2=_st(category).__eq("*".__comma(name));
|
|
|
|
+if(smalltalk.assert($2)){
|
|
return _st(map)._at_put_(category,methods);
|
|
return _st(map)._at_put_(category,methods);
|
|
};
|
|
};
|
|
}, function($ctx4) {$ctx4.fillBlock({category:category,methods:methods},$ctx3,3)})}));
|
|
}, function($ctx4) {$ctx4.fillBlock({category:category,methods:methods},$ctx3,3)})}));
|
|
@@ -430,8 +519,9 @@ return _st($MethodCategory())._name_theClass_methods_(category,aClass,_st(map)._
|
|
}, function($ctx4) {$ctx4.fillBlock({category:category},$ctx3,6)})})));
|
|
}, function($ctx4) {$ctx4.fillBlock({category:category},$ctx3,6)})})));
|
|
}, function($ctx3) {$ctx3.fillBlock({aClass:aClass},$ctx2,2)})}));
|
|
}, function($ctx3) {$ctx3.fillBlock({aClass:aClass},$ctx2,2)})}));
|
|
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
|
|
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
|
|
-$2=result;
|
|
|
|
-return $2;
|
|
|
|
|
|
+$ctx1.sendIdx["do:"]=1;
|
|
|
|
+$3=result;
|
|
|
|
+return $3;
|
|
}, function($ctx1) {$ctx1.fill(self,"extensionCategoriesOfPackage:",{aPackage:aPackage,name:name,map:map,result:result},smalltalk.ChunkExporter)})},
|
|
}, function($ctx1) {$ctx1.fill(self,"extensionCategoriesOfPackage:",{aPackage:aPackage,name:name,map:map,result:result},smalltalk.ChunkExporter)})},
|
|
args: ["aPackage"],
|
|
args: ["aPackage"],
|
|
source: "extensionCategoriesOfPackage: aPackage\x0a\x09\x22Issue #143: sort protocol alphabetically\x22\x0a\x0a\x09| name map result |\x0a\x09name := aPackage name.\x0a\x09result := OrderedCollection new.\x0a\x09(Package sortedClasses: Smalltalk current classes) do: [ :each |\x0a\x09\x09{each. each class} do: [ :aClass |\x0a\x09\x09\x09map := Dictionary new.\x0a\x09\x09\x09aClass protocolsDo: [ :category :methods |\x0a\x09\x09\x09\x09category = ('*', name) ifTrue: [ map at: category put: methods ] ].\x0a\x09\x09\x09result addAll: ((map keys sorted: [:a :b | a <= b ]) collect: [ :category |\x0a\x09\x09\x09\x09MethodCategory name: category theClass: aClass methods: (map at: category) ]) ] ].\x0a\x09^result",
|
|
source: "extensionCategoriesOfPackage: aPackage\x0a\x09\x22Issue #143: sort protocol alphabetically\x22\x0a\x0a\x09| name map result |\x0a\x09name := aPackage name.\x0a\x09result := OrderedCollection new.\x0a\x09(Package sortedClasses: Smalltalk current classes) do: [ :each |\x0a\x09\x09{each. each class} do: [ :aClass |\x0a\x09\x09\x09map := Dictionary new.\x0a\x09\x09\x09aClass protocolsDo: [ :category :methods |\x0a\x09\x09\x09\x09category = ('*', name) ifTrue: [ map at: category put: methods ] ].\x0a\x09\x09\x09result addAll: ((map keys sorted: [:a :b | a <= b ]) collect: [ :category |\x0a\x09\x09\x09\x09MethodCategory name: category theClass: aClass methods: (map at: category) ]) ] ].\x0a\x09^result",
|
|
@@ -526,13 +616,15 @@ category: 'convenience',
|
|
fn: function (aClass){
|
|
fn: function (aClass){
|
|
var self=this;
|
|
var self=this;
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
-var $2,$3,$1;
|
|
|
|
|
|
+var $2,$3,$4,$1;
|
|
$2=_st(aClass)._isMetaclass();
|
|
$2=_st(aClass)._isMetaclass();
|
|
if(smalltalk.assert($2)){
|
|
if(smalltalk.assert($2)){
|
|
-$1=_st(_st(_st(aClass)._instanceClass())._name()).__comma(".klass");
|
|
|
|
|
|
+$3=_st(_st(aClass)._instanceClass())._name();
|
|
|
|
+$ctx1.sendIdx["name"]=1;
|
|
|
|
+$1=_st($3).__comma(".klass");
|
|
} else {
|
|
} else {
|
|
-$3=_st(aClass)._isNil();
|
|
|
|
-if(smalltalk.assert($3)){
|
|
|
|
|
|
+$4=_st(aClass)._isNil();
|
|
|
|
+if(smalltalk.assert($4)){
|
|
$1="nil";
|
|
$1="nil";
|
|
} else {
|
|
} else {
|
|
$1=_st(aClass)._name();
|
|
$1=_st(aClass)._name();
|
|
@@ -554,36 +646,77 @@ category: 'output',
|
|
fn: function (aClass,aStream){
|
|
fn: function (aClass,aStream){
|
|
var self=this;
|
|
var self=this;
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
-var $1,$2,$3,$4,$5,$6,$7;
|
|
|
|
|
|
+var $1,$2,$5,$4,$3,$6,$8,$7,$9,$10,$12,$11,$13,$14,$15,$16,$18,$17,$19,$20,$21,$22,$24,$23,$25,$26;
|
|
$1=aStream;
|
|
$1=aStream;
|
|
_st($1)._lf();
|
|
_st($1)._lf();
|
|
|
|
+$ctx1.sendIdx["lf"]=1;
|
|
_st($1)._nextPutAll_("smalltalk.addClass(");
|
|
_st($1)._nextPutAll_("smalltalk.addClass(");
|
|
-_st($1)._nextPutAll_(_st("'".__comma(self._classNameFor_(aClass))).__comma("', "));
|
|
|
|
-_st($1)._nextPutAll_("smalltalk.".__comma(self._classNameFor_(_st(aClass)._superclass())));
|
|
|
|
-$2=_st($1)._nextPutAll_(", [");
|
|
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=1;
|
|
|
|
+$2=$1;
|
|
|
|
+$5=self._classNameFor_(aClass);
|
|
|
|
+$ctx1.sendIdx["classNameFor:"]=1;
|
|
|
|
+$4="'".__comma($5);
|
|
|
|
+$ctx1.sendIdx[","]=2;
|
|
|
|
+$3=_st($4).__comma("', ");
|
|
|
|
+$ctx1.sendIdx[","]=1;
|
|
|
|
+_st($2)._nextPutAll_($3);
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=2;
|
|
|
|
+$6=$1;
|
|
|
|
+$8=self._classNameFor_(_st(aClass)._superclass());
|
|
|
|
+$ctx1.sendIdx["classNameFor:"]=2;
|
|
|
|
+$7="smalltalk.".__comma($8);
|
|
|
|
+$ctx1.sendIdx[","]=3;
|
|
|
|
+_st($6)._nextPutAll_($7);
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=3;
|
|
|
|
+$9=_st($1)._nextPutAll_(", [");
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=4;
|
|
_st(_st(aClass)._instanceVariableNames())._do_separatedBy_((function(each){
|
|
_st(_st(aClass)._instanceVariableNames())._do_separatedBy_((function(each){
|
|
return smalltalk.withContext(function($ctx2) {
|
|
return smalltalk.withContext(function($ctx2) {
|
|
-return _st(aStream)._nextPutAll_(_st("'".__comma(each)).__comma("'"));
|
|
|
|
|
|
+$10=aStream;
|
|
|
|
+$12="'".__comma(each);
|
|
|
|
+$ctx2.sendIdx[","]=5;
|
|
|
|
+$11=_st($12).__comma("'");
|
|
|
|
+$ctx2.sendIdx[","]=4;
|
|
|
|
+return _st($10)._nextPutAll_($11);
|
|
|
|
+$ctx2.sendIdx["nextPutAll:"]=5;
|
|
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}),(function(){
|
|
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}),(function(){
|
|
return smalltalk.withContext(function($ctx2) {
|
|
return smalltalk.withContext(function($ctx2) {
|
|
return _st(aStream)._nextPutAll_(", ");
|
|
return _st(aStream)._nextPutAll_(", ");
|
|
|
|
+$ctx2.sendIdx["nextPutAll:"]=6;
|
|
}, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
|
|
}, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
|
|
-$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_(self._classNameFor_(aClass));
|
|
|
|
-_st($6)._nextPutAll_(".comment=");
|
|
|
|
-_st($6)._nextPutAll_(_st(_st(aClass)._comment())._asJavascript());
|
|
|
|
-$7=_st($6)._nextPutAll_(";");
|
|
|
|
-$7;
|
|
|
|
|
|
+$13=aStream;
|
|
|
|
+_st($13)._nextPutAll_("], '");
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=7;
|
|
|
|
+$14=$13;
|
|
|
|
+$15=_st(_st(aClass)._category()).__comma("'");
|
|
|
|
+_st($14)._nextPutAll_($15);
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=8;
|
|
|
|
+$16=_st($13)._nextPutAll_(");");
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=9;
|
|
|
|
+$18=_st(aClass)._comment();
|
|
|
|
+$ctx1.sendIdx["comment"]=1;
|
|
|
|
+$17=_st($18)._notEmpty();
|
|
|
|
+if(smalltalk.assert($17)){
|
|
|
|
+$19=aStream;
|
|
|
|
+_st($19)._lf();
|
|
|
|
+$ctx1.sendIdx["lf"]=2;
|
|
|
|
+_st($19)._nextPutAll_("smalltalk.");
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=10;
|
|
|
|
+$20=$19;
|
|
|
|
+$21=self._classNameFor_(aClass);
|
|
|
|
+_st($20)._nextPutAll_($21);
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=11;
|
|
|
|
+_st($19)._nextPutAll_(".comment=");
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=12;
|
|
|
|
+$22=$19;
|
|
|
|
+$24=_st(aClass)._comment();
|
|
|
|
+$23=_st($24)._asJavascript();
|
|
|
|
+_st($22)._nextPutAll_($23);
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=13;
|
|
|
|
+$25=_st($19)._nextPutAll_(";");
|
|
|
|
+$25;
|
|
};
|
|
};
|
|
-_st(aStream)._lf();
|
|
|
|
|
|
+$26=_st(aStream)._lf();
|
|
return self}, function($ctx1) {$ctx1.fill(self,"exportDefinitionOf:on:",{aClass:aClass,aStream:aStream},smalltalk.Exporter)})},
|
|
return self}, function($ctx1) {$ctx1.fill(self,"exportDefinitionOf:on:",{aClass:aClass,aStream:aStream},smalltalk.Exporter)})},
|
|
args: ["aClass", "aStream"],
|
|
args: ["aClass", "aStream"],
|
|
source: "exportDefinitionOf: aClass on: aStream\x0a\x09aStream\x0a\x09\x09lf;\x0a\x09\x09nextPutAll: 'smalltalk.addClass(';\x0a\x09\x09nextPutAll: '''', (self classNameFor: aClass), ''', ';\x0a\x09\x09nextPutAll: 'smalltalk.', (self classNameFor: aClass superclass);\x0a\x09\x09nextPutAll: ', ['.\x0a\x09aClass instanceVariableNames\x0a\x09\x09do: [:each | aStream nextPutAll: '''', each, '''']\x0a\x09\x09separatedBy: [aStream nextPutAll: ', '].\x0a\x09aStream\x0a\x09\x09nextPutAll: '], ''';\x0a\x09\x09nextPutAll: aClass category, '''';\x0a\x09\x09nextPutAll: ');'.\x0a\x09aClass comment notEmpty ifTrue: [\x0a\x09\x09aStream\x0a\x09\x09\x09lf;\x0a\x09\x09nextPutAll: 'smalltalk.';\x0a\x09\x09nextPutAll: (self classNameFor: aClass);\x0a\x09\x09nextPutAll: '.comment=';\x0a\x09\x09nextPutAll: aClass comment asJavascript;\x0a\x09\x09nextPutAll: ';'].\x0a\x09aStream lf",
|
|
source: "exportDefinitionOf: aClass on: aStream\x0a\x09aStream\x0a\x09\x09lf;\x0a\x09\x09nextPutAll: 'smalltalk.addClass(';\x0a\x09\x09nextPutAll: '''', (self classNameFor: aClass), ''', ';\x0a\x09\x09nextPutAll: 'smalltalk.', (self classNameFor: aClass superclass);\x0a\x09\x09nextPutAll: ', ['.\x0a\x09aClass instanceVariableNames\x0a\x09\x09do: [:each | aStream nextPutAll: '''', each, '''']\x0a\x09\x09separatedBy: [aStream nextPutAll: ', '].\x0a\x09aStream\x0a\x09\x09nextPutAll: '], ''';\x0a\x09\x09nextPutAll: aClass category, '''';\x0a\x09\x09nextPutAll: ');'.\x0a\x09aClass comment notEmpty ifTrue: [\x0a\x09\x09aStream\x0a\x09\x09\x09lf;\x0a\x09\x09nextPutAll: 'smalltalk.';\x0a\x09\x09nextPutAll: (self classNameFor: aClass);\x0a\x09\x09nextPutAll: '.comment=';\x0a\x09\x09nextPutAll: aClass comment asJavascript;\x0a\x09\x09nextPutAll: ';'].\x0a\x09aStream lf",
|
|
@@ -600,22 +733,47 @@ fn: function (aClass,aStream){
|
|
var self=this;
|
|
var self=this;
|
|
function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
|
|
function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
-var $1,$2,$3;
|
|
|
|
-_st(aStream)._lf();
|
|
|
|
-$1=_st(_st(_st(aClass)._class())._instanceVariableNames())._isEmpty();
|
|
|
|
-if(! smalltalk.assert($1)){
|
|
|
|
-$2=aStream;
|
|
|
|
-_st($2)._nextPutAll_("smalltalk.".__comma(self._classNameFor_(_st(aClass)._class())));
|
|
|
|
-$3=_st($2)._nextPutAll_(".iVarNames = [");
|
|
|
|
-$3;
|
|
|
|
-_st(_st(_st(aClass)._class())._instanceVariableNames())._do_separatedBy_((function(each){
|
|
|
|
|
|
+var $1,$4,$3,$2,$5,$6,$9,$8,$7,$10,$12,$11,$13,$15,$14,$16,$18,$17;
|
|
|
|
+$1=_st(aStream)._lf();
|
|
|
|
+$ctx1.sendIdx["lf"]=1;
|
|
|
|
+$4=_st(aClass)._class();
|
|
|
|
+$ctx1.sendIdx["class"]=1;
|
|
|
|
+$3=_st($4)._instanceVariableNames();
|
|
|
|
+$ctx1.sendIdx["instanceVariableNames"]=1;
|
|
|
|
+$2=_st($3)._isEmpty();
|
|
|
|
+if(! smalltalk.assert($2)){
|
|
|
|
+$5=aStream;
|
|
|
|
+$6=$5;
|
|
|
|
+$9=_st(aClass)._class();
|
|
|
|
+$ctx1.sendIdx["class"]=2;
|
|
|
|
+$8=self._classNameFor_($9);
|
|
|
|
+$7="smalltalk.".__comma($8);
|
|
|
|
+$ctx1.sendIdx[","]=1;
|
|
|
|
+_st($6)._nextPutAll_($7);
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=1;
|
|
|
|
+$10=_st($5)._nextPutAll_(".iVarNames = [");
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=2;
|
|
|
|
+$10;
|
|
|
|
+$12=_st(aClass)._class();
|
|
|
|
+$11=_st($12)._instanceVariableNames();
|
|
|
|
+_st($11)._do_separatedBy_((function(each){
|
|
return smalltalk.withContext(function($ctx2) {
|
|
return smalltalk.withContext(function($ctx2) {
|
|
-return _st(aStream)._nextPutAll_(_st("'".__comma(each)).__comma("'"));
|
|
|
|
|
|
+$13=aStream;
|
|
|
|
+$15="'".__comma(each);
|
|
|
|
+$ctx2.sendIdx[","]=3;
|
|
|
|
+$14=_st($15).__comma("'");
|
|
|
|
+$ctx2.sendIdx[","]=2;
|
|
|
|
+return _st($13)._nextPutAll_($14);
|
|
|
|
+$ctx2.sendIdx["nextPutAll:"]=3;
|
|
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}),(function(){
|
|
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}),(function(){
|
|
return smalltalk.withContext(function($ctx2) {
|
|
return smalltalk.withContext(function($ctx2) {
|
|
return _st(aStream)._nextPutAll_(",");
|
|
return _st(aStream)._nextPutAll_(",");
|
|
|
|
+$ctx2.sendIdx["nextPutAll:"]=4;
|
|
}, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
|
|
}, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
|
|
-_st(aStream)._nextPutAll_("];".__comma(_st($String())._lf()));
|
|
|
|
|
|
+$16=aStream;
|
|
|
|
+$18=_st($String())._lf();
|
|
|
|
+$17="];".__comma($18);
|
|
|
|
+_st($16)._nextPutAll_($17);
|
|
};
|
|
};
|
|
return self}, function($ctx1) {$ctx1.fill(self,"exportMetaDefinitionOf:on:",{aClass:aClass,aStream:aStream},smalltalk.Exporter)})},
|
|
return self}, function($ctx1) {$ctx1.fill(self,"exportMetaDefinitionOf:on:",{aClass:aClass,aStream:aStream},smalltalk.Exporter)})},
|
|
args: ["aClass", "aStream"],
|
|
args: ["aClass", "aStream"],
|
|
@@ -632,33 +790,99 @@ category: 'output',
|
|
fn: function (aMethod,aStream){
|
|
fn: function (aMethod,aStream){
|
|
var self=this;
|
|
var self=this;
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
-var $1,$2,$3,$4;
|
|
|
|
|
|
+var $1,$2,$5,$4,$3,$6,$8,$7,$9,$11,$10,$12,$15,$14,$13,$16,$19,$18,$17,$20,$23,$22,$21,$25,$27,$26,$24,$28,$29,$30,$31;
|
|
$1=aStream;
|
|
$1=aStream;
|
|
_st($1)._nextPutAll_("smalltalk.addMethod(");
|
|
_st($1)._nextPutAll_("smalltalk.addMethod(");
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=1;
|
|
_st($1)._lf();
|
|
_st($1)._lf();
|
|
|
|
+$ctx1.sendIdx["lf"]=1;
|
|
_st($1)._nextPutAll_("smalltalk.method({");
|
|
_st($1)._nextPutAll_("smalltalk.method({");
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=2;
|
|
_st($1)._lf();
|
|
_st($1)._lf();
|
|
-_st($1)._nextPutAll_(_st("selector: ".__comma(_st(_st(aMethod)._selector())._asJavascript())).__comma(","));
|
|
|
|
|
|
+$ctx1.sendIdx["lf"]=2;
|
|
|
|
+$2=$1;
|
|
|
|
+$5=_st(_st(aMethod)._selector())._asJavascript();
|
|
|
|
+$ctx1.sendIdx["asJavascript"]=1;
|
|
|
|
+$4="selector: ".__comma($5);
|
|
|
|
+$ctx1.sendIdx[","]=2;
|
|
|
|
+$3=_st($4).__comma(",");
|
|
|
|
+$ctx1.sendIdx[","]=1;
|
|
|
|
+_st($2)._nextPutAll_($3);
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=3;
|
|
_st($1)._lf();
|
|
_st($1)._lf();
|
|
-_st($1)._nextPutAll_(_st("category: '".__comma(_st(aMethod)._category())).__comma("',"));
|
|
|
|
|
|
+$ctx1.sendIdx["lf"]=3;
|
|
|
|
+$6=$1;
|
|
|
|
+$8="category: '".__comma(_st(aMethod)._category());
|
|
|
|
+$ctx1.sendIdx[","]=4;
|
|
|
|
+$7=_st($8).__comma("',");
|
|
|
|
+$ctx1.sendIdx[","]=3;
|
|
|
|
+_st($6)._nextPutAll_($7);
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=4;
|
|
_st($1)._lf();
|
|
_st($1)._lf();
|
|
-_st($1)._nextPutAll_(_st("fn: ".__comma(_st(_st(aMethod)._fn())._compiledSource())).__comma(","));
|
|
|
|
|
|
+$ctx1.sendIdx["lf"]=4;
|
|
|
|
+$9=$1;
|
|
|
|
+$11="fn: ".__comma(_st(_st(aMethod)._fn())._compiledSource());
|
|
|
|
+$ctx1.sendIdx[","]=6;
|
|
|
|
+$10=_st($11).__comma(",");
|
|
|
|
+$ctx1.sendIdx[","]=5;
|
|
|
|
+_st($9)._nextPutAll_($10);
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=5;
|
|
_st($1)._lf();
|
|
_st($1)._lf();
|
|
-_st($1)._nextPutAll_(_st("args: ".__comma(_st(_st(aMethod)._arguments())._asJavascript())).__comma(","));
|
|
|
|
|
|
+$ctx1.sendIdx["lf"]=5;
|
|
|
|
+$12=$1;
|
|
|
|
+$15=_st(_st(aMethod)._arguments())._asJavascript();
|
|
|
|
+$ctx1.sendIdx["asJavascript"]=2;
|
|
|
|
+$14="args: ".__comma($15);
|
|
|
|
+$ctx1.sendIdx[","]=8;
|
|
|
|
+$13=_st($14).__comma(",");
|
|
|
|
+$ctx1.sendIdx[","]=7;
|
|
|
|
+_st($12)._nextPutAll_($13);
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=6;
|
|
_st($1)._lf();
|
|
_st($1)._lf();
|
|
-_st($1)._nextPutAll_(_st("source: ".__comma(_st(_st(aMethod)._source())._asJavascript())).__comma(","));
|
|
|
|
|
|
+$ctx1.sendIdx["lf"]=6;
|
|
|
|
+$16=$1;
|
|
|
|
+$19=_st(_st(aMethod)._source())._asJavascript();
|
|
|
|
+$ctx1.sendIdx["asJavascript"]=3;
|
|
|
|
+$18="source: ".__comma($19);
|
|
|
|
+$ctx1.sendIdx[","]=10;
|
|
|
|
+$17=_st($18).__comma(",");
|
|
|
|
+$ctx1.sendIdx[","]=9;
|
|
|
|
+_st($16)._nextPutAll_($17);
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=7;
|
|
_st($1)._lf();
|
|
_st($1)._lf();
|
|
-_st($1)._nextPutAll_(_st("messageSends: ".__comma(_st(_st(aMethod)._messageSends())._asJavascript())).__comma(","));
|
|
|
|
|
|
+$ctx1.sendIdx["lf"]=7;
|
|
|
|
+$20=$1;
|
|
|
|
+$23=_st(_st(aMethod)._messageSends())._asJavascript();
|
|
|
|
+$ctx1.sendIdx["asJavascript"]=4;
|
|
|
|
+$22="messageSends: ".__comma($23);
|
|
|
|
+$ctx1.sendIdx[","]=12;
|
|
|
|
+$21=_st($22).__comma(",");
|
|
|
|
+$ctx1.sendIdx[","]=11;
|
|
|
|
+_st($20)._nextPutAll_($21);
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=8;
|
|
_st($1)._lf();
|
|
_st($1)._lf();
|
|
-$2=_st($1)._nextPutAll_("referencedClasses: ".__comma(_st(_st(aMethod)._referencedClasses())._asJavascript()));
|
|
|
|
-$3=aStream;
|
|
|
|
-_st($3)._lf();
|
|
|
|
-_st($3)._nextPutAll_("}),");
|
|
|
|
-_st($3)._lf();
|
|
|
|
-_st($3)._nextPutAll_("smalltalk.".__comma(self._classNameFor_(_st(aMethod)._methodClass())));
|
|
|
|
-_st($3)._nextPutAll_(");");
|
|
|
|
-_st($3)._lf();
|
|
|
|
-$4=_st($3)._lf();
|
|
|
|
|
|
+$ctx1.sendIdx["lf"]=8;
|
|
|
|
+$25=$1;
|
|
|
|
+$27=_st(_st(aMethod)._referencedClasses())._asJavascript();
|
|
|
|
+$26="referencedClasses: ".__comma($27);
|
|
|
|
+$ctx1.sendIdx[","]=13;
|
|
|
|
+$24=_st($25)._nextPutAll_($26);
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=9;
|
|
|
|
+$28=aStream;
|
|
|
|
+_st($28)._lf();
|
|
|
|
+$ctx1.sendIdx["lf"]=9;
|
|
|
|
+_st($28)._nextPutAll_("}),");
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=10;
|
|
|
|
+_st($28)._lf();
|
|
|
|
+$ctx1.sendIdx["lf"]=10;
|
|
|
|
+$29=$28;
|
|
|
|
+$30="smalltalk.".__comma(self._classNameFor_(_st(aMethod)._methodClass()));
|
|
|
|
+_st($29)._nextPutAll_($30);
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=11;
|
|
|
|
+_st($28)._nextPutAll_(");");
|
|
|
|
+_st($28)._lf();
|
|
|
|
+$ctx1.sendIdx["lf"]=11;
|
|
|
|
+$31=_st($28)._lf();
|
|
return self}, function($ctx1) {$ctx1.fill(self,"exportMethod:on:",{aMethod:aMethod,aStream:aStream},smalltalk.Exporter)})},
|
|
return self}, function($ctx1) {$ctx1.fill(self,"exportMethod:on:",{aMethod:aMethod,aStream:aStream},smalltalk.Exporter)})},
|
|
args: ["aMethod", "aStream"],
|
|
args: ["aMethod", "aStream"],
|
|
source: "exportMethod: aMethod on: aStream\x0a\x09aStream\x0a\x09\x09nextPutAll: 'smalltalk.addMethod(';lf;\x0a\x09\x09\x22nextPutAll: aMethod selector asSelector asJavascript, ',';lf;\x22\x0a\x09\x09nextPutAll: 'smalltalk.method({';lf;\x0a\x09\x09nextPutAll: 'selector: ', aMethod selector asJavascript, ',';lf;\x0a\x09\x09nextPutAll: 'category: ''', aMethod category, ''',';lf;\x0a\x09\x09nextPutAll: 'fn: ', aMethod fn compiledSource, ',';lf;\x0a\x09\x09nextPutAll: 'args: ', aMethod arguments asJavascript, ','; lf;\x0a\x09\x09nextPutAll: 'source: ', aMethod source asJavascript, ',';lf;\x0a\x09\x09nextPutAll: 'messageSends: ', aMethod messageSends asJavascript, ',';lf;\x0a\x09\x09nextPutAll: 'referencedClasses: ', aMethod referencedClasses asJavascript.\x0a\x09aStream\x0a\x09\x09lf;\x0a\x09\x09nextPutAll: '}),';lf;\x0a\x09\x09nextPutAll: 'smalltalk.', (self classNameFor: aMethod methodClass);\x0a\x09\x09nextPutAll: ');';lf;lf",
|
|
source: "exportMethod: aMethod on: aStream\x0a\x09aStream\x0a\x09\x09nextPutAll: 'smalltalk.addMethod(';lf;\x0a\x09\x09\x22nextPutAll: aMethod selector asSelector asJavascript, ',';lf;\x22\x0a\x09\x09nextPutAll: 'smalltalk.method({';lf;\x0a\x09\x09nextPutAll: 'selector: ', aMethod selector asJavascript, ',';lf;\x0a\x09\x09nextPutAll: 'category: ''', aMethod category, ''',';lf;\x0a\x09\x09nextPutAll: 'fn: ', aMethod fn compiledSource, ',';lf;\x0a\x09\x09nextPutAll: 'args: ', aMethod arguments asJavascript, ','; lf;\x0a\x09\x09nextPutAll: 'source: ', aMethod source asJavascript, ',';lf;\x0a\x09\x09nextPutAll: 'messageSends: ', aMethod messageSends asJavascript, ',';lf;\x0a\x09\x09nextPutAll: 'referencedClasses: ', aMethod referencedClasses asJavascript.\x0a\x09aStream\x0a\x09\x09lf;\x0a\x09\x09nextPutAll: '}),';lf;\x0a\x09\x09nextPutAll: 'smalltalk.', (self classNameFor: aMethod methodClass);\x0a\x09\x09nextPutAll: ');';lf;lf",
|
|
@@ -674,25 +898,32 @@ category: 'output',
|
|
fn: function (aPackage,aStream){
|
|
fn: function (aPackage,aStream){
|
|
var self=this;
|
|
var self=this;
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
-var $1,$2;
|
|
|
|
-$1=self;
|
|
|
|
-_st($1)._exportPackagePrologueOf_on_(aPackage,aStream);
|
|
|
|
-_st($1)._exportPackageDefinitionOf_on_(aPackage,aStream);
|
|
|
|
-$2=_st($1)._exportPackageTransportOf_on_(aPackage,aStream);
|
|
|
|
-_st(_st(aPackage)._sortedClasses())._do_((function(each){
|
|
|
|
|
|
+var $1,$3,$4,$2,$5;
|
|
|
|
+self._exportPackagePrologueOf_on_(aPackage,aStream);
|
|
|
|
+self._exportPackageDefinitionOf_on_(aPackage,aStream);
|
|
|
|
+$1=self._exportPackageTransportOf_on_(aPackage,aStream);
|
|
|
|
+$2=_st(_st(aPackage)._sortedClasses())._do_((function(each){
|
|
return smalltalk.withContext(function($ctx2) {
|
|
return smalltalk.withContext(function($ctx2) {
|
|
self._exportDefinitionOf_on_(each,aStream);
|
|
self._exportDefinitionOf_on_(each,aStream);
|
|
-_st(_st(each)._ownMethods())._do_((function(method){
|
|
|
|
|
|
+$3=_st(each)._ownMethods();
|
|
|
|
+$ctx2.sendIdx["ownMethods"]=1;
|
|
|
|
+_st($3)._do_((function(method){
|
|
return smalltalk.withContext(function($ctx3) {
|
|
return smalltalk.withContext(function($ctx3) {
|
|
return self._exportMethod_on_(method,aStream);
|
|
return self._exportMethod_on_(method,aStream);
|
|
|
|
+$ctx3.sendIdx["exportMethod:on:"]=1;
|
|
}, function($ctx3) {$ctx3.fillBlock({method:method},$ctx2,2)})}));
|
|
}, function($ctx3) {$ctx3.fillBlock({method:method},$ctx2,2)})}));
|
|
|
|
+$ctx2.sendIdx["do:"]=2;
|
|
self._exportMetaDefinitionOf_on_(each,aStream);
|
|
self._exportMetaDefinitionOf_on_(each,aStream);
|
|
-return _st(_st(_st(each)._class())._ownMethods())._do_((function(method){
|
|
|
|
|
|
+$4=_st(_st(each)._class())._ownMethods();
|
|
|
|
+return _st($4)._do_((function(method){
|
|
return smalltalk.withContext(function($ctx3) {
|
|
return smalltalk.withContext(function($ctx3) {
|
|
return self._exportMethod_on_(method,aStream);
|
|
return self._exportMethod_on_(method,aStream);
|
|
|
|
+$ctx3.sendIdx["exportMethod:on:"]=2;
|
|
}, function($ctx3) {$ctx3.fillBlock({method:method},$ctx2,3)})}));
|
|
}, function($ctx3) {$ctx3.fillBlock({method:method},$ctx2,3)})}));
|
|
|
|
+$ctx2.sendIdx["do:"]=3;
|
|
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
|
|
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
|
|
-_st(self._extensionMethodsOfPackage_(aPackage))._do_((function(each){
|
|
|
|
|
|
+$ctx1.sendIdx["do:"]=1;
|
|
|
|
+$5=_st(self._extensionMethodsOfPackage_(aPackage))._do_((function(each){
|
|
return smalltalk.withContext(function($ctx2) {
|
|
return smalltalk.withContext(function($ctx2) {
|
|
return self._exportMethod_on_(each,aStream);
|
|
return self._exportMethod_on_(each,aStream);
|
|
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)})}));
|
|
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)})}));
|
|
@@ -712,11 +943,16 @@ category: 'output',
|
|
fn: function (aPackage,aStream){
|
|
fn: function (aPackage,aStream){
|
|
var self=this;
|
|
var self=this;
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
-var $1,$2;
|
|
|
|
|
|
+var $1,$2,$4,$3,$5;
|
|
$1=aStream;
|
|
$1=aStream;
|
|
_st($1)._nextPutAll_("smalltalk.addPackage(");
|
|
_st($1)._nextPutAll_("smalltalk.addPackage(");
|
|
-_st($1)._nextPutAll_(_st("'".__comma(_st(aPackage)._name())).__comma("');"));
|
|
|
|
-$2=_st($1)._lf();
|
|
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=1;
|
|
|
|
+$2=$1;
|
|
|
|
+$4="'".__comma(_st(aPackage)._name());
|
|
|
|
+$3=_st($4).__comma("');");
|
|
|
|
+$ctx1.sendIdx[","]=1;
|
|
|
|
+_st($2)._nextPutAll_($3);
|
|
|
|
+$5=_st($1)._lf();
|
|
return self}, function($ctx1) {$ctx1.fill(self,"exportPackageDefinitionOf:on:",{aPackage:aPackage,aStream:aStream},smalltalk.Exporter)})},
|
|
return self}, function($ctx1) {$ctx1.fill(self,"exportPackageDefinitionOf:on:",{aPackage:aPackage,aStream:aStream},smalltalk.Exporter)})},
|
|
args: ["aPackage", "aStream"],
|
|
args: ["aPackage", "aStream"],
|
|
source: "exportPackageDefinitionOf: aPackage on: aStream\x0a\x09aStream\x0a\x09\x09nextPutAll: 'smalltalk.addPackage(';\x0a\x09\x09nextPutAll: '''', aPackage name, ''');';\x0a\x09\x09lf",
|
|
source: "exportPackageDefinitionOf: aPackage on: aStream\x0a\x09aStream\x0a\x09\x09nextPutAll: 'smalltalk.addPackage(';\x0a\x09\x09nextPutAll: '''', aPackage name, ''');';\x0a\x09\x09lf",
|
|
@@ -773,9 +1009,13 @@ return smalltalk.withContext(function($ctx1) {
|
|
var $1,$2;
|
|
var $1,$2;
|
|
$1=aStream;
|
|
$1=aStream;
|
|
_st($1)._nextPutAll_("smalltalk.packages[");
|
|
_st($1)._nextPutAll_("smalltalk.packages[");
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=1;
|
|
_st($1)._nextPutAll_(_st(_st(aPackage)._name())._asJavascript());
|
|
_st($1)._nextPutAll_(_st(_st(aPackage)._name())._asJavascript());
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=2;
|
|
_st($1)._nextPutAll_("].transport = ");
|
|
_st($1)._nextPutAll_("].transport = ");
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=3;
|
|
_st($1)._nextPutAll_(_st(_st(aPackage)._transport())._asJSONString());
|
|
_st($1)._nextPutAll_(_st(_st(aPackage)._transport())._asJSONString());
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=4;
|
|
_st($1)._nextPutAll_(";");
|
|
_st($1)._nextPutAll_(";");
|
|
$2=_st($1)._lf();
|
|
$2=_st($1)._lf();
|
|
return self}, function($ctx1) {$ctx1.fill(self,"exportPackageTransportOf:on:",{aPackage:aPackage,aStream:aStream},smalltalk.Exporter)})},
|
|
return self}, function($ctx1) {$ctx1.fill(self,"exportPackageTransportOf:on:",{aPackage:aPackage,aStream:aStream},smalltalk.Exporter)})},
|
|
@@ -793,10 +1033,13 @@ category: 'accessing',
|
|
fn: function (aClass){
|
|
fn: function (aClass){
|
|
var self=this;
|
|
var self=this;
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
-var $1;
|
|
|
|
|
|
+var $2,$3,$1;
|
|
$1=_st(_st(_st(_st(aClass)._methodDictionary())._values())._sorted_((function(a,b){
|
|
$1=_st(_st(_st(_st(aClass)._methodDictionary())._values())._sorted_((function(a,b){
|
|
return smalltalk.withContext(function($ctx2) {
|
|
return smalltalk.withContext(function($ctx2) {
|
|
-return _st(_st(a)._selector()).__lt_eq(_st(b)._selector());
|
|
|
|
|
|
+$2=_st(a)._selector();
|
|
|
|
+$ctx2.sendIdx["selector"]=1;
|
|
|
|
+$3=_st(b)._selector();
|
|
|
|
+return _st($2).__lt_eq($3);
|
|
}, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,1)})})))._reject_((function(each){
|
|
}, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,1)})})))._reject_((function(each){
|
|
return smalltalk.withContext(function($ctx2) {
|
|
return smalltalk.withContext(function($ctx2) {
|
|
return _st(_st(each)._category())._match_("^\x5c*");
|
|
return _st(_st(each)._category())._match_("^\x5c*");
|
|
@@ -839,13 +1082,18 @@ category: 'private',
|
|
fn: function (anArray){
|
|
fn: function (anArray){
|
|
var self=this;
|
|
var self=this;
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
-var $1;
|
|
|
|
|
|
+var $2,$4,$3,$1;
|
|
$1=_st(_st(anArray)._select_((function(each){
|
|
$1=_st(_st(anArray)._select_((function(each){
|
|
return smalltalk.withContext(function($ctx2) {
|
|
return smalltalk.withContext(function($ctx2) {
|
|
-return _st(self._amdNamespaceOfPackage_(each))._notNil();
|
|
|
|
|
|
+$2=self._amdNamespaceOfPackage_(each);
|
|
|
|
+$ctx2.sendIdx["amdNamespaceOfPackage:"]=1;
|
|
|
|
+return _st($2)._notNil();
|
|
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})))._collect_((function(each){
|
|
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})))._collect_((function(each){
|
|
return smalltalk.withContext(function($ctx2) {
|
|
return smalltalk.withContext(function($ctx2) {
|
|
-return _st(_st(self._amdNamespaceOfPackage_(each)).__comma("/")).__comma(_st(each)._name());
|
|
|
|
|
|
+$4=self._amdNamespaceOfPackage_(each);
|
|
|
|
+$3=_st($4).__comma("/");
|
|
|
|
+return _st($3).__comma(_st(each)._name());
|
|
|
|
+$ctx2.sendIdx[","]=1;
|
|
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));
|
|
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));
|
|
return $1;
|
|
return $1;
|
|
}, function($ctx1) {$ctx1.fill(self,"amdNamesOfPackages:",{anArray:anArray},smalltalk.AmdExporter)})},
|
|
}, function($ctx1) {$ctx1.fill(self,"amdNamesOfPackages:",{anArray:anArray},smalltalk.AmdExporter)})},
|
|
@@ -863,10 +1111,14 @@ category: 'private',
|
|
fn: function (aPackage){
|
|
fn: function (aPackage){
|
|
var self=this;
|
|
var self=this;
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
-var $2,$1;
|
|
|
|
-$2=_st(_st(_st(aPackage)._transport())._type()).__eq("amd");
|
|
|
|
|
|
+var $4,$3,$2,$5,$1;
|
|
|
|
+$4=_st(aPackage)._transport();
|
|
|
|
+$ctx1.sendIdx["transport"]=1;
|
|
|
|
+$3=_st($4)._type();
|
|
|
|
+$2=_st($3).__eq("amd");
|
|
if(smalltalk.assert($2)){
|
|
if(smalltalk.assert($2)){
|
|
-$1=_st(_st(aPackage)._transport())._namespace();
|
|
|
|
|
|
+$5=_st(aPackage)._transport();
|
|
|
|
+$1=_st($5)._namespace();
|
|
} else {
|
|
} else {
|
|
$1=nil;
|
|
$1=nil;
|
|
};
|
|
};
|
|
@@ -908,11 +1160,17 @@ return smalltalk.withContext(function($ctx1) {
|
|
var $1,$2;
|
|
var $1,$2;
|
|
$1=aStream;
|
|
$1=aStream;
|
|
_st($1)._nextPutAll_("define(\x22");
|
|
_st($1)._nextPutAll_("define(\x22");
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=1;
|
|
_st($1)._nextPutAll_(self._amdNamespaceOfPackage_(aPackage));
|
|
_st($1)._nextPutAll_(self._amdNamespaceOfPackage_(aPackage));
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=2;
|
|
_st($1)._nextPutAll_("/");
|
|
_st($1)._nextPutAll_("/");
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=3;
|
|
_st($1)._nextPutAll_(_st(aPackage)._name());
|
|
_st($1)._nextPutAll_(_st(aPackage)._name());
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=4;
|
|
_st($1)._nextPutAll_("\x22, ");
|
|
_st($1)._nextPutAll_("\x22, ");
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=5;
|
|
_st($1)._nextPutAll_(_st(["amber_vm/smalltalk", "amber_vm/nil", "amber_vm/_st"].__comma(self._amdNamesOfPackages_(_st(aPackage)._loadDependencies())))._asJavascript());
|
|
_st($1)._nextPutAll_(_st(["amber_vm/smalltalk", "amber_vm/nil", "amber_vm/_st"].__comma(self._amdNamesOfPackages_(_st(aPackage)._loadDependencies())))._asJavascript());
|
|
|
|
+$ctx1.sendIdx["nextPutAll:"]=6;
|
|
_st($1)._nextPutAll_(", function(smalltalk,nil,_st){");
|
|
_st($1)._nextPutAll_(", function(smalltalk,nil,_st){");
|
|
$2=_st($1)._lf();
|
|
$2=_st($1)._lf();
|
|
return self}, function($ctx1) {$ctx1.fill(self,"exportPackagePrologueOf:on:",{aPackage:aPackage,aStream:aStream},smalltalk.AmdExporter)})},
|
|
return self}, function($ctx1) {$ctx1.fill(self,"exportPackagePrologueOf:on:",{aPackage:aPackage,aStream:aStream},smalltalk.AmdExporter)})},
|
|
@@ -942,11 +1200,13 @@ result=""._writeStream();
|
|
_st((function(){
|
|
_st((function(){
|
|
return smalltalk.withContext(function($ctx2) {
|
|
return smalltalk.withContext(function($ctx2) {
|
|
char=_st(self["@stream"])._next();
|
|
char=_st(self["@stream"])._next();
|
|
|
|
+$ctx2.sendIdx["next"]=1;
|
|
char;
|
|
char;
|
|
return _st(char)._notNil();
|
|
return _st(char)._notNil();
|
|
}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._whileTrue_((function(){
|
|
}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._whileTrue_((function(){
|
|
return smalltalk.withContext(function($ctx2) {
|
|
return smalltalk.withContext(function($ctx2) {
|
|
$1=_st(char).__eq("!");
|
|
$1=_st(char).__eq("!");
|
|
|
|
+$ctx2.sendIdx["="]=1;
|
|
if(smalltalk.assert($1)){
|
|
if(smalltalk.assert($1)){
|
|
$2=_st(_st(self["@stream"])._peek()).__eq("!");
|
|
$2=_st(_st(self["@stream"])._peek()).__eq("!");
|
|
if(smalltalk.assert($2)){
|
|
if(smalltalk.assert($2)){
|
|
@@ -1014,10 +1274,13 @@ category: 'accessing',
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
-var $1;
|
|
|
|
|
|
+var $2,$3,$1;
|
|
$1=_st(_st(self._theClass())._methodsInProtocol_(self._name()))._sorted_((function(a,b){
|
|
$1=_st(_st(self._theClass())._methodsInProtocol_(self._name()))._sorted_((function(a,b){
|
|
return smalltalk.withContext(function($ctx2) {
|
|
return smalltalk.withContext(function($ctx2) {
|
|
-return _st(_st(a)._selector()).__lt_eq(_st(b)._selector());
|
|
|
|
|
|
+$2=_st(a)._selector();
|
|
|
|
+$ctx2.sendIdx["selector"]=1;
|
|
|
|
+$3=_st(b)._selector();
|
|
|
|
+return _st($2).__lt_eq($3);
|
|
}, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,1)})}));
|
|
}, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,1)})}));
|
|
return $1;
|
|
return $1;
|
|
}, function($ctx1) {$ctx1.fill(self,"methods",{},smalltalk.ExportMethodProtocol)})},
|
|
}, function($ctx1) {$ctx1.fill(self,"methods",{},smalltalk.ExportMethodProtocol)})},
|
|
@@ -1176,10 +1439,28 @@ category: 'private',
|
|
fn: function (aURL,aString){
|
|
fn: function (aURL,aString){
|
|
var self=this;
|
|
var self=this;
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
-self._ajax_(smalltalk.HashedCollection._from_(["url".__minus_gt(aURL),"type".__minus_gt("PUT"),"data".__minus_gt(aString),"contentType".__minus_gt("text/plain;charset=UTF-8"),"error".__minus_gt((function(xhr){
|
|
|
|
|
|
+var $2,$3,$4,$5,$10,$9,$8,$7,$6,$1;
|
|
|
|
+$2="url".__minus_gt(aURL);
|
|
|
|
+$ctx1.sendIdx["->"]=1;
|
|
|
|
+$3="type".__minus_gt("PUT");
|
|
|
|
+$ctx1.sendIdx["->"]=2;
|
|
|
|
+$4="data".__minus_gt(aString);
|
|
|
|
+$ctx1.sendIdx["->"]=3;
|
|
|
|
+$5="contentType".__minus_gt("text/plain;charset=UTF-8");
|
|
|
|
+$ctx1.sendIdx["->"]=4;
|
|
|
|
+$6="error".__minus_gt((function(xhr){
|
|
return smalltalk.withContext(function($ctx2) {
|
|
return smalltalk.withContext(function($ctx2) {
|
|
-return self._error_(_st(_st(_st("Commiting ".__comma(aURL)).__comma(" failed with reason: \x22")).__comma(_st(xhr)._responseText())).__comma("\x22"));
|
|
|
|
-}, function($ctx2) {$ctx2.fillBlock({xhr:xhr},$ctx1,1)})}))]));
|
|
|
|
|
|
+$10="Commiting ".__comma(aURL);
|
|
|
|
+$9=_st($10).__comma(" failed with reason: \x22");
|
|
|
|
+$ctx2.sendIdx[","]=3;
|
|
|
|
+$8=_st($9).__comma(_st(xhr)._responseText());
|
|
|
|
+$ctx2.sendIdx[","]=2;
|
|
|
|
+$7=_st($8).__comma("\x22");
|
|
|
|
+$ctx2.sendIdx[","]=1;
|
|
|
|
+return self._error_($7);
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({xhr:xhr},$ctx1,1)})}));
|
|
|
|
+$1=smalltalk.HashedCollection._from_([$2,$3,$4,$5,$6]);
|
|
|
|
+self._ajax_($1);
|
|
return self}, function($ctx1) {$ctx1.fill(self,"ajaxPutAt:data:",{aURL:aURL,aString:aString},smalltalk.PackageHandler)})},
|
|
return self}, function($ctx1) {$ctx1.fill(self,"ajaxPutAt:data:",{aURL:aURL,aString:aString},smalltalk.PackageHandler)})},
|
|
args: ["aURL", "aString"],
|
|
args: ["aURL", "aString"],
|
|
source: "ajaxPutAt: aURL data: aString\x0a\x09self\x0a\x09\x09ajax: #{\x0a\x09\x09\x09'url' -> aURL.\x0a\x09\x09\x09'type' -> 'PUT'.\x0a\x09\x09\x09'data' -> aString.\x0a\x09\x09\x09'contentType' -> 'text/plain;charset=UTF-8'.\x0a\x09\x09\x09'error' -> [ :xhr | self error: 'Commiting ' , aURL , ' failed with reason: \x22' , (xhr responseText) , '\x22'] }",
|
|
source: "ajaxPutAt: aURL data: aString\x0a\x09self\x0a\x09\x09ajax: #{\x0a\x09\x09\x09'url' -> aURL.\x0a\x09\x09\x09'type' -> 'PUT'.\x0a\x09\x09\x09'data' -> aString.\x0a\x09\x09\x09'contentType' -> 'text/plain;charset=UTF-8'.\x0a\x09\x09\x09'error' -> [ :xhr | self error: 'Commiting ' , aURL , ' failed with reason: \x22' , (xhr responseText) , '\x22'] }",
|
|
@@ -1279,7 +1560,13 @@ category: 'committing',
|
|
fn: function (aPackage){
|
|
fn: function (aPackage){
|
|
var self=this;
|
|
var self=this;
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
-self._ajaxPutAt_data_(_st(_st(_st(self._commitPathJsFor_(aPackage)).__comma("/")).__comma(_st(aPackage)._name())).__comma(".js"),self._contentsFor_(aPackage));
|
|
|
|
|
|
+var $3,$2,$1;
|
|
|
|
+$3=_st(self._commitPathJsFor_(aPackage)).__comma("/");
|
|
|
|
+$2=_st($3).__comma(_st(aPackage)._name());
|
|
|
|
+$ctx1.sendIdx[","]=2;
|
|
|
|
+$1=_st($2).__comma(".js");
|
|
|
|
+$ctx1.sendIdx[","]=1;
|
|
|
|
+self._ajaxPutAt_data_($1,self._contentsFor_(aPackage));
|
|
return self}, function($ctx1) {$ctx1.fill(self,"commitJsFileFor:",{aPackage:aPackage},smalltalk.PackageHandler)})},
|
|
return self}, function($ctx1) {$ctx1.fill(self,"commitJsFileFor:",{aPackage:aPackage},smalltalk.PackageHandler)})},
|
|
args: ["aPackage"],
|
|
args: ["aPackage"],
|
|
source: "commitJsFileFor: aPackage\x0a\x09self \x0a\x09\x09ajaxPutAt: (self commitPathJsFor: aPackage), '/', aPackage name, '.js'\x0a\x09\x09data: (self contentsFor: aPackage)",
|
|
source: "commitJsFileFor: aPackage\x0a\x09self \x0a\x09\x09ajaxPutAt: (self commitPathJsFor: aPackage), '/', aPackage name, '.js'\x0a\x09\x09data: (self contentsFor: aPackage)",
|
|
@@ -1327,7 +1614,13 @@ category: 'committing',
|
|
fn: function (aPackage){
|
|
fn: function (aPackage){
|
|
var self=this;
|
|
var self=this;
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
-self._ajaxPutAt_data_(_st(_st(_st(self._commitPathStFor_(aPackage)).__comma("/")).__comma(_st(aPackage)._name())).__comma(".st"),self._chunkContentsFor_(aPackage));
|
|
|
|
|
|
+var $3,$2,$1;
|
|
|
|
+$3=_st(self._commitPathStFor_(aPackage)).__comma("/");
|
|
|
|
+$2=_st($3).__comma(_st(aPackage)._name());
|
|
|
|
+$ctx1.sendIdx[","]=2;
|
|
|
|
+$1=_st($2).__comma(".st");
|
|
|
|
+$ctx1.sendIdx[","]=1;
|
|
|
|
+self._ajaxPutAt_data_($1,self._chunkContentsFor_(aPackage));
|
|
return self}, function($ctx1) {$ctx1.fill(self,"commitStFileFor:",{aPackage:aPackage},smalltalk.PackageHandler)})},
|
|
return self}, function($ctx1) {$ctx1.fill(self,"commitStFileFor:",{aPackage:aPackage},smalltalk.PackageHandler)})},
|
|
args: ["aPackage"],
|
|
args: ["aPackage"],
|
|
source: "commitStFileFor: aPackage\x0a\x09self \x0a\x09\x09ajaxPutAt: (self commitPathStFor: aPackage), '/', aPackage name, '.st'\x0a\x09\x09data: (self chunkContentsFor: aPackage)",
|
|
source: "commitStFileFor: aPackage\x0a\x09self \x0a\x09\x09ajaxPutAt: (self commitPathStFor: aPackage), '/', aPackage name, '.st'\x0a\x09\x09data: (self chunkContentsFor: aPackage)",
|
|
@@ -1741,6 +2034,7 @@ var $1,$2,$4,$5,$3;
|
|
$1=anObject;
|
|
$1=anObject;
|
|
if(($receiver = $1) == nil || $receiver == null){
|
|
if(($receiver = $1) == nil || $receiver == null){
|
|
$2=self._for_(self._defaultType());
|
|
$2=self._for_(self._defaultType());
|
|
|
|
+$ctx1.sendIdx["for:"]=1;
|
|
return $2;
|
|
return $2;
|
|
} else {
|
|
} else {
|
|
$1;
|
|
$1;
|
|
@@ -1800,12 +2094,15 @@ category: 'registration',
|
|
fn: function (aClass){
|
|
fn: function (aClass){
|
|
var self=this;
|
|
var self=this;
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
-var $1;
|
|
|
|
|
|
+var $1,$2,$3;
|
|
$1=_st(aClass)._type();
|
|
$1=_st(aClass)._type();
|
|
|
|
+$ctx1.sendIdx["type"]=1;
|
|
if(($receiver = $1) == nil || $receiver == null){
|
|
if(($receiver = $1) == nil || $receiver == null){
|
|
$1;
|
|
$1;
|
|
} else {
|
|
} else {
|
|
-_st(self["@registry"])._at_put_(_st(aClass)._type(),aClass);
|
|
|
|
|
|
+$2=self["@registry"];
|
|
|
|
+$3=_st(aClass)._type();
|
|
|
|
+_st($2)._at_put_($3,aClass);
|
|
};
|
|
};
|
|
return self}, function($ctx1) {$ctx1.fill(self,"register:",{aClass:aClass},smalltalk.PackageTransport.klass)})},
|
|
return self}, function($ctx1) {$ctx1.fill(self,"register:",{aClass:aClass},smalltalk.PackageTransport.klass)})},
|
|
args: ["aClass"],
|
|
args: ["aClass"],
|