|
@@ -1527,32 +1527,30 @@ smalltalk.addMethod(
|
|
|
smalltalk.method({
|
|
|
selector: "visitSendNode:",
|
|
|
category: 'visiting',
|
|
|
-fn: function (aNode) {
|
|
|
- var self = this;
|
|
|
- var $1, $2, $3;
|
|
|
- $1 = smalltalk.send(smalltalk.send(smalltalk.send(aNode, "_receiver", []), "_value", []), "__eq", ["super"]);
|
|
|
- if (smalltalk.assert($1)) {
|
|
|
- smalltalk.send(aNode, "_superSend_", [true]);
|
|
|
- smalltalk.send(smalltalk.send(aNode, "_receiver", []), "_value_", ["self"]);
|
|
|
- } else {
|
|
|
- $2 = smalltalk.send(smalltalk.send(smalltalk.IRSendInliner || IRSendInliner, "_inlinedSelectors", []), "_includes_", [smalltalk.send(aNode, "_selector", [])]);
|
|
|
- if (smalltalk.assert($2)) {
|
|
|
- smalltalk.send(aNode, "_shouldBeInlined_", [true]);
|
|
|
- $3 = smalltalk.send(smalltalk.send(aNode, "_receiver", []), "_isValueNode", []);
|
|
|
- if (!smalltalk.assert($3)) {
|
|
|
- smalltalk.send(smalltalk.send(aNode, "_receiver", []), "_shouldBeAliased_", [true]);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- smalltalk.send(smalltalk.send(self, "_messageSends", []), "_at_ifAbsentPut_", [smalltalk.send(aNode, "_selector", []), function () {return smalltalk.send(smalltalk.Set || Set, "_new", []);}]);
|
|
|
- smalltalk.send(smalltalk.send(smalltalk.send(self, "_messageSends", []), "_at_", [smalltalk.send(aNode, "_selector", [])]), "_add_", [aNode]);
|
|
|
- smalltalk.send(aNode, "_index_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_messageSends", []), "_at_", [smalltalk.send(aNode, "_selector", [])]), "_size", [])]);
|
|
|
- smalltalk.send(self, "_visitSendNode_", [aNode], smalltalk.NodeVisitor);
|
|
|
- return self;
|
|
|
-},
|
|
|
+fn: function (aNode){
|
|
|
+var self=this;
|
|
|
+var $1,$2;
|
|
|
+$1=smalltalk.send(smalltalk.send(smalltalk.send(aNode,"_receiver",[]),"_value",[]),"__eq",["super"]);
|
|
|
+if(smalltalk.assert($1)){
|
|
|
+smalltalk.send(aNode,"_superSend_",[true]);
|
|
|
+smalltalk.send(smalltalk.send(aNode,"_receiver",[]),"_value_",["self"]);
|
|
|
+} else {
|
|
|
+$2=smalltalk.send(smalltalk.send((smalltalk.IRSendInliner || IRSendInliner),"_inlinedSelectors",[]),"_includes_",[smalltalk.send(aNode,"_selector",[])]);
|
|
|
+if(smalltalk.assert($2)){
|
|
|
+smalltalk.send(aNode,"_shouldBeInlined_",[true]);
|
|
|
+smalltalk.send(smalltalk.send(aNode,"_receiver",[]),"_shouldBeAliased_",[true]);
|
|
|
+};
|
|
|
+};
|
|
|
+smalltalk.send(smalltalk.send(self,"_messageSends",[]),"_at_ifAbsentPut_",[smalltalk.send(aNode,"_selector",[]),(function(){
|
|
|
+return smalltalk.send((smalltalk.Set || Set),"_new",[]);
|
|
|
+})]);
|
|
|
+smalltalk.send(smalltalk.send(smalltalk.send(self,"_messageSends",[]),"_at_",[smalltalk.send(aNode,"_selector",[])]),"_add_",[aNode]);
|
|
|
+smalltalk.send(aNode,"_index_",[smalltalk.send(smalltalk.send(smalltalk.send(self,"_messageSends",[]),"_at_",[smalltalk.send(aNode,"_selector",[])]),"_size",[])]);
|
|
|
+smalltalk.send(self,"_visitSendNode_",[aNode],smalltalk.NodeVisitor);
|
|
|
+return self},
|
|
|
args: ["aNode"],
|
|
|
-source: "visitSendNode: aNode\x0a\x0a\x09aNode receiver value = 'super' \x0a\x09\x09ifTrue: [\x0a\x09\x09\x09aNode superSend: true.\x0a\x09\x09\x09aNode receiver value: 'self' ]\x0a\x09\x09ifFalse: [ (IRSendInliner inlinedSelectors includes: aNode selector) ifTrue: [\x0a\x09\x09\x09aNode shouldBeInlined: true.\x0a\x09\x09\x09aNode receiver isValueNode ifFalse: [ aNode receiver shouldBeAliased: true ] ] ].\x0a\x0a\x09self messageSends at: aNode selector ifAbsentPut: [ Set new ].\x0a\x09(self messageSends at: aNode selector) add: aNode.\x0a\x0a\x09aNode index: (self messageSends at: aNode selector) size.\x0a\x0a\x09super visitSendNode: aNode",
|
|
|
-messageSends: ["ifTrue:ifFalse:", "superSend:", "value:", "receiver", "ifTrue:", "shouldBeInlined:", "ifFalse:", "shouldBeAliased:", "isValueNode", "includes:", "selector", "inlinedSelectors", "=", "value", "at:ifAbsentPut:", "new", "messageSends", "add:", "at:", "index:", "size", "visitSendNode:"],
|
|
|
+source: "visitSendNode: aNode\x0a\x0a\x09aNode receiver value = 'super' \x0a\x09\x09ifTrue: [\x0a\x09\x09\x09aNode superSend: true.\x0a\x09\x09\x09aNode receiver value: 'self' ]\x0a\x09\x09ifFalse: [ (IRSendInliner inlinedSelectors includes: aNode selector) ifTrue: [\x0a\x09\x09\x09aNode shouldBeInlined: true.\x0a\x09\x09\x09aNode receiver shouldBeAliased: true ] ].\x0a\x0a\x09self messageSends at: aNode selector ifAbsentPut: [ Set new ].\x0a\x09(self messageSends at: aNode selector) add: aNode.\x0a\x0a\x09aNode index: (self messageSends at: aNode selector) size.\x0a\x0a\x09super visitSendNode: aNode",
|
|
|
+messageSends: ["ifTrue:ifFalse:", "superSend:", "value:", "receiver", "ifTrue:", "shouldBeInlined:", "shouldBeAliased:", "includes:", "selector", "inlinedSelectors", "=", "value", "at:ifAbsentPut:", "new", "messageSends", "add:", "at:", "index:", "size", "visitSendNode:"],
|
|
|
referencedClasses: ["IRSendInliner", "Set"]
|
|
|
}),
|
|
|
smalltalk.SemanticAnalyzer);
|