Преглед на файлове

Fixed issue #326 (again, it was lost in a merge)

Nicolas Petton преди 11 години
родител
ревизия
76860744d2
променени са 3 файла, в които са добавени 39 реда и са изтрити 0 реда
  1. 15 0
      js/Compiler-AST.deploy.js
  2. 20 0
      js/Compiler-AST.js
  3. 4 0
      st/Compiler-AST.st

+ 15 - 0
js/Compiler-AST.deploy.js

@@ -420,6 +420,21 @@ return self}, function($ctx1) {$ctx1.fill(self,"scope:",{aLexicalScope:aLexicalS
 }),
 smalltalk.BlockNode);
 
+smalltalk.addMethod(
+"_subtreeNeedsAliasing",
+smalltalk.method({
+selector: "subtreeNeedsAliasing",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=_st(_st(self)._shouldBeAliased())._or_((function(){
+return smalltalk.withContext(function($ctx2) {
return _st(self)._shouldBeInlined();
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"subtreeNeedsAliasing",{}, smalltalk.BlockNode)})}
+}),
+smalltalk.BlockNode);
+
 
 
 smalltalk.addClass('CascadeNode', smalltalk.Node, ['receiver'], 'Compiler-AST');

+ 20 - 0
js/Compiler-AST.js

@@ -581,6 +581,26 @@ referencedClasses: []
 }),
 smalltalk.BlockNode);
 
+smalltalk.addMethod(
+"_subtreeNeedsAliasing",
+smalltalk.method({
+selector: "subtreeNeedsAliasing",
+category: 'testing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
var $1;
+$1=_st(_st(self)._shouldBeAliased())._or_((function(){
+return smalltalk.withContext(function($ctx2) {
return _st(self)._shouldBeInlined();
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"subtreeNeedsAliasing",{}, smalltalk.BlockNode)})},
+args: [],
+source: "subtreeNeedsAliasing\x0a    ^ self shouldBeAliased or: [ self shouldBeInlined ]",
+messageSends: ["or:", "shouldBeInlined", "shouldBeAliased"],
+referencedClasses: []
+}),
+smalltalk.BlockNode);
+
 
 
 smalltalk.addClass('CascadeNode', smalltalk.Node, ['receiver'], 'Compiler-AST');

+ 4 - 0
st/Compiler-AST.st

@@ -156,6 +156,10 @@ scope: aLexicalScope
 
 isBlockNode
 	^true
+!
+
+subtreeNeedsAliasing
+    ^ self shouldBeAliased or: [ self shouldBeInlined ]
 ! !
 
 !BlockNode methodsFor: 'visiting'!