|
@@ -9,8 +9,8 @@ category: 'visiting',
|
|
fn: function (aNode){
|
|
fn: function (aNode){
|
|
var self=this;
|
|
var self=this;
|
|
return smalltalk.withContext(function($ctx1) {
var $1,$2,$3,$4,$5,$6;
|
|
return smalltalk.withContext(function($ctx1) {
var $1,$2,$3,$4,$5,$6;
|
|
-$ctx1.variable=nil;
|
|
|
|
-$1=_st(aNode)._isValueNode();
|
|
|
|
|
|
+$ctx1.locals.variable=nil;
|
|
|
|
+$1=_st(aNode)._isImmutable();
|
|
if(smalltalk.assert($1)){
|
|
if(smalltalk.assert($1)){
|
|
$2=_st(self)._visit_(aNode);
|
|
$2=_st(self)._visit_(aNode);
|
|
return $2;
|
|
return $2;
|
|
@@ -28,8 +28,8 @@ _st(_st(_st(self)._method())._internalVariables())._add_($ctx1.locals.variable);
|
|
return $ctx1.locals.variable;
|
|
return $ctx1.locals.variable;
|
|
}, self, "alias:", [aNode], smalltalk.IRASTTranslator)},
|
|
}, self, "alias:", [aNode], smalltalk.IRASTTranslator)},
|
|
args: ["aNode"],
|
|
args: ["aNode"],
|
|
-source: "alias: aNode\x0a\x09| variable |\x0a\x0a\x09aNode isValueNode ifTrue: [ ^ self visit: aNode ].\x0a\x0a\x09variable := IRVariable new \x0a\x09\x09variable: (AliasVar new name: '$', self nextAlias); \x0a\x09\x09yourself.\x0a\x0a\x09self sequence add: (IRAssignment new\x0a\x09\x09add: variable;\x0a\x09\x09add: (self visit: aNode);\x0a\x09\x09yourself).\x0a\x0a\x09self method internalVariables add: variable.\x0a\x0a\x09^ variable",
|
|
|
|
-messageSends: ["ifTrue:", "visit:", "isValueNode", "variable:", "name:", ",", "nextAlias", "new", "yourself", "add:", "sequence", "internalVariables", "method"],
|
|
|
|
|
|
+source: "alias: aNode\x0a\x09| variable |\x0a\x0a\x09aNode isImmutable ifTrue: [ ^ self visit: aNode ].\x0a\x0a\x09variable := IRVariable new \x0a\x09\x09variable: (AliasVar new name: '$', self nextAlias); \x0a\x09\x09yourself.\x0a\x0a\x09self sequence add: (IRAssignment new\x0a\x09\x09add: variable;\x0a\x09\x09add: (self visit: aNode);\x0a\x09\x09yourself).\x0a\x0a\x09self method internalVariables add: variable.\x0a\x0a\x09^ variable",
|
|
|
|
+messageSends: ["ifTrue:", "visit:", "isImmutable", "variable:", "name:", ",", "nextAlias", "new", "yourself", "add:", "sequence", "internalVariables", "method"],
|
|
referencedClasses: ["AliasVar", "IRVariable", "IRAssignment"]
|
|
referencedClasses: ["AliasVar", "IRVariable", "IRAssignment"]
|
|
}),
|
|
}),
|
|
smalltalk.IRASTTranslator);
|
|
smalltalk.IRASTTranslator);
|
|
@@ -155,6 +155,46 @@ referencedClasses: []
|
|
}),
|
|
}),
|
|
smalltalk.IRASTTranslator);
|
|
smalltalk.IRASTTranslator);
|
|
|
|
|
|
|
|
+smalltalk.addMethod(
|
|
|
|
+"_temporallyDependentList_",
|
|
|
|
+smalltalk.method({
|
|
|
|
+selector: "temporallyDependentList:",
|
|
|
|
+category: 'visiting',
|
|
|
|
+fn: function (nodes){
|
|
|
|
+var self=this;
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1,$3,$2,$4;
|
|
|
|
+$ctx1.locals.threshold=nil;
|
|
|
|
+$ctx1.locals.result=nil;
|
|
|
|
+$ctx1.locals.threshold=(0);
|
|
|
|
+_st(nodes)._withIndexDo_((function(each,i){
|
|
|
|
+return smalltalk.withContext(function($ctx2) {
$1=_st(_st(each)._shouldBeInlined())._or_((function(){
|
|
|
|
+return smalltalk.withContext(function($ctx3) {
return _st(each)._shouldBeAliased();
|
|
|
|
+})}));
|
|
|
|
+if(smalltalk.assert($1)){
|
|
|
|
+$ctx1.locals.threshold=i;
|
|
|
|
+return $ctx1.locals.threshold;
|
|
|
|
+};
|
|
|
|
+})}));
|
|
|
|
+$ctx1.locals.result=_st((smalltalk.OrderedCollection || OrderedCollection))._new();
|
|
|
|
+_st(nodes)._withIndexDo_((function(each,i){
|
|
|
|
+return smalltalk.withContext(function($ctx2) {
$3=_st(i).__lt_eq($ctx1.locals.threshold);
|
|
|
|
+if(smalltalk.assert($3)){
|
|
|
|
+$2=_st(self)._alias_(each);
|
|
|
|
+} else {
|
|
|
|
+$2=_st(self)._visit_(each);
|
|
|
|
+};
|
|
|
|
+return _st($ctx1.locals.result)._add_($2);
|
|
|
|
+})}));
|
|
|
|
+$4=$ctx1.locals.result;
|
|
|
|
+return $4;
|
|
|
|
+}, self, "temporallyDependentList:", [nodes], smalltalk.IRASTTranslator)},
|
|
|
|
+args: ["nodes"],
|
|
|
|
+source: "temporallyDependentList: nodes\x0a\x09| threshold result |\x0a threshold := 0.\x0a \x0a nodes withIndexDo: [ :each :i |\x0a (each shouldBeInlined or: [ each shouldBeAliased ])\x0a\x09\x09 ifTrue: [ threshold := i ]].\x0a\x0a\x09result := OrderedCollection new.\x0a\x09nodes withIndexDo: [ :each :i | \x0a\x09\x09result add: (i <= threshold\x0a\x09\x09\x09ifTrue: [ self alias: each ]\x0a\x09\x09\x09ifFalse: [ self visit: each ])].\x0a\x0a ^result",
|
|
|
|
+messageSends: ["withIndexDo:", "ifTrue:", "or:", "shouldBeAliased", "shouldBeInlined", "new", "add:", "ifTrue:ifFalse:", "alias:", "visit:", "<="],
|
|
|
|
+referencedClasses: ["OrderedCollection"]
|
|
|
|
+}),
|
|
|
|
+smalltalk.IRASTTranslator);
|
|
|
|
+
|
|
smalltalk.addMethod(
|
|
smalltalk.addMethod(
|
|
"_theClass",
|
|
"_theClass",
|
|
smalltalk.method({
|
|
smalltalk.method({
|
|
@@ -194,10 +234,10 @@ selector: "visitAssignmentNode:",
|
|
category: 'visiting',
|
|
category: 'visiting',
|
|
fn: function (aNode){
|
|
fn: function (aNode){
|
|
var self=this;
|
|
var self=this;
|
|
-return smalltalk.withContext(function($ctx1) {
var $1,$2;
|
|
|
|
-$ctx1.left=nil;
|
|
|
|
-$ctx1.right=nil;
|
|
|
|
-$ctx1.assignment=nil;
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1,$2,$3;
|
|
|
|
+$ctx1.locals.left=nil;
|
|
|
|
+$ctx1.locals.right=nil;
|
|
|
|
+$ctx1.locals.assignment=nil;
|
|
$ctx1.locals.right=_st(self)._visit_(_st(aNode)._right());
|
|
$ctx1.locals.right=_st(self)._visit_(_st(aNode)._right());
|
|
$ctx1.locals.left=_st(self)._visit_(_st(aNode)._left());
|
|
$ctx1.locals.left=_st(self)._visit_(_st(aNode)._left());
|
|
$1=_st((smalltalk.IRAssignment || IRAssignment))._new();
|
|
$1=_st((smalltalk.IRAssignment || IRAssignment))._new();
|
|
@@ -205,7 +245,8 @@ _st($1)._add_($ctx1.locals.left);
|
|
_st($1)._add_($ctx1.locals.right);
|
|
_st($1)._add_($ctx1.locals.right);
|
|
$2=_st($1)._yourself();
|
|
$2=_st($1)._yourself();
|
|
_st(_st(self)._sequence())._add_($2);
|
|
_st(_st(self)._sequence())._add_($2);
|
|
-return $ctx1.locals.left;
|
|
|
|
|
|
+$3=$ctx1.locals.left;
|
|
|
|
+return $3;
|
|
}, self, "visitAssignmentNode:", [aNode], smalltalk.IRASTTranslator)},
|
|
}, self, "visitAssignmentNode:", [aNode], smalltalk.IRASTTranslator)},
|
|
args: ["aNode"],
|
|
args: ["aNode"],
|
|
source: "visitAssignmentNode: aNode\x0a\x09| left right assignment |\x0a\x09right := self visit: aNode right.\x0a\x09left := self visit: aNode left.\x0a\x09self sequence add: (IRAssignment new \x0a\x09\x09add: left;\x0a\x09\x09add: right;\x0a\x09\x09yourself).\x0a\x09^ left",
|
|
source: "visitAssignmentNode: aNode\x0a\x09| left right assignment |\x0a\x09right := self visit: aNode right.\x0a\x09left := self visit: aNode left.\x0a\x09self sequence add: (IRAssignment new \x0a\x09\x09add: left;\x0a\x09\x09add: right;\x0a\x09\x09yourself).\x0a\x09^ left",
|
|
@@ -221,8 +262,8 @@ selector: "visitBlockNode:",
|
|
category: 'visiting',
|
|
category: 'visiting',
|
|
fn: function (aNode){
|
|
fn: function (aNode){
|
|
var self=this;
|
|
var self=this;
|
|
-return smalltalk.withContext(function($ctx1) {
var $1,$2,$3,$4;
|
|
|
|
-$ctx1.closure=nil;
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1,$2,$3,$4,$5;
|
|
|
|
+$ctx1.locals.closure=nil;
|
|
$1=_st((smalltalk.IRClosure || IRClosure))._new();
|
|
$1=_st((smalltalk.IRClosure || IRClosure))._new();
|
|
_st($1)._arguments_(_st(aNode)._parameters());
|
|
_st($1)._arguments_(_st(aNode)._parameters());
|
|
_st($1)._scope_(_st(aNode)._scope());
|
|
_st($1)._scope_(_st(aNode)._scope());
|
|
@@ -238,7 +279,8 @@ return _st($ctx1.locals.closure)._add_($4);
|
|
_st(_st(aNode)._nodes())._do_((function(each){
|
|
_st(_st(aNode)._nodes())._do_((function(each){
|
|
return smalltalk.withContext(function($ctx2) {
return _st($ctx1.locals.closure)._add_(_st(self)._visit_(each));
|
|
return smalltalk.withContext(function($ctx2) {
return _st($ctx1.locals.closure)._add_(_st(self)._visit_(each));
|
|
})}));
|
|
})}));
|
|
-return $ctx1.locals.closure;
|
|
|
|
|
|
+$5=$ctx1.locals.closure;
|
|
|
|
+return $5;
|
|
}, self, "visitBlockNode:", [aNode], smalltalk.IRASTTranslator)},
|
|
}, self, "visitBlockNode:", [aNode], smalltalk.IRASTTranslator)},
|
|
args: ["aNode"],
|
|
args: ["aNode"],
|
|
source: "visitBlockNode: aNode\x0a\x09| closure |\x0a\x09closure := IRClosure new\x0a\x09\x09arguments: aNode parameters;\x0a\x09\x09scope: aNode scope;\x0a\x09\x09yourself.\x0a\x09aNode scope temps do: [ :each |\x0a\x09\x09closure add: (IRTempDeclaration new \x0a\x09\x09\x09name: each name;\x0a scope: aNode scope;\x0a\x09\x09\x09yourself) ].\x0a\x09aNode nodes do: [ :each | closure add: (self visit: each) ].\x0a\x09^ closure",
|
|
source: "visitBlockNode: aNode\x0a\x09| closure |\x0a\x09closure := IRClosure new\x0a\x09\x09arguments: aNode parameters;\x0a\x09\x09scope: aNode scope;\x0a\x09\x09yourself.\x0a\x09aNode scope temps do: [ :each |\x0a\x09\x09closure add: (IRTempDeclaration new \x0a\x09\x09\x09name: each name;\x0a scope: aNode scope;\x0a\x09\x09\x09yourself) ].\x0a\x09aNode nodes do: [ :each | closure add: (self visit: each) ].\x0a\x09^ closure",
|
|
@@ -288,8 +330,8 @@ category: 'visiting',
|
|
fn: function (aNode){
|
|
fn: function (aNode){
|
|
var self=this;
|
|
var self=this;
|
|
return smalltalk.withContext(function($ctx1) {
var $1,$2;
|
|
return smalltalk.withContext(function($ctx1) {
var $1,$2;
|
|
-$ctx1.alias=nil;
|
|
|
|
-$1=_st(_st(aNode)._receiver())._isValueNode();
|
|
|
|
|
|
+$ctx1.locals.alias=nil;
|
|
|
|
+$1=_st(_st(aNode)._receiver())._isImmutable();
|
|
if(! smalltalk.assert($1)){
|
|
if(! smalltalk.assert($1)){
|
|
$ctx1.locals.alias=_st(self)._alias_(_st(aNode)._receiver());
|
|
$ctx1.locals.alias=_st(self)._alias_(_st(aNode)._receiver());
|
|
$ctx1.locals.alias;
|
|
$ctx1.locals.alias;
|
|
@@ -304,8 +346,8 @@ $2=_st(self)._alias_(_st(_st(aNode)._nodes())._last());
|
|
return $2;
|
|
return $2;
|
|
}, self, "visitCascadeNode:", [aNode], smalltalk.IRASTTranslator)},
|
|
}, self, "visitCascadeNode:", [aNode], smalltalk.IRASTTranslator)},
|
|
args: ["aNode"],
|
|
args: ["aNode"],
|
|
-source: "visitCascadeNode: aNode\x0a\x09| alias |\x0a\x0a\x09aNode receiver isValueNode ifFalse: [ \x0a\x09\x09alias := self alias: aNode receiver.\x0a\x09\x09aNode nodes do: [ :each |\x0a\x09\x09\x09each receiver: (VariableNode new binding: alias variable) ]].\x0a\x0a\x09aNode nodes allButLast do: [ :each |\x0a\x09\x09self sequence add: (self visit: each) ].\x0a\x0a\x09^ self alias: aNode nodes last",
|
|
|
|
-messageSends: ["ifFalse:", "alias:", "receiver", "do:", "receiver:", "binding:", "variable", "new", "nodes", "isValueNode", "add:", "visit:", "sequence", "allButLast", "last"],
|
|
|
|
|
|
+source: "visitCascadeNode: aNode\x0a\x09| alias |\x0a\x0a\x09aNode receiver isImmutable ifFalse: [ \x0a\x09\x09alias := self alias: aNode receiver.\x0a\x09\x09aNode nodes do: [ :each |\x0a\x09\x09\x09each receiver: (VariableNode new binding: alias variable) ]].\x0a\x0a\x09aNode nodes allButLast do: [ :each |\x0a\x09\x09self sequence add: (self visit: each) ].\x0a\x0a\x09^ self alias: aNode nodes last",
|
|
|
|
+messageSends: ["ifFalse:", "alias:", "receiver", "do:", "receiver:", "binding:", "variable", "new", "nodes", "isImmutable", "add:", "visit:", "sequence", "allButLast", "last"],
|
|
referencedClasses: ["VariableNode"]
|
|
referencedClasses: ["VariableNode"]
|
|
}),
|
|
}),
|
|
smalltalk.IRASTTranslator);
|
|
smalltalk.IRASTTranslator);
|
|
@@ -317,12 +359,14 @@ selector: "visitDynamicArrayNode:",
|
|
category: 'visiting',
|
|
category: 'visiting',
|
|
fn: function (aNode){
|
|
fn: function (aNode){
|
|
var self=this;
|
|
var self=this;
|
|
-return smalltalk.withContext(function($ctx1) {
$ctx1.array=nil;
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
|
+$ctx1.locals.array=nil;
|
|
$ctx1.locals.array=_st((smalltalk.IRDynamicArray || IRDynamicArray))._new();
|
|
$ctx1.locals.array=_st((smalltalk.IRDynamicArray || IRDynamicArray))._new();
|
|
_st(_st(aNode)._nodes())._do_((function(each){
|
|
_st(_st(aNode)._nodes())._do_((function(each){
|
|
return smalltalk.withContext(function($ctx2) {
return _st($ctx1.locals.array)._add_(_st(self)._visit_(each));
|
|
return smalltalk.withContext(function($ctx2) {
return _st($ctx1.locals.array)._add_(_st(self)._visit_(each));
|
|
})}));
|
|
})}));
|
|
-return $ctx1.locals.array;
|
|
|
|
|
|
+$1=$ctx1.locals.array;
|
|
|
|
+return $1;
|
|
}, self, "visitDynamicArrayNode:", [aNode], smalltalk.IRASTTranslator)},
|
|
}, self, "visitDynamicArrayNode:", [aNode], smalltalk.IRASTTranslator)},
|
|
args: ["aNode"],
|
|
args: ["aNode"],
|
|
source: "visitDynamicArrayNode: aNode\x0a\x09| array |\x0a\x09array := IRDynamicArray new.\x0a\x09aNode nodes do: [ :each | array add: (self visit: each) ].\x0a\x09^ array",
|
|
source: "visitDynamicArrayNode: aNode\x0a\x09| array |\x0a\x09array := IRDynamicArray new.\x0a\x09aNode nodes do: [ :each | array add: (self visit: each) ].\x0a\x09^ array",
|
|
@@ -338,12 +382,14 @@ selector: "visitDynamicDictionaryNode:",
|
|
category: 'visiting',
|
|
category: 'visiting',
|
|
fn: function (aNode){
|
|
fn: function (aNode){
|
|
var self=this;
|
|
var self=this;
|
|
-return smalltalk.withContext(function($ctx1) {
$ctx1.dictionary=nil;
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
|
+$ctx1.locals.dictionary=nil;
|
|
$ctx1.locals.dictionary=_st((smalltalk.IRDynamicDictionary || IRDynamicDictionary))._new();
|
|
$ctx1.locals.dictionary=_st((smalltalk.IRDynamicDictionary || IRDynamicDictionary))._new();
|
|
_st(_st(aNode)._nodes())._do_((function(each){
|
|
_st(_st(aNode)._nodes())._do_((function(each){
|
|
return smalltalk.withContext(function($ctx2) {
return _st($ctx1.locals.dictionary)._add_(_st(self)._visit_(each));
|
|
return smalltalk.withContext(function($ctx2) {
return _st($ctx1.locals.dictionary)._add_(_st(self)._visit_(each));
|
|
})}));
|
|
})}));
|
|
-return $ctx1.locals.dictionary;
|
|
|
|
|
|
+$1=$ctx1.locals.dictionary;
|
|
|
|
+return $1;
|
|
}, self, "visitDynamicDictionaryNode:", [aNode], smalltalk.IRASTTranslator)},
|
|
}, self, "visitDynamicDictionaryNode:", [aNode], smalltalk.IRASTTranslator)},
|
|
args: ["aNode"],
|
|
args: ["aNode"],
|
|
source: "visitDynamicDictionaryNode: aNode\x0a\x09| dictionary |\x0a\x09dictionary := IRDynamicDictionary new.\x0a\x09aNode nodes do: [ :each | dictionary add: (self visit: each) ].\x0a\x09^ dictionary",
|
|
source: "visitDynamicDictionaryNode: aNode\x0a\x09| dictionary |\x0a\x09dictionary := IRDynamicDictionary new.\x0a\x09aNode nodes do: [ :each | dictionary add: (self visit: each) ].\x0a\x09^ dictionary",
|
|
@@ -426,8 +472,8 @@ selector: "visitReturnNode:",
|
|
category: 'visiting',
|
|
category: 'visiting',
|
|
fn: function (aNode){
|
|
fn: function (aNode){
|
|
var self=this;
|
|
var self=this;
|
|
-return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
|
-$ctx1.return=nil;
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1,$2;
|
|
|
|
+$ctx1.locals.return=nil;
|
|
$1=_st(aNode)._nonLocalReturn();
|
|
$1=_st(aNode)._nonLocalReturn();
|
|
if(smalltalk.assert($1)){
|
|
if(smalltalk.assert($1)){
|
|
$ctx1.locals.return_=_st((smalltalk.IRNonLocalReturn || IRNonLocalReturn))._new();
|
|
$ctx1.locals.return_=_st((smalltalk.IRNonLocalReturn || IRNonLocalReturn))._new();
|
|
@@ -438,7 +484,8 @@ _st($ctx1.locals.return_)._scope_(_st(aNode)._scope());
|
|
_st(_st(aNode)._nodes())._do_((function(each){
|
|
_st(_st(aNode)._nodes())._do_((function(each){
|
|
return smalltalk.withContext(function($ctx2) {
return _st($ctx1.locals.return_)._add_(_st(self)._alias_(each));
|
|
return smalltalk.withContext(function($ctx2) {
return _st($ctx1.locals.return_)._add_(_st(self)._alias_(each));
|
|
})}));
|
|
})}));
|
|
-return $ctx1.locals.return_;
|
|
|
|
|
|
+$2=$ctx1.locals.return_;
|
|
|
|
+return $2;
|
|
}, self, "visitReturnNode:", [aNode], smalltalk.IRASTTranslator)},
|
|
}, self, "visitReturnNode:", [aNode], smalltalk.IRASTTranslator)},
|
|
args: ["aNode"],
|
|
args: ["aNode"],
|
|
source: "visitReturnNode: aNode\x0a\x09| return |\x0a\x09return := aNode nonLocalReturn \x0a\x09\x09ifTrue: [ IRNonLocalReturn new ]\x0a\x09\x09ifFalse: [ IRReturn new ].\x0a\x09return scope: aNode scope.\x0a\x09aNode nodes do: [ :each |\x0a\x09\x09return add: (self alias: each) ].\x0a\x09^ return",
|
|
source: "visitReturnNode: aNode\x0a\x09| return |\x0a\x09return := aNode nonLocalReturn \x0a\x09\x09ifTrue: [ IRNonLocalReturn new ]\x0a\x09\x09ifFalse: [ IRReturn new ].\x0a\x09return scope: aNode scope.\x0a\x09aNode nodes do: [ :each |\x0a\x09\x09return add: (self alias: each) ].\x0a\x09^ return",
|
|
@@ -455,41 +502,31 @@ category: 'visiting',
|
|
fn: function (aNode){
|
|
fn: function (aNode){
|
|
var self=this;
|
|
var self=this;
|
|
return smalltalk.withContext(function($ctx1) {
var $1,$2,$3,$4;
|
|
return smalltalk.withContext(function($ctx1) {
var $1,$2,$3,$4;
|
|
-$ctx1.send=nil;
|
|
|
|
-$ctx1.receiver=nil;
|
|
|
|
-$ctx1.arguments=nil;
|
|
|
|
|
|
+$ctx1.locals.send=nil;
|
|
|
|
+$ctx1.locals.all=nil;
|
|
|
|
+$ctx1.locals.receiver=nil;
|
|
|
|
+$ctx1.locals.arguments=nil;
|
|
$ctx1.locals.send=_st((smalltalk.IRSend || IRSend))._new();
|
|
$ctx1.locals.send=_st((smalltalk.IRSend || IRSend))._new();
|
|
-_st($ctx1.locals.send)._selector_(_st(aNode)._selector());
|
|
|
|
-$1=_st($ctx1.locals.send)._index_(_st(aNode)._index());
|
|
|
|
-$2=_st(aNode)._superSend();
|
|
|
|
-if(smalltalk.assert($2)){
|
|
|
|
-_st($ctx1.locals.send)._classSend_(_st(_st(self)._theClass())._superclass());
|
|
|
|
-};
|
|
|
|
-$3=_st(_st(_st(aNode)._receiver())._shouldBeInlined())._or_((function(){
|
|
|
|
-return smalltalk.withContext(function($ctx2) {
return _st(_st(aNode)._receiver())._shouldBeAliased();
|
|
|
|
-})}));
|
|
|
|
|
|
+$1=$ctx1.locals.send;
|
|
|
|
+_st($1)._selector_(_st(aNode)._selector());
|
|
|
|
+$2=_st($1)._index_(_st(aNode)._index());
|
|
|
|
+$3=_st(aNode)._superSend();
|
|
if(smalltalk.assert($3)){
|
|
if(smalltalk.assert($3)){
|
|
-$ctx1.locals.receiver=_st(self)._alias_(_st(aNode)._receiver());
|
|
|
|
-} else {
|
|
|
|
-$ctx1.locals.receiver=_st(self)._visit_(_st(aNode)._receiver());
|
|
|
|
-};
|
|
|
|
-$ctx1.locals.arguments=_st(_st(aNode)._arguments())._collect_((function(each){
|
|
|
|
-return smalltalk.withContext(function($ctx2) {
$4=_st(each)._shouldBeInlined();
|
|
|
|
-if(smalltalk.assert($4)){
|
|
|
|
-return _st(self)._alias_(each);
|
|
|
|
-} else {
|
|
|
|
-return _st(self)._visit_(each);
|
|
|
|
|
|
+_st($ctx1.locals.send)._classSend_(_st(_st(self)._theClass())._superclass());
|
|
};
|
|
};
|
|
-})}));
|
|
|
|
|
|
+$ctx1.locals.all=_st(self)._temporallyDependentList_(_st([_st(aNode)._receiver()]).__comma(_st(aNode)._arguments()));
|
|
|
|
+$ctx1.locals.receiver=_st($ctx1.locals.all)._first();
|
|
|
|
+$ctx1.locals.arguments=_st($ctx1.locals.all)._allButFirst();
|
|
_st($ctx1.locals.send)._add_($ctx1.locals.receiver);
|
|
_st($ctx1.locals.send)._add_($ctx1.locals.receiver);
|
|
_st($ctx1.locals.arguments)._do_((function(each){
|
|
_st($ctx1.locals.arguments)._do_((function(each){
|
|
return smalltalk.withContext(function($ctx2) {
return _st($ctx1.locals.send)._add_(each);
|
|
return smalltalk.withContext(function($ctx2) {
return _st($ctx1.locals.send)._add_(each);
|
|
})}));
|
|
})}));
|
|
-return $ctx1.locals.send;
|
|
|
|
|
|
+$4=$ctx1.locals.send;
|
|
|
|
+return $4;
|
|
}, self, "visitSendNode:", [aNode], smalltalk.IRASTTranslator)},
|
|
}, self, "visitSendNode:", [aNode], smalltalk.IRASTTranslator)},
|
|
args: ["aNode"],
|
|
args: ["aNode"],
|
|
-source: "visitSendNode: aNode\x0a\x09| send receiver arguments |\x0a\x09send := IRSend new.\x0a\x09send \x0a\x09\x09selector: aNode selector;\x0a\x09\x09index: aNode index.\x0a\x09aNode superSend ifTrue: [ send classSend: self theClass superclass ].\x0a\x0a\x09receiver := (aNode receiver shouldBeInlined or: [ aNode receiver shouldBeAliased ])\x0a\x09\x09ifTrue: [ self alias: aNode receiver ]\x0a\x09\x09ifFalse: [ self visit: aNode receiver ].\x0a\x0a\x09arguments := aNode arguments collect: [ :each | \x0a\x09\x09each shouldBeInlined\x0a\x09\x09\x09ifTrue: [ self alias: each ]\x0a\x09\x09\x09ifFalse: [ self visit: each ]].\x0a\x0a\x09send add: receiver.\x0a\x09arguments do: [ :each | send add: each ].\x0a\x0a\x09^ send",
|
|
|
|
-messageSends: ["new", "selector:", "selector", "index:", "index", "ifTrue:", "classSend:", "superclass", "theClass", "superSend", "ifTrue:ifFalse:", "alias:", "receiver", "visit:", "or:", "shouldBeAliased", "shouldBeInlined", "collect:", "arguments", "add:", "do:"],
|
|
|
|
|
|
+source: "visitSendNode: aNode\x0a\x09| send all receiver arguments |\x0a\x09send := IRSend new.\x0a\x09send \x0a\x09\x09selector: aNode selector;\x0a\x09\x09index: aNode index.\x0a\x09aNode superSend ifTrue: [ send classSend: self theClass superclass ].\x0a \x0a all := self temporallyDependentList: { aNode receiver }, aNode arguments.\x0a\x09receiver := all first.\x0a\x09arguments := all allButFirst.\x0a\x0a\x09send add: receiver.\x0a\x09arguments do: [ :each | send add: each ].\x0a\x0a\x09^ send",
|
|
|
|
+messageSends: ["new", "selector:", "selector", "index:", "index", "ifTrue:", "classSend:", "superclass", "theClass", "superSend", "temporallyDependentList:", ",", "arguments", "receiver", "first", "allButFirst", "add:", "do:"],
|
|
referencedClasses: ["IRSend"]
|
|
referencedClasses: ["IRSend"]
|
|
}),
|
|
}),
|
|
smalltalk.IRASTTranslator);
|
|
smalltalk.IRASTTranslator);
|
|
@@ -504,7 +541,7 @@ var self=this;
|
|
return smalltalk.withContext(function($ctx1) {
var $2,$1;
|
|
return smalltalk.withContext(function($ctx1) {
var $2,$1;
|
|
$1=_st(self)._withSequence_do_(_st((smalltalk.IRSequence || IRSequence))._new(),(function(){
|
|
$1=_st(self)._withSequence_do_(_st((smalltalk.IRSequence || IRSequence))._new(),(function(){
|
|
return smalltalk.withContext(function($ctx2) {
return _st(_st(aNode)._nodes())._do_((function(each){
|
|
return smalltalk.withContext(function($ctx2) {
return _st(_st(aNode)._nodes())._do_((function(each){
|
|
-return smalltalk.withContext(function($ctx3) {
$ctx3.instruction=nil;
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx3) {
$ctx3.locals.instruction=nil;
|
|
$ctx3.locals.instruction=_st(self)._visit_(each);
|
|
$ctx3.locals.instruction=_st(self)._visit_(each);
|
|
$ctx3.locals.instruction;
|
|
$ctx3.locals.instruction;
|
|
$2=_st($ctx3.locals.instruction)._isVariable();
|
|
$2=_st($ctx3.locals.instruction)._isVariable();
|
|
@@ -571,7 +608,7 @@ selector: "withSequence:do:",
|
|
category: 'accessing',
|
|
category: 'accessing',
|
|
fn: function (aSequence,aBlock){
|
|
fn: function (aSequence,aBlock){
|
|
var self=this;
|
|
var self=this;
|
|
-return smalltalk.withContext(function($ctx1) {
$ctx1.outerSequence=nil;
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
$ctx1.locals.outerSequence=nil;
|
|
$ctx1.locals.outerSequence=_st(self)._sequence();
|
|
$ctx1.locals.outerSequence=_st(self)._sequence();
|
|
_st(self)._sequence_(aSequence);
|
|
_st(self)._sequence_(aSequence);
|
|
_st(aBlock)._value();
|
|
_st(aBlock)._value();
|
|
@@ -588,7 +625,7 @@ smalltalk.IRASTTranslator);
|
|
|
|
|
|
|
|
|
|
smalltalk.addClass('IRInstruction', smalltalk.Object, ['parent', 'instructions'], 'Compiler-IR');
|
|
smalltalk.addClass('IRInstruction', smalltalk.Object, ['parent', 'instructions'], 'Compiler-IR');
|
|
-smalltalk.IRInstruction.comment="I am the abstract root class of the IR (intermediate representation) instructions class hierarchy.\x0aThe IR graph is used to emit JavaScript code using a JSStream. "
|
|
|
|
|
|
+smalltalk.IRInstruction.comment="I am the abstract root class of the IR (intermediate representation) instructions class hierarchy.\x0aThe IR graph is used to emit JavaScript code using a JSStream."
|
|
smalltalk.addMethod(
|
|
smalltalk.addMethod(
|
|
"_accept_",
|
|
"_accept_",
|
|
smalltalk.method({
|
|
smalltalk.method({
|
|
@@ -800,7 +837,9 @@ selector: "parent",
|
|
category: 'accessing',
|
|
category: 'accessing',
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
-return smalltalk.withContext(function($ctx1) {
return self["@parent"];
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
|
+$1=self["@parent"];
|
|
|
|
+return $1;
|
|
}, self, "parent", [], smalltalk.IRInstruction)},
|
|
}, self, "parent", [], smalltalk.IRInstruction)},
|
|
args: [],
|
|
args: [],
|
|
source: "parent\x0a\x09^ parent",
|
|
source: "parent\x0a\x09^ parent",
|
|
@@ -984,7 +1023,9 @@ selector: "scope",
|
|
category: 'accessing',
|
|
category: 'accessing',
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
-return smalltalk.withContext(function($ctx1) {
return self["@scope"];
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
|
+$1=self["@scope"];
|
|
|
|
+return $1;
|
|
}, self, "scope", [], smalltalk.IRScopedInstruction)},
|
|
}, self, "scope", [], smalltalk.IRScopedInstruction)},
|
|
args: [],
|
|
args: [],
|
|
source: "scope\x0a\x09^ scope",
|
|
source: "scope\x0a\x09^ scope",
|
|
@@ -1148,7 +1189,9 @@ selector: "arguments",
|
|
category: 'accessing',
|
|
category: 'accessing',
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
-return smalltalk.withContext(function($ctx1) {
return self["@arguments"];
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
|
+$1=self["@arguments"];
|
|
|
|
+return $1;
|
|
}, self, "arguments", [], smalltalk.IRMethod)},
|
|
}, self, "arguments", [], smalltalk.IRMethod)},
|
|
args: [],
|
|
args: [],
|
|
source: "arguments\x0a\x09^ arguments",
|
|
source: "arguments\x0a\x09^ arguments",
|
|
@@ -1180,7 +1223,9 @@ selector: "classReferences",
|
|
category: 'accessing',
|
|
category: 'accessing',
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
-return smalltalk.withContext(function($ctx1) {
return self["@classReferences"];
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
|
+$1=self["@classReferences"];
|
|
|
|
+return $1;
|
|
}, self, "classReferences", [], smalltalk.IRMethod)},
|
|
}, self, "classReferences", [], smalltalk.IRMethod)},
|
|
args: [],
|
|
args: [],
|
|
source: "classReferences\x0a\x09^ classReferences",
|
|
source: "classReferences\x0a\x09^ classReferences",
|
|
@@ -1235,7 +1280,9 @@ selector: "messageSends",
|
|
category: 'accessing',
|
|
category: 'accessing',
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
-return smalltalk.withContext(function($ctx1) {
return self["@messageSends"];
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
|
+$1=self["@messageSends"];
|
|
|
|
+return $1;
|
|
}, self, "messageSends", [], smalltalk.IRMethod)},
|
|
}, self, "messageSends", [], smalltalk.IRMethod)},
|
|
args: [],
|
|
args: [],
|
|
source: "messageSends\x0a\x09^ messageSends",
|
|
source: "messageSends\x0a\x09^ messageSends",
|
|
@@ -1284,7 +1331,9 @@ selector: "selector",
|
|
category: 'accessing',
|
|
category: 'accessing',
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
-return smalltalk.withContext(function($ctx1) {
return self["@selector"];
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
|
+$1=self["@selector"];
|
|
|
|
+return $1;
|
|
}, self, "selector", [], smalltalk.IRMethod)},
|
|
}, self, "selector", [], smalltalk.IRMethod)},
|
|
args: [],
|
|
args: [],
|
|
source: "selector\x0a\x09^ selector",
|
|
source: "selector\x0a\x09^ selector",
|
|
@@ -1316,7 +1365,9 @@ selector: "source",
|
|
category: 'accessing',
|
|
category: 'accessing',
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
-return smalltalk.withContext(function($ctx1) {
return self["@source"];
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
|
+$1=self["@source"];
|
|
|
|
+return $1;
|
|
}, self, "source", [], smalltalk.IRMethod)},
|
|
}, self, "source", [], smalltalk.IRMethod)},
|
|
args: [],
|
|
args: [],
|
|
source: "source\x0a\x09^ source",
|
|
source: "source\x0a\x09^ source",
|
|
@@ -1348,7 +1399,9 @@ selector: "superSends",
|
|
category: 'accessing',
|
|
category: 'accessing',
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
-return smalltalk.withContext(function($ctx1) {
return self["@superSends"];
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
|
+$1=self["@superSends"];
|
|
|
|
+return $1;
|
|
}, self, "superSends", [], smalltalk.IRMethod)},
|
|
}, self, "superSends", [], smalltalk.IRMethod)},
|
|
args: [],
|
|
args: [],
|
|
source: "superSends\x0a\x09^ superSends",
|
|
source: "superSends\x0a\x09^ superSends",
|
|
@@ -1380,7 +1433,9 @@ selector: "theClass",
|
|
category: 'accessing',
|
|
category: 'accessing',
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
-return smalltalk.withContext(function($ctx1) {
return self["@theClass"];
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
|
+$1=self["@theClass"];
|
|
|
|
+return $1;
|
|
}, self, "theClass", [], smalltalk.IRMethod)},
|
|
}, self, "theClass", [], smalltalk.IRMethod)},
|
|
args: [],
|
|
args: [],
|
|
source: "theClass\x0a\x09^ theClass",
|
|
source: "theClass\x0a\x09^ theClass",
|
|
@@ -1613,7 +1668,9 @@ selector: "name",
|
|
category: 'accessing',
|
|
category: 'accessing',
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
-return smalltalk.withContext(function($ctx1) {
return self["@name"];
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
|
+$1=self["@name"];
|
|
|
|
+return $1;
|
|
}, self, "name", [], smalltalk.IRTempDeclaration)},
|
|
}, self, "name", [], smalltalk.IRTempDeclaration)},
|
|
args: [],
|
|
args: [],
|
|
source: "name\x0a\x09^ name",
|
|
source: "name\x0a\x09^ name",
|
|
@@ -1641,7 +1698,7 @@ smalltalk.IRTempDeclaration);
|
|
|
|
|
|
|
|
|
|
smalltalk.addClass('IRSend', smalltalk.IRInstruction, ['selector', 'classSend', 'index'], 'Compiler-IR');
|
|
smalltalk.addClass('IRSend', smalltalk.IRInstruction, ['selector', 'classSend', 'index'], 'Compiler-IR');
|
|
-smalltalk.IRSend.comment="I am a message send instruction. "
|
|
|
|
|
|
+smalltalk.IRSend.comment="I am a message send instruction."
|
|
smalltalk.addMethod(
|
|
smalltalk.addMethod(
|
|
"_accept_",
|
|
"_accept_",
|
|
smalltalk.method({
|
|
smalltalk.method({
|
|
@@ -1667,7 +1724,9 @@ selector: "classSend",
|
|
category: 'accessing',
|
|
category: 'accessing',
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
-return smalltalk.withContext(function($ctx1) {
return self["@classSend"];
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
|
+$1=self["@classSend"];
|
|
|
|
+return $1;
|
|
}, self, "classSend", [], smalltalk.IRSend)},
|
|
}, self, "classSend", [], smalltalk.IRSend)},
|
|
args: [],
|
|
args: [],
|
|
source: "classSend\x0a\x09^ classSend",
|
|
source: "classSend\x0a\x09^ classSend",
|
|
@@ -1699,7 +1758,9 @@ selector: "index",
|
|
category: 'accessing',
|
|
category: 'accessing',
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
-return smalltalk.withContext(function($ctx1) {
return self["@index"];
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
|
+$1=self["@index"];
|
|
|
|
+return $1;
|
|
}, self, "index", [], smalltalk.IRSend)},
|
|
}, self, "index", [], smalltalk.IRSend)},
|
|
args: [],
|
|
args: [],
|
|
source: "index\x0a\x09^ index",
|
|
source: "index\x0a\x09^ index",
|
|
@@ -1770,7 +1831,9 @@ selector: "selector",
|
|
category: 'accessing',
|
|
category: 'accessing',
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
-return smalltalk.withContext(function($ctx1) {
return self["@selector"];
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
|
+$1=self["@selector"];
|
|
|
|
+return $1;
|
|
}, self, "selector", [], smalltalk.IRSend)},
|
|
}, self, "selector", [], smalltalk.IRSend)},
|
|
args: [],
|
|
args: [],
|
|
source: "selector\x0a\x09^ selector",
|
|
source: "selector\x0a\x09^ selector",
|
|
@@ -1882,7 +1945,9 @@ selector: "value",
|
|
category: 'accessing',
|
|
category: 'accessing',
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
-return smalltalk.withContext(function($ctx1) {
return self["@value"];
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
|
+$1=self["@value"];
|
|
|
|
+return $1;
|
|
}, self, "value", [], smalltalk.IRValue)},
|
|
}, self, "value", [], smalltalk.IRValue)},
|
|
args: [],
|
|
args: [],
|
|
source: "value\x0a\x09^value",
|
|
source: "value\x0a\x09^value",
|
|
@@ -1952,7 +2017,9 @@ selector: "variable",
|
|
category: 'accessing',
|
|
category: 'accessing',
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
-return smalltalk.withContext(function($ctx1) {
return self["@variable"];
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
|
+$1=self["@variable"];
|
|
|
|
+return $1;
|
|
}, self, "variable", [], smalltalk.IRVariable)},
|
|
}, self, "variable", [], smalltalk.IRVariable)},
|
|
args: [],
|
|
args: [],
|
|
source: "variable\x0a\x09^ variable",
|
|
source: "variable\x0a\x09^ variable",
|
|
@@ -2005,7 +2072,9 @@ selector: "source",
|
|
category: 'accessing',
|
|
category: 'accessing',
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
-return smalltalk.withContext(function($ctx1) {
return self["@source"];
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
|
+$1=self["@source"];
|
|
|
|
+return $1;
|
|
}, self, "source", [], smalltalk.IRVerbatim)},
|
|
}, self, "source", [], smalltalk.IRVerbatim)},
|
|
args: [],
|
|
args: [],
|
|
source: "source\x0a\x09^ source",
|
|
source: "source\x0a\x09^ source",
|
|
@@ -2202,10 +2271,12 @@ selector: "visitIRInstruction:",
|
|
category: 'visiting',
|
|
category: 'visiting',
|
|
fn: function (anIRInstruction){
|
|
fn: function (anIRInstruction){
|
|
var self=this;
|
|
var self=this;
|
|
-return smalltalk.withContext(function($ctx1) {
_st(_st(anIRInstruction)._instructions())._do_((function(each){
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
|
+_st(_st(anIRInstruction)._instructions())._do_((function(each){
|
|
return smalltalk.withContext(function($ctx2) {
return _st(self)._visit_(each);
|
|
return smalltalk.withContext(function($ctx2) {
return _st(self)._visit_(each);
|
|
})}));
|
|
})}));
|
|
-return anIRInstruction;
|
|
|
|
|
|
+$1=anIRInstruction;
|
|
|
|
+return $1;
|
|
}, self, "visitIRInstruction:", [anIRInstruction], smalltalk.IRVisitor)},
|
|
}, self, "visitIRInstruction:", [anIRInstruction], smalltalk.IRVisitor)},
|
|
args: ["anIRInstruction"],
|
|
args: ["anIRInstruction"],
|
|
source: "visitIRInstruction: anIRInstruction\x0a\x09anIRInstruction instructions do: [ :each | self visit: each ].\x0a\x09^ anIRInstruction",
|
|
source: "visitIRInstruction: anIRInstruction\x0a\x09anIRInstruction instructions do: [ :each | self visit: each ].\x0a\x09^ anIRInstruction",
|
|
@@ -2439,7 +2510,9 @@ selector: "stream",
|
|
category: 'accessing',
|
|
category: 'accessing',
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
-return smalltalk.withContext(function($ctx1) {
return self["@stream"];
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
|
+$1=self["@stream"];
|
|
|
|
+return $1;
|
|
}, self, "stream", [], smalltalk.IRJSTranslator)},
|
|
}, self, "stream", [], smalltalk.IRJSTranslator)},
|
|
args: [],
|
|
args: [],
|
|
source: "stream\x0a\x09^ stream",
|
|
source: "stream\x0a\x09^ stream",
|
|
@@ -2864,9 +2937,10 @@ selector: "nextPutBlockContextFor:during:",
|
|
category: 'streaming',
|
|
category: 'streaming',
|
|
fn: function (anIRClosure,aBlock){
|
|
fn: function (anIRClosure,aBlock){
|
|
var self=this;
|
|
var self=this;
|
|
-return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
|
-_st(self)._nextPutAll_(_st(_st("return smalltalk.withContext(function(").__comma(_st(_st(anIRClosure)._scope())._alias())).__comma(") { "));
|
|
|
|
-$1=_st(self)._nextPutAll_(_st((smalltalk.String || String))._cr());
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1,$2;
|
|
|
|
+$1=self;
|
|
|
|
+_st($1)._nextPutAll_(_st(_st("return smalltalk.withContext(function(").__comma(_st(_st(anIRClosure)._scope())._alias())).__comma(") { "));
|
|
|
|
+$2=_st($1)._nextPutAll_(_st((smalltalk.String || String))._cr());
|
|
_st(aBlock)._value();
|
|
_st(aBlock)._value();
|
|
_st(self)._nextPutAll_("})");
|
|
_st(self)._nextPutAll_("})");
|
|
return self}, self, "nextPutBlockContextFor:during:", [anIRClosure,aBlock], smalltalk.JSStream)},
|
|
return self}, self, "nextPutBlockContextFor:during:", [anIRClosure,aBlock], smalltalk.JSStream)},
|
|
@@ -2884,15 +2958,16 @@ selector: "nextPutClosureWith:arguments:",
|
|
category: 'streaming',
|
|
category: 'streaming',
|
|
fn: function (aBlock,anArray){
|
|
fn: function (aBlock,anArray){
|
|
var self=this;
|
|
var self=this;
|
|
-return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1,$2;
|
|
_st(self["@stream"])._nextPutAll_("(function(");
|
|
_st(self["@stream"])._nextPutAll_("(function(");
|
|
_st(anArray)._do_separatedBy_((function(each){
|
|
_st(anArray)._do_separatedBy_((function(each){
|
|
return smalltalk.withContext(function($ctx2) {
return _st(self["@stream"])._nextPutAll_(_st(each)._asVariableName());
|
|
return smalltalk.withContext(function($ctx2) {
return _st(self["@stream"])._nextPutAll_(_st(each)._asVariableName());
|
|
})}),(function(){
|
|
})}),(function(){
|
|
return smalltalk.withContext(function($ctx2) {
return _st(self["@stream"])._nextPut_(",");
|
|
return smalltalk.withContext(function($ctx2) {
return _st(self["@stream"])._nextPut_(",");
|
|
})}));
|
|
})}));
|
|
-_st(self["@stream"])._nextPutAll_("){");
|
|
|
|
-$1=_st(self["@stream"])._lf();
|
|
|
|
|
|
+$1=self["@stream"];
|
|
|
|
+_st($1)._nextPutAll_("){");
|
|
|
|
+$2=_st($1)._lf();
|
|
_st(aBlock)._value();
|
|
_st(aBlock)._value();
|
|
_st(self["@stream"])._nextPutAll_("})");
|
|
_st(self["@stream"])._nextPutAll_("})");
|
|
return self}, self, "nextPutClosureWith:arguments:", [aBlock,anArray], smalltalk.JSStream)},
|
|
return self}, self, "nextPutClosureWith:arguments:", [aBlock,anArray], smalltalk.JSStream)},
|
|
@@ -2910,20 +2985,23 @@ selector: "nextPutContextFor:during:",
|
|
category: 'streaming',
|
|
category: 'streaming',
|
|
fn: function (aMethod,aBlock){
|
|
fn: function (aMethod,aBlock){
|
|
var self=this;
|
|
var self=this;
|
|
-return smalltalk.withContext(function($ctx1) {
var $1,$2,$3;
|
|
|
|
-_st(self)._nextPutAll_(_st(_st("return smalltalk.withContext(function(").__comma(_st(_st(aMethod)._scope())._alias())).__comma(") { "));
|
|
|
|
-$1=_st(self)._nextPutAll_(_st((smalltalk.String || String))._cr());
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1,$2,$3,$4,$5,$6;
|
|
|
|
+$1=self;
|
|
|
|
+_st($1)._nextPutAll_(_st(_st("return smalltalk.withContext(function(").__comma(_st(_st(aMethod)._scope())._alias())).__comma(") { "));
|
|
|
|
+$2=_st($1)._nextPutAll_(_st((smalltalk.String || String))._cr());
|
|
_st(aBlock)._value();
|
|
_st(aBlock)._value();
|
|
-_st(self)._nextPutAll_("}, self, ");
|
|
|
|
-$2=_st(self)._nextPutAll_(_st(_st(_st(aMethod)._selector())._asJavascript()).__comma(", ["));
|
|
|
|
|
|
+$3=self;
|
|
|
|
+_st($3)._nextPutAll_("}, self, ");
|
|
|
|
+$4=_st($3)._nextPutAll_(_st(_st(_st(aMethod)._selector())._asJavascript()).__comma(", ["));
|
|
_st(_st(aMethod)._arguments())._do_separatedBy_((function(each){
|
|
_st(_st(aMethod)._arguments())._do_separatedBy_((function(each){
|
|
return smalltalk.withContext(function($ctx2) {
return _st(self)._nextPutAll_(_st(each)._asVariableName());
|
|
return smalltalk.withContext(function($ctx2) {
return _st(self)._nextPutAll_(_st(each)._asVariableName());
|
|
})}),(function(){
|
|
})}),(function(){
|
|
return smalltalk.withContext(function($ctx2) {
return _st(self)._nextPutAll_(",");
|
|
return smalltalk.withContext(function($ctx2) {
return _st(self)._nextPutAll_(",");
|
|
})}));
|
|
})}));
|
|
-_st(self)._nextPutAll_("], ");
|
|
|
|
-_st(self)._nextPutAll_(_st(_st(aMethod)._theClass())._asJavascript());
|
|
|
|
-$3=_st(self)._nextPutAll_(")");
|
|
|
|
|
|
+$5=self;
|
|
|
|
+_st($5)._nextPutAll_("], ");
|
|
|
|
+_st($5)._nextPutAll_(_st(_st(aMethod)._theClass())._asJavascript());
|
|
|
|
+$6=_st($5)._nextPutAll_(")");
|
|
return self}, self, "nextPutContextFor:during:", [aMethod,aBlock], smalltalk.JSStream)},
|
|
return self}, self, "nextPutContextFor:during:", [aMethod,aBlock], smalltalk.JSStream)},
|
|
args: ["aMethod", "aBlock"],
|
|
args: ["aMethod", "aBlock"],
|
|
source: "nextPutContextFor: aMethod during: aBlock\x0a\x09self \x0a \x09nextPutAll: 'return smalltalk.withContext(function(', aMethod scope alias, ') { '; \x0a nextPutAll: String cr.\x0a aBlock value.\x0a self \x0a \x09nextPutAll: '}, self, ';\x0a nextPutAll: aMethod selector asJavascript, ', ['.\x0a aMethod arguments \x0a \x09do: [ :each | self nextPutAll: each asVariableName ]\x0a \x09separatedBy: [ self nextPutAll: ',' ].\x0a self nextPutAll: '], ';\x0a nextPutAll: aMethod theClass asJavascript;\x0a nextPutAll: ')'",
|
|
source: "nextPutContextFor: aMethod during: aBlock\x0a\x09self \x0a \x09nextPutAll: 'return smalltalk.withContext(function(', aMethod scope alias, ') { '; \x0a nextPutAll: String cr.\x0a aBlock value.\x0a self \x0a \x09nextPutAll: '}, self, ';\x0a nextPutAll: aMethod selector asJavascript, ', ['.\x0a aMethod arguments \x0a \x09do: [ :each | self nextPutAll: each asVariableName ]\x0a \x09separatedBy: [ self nextPutAll: ',' ].\x0a self nextPutAll: '], ';\x0a nextPutAll: aMethod theClass asJavascript;\x0a nextPutAll: ')'",
|
|
@@ -2939,17 +3017,19 @@ selector: "nextPutFunctionWith:arguments:",
|
|
category: 'streaming',
|
|
category: 'streaming',
|
|
fn: function (aBlock,anArray){
|
|
fn: function (aBlock,anArray){
|
|
var self=this;
|
|
var self=this;
|
|
-return smalltalk.withContext(function($ctx1) {
var $1,$2;
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1,$2,$3,$4;
|
|
_st(self["@stream"])._nextPutAll_("fn: function(");
|
|
_st(self["@stream"])._nextPutAll_("fn: function(");
|
|
_st(anArray)._do_separatedBy_((function(each){
|
|
_st(anArray)._do_separatedBy_((function(each){
|
|
return smalltalk.withContext(function($ctx2) {
return _st(self["@stream"])._nextPutAll_(_st(each)._asVariableName());
|
|
return smalltalk.withContext(function($ctx2) {
return _st(self["@stream"])._nextPutAll_(_st(each)._asVariableName());
|
|
})}),(function(){
|
|
})}),(function(){
|
|
return smalltalk.withContext(function($ctx2) {
return _st(self["@stream"])._nextPut_(",");
|
|
return smalltalk.withContext(function($ctx2) {
return _st(self["@stream"])._nextPut_(",");
|
|
})}));
|
|
})}));
|
|
-_st(self["@stream"])._nextPutAll_("){");
|
|
|
|
-$1=_st(self["@stream"])._lf();
|
|
|
|
-_st(self["@stream"])._nextPutAll_("var self=this;");
|
|
|
|
-$2=_st(self["@stream"])._lf();
|
|
|
|
|
|
+$1=self["@stream"];
|
|
|
|
+_st($1)._nextPutAll_("){");
|
|
|
|
+$2=_st($1)._lf();
|
|
|
|
+$3=self["@stream"];
|
|
|
|
+_st($3)._nextPutAll_("var self=this;");
|
|
|
|
+$4=_st($3)._lf();
|
|
_st(aBlock)._value();
|
|
_st(aBlock)._value();
|
|
_st(self["@stream"])._nextPutAll_("}");
|
|
_st(self["@stream"])._nextPutAll_("}");
|
|
return self}, self, "nextPutFunctionWith:arguments:", [aBlock,anArray], smalltalk.JSStream)},
|
|
return self}, self, "nextPutFunctionWith:arguments:", [aBlock,anArray], smalltalk.JSStream)},
|
|
@@ -2967,11 +3047,12 @@ selector: "nextPutIf:with:",
|
|
category: 'streaming',
|
|
category: 'streaming',
|
|
fn: function (aBlock,anotherBlock){
|
|
fn: function (aBlock,anotherBlock){
|
|
var self=this;
|
|
var self=this;
|
|
-return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1,$2;
|
|
_st(self["@stream"])._nextPutAll_("if(");
|
|
_st(self["@stream"])._nextPutAll_("if(");
|
|
_st(aBlock)._value();
|
|
_st(aBlock)._value();
|
|
-_st(self["@stream"])._nextPutAll_("){");
|
|
|
|
-$1=_st(self["@stream"])._lf();
|
|
|
|
|
|
+$1=self["@stream"];
|
|
|
|
+_st($1)._nextPutAll_("){");
|
|
|
|
+$2=_st($1)._lf();
|
|
_st(anotherBlock)._value();
|
|
_st(anotherBlock)._value();
|
|
_st(self["@stream"])._nextPutAll_("}");
|
|
_st(self["@stream"])._nextPutAll_("}");
|
|
return self}, self, "nextPutIf:with:", [aBlock,anotherBlock], smalltalk.JSStream)},
|
|
return self}, self, "nextPutIf:with:", [aBlock,anotherBlock], smalltalk.JSStream)},
|
|
@@ -2989,14 +3070,16 @@ selector: "nextPutIfElse:with:with:",
|
|
category: 'streaming',
|
|
category: 'streaming',
|
|
fn: function (aBlock,ifBlock,elseBlock){
|
|
fn: function (aBlock,ifBlock,elseBlock){
|
|
var self=this;
|
|
var self=this;
|
|
-return smalltalk.withContext(function($ctx1) {
var $1,$2;
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1,$2,$3,$4;
|
|
_st(self["@stream"])._nextPutAll_("if(");
|
|
_st(self["@stream"])._nextPutAll_("if(");
|
|
_st(aBlock)._value();
|
|
_st(aBlock)._value();
|
|
-_st(self["@stream"])._nextPutAll_("){");
|
|
|
|
-$1=_st(self["@stream"])._lf();
|
|
|
|
|
|
+$1=self["@stream"];
|
|
|
|
+_st($1)._nextPutAll_("){");
|
|
|
|
+$2=_st($1)._lf();
|
|
_st(ifBlock)._value();
|
|
_st(ifBlock)._value();
|
|
-_st(self["@stream"])._nextPutAll_("} else {");
|
|
|
|
-$2=_st(self["@stream"])._lf();
|
|
|
|
|
|
+$3=self["@stream"];
|
|
|
|
+_st($3)._nextPutAll_("} else {");
|
|
|
|
+$4=_st($3)._lf();
|
|
_st(elseBlock)._value();
|
|
_st(elseBlock)._value();
|
|
_st(self["@stream"])._nextPutAll_("}");
|
|
_st(self["@stream"])._nextPutAll_("}");
|
|
return self}, self, "nextPutIfElse:with:with:", [aBlock,ifBlock,elseBlock], smalltalk.JSStream)},
|
|
return self}, self, "nextPutIfElse:with:with:", [aBlock,ifBlock,elseBlock], smalltalk.JSStream)},
|
|
@@ -3014,29 +3097,32 @@ selector: "nextPutMethodDeclaration:with:",
|
|
category: 'streaming',
|
|
category: 'streaming',
|
|
fn: function (aMethod,aBlock){
|
|
fn: function (aMethod,aBlock){
|
|
var self=this;
|
|
var self=this;
|
|
-return smalltalk.withContext(function($ctx1) {
var $1,$2,$3;
|
|
|
|
-_st(self["@stream"])._nextPutAll_("smalltalk.method({");
|
|
|
|
-_st(self["@stream"])._lf();
|
|
|
|
-_st(self["@stream"])._nextPutAll_(_st(_st("selector: \x22").__comma(_st(aMethod)._selector())).__comma("\x22,"));
|
|
|
|
-_st(self["@stream"])._lf();
|
|
|
|
-_st(self["@stream"])._nextPutAll_(_st(_st("source: ").__comma(_st(_st(aMethod)._source())._asJavascript())).__comma(","));
|
|
|
|
-$1=_st(self["@stream"])._lf();
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1,$2,$3,$4,$5,$6;
|
|
|
|
+$1=self["@stream"];
|
|
|
|
+_st($1)._nextPutAll_("smalltalk.method({");
|
|
|
|
+_st($1)._lf();
|
|
|
|
+_st($1)._nextPutAll_(_st(_st("selector: \x22").__comma(_st(aMethod)._selector())).__comma("\x22,"));
|
|
|
|
+_st($1)._lf();
|
|
|
|
+_st($1)._nextPutAll_(_st(_st("source: ").__comma(_st(_st(aMethod)._source())._asJavascript())).__comma(","));
|
|
|
|
+$2=_st($1)._lf();
|
|
_st(aBlock)._value();
|
|
_st(aBlock)._value();
|
|
-_st(self["@stream"])._nextPutAll_(_st(_st(",").__comma(_st((smalltalk.String || String))._lf())).__comma("messageSends: "));
|
|
|
|
-_st(self["@stream"])._nextPutAll_(_st(_st(_st(_st(aMethod)._messageSends())._asArray())._asJavascript()).__comma(","));
|
|
|
|
-_st(self["@stream"])._lf();
|
|
|
|
-_st(self["@stream"])._nextPutAll_(_st(_st("args: ").__comma(_st(_st(_st(_st(aMethod)._arguments())._collect_((function(each){
|
|
|
|
|
|
+$3=self["@stream"];
|
|
|
|
+_st($3)._nextPutAll_(_st(_st(",").__comma(_st((smalltalk.String || String))._lf())).__comma("messageSends: "));
|
|
|
|
+_st($3)._nextPutAll_(_st(_st(_st(_st(aMethod)._messageSends())._asArray())._asJavascript()).__comma(","));
|
|
|
|
+_st($3)._lf();
|
|
|
|
+_st($3)._nextPutAll_(_st(_st("args: ").__comma(_st(_st(_st(_st(aMethod)._arguments())._collect_((function(each){
|
|
return smalltalk.withContext(function($ctx2) {
return _st(each)._value();
|
|
return smalltalk.withContext(function($ctx2) {
return _st(each)._value();
|
|
})})))._asArray())._asJavascript())).__comma(","));
|
|
})})))._asArray())._asJavascript())).__comma(","));
|
|
-_st(self["@stream"])._lf();
|
|
|
|
-$2=_st(self["@stream"])._nextPutAll_("referencedClasses: [");
|
|
|
|
|
|
+_st($3)._lf();
|
|
|
|
+$4=_st($3)._nextPutAll_("referencedClasses: [");
|
|
_st(_st(aMethod)._classReferences())._do_separatedBy_((function(each){
|
|
_st(_st(aMethod)._classReferences())._do_separatedBy_((function(each){
|
|
return smalltalk.withContext(function($ctx2) {
return _st(self["@stream"])._nextPutAll_(_st(each)._asJavascript());
|
|
return smalltalk.withContext(function($ctx2) {
return _st(self["@stream"])._nextPutAll_(_st(each)._asJavascript());
|
|
})}),(function(){
|
|
})}),(function(){
|
|
return smalltalk.withContext(function($ctx2) {
return _st(self["@stream"])._nextPutAll_(",");
|
|
return smalltalk.withContext(function($ctx2) {
return _st(self["@stream"])._nextPutAll_(",");
|
|
})}));
|
|
})}));
|
|
-_st(self["@stream"])._nextPutAll_("]");
|
|
|
|
-$3=_st(self["@stream"])._nextPutAll_("})");
|
|
|
|
|
|
+$5=self["@stream"];
|
|
|
|
+_st($5)._nextPutAll_("]");
|
|
|
|
+$6=_st($5)._nextPutAll_("})");
|
|
return self}, self, "nextPutMethodDeclaration:with:", [aMethod,aBlock], smalltalk.JSStream)},
|
|
return self}, self, "nextPutMethodDeclaration:with:", [aMethod,aBlock], smalltalk.JSStream)},
|
|
args: ["aMethod", "aBlock"],
|
|
args: ["aMethod", "aBlock"],
|
|
source: "nextPutMethodDeclaration: aMethod with: aBlock\x0a\x09stream \x0a\x09\x09nextPutAll: 'smalltalk.method({'; lf;\x0a\x09\x09nextPutAll: 'selector: \x22', aMethod selector, '\x22,'; lf;\x0a\x09\x09nextPutAll: 'source: ', aMethod source asJavascript, ',';lf. \x0a\x09aBlock value.\x0a\x09stream \x0a\x09\x09nextPutAll: ',', String lf, 'messageSends: ';\x0a\x09\x09nextPutAll: aMethod messageSends asArray asJavascript, ','; lf;\x0a nextPutAll: 'args: ', (aMethod arguments collect: [ :each | each value ]) asArray asJavascript, ','; lf;\x0a\x09\x09nextPutAll: 'referencedClasses: ['.\x0a\x09aMethod classReferences \x0a\x09\x09do: [:each | stream nextPutAll: each asJavascript]\x0a\x09\x09separatedBy: [stream nextPutAll: ','].\x0a\x09stream \x0a\x09\x09nextPutAll: ']';\x0a\x09\x09nextPutAll: '})'",
|
|
source: "nextPutMethodDeclaration: aMethod with: aBlock\x0a\x09stream \x0a\x09\x09nextPutAll: 'smalltalk.method({'; lf;\x0a\x09\x09nextPutAll: 'selector: \x22', aMethod selector, '\x22,'; lf;\x0a\x09\x09nextPutAll: 'source: ', aMethod source asJavascript, ',';lf. \x0a\x09aBlock value.\x0a\x09stream \x0a\x09\x09nextPutAll: ',', String lf, 'messageSends: ';\x0a\x09\x09nextPutAll: aMethod messageSends asArray asJavascript, ','; lf;\x0a nextPutAll: 'args: ', (aMethod arguments collect: [ :each | each value ]) asArray asJavascript, ','; lf;\x0a\x09\x09nextPutAll: 'referencedClasses: ['.\x0a\x09aMethod classReferences \x0a\x09\x09do: [:each | stream nextPutAll: each asJavascript]\x0a\x09\x09separatedBy: [stream nextPutAll: ','].\x0a\x09stream \x0a\x09\x09nextPutAll: ']';\x0a\x09\x09nextPutAll: '})'",
|
|
@@ -3052,16 +3138,18 @@ selector: "nextPutNonLocalReturnHandlingWith:",
|
|
category: 'streaming',
|
|
category: 'streaming',
|
|
fn: function (aBlock){
|
|
fn: function (aBlock){
|
|
var self=this;
|
|
var self=this;
|
|
-return smalltalk.withContext(function($ctx1) {
var $1,$2;
|
|
|
|
-_st(self["@stream"])._nextPutAll_("var $early={};");
|
|
|
|
-_st(self["@stream"])._lf();
|
|
|
|
-_st(self["@stream"])._nextPutAll_("try {");
|
|
|
|
-$1=_st(self["@stream"])._lf();
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1,$2,$3,$4;
|
|
|
|
+$1=self["@stream"];
|
|
|
|
+_st($1)._nextPutAll_("var $early={};");
|
|
|
|
+_st($1)._lf();
|
|
|
|
+_st($1)._nextPutAll_("try {");
|
|
|
|
+$2=_st($1)._lf();
|
|
_st(aBlock)._value();
|
|
_st(aBlock)._value();
|
|
-_st(self["@stream"])._nextPutAll_("}");
|
|
|
|
-_st(self["@stream"])._lf();
|
|
|
|
-_st(self["@stream"])._nextPutAll_("catch(e) {if(e===$early)return e[0]; throw e}");
|
|
|
|
-$2=_st(self["@stream"])._lf();
|
|
|
|
|
|
+$3=self["@stream"];
|
|
|
|
+_st($3)._nextPutAll_("}");
|
|
|
|
+_st($3)._lf();
|
|
|
|
+_st($3)._nextPutAll_("catch(e) {if(e===$early)return e[0]; throw e}");
|
|
|
|
+$4=_st($3)._lf();
|
|
return self}, self, "nextPutNonLocalReturnHandlingWith:", [aBlock], smalltalk.JSStream)},
|
|
return self}, self, "nextPutNonLocalReturnHandlingWith:", [aBlock], smalltalk.JSStream)},
|
|
args: ["aBlock"],
|
|
args: ["aBlock"],
|
|
source: "nextPutNonLocalReturnHandlingWith: aBlock\x0a\x09stream \x0a\x09\x09nextPutAll: 'var $early={};'; lf;\x0a\x09\x09nextPutAll: 'try {'; lf.\x0a\x09aBlock value.\x0a\x09stream \x0a\x09\x09nextPutAll: '}'; lf;\x0a\x09\x09nextPutAll: 'catch(e) {if(e===$early)return e[0]; throw e}'; lf",
|
|
source: "nextPutNonLocalReturnHandlingWith: aBlock\x0a\x09stream \x0a\x09\x09nextPutAll: 'var $early={};'; lf;\x0a\x09\x09nextPutAll: 'try {'; lf.\x0a\x09aBlock value.\x0a\x09stream \x0a\x09\x09nextPutAll: '}'; lf;\x0a\x09\x09nextPutAll: 'catch(e) {if(e===$early)return e[0]; throw e}'; lf",
|
|
@@ -3144,12 +3232,14 @@ selector: "nextPutStatement:with:",
|
|
category: 'streaming',
|
|
category: 'streaming',
|
|
fn: function (anInteger,aBlock){
|
|
fn: function (anInteger,aBlock){
|
|
var self=this;
|
|
var self=this;
|
|
-return smalltalk.withContext(function($ctx1) {
var $1,$2;
|
|
|
|
-_st(self["@stream"])._nextPutAll_(_st(_st("case ").__comma(_st(anInteger)._asString())).__comma(":"));
|
|
|
|
-$1=_st(self["@stream"])._lf();
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1,$2,$3,$4;
|
|
|
|
+$1=self["@stream"];
|
|
|
|
+_st($1)._nextPutAll_(_st(_st("case ").__comma(_st(anInteger)._asString())).__comma(":"));
|
|
|
|
+$2=_st($1)._lf();
|
|
_st(self)._nextPutStatementWith_(aBlock);
|
|
_st(self)._nextPutStatementWith_(aBlock);
|
|
-_st(self["@stream"])._nextPutAll_(_st(_st("smalltalk.thisContext.pc=").__comma(_st(_st(anInteger).__plus((1)))._asString())).__comma(";"));
|
|
|
|
-$2=_st(self["@stream"])._lf();
|
|
|
|
|
|
+$3=self["@stream"];
|
|
|
|
+_st($3)._nextPutAll_(_st(_st("smalltalk.thisContext.pc=").__comma(_st(_st(anInteger).__plus((1)))._asString())).__comma(";"));
|
|
|
|
+$4=_st($3)._lf();
|
|
return self}, self, "nextPutStatement:with:", [anInteger,aBlock], smalltalk.JSStream)},
|
|
return self}, self, "nextPutStatement:with:", [anInteger,aBlock], smalltalk.JSStream)},
|
|
args: ["anInteger", "aBlock"],
|
|
args: ["anInteger", "aBlock"],
|
|
source: "nextPutStatement: anInteger with: aBlock\x0a\x09stream nextPutAll: 'case ', anInteger asString, ':'; lf.\x0a\x09self nextPutStatementWith: aBlock.\x0a\x09stream nextPutAll: 'smalltalk.thisContext.pc=', (anInteger + 1) asString, ';'; lf",
|
|
source: "nextPutStatement: anInteger with: aBlock\x0a\x09stream nextPutAll: 'case ', anInteger asString, ':'; lf.\x0a\x09self nextPutStatementWith: aBlock.\x0a\x09stream nextPutAll: 'smalltalk.thisContext.pc=', (anInteger + 1) asString, ';'; lf",
|
|
@@ -3165,10 +3255,11 @@ selector: "nextPutStatementWith:",
|
|
category: 'streaming',
|
|
category: 'streaming',
|
|
fn: function (aBlock){
|
|
fn: function (aBlock){
|
|
var self=this;
|
|
var self=this;
|
|
-return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1,$2;
|
|
_st(aBlock)._value();
|
|
_st(aBlock)._value();
|
|
-_st(self["@stream"])._nextPutAll_(";");
|
|
|
|
-$1=_st(self["@stream"])._lf();
|
|
|
|
|
|
+$1=self["@stream"];
|
|
|
|
+_st($1)._nextPutAll_(";");
|
|
|
|
+$2=_st($1)._lf();
|
|
return self}, self, "nextPutStatementWith:", [aBlock], smalltalk.JSStream)},
|
|
return self}, self, "nextPutStatementWith:", [aBlock], smalltalk.JSStream)},
|
|
args: ["aBlock"],
|
|
args: ["aBlock"],
|
|
source: "nextPutStatementWith: aBlock\x0a\x09aBlock value.\x0a\x09stream nextPutAll: ';'; lf",
|
|
source: "nextPutStatementWith: aBlock\x0a\x09aBlock value.\x0a\x09stream nextPutAll: ';'; lf",
|
|
@@ -3184,9 +3275,10 @@ selector: "nextPutVar:",
|
|
category: 'streaming',
|
|
category: 'streaming',
|
|
fn: function (aString){
|
|
fn: function (aString){
|
|
var self=this;
|
|
var self=this;
|
|
-return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
|
-_st(self["@stream"])._nextPutAll_(_st(_st("var ").__comma(aString)).__comma(";"));
|
|
|
|
-$1=_st(self["@stream"])._lf();
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1,$2;
|
|
|
|
+$1=self["@stream"];
|
|
|
|
+_st($1)._nextPutAll_(_st(_st("var ").__comma(aString)).__comma(";"));
|
|
|
|
+$2=_st($1)._lf();
|
|
return self}, self, "nextPutVar:", [aString], smalltalk.JSStream)},
|
|
return self}, self, "nextPutVar:", [aString], smalltalk.JSStream)},
|
|
args: ["aString"],
|
|
args: ["aString"],
|
|
source: "nextPutVar: aString\x0a\x09stream nextPutAll: 'var ', aString, ';'; lf",
|
|
source: "nextPutVar: aString\x0a\x09stream nextPutAll: 'var ', aString, ';'; lf",
|
|
@@ -3202,15 +3294,16 @@ selector: "nextPutVars:",
|
|
category: 'streaming',
|
|
category: 'streaming',
|
|
fn: function (aCollection){
|
|
fn: function (aCollection){
|
|
var self=this;
|
|
var self=this;
|
|
-return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1,$2;
|
|
_st(self["@stream"])._nextPutAll_("var ");
|
|
_st(self["@stream"])._nextPutAll_("var ");
|
|
_st(aCollection)._do_separatedBy_((function(each){
|
|
_st(aCollection)._do_separatedBy_((function(each){
|
|
return smalltalk.withContext(function($ctx2) {
return _st(self["@stream"])._nextPutAll_(each);
|
|
return smalltalk.withContext(function($ctx2) {
return _st(self["@stream"])._nextPutAll_(each);
|
|
})}),(function(){
|
|
})}),(function(){
|
|
return smalltalk.withContext(function($ctx2) {
return _st(self["@stream"])._nextPutAll_(",");
|
|
return smalltalk.withContext(function($ctx2) {
return _st(self["@stream"])._nextPutAll_(",");
|
|
})}));
|
|
})}));
|
|
-_st(self["@stream"])._nextPutAll_(";");
|
|
|
|
-$1=_st(self["@stream"])._lf();
|
|
|
|
|
|
+$1=self["@stream"];
|
|
|
|
+_st($1)._nextPutAll_(";");
|
|
|
|
+$2=_st($1)._lf();
|
|
return self}, self, "nextPutVars:", [aCollection], smalltalk.JSStream)},
|
|
return self}, self, "nextPutVars:", [aCollection], smalltalk.JSStream)},
|
|
args: ["aCollection"],
|
|
args: ["aCollection"],
|
|
source: "nextPutVars: aCollection\x0a\x09stream nextPutAll: 'var '.\x0a\x09aCollection \x0a\x09\x09do: [ :each | stream nextPutAll: each ]\x0a\x09\x09separatedBy: [ stream nextPutAll: ',' ].\x0a\x09stream nextPutAll: ';'; lf",
|
|
source: "nextPutVars: aCollection\x0a\x09stream nextPutAll: 'var '.\x0a\x09aCollection \x0a\x09\x09do: [ :each | stream nextPutAll: each ]\x0a\x09\x09separatedBy: [ stream nextPutAll: ',' ].\x0a\x09stream nextPutAll: ';'; lf",
|