소스 검색

CascadeNode >> subtreeNeedsAliasing ^ true. Fix #1214.

Herbert Vojčík 9 년 전
부모
커밋
dce39e89eb
2개의 변경된 파일27개의 추가작업 그리고 0개의 파일을 삭제
  1. 23 0
      src/Compiler-AST.js
  2. 4 0
      src/Compiler-AST.st

+ 23 - 0
src/Compiler-AST.js

@@ -1564,6 +1564,29 @@ messageSends: []
 }),
 $globals.CascadeNode);
 
+$core.addMethod(
+$core.method({
+selector: "subtreeNeedsAliasing",
+protocol: 'testing',
+fn: function (){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+return $recv($recv(self._parent())._isSequenceNode())._not();
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"subtreeNeedsAliasing",{},$globals.CascadeNode)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "subtreeNeedsAliasing\x0a\x09^ self parent isSequenceNode not",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["not", "isSequenceNode", "parent"]
+}),
+$globals.CascadeNode);
+
 
 
 $core.addClass('DynamicArrayNode', $globals.Node, [], 'Compiler-AST');

+ 4 - 0
src/Compiler-AST.st

@@ -337,6 +337,10 @@ receiver: aNode
 
 isCascadeNode
 	^ true
+!
+
+subtreeNeedsAliasing
+	^ self parent isSequenceNode not
 ! !
 
 !CascadeNode methodsFor: 'visiting'!