|
@@ -1106,25 +1106,7 @@ smalltalk.IRScopedInstruction);
|
|
|
|
|
|
|
|
|
|
|
|
-smalltalk.addClass('IRClosure', smalltalk.IRScopedInstruction, ['arguments'], 'Compiler-IR');
|
|
|
-smalltalk.addMethod(
|
|
|
-"_accept_",
|
|
|
-smalltalk.method({
|
|
|
-selector: "accept:",
|
|
|
-category: 'visiting',
|
|
|
-fn: function (aVisitor){
|
|
|
-var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
-$1=_st(aVisitor)._visitIRClosure_(self);
|
|
|
-return $1;
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRClosure)})},
|
|
|
-args: ["aVisitor"],
|
|
|
-source: "accept: aVisitor\x0a\x09^ aVisitor visitIRClosure: self",
|
|
|
-messageSends: ["visitIRClosure:"],
|
|
|
-referencedClasses: []
|
|
|
-}),
|
|
|
-smalltalk.IRClosure);
|
|
|
-
|
|
|
+smalltalk.addClass('IRClosureInstruction', smalltalk.IRScopedInstruction, ['arguments'], 'Compiler-IR');
|
|
|
smalltalk.addMethod(
|
|
|
"_arguments",
|
|
|
smalltalk.method({
|
|
@@ -1140,13 +1122,13 @@ $1=[];
|
|
|
$1=$2;
|
|
|
};
|
|
|
return $1;
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"arguments",{}, smalltalk.IRClosure)})},
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"arguments",{}, smalltalk.IRClosureInstruction)})},
|
|
|
args: [],
|
|
|
source: "arguments\x0a\x09^ arguments ifNil: [ #() ]",
|
|
|
messageSends: ["ifNil:"],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
|
-smalltalk.IRClosure);
|
|
|
+smalltalk.IRClosureInstruction);
|
|
|
|
|
|
smalltalk.addMethod(
|
|
|
"_arguments_",
|
|
@@ -1156,29 +1138,13 @@ category: 'accessing',
|
|
|
fn: function (aCollection){
|
|
|
var self=this;
|
|
|
return smalltalk.withContext(function($ctx1) {
self["@arguments"]=aCollection;
|
|
|
-return self}, function($ctx1) {$ctx1.fill(self,"arguments:",{aCollection:aCollection}, smalltalk.IRClosure)})},
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"arguments:",{aCollection:aCollection}, smalltalk.IRClosureInstruction)})},
|
|
|
args: ["aCollection"],
|
|
|
source: "arguments: aCollection\x0a\x09arguments := aCollection",
|
|
|
messageSends: [],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
|
-smalltalk.IRClosure);
|
|
|
-
|
|
|
-smalltalk.addMethod(
|
|
|
-"_isClosure",
|
|
|
-smalltalk.method({
|
|
|
-selector: "isClosure",
|
|
|
-category: 'testing',
|
|
|
-fn: function (){
|
|
|
-var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
return true;
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"isClosure",{}, smalltalk.IRClosure)})},
|
|
|
-args: [],
|
|
|
-source: "isClosure\x0a\x09^ true",
|
|
|
-messageSends: [],
|
|
|
-referencedClasses: []
|
|
|
-}),
|
|
|
-smalltalk.IRClosure);
|
|
|
+smalltalk.IRClosureInstruction);
|
|
|
|
|
|
smalltalk.addMethod(
|
|
|
"_locals",
|
|
@@ -1195,13 +1161,13 @@ return smalltalk.withContext(function($ctx2) {
return _st(each)._name();
|
|
|
$3=_st($2)._yourself();
|
|
|
$1=$3;
|
|
|
return $1;
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"locals",{}, smalltalk.IRClosure)})},
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"locals",{}, smalltalk.IRClosureInstruction)})},
|
|
|
args: [],
|
|
|
source: "locals\x0a\x09^ self arguments copy\x0a \x09addAll: (self tempDeclarations collect: [ :each | each name ]); \x0a yourself",
|
|
|
messageSends: ["addAll:", "collect:", "name", "tempDeclarations", "copy", "arguments", "yourself"],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
|
-smalltalk.IRClosure);
|
|
|
+smalltalk.IRClosureInstruction);
|
|
|
|
|
|
smalltalk.addMethod(
|
|
|
"_scope_",
|
|
@@ -1212,31 +1178,13 @@ fn: function (aScope){
|
|
|
var self=this;
|
|
|
return smalltalk.withContext(function($ctx1) {
smalltalk.IRScopedInstruction.fn.prototype._scope_.apply(_st(self), [aScope]);
|
|
|
_st(aScope)._instruction_(self);
|
|
|
-return self}, function($ctx1) {$ctx1.fill(self,"scope:",{aScope:aScope}, smalltalk.IRClosure)})},
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"scope:",{aScope:aScope}, smalltalk.IRClosureInstruction)})},
|
|
|
args: ["aScope"],
|
|
|
source: "scope: aScope\x0a\x09super scope: aScope.\x0a\x09aScope instruction: self",
|
|
|
messageSends: ["scope:", "instruction:"],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
|
-smalltalk.IRClosure);
|
|
|
-
|
|
|
-smalltalk.addMethod(
|
|
|
-"_sequence",
|
|
|
-smalltalk.method({
|
|
|
-selector: "sequence",
|
|
|
-category: 'accessing',
|
|
|
-fn: function (){
|
|
|
-var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
-$1=_st(_st(self)._instructions())._last();
|
|
|
-return $1;
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"sequence",{}, smalltalk.IRClosure)})},
|
|
|
-args: [],
|
|
|
-source: "sequence\x0a\x09^ self instructions last",
|
|
|
-messageSends: ["last", "instructions"],
|
|
|
-referencedClasses: []
|
|
|
-}),
|
|
|
-smalltalk.IRClosure);
|
|
|
+smalltalk.IRClosureInstruction);
|
|
|
|
|
|
smalltalk.addMethod(
|
|
|
"_tempDeclarations",
|
|
@@ -1250,18 +1198,17 @@ $1=_st(_st(self)._instructions())._select_((function(each){
|
|
|
return smalltalk.withContext(function($ctx2) {
return _st(each)._isTempDeclaration();
|
|
|
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
|
|
|
return $1;
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"tempDeclarations",{}, smalltalk.IRClosure)})},
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"tempDeclarations",{}, smalltalk.IRClosureInstruction)})},
|
|
|
args: [],
|
|
|
source: "tempDeclarations\x0a\x09^ self instructions select: [ :each | \x0a \x09each isTempDeclaration ]",
|
|
|
messageSends: ["select:", "isTempDeclaration", "instructions"],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
|
-smalltalk.IRClosure);
|
|
|
+smalltalk.IRClosureInstruction);
|
|
|
|
|
|
|
|
|
|
|
|
-smalltalk.addClass('IRMethod', smalltalk.IRScopedInstruction, ['theClass', 'source', 'selector', 'classReferences', 'messageSends', 'superSends', 'arguments', 'internalVariables'], 'Compiler-IR');
|
|
|
-smalltalk.IRMethod.comment="I am a method instruction"
|
|
|
+smalltalk.addClass('IRClosure', smalltalk.IRClosureInstruction, [], 'Compiler-IR');
|
|
|
smalltalk.addMethod(
|
|
|
"_accept_",
|
|
|
smalltalk.method({
|
|
@@ -1270,46 +1217,68 @@ category: 'visiting',
|
|
|
fn: function (aVisitor){
|
|
|
var self=this;
|
|
|
return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
-$1=_st(aVisitor)._visitIRMethod_(self);
|
|
|
+$1=_st(aVisitor)._visitIRClosure_(self);
|
|
|
return $1;
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRMethod)})},
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRClosure)})},
|
|
|
args: ["aVisitor"],
|
|
|
-source: "accept: aVisitor\x0a\x09^ aVisitor visitIRMethod: self",
|
|
|
-messageSends: ["visitIRMethod:"],
|
|
|
+source: "accept: aVisitor\x0a\x09^ aVisitor visitIRClosure: self",
|
|
|
+messageSends: ["visitIRClosure:"],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
|
-smalltalk.IRMethod);
|
|
|
+smalltalk.IRClosure);
|
|
|
|
|
|
smalltalk.addMethod(
|
|
|
-"_arguments",
|
|
|
+"_isClosure",
|
|
|
smalltalk.method({
|
|
|
-selector: "arguments",
|
|
|
+selector: "isClosure",
|
|
|
+category: 'testing',
|
|
|
+fn: function (){
|
|
|
+var self=this;
|
|
|
+return smalltalk.withContext(function($ctx1) {
return true;
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"isClosure",{}, smalltalk.IRClosure)})},
|
|
|
+args: [],
|
|
|
+source: "isClosure\x0a\x09^ true",
|
|
|
+messageSends: [],
|
|
|
+referencedClasses: []
|
|
|
+}),
|
|
|
+smalltalk.IRClosure);
|
|
|
+
|
|
|
+smalltalk.addMethod(
|
|
|
+"_sequence",
|
|
|
+smalltalk.method({
|
|
|
+selector: "sequence",
|
|
|
category: 'accessing',
|
|
|
fn: function (){
|
|
|
var self=this;
|
|
|
return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
-$1=self["@arguments"];
|
|
|
+$1=_st(_st(self)._instructions())._last();
|
|
|
return $1;
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"arguments",{}, smalltalk.IRMethod)})},
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"sequence",{}, smalltalk.IRClosure)})},
|
|
|
args: [],
|
|
|
-source: "arguments\x0a\x09^ arguments",
|
|
|
-messageSends: [],
|
|
|
+source: "sequence\x0a\x09^ self instructions last",
|
|
|
+messageSends: ["last", "instructions"],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
|
-smalltalk.IRMethod);
|
|
|
+smalltalk.IRClosure);
|
|
|
+
|
|
|
|
|
|
+
|
|
|
+smalltalk.addClass('IRMethod', smalltalk.IRClosureInstruction, ['theClass', 'source', 'selector', 'classReferences', 'messageSends', 'superSends', 'internalVariables'], 'Compiler-IR');
|
|
|
+smalltalk.IRMethod.comment="I am a method instruction"
|
|
|
smalltalk.addMethod(
|
|
|
-"_arguments_",
|
|
|
+"_accept_",
|
|
|
smalltalk.method({
|
|
|
-selector: "arguments:",
|
|
|
-category: 'accessing',
|
|
|
-fn: function (aCollection){
|
|
|
+selector: "accept:",
|
|
|
+category: 'visiting',
|
|
|
+fn: function (aVisitor){
|
|
|
var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
self["@arguments"]=aCollection;
|
|
|
-return self}, function($ctx1) {$ctx1.fill(self,"arguments:",{aCollection:aCollection}, smalltalk.IRMethod)})},
|
|
|
-args: ["aCollection"],
|
|
|
-source: "arguments: aCollection\x0a\x09arguments := aCollection",
|
|
|
-messageSends: [],
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
+$1=_st(aVisitor)._visitIRMethod_(self);
|
|
|
+return $1;
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"accept:",{aVisitor:aVisitor}, smalltalk.IRMethod)})},
|
|
|
+args: ["aVisitor"],
|
|
|
+source: "accept: aVisitor\x0a\x09^ aVisitor visitIRMethod: self",
|
|
|
+messageSends: ["visitIRMethod:"],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.IRMethod);
|
|
@@ -1388,29 +1357,6 @@ referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.IRMethod);
|
|
|
|
|
|
-smalltalk.addMethod(
|
|
|
-"_locals",
|
|
|
-smalltalk.method({
|
|
|
-selector: "locals",
|
|
|
-category: 'accessing',
|
|
|
-fn: function (){
|
|
|
-var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
var $2,$3,$1;
|
|
|
-$2=_st(_st(self)._arguments())._copy();
|
|
|
-_st($2)._addAll_(_st(_st(self)._tempDeclarations())._collect_((function(each){
|
|
|
-return smalltalk.withContext(function($ctx2) {
return _st(each)._name();
|
|
|
-}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})));
|
|
|
-$3=_st($2)._yourself();
|
|
|
-$1=$3;
|
|
|
-return $1;
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"locals",{}, smalltalk.IRMethod)})},
|
|
|
-args: [],
|
|
|
-source: "locals\x0a\x09^ self arguments copy\x0a \x09addAll: (self tempDeclarations collect: [ :each | each name ]); \x0a yourself",
|
|
|
-messageSends: ["addAll:", "collect:", "name", "tempDeclarations", "copy", "arguments", "yourself"],
|
|
|
-referencedClasses: []
|
|
|
-}),
|
|
|
-smalltalk.IRMethod);
|
|
|
-
|
|
|
smalltalk.addMethod(
|
|
|
"_messageSends",
|
|
|
smalltalk.method({
|
|
@@ -1463,23 +1409,6 @@ referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.IRMethod);
|
|
|
|
|
|
-smalltalk.addMethod(
|
|
|
-"_scope_",
|
|
|
-smalltalk.method({
|
|
|
-selector: "scope:",
|
|
|
-category: 'accessing',
|
|
|
-fn: function (aScope){
|
|
|
-var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
smalltalk.IRScopedInstruction.fn.prototype._scope_.apply(_st(self), [aScope]);
|
|
|
-_st(aScope)._instruction_(self);
|
|
|
-return self}, function($ctx1) {$ctx1.fill(self,"scope:",{aScope:aScope}, smalltalk.IRMethod)})},
|
|
|
-args: ["aScope"],
|
|
|
-source: "scope: aScope\x0a\x09super scope: aScope.\x0a\x09aScope instruction: self",
|
|
|
-messageSends: ["scope:", "instruction:"],
|
|
|
-referencedClasses: []
|
|
|
-}),
|
|
|
-smalltalk.IRMethod);
|
|
|
-
|
|
|
smalltalk.addMethod(
|
|
|
"_selector",
|
|
|
smalltalk.method({
|
|
@@ -1582,26 +1511,6 @@ referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.IRMethod);
|
|
|
|
|
|
-smalltalk.addMethod(
|
|
|
-"_tempDeclarations",
|
|
|
-smalltalk.method({
|
|
|
-selector: "tempDeclarations",
|
|
|
-category: 'accessing',
|
|
|
-fn: function (){
|
|
|
-var self=this;
|
|
|
-return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
-$1=_st(_st(self)._instructions())._select_((function(each){
|
|
|
-return smalltalk.withContext(function($ctx2) {
return _st(each)._isTempDeclaration();
|
|
|
-}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
|
|
|
-return $1;
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"tempDeclarations",{}, smalltalk.IRMethod)})},
|
|
|
-args: [],
|
|
|
-source: "tempDeclarations\x0a\x09^ self instructions select: [ :each | \x0a \x09each isTempDeclaration ]",
|
|
|
-messageSends: ["select:", "isTempDeclaration", "instructions"],
|
|
|
-referencedClasses: []
|
|
|
-}),
|
|
|
-smalltalk.IRMethod);
|
|
|
-
|
|
|
smalltalk.addMethod(
|
|
|
"_theClass",
|
|
|
smalltalk.method({
|