compiler/PPCInliningVisitor.st
changeset 509 fd22630c7e62
parent 503 ff58cd9f1f3c
child 516 3b81c9e53352
--- a/compiler/PPCInliningVisitor.st	Fri Jul 31 08:16:54 2015 +0100
+++ b/compiler/PPCInliningVisitor.st	Fri Jul 31 08:22:18 2015 +0100
@@ -39,10 +39,16 @@
 !
 
 visitActionNode: node
-    node child markForInline.
+    "Only mark unnamed sequence nodes for inlining.
+     Named nodes should not be inlined as they should make a method.
+     There's little point in inlining non-sequence nodes, so don't
+     enforce inlining on those. Some (JK :-) may prefer them non-inlined
+     (for debugging purposes)"
+    (node child isSequenceNode and:[node child name isNil]) ifTrue: [ node child markForInline ].
     ^ super visitActionNode: node.
 
     "Created: / 13-05-2015 / 16:25:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 31-07-2015 / 08:20:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 visitCharSetPredicateNode: node