--- a/compiler/PPCNode.st Sun Oct 26 01:03:31 2014 +0000
+++ b/compiler/PPCNode.st Sun Oct 26 01:28:07 2014 +0000
@@ -7,9 +7,6 @@
category:'PetitCompiler-Nodes'
!
-PPCNode comment:''
-!
-
!PPCNode methodsFor:'accessing'!
children
@@ -189,27 +186,30 @@
!
doOptimizationLoop: params status: changeStatus
- | mapping optimized root |
- mapping := IdentityDictionary new.
- self allNodes do: [ :node |
- optimized := (node optimize: params status: changeStatus).
- (optimized ~= node) ifTrue: [
- mapping at: node put: optimized.
- ].
- ].
-
- root := mapping at: self ifAbsent: [ self ].
- [ | changed |
- changed := false.
- root allNodes do: [ :node |
- node children do: [ :child |
- mapping at: child ifPresent: [:newChild |
- node replace: child with: newChild.
- changed := true ]
- ]].
- changed
- ] whileTrue.
- ^ root
+ | mapping optimized root |
+ mapping := IdentityDictionary new.
+ self allNodes do: [ :node |
+ optimized := (node optimize: params status: changeStatus).
+ (optimized ~= node) ifTrue: [
+ mapping at: node put: optimized.
+ ].
+ ].
+
+ root := mapping at: self ifAbsent: [ self ].
+ [ | changed |
+ changed := false.
+ root allNodes do: [ :node |
+ node children do: [ :child |
+ mapping at: child ifPresent: [:newChild |
+ node replace: child with: newChild.
+ changed := true.
+ changeStatus change]
+ ]].
+ changed
+ ] whileTrue.
+ ^ root
+
+ "Modified: / 26-10-2014 / 01:14:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
inline: changeStatus