compiler/PPCListNode.st
changeset 438 20598d7ce9fa
parent 422 116d2b2af905
child 452 9f4558b3be66
--- a/compiler/PPCListNode.st	Tue Apr 21 17:20:11 2015 +0100
+++ b/compiler/PPCListNode.st	Thu Apr 30 23:43:14 2015 +0200
@@ -25,6 +25,14 @@
 children: anObject
 	
 	children := anObject
+!
+
+firstChild
+	^ self children first
+!
+
+secondChild
+	^ self children second
 ! !
 
 !PPCListNode methodsFor:'analysis'!
@@ -35,12 +43,6 @@
 
 acceptsEpsilonOpenSet: set
 	self subclassResponsibility
-!
-
-replace: node with: anotherNode
-	children keysAndValuesDo: [ :index :child |
-		child == node ifTrue: [ children at: index put: anotherNode ] 
-	]
 ! !
 
 !PPCListNode methodsFor:'copying'!
@@ -50,16 +52,11 @@
 	children := children copy
 ! !
 
-!PPCListNode methodsFor:'optimizing'!
+!PPCListNode methodsFor:'transformation'!
 
-inline: changeStatus
-	| inlinedNode |
-	self children do: [ :child |
-		inlinedNode := child asInlined.
-		(inlinedNode ~= child) ifTrue: [ 
-			changeStatus change.
-			^ self replace: child with: inlinedNode.
-		]
+replace: node with: anotherNode
+	children keysAndValuesDo: [ :index :child |
+		child == node ifTrue: [ children at: index put: anotherNode ] 
 	]
 ! !