Make YieldCallTree post-order

This commit is contained in:
Nick Rolfe
2021-05-05 17:14:32 +01:00
parent 73b5699f32
commit 569063ca73
2 changed files with 4 additions and 5 deletions

View File

@@ -1293,8 +1293,7 @@ module Trees {
}
}
// TODO: make post-order
private class YieldCallTree extends StandardPreOrderTree, YieldCall {
private class YieldCallTree extends StandardPostOrderTree, YieldCall {
final override ControlFlowTree getChildNode(int i) { result = this.getArgument(i) }
}
}

View File

@@ -2038,7 +2038,7 @@ cfg.rb:
#-----| -> ... != ...
# 190| enter run_block
#-----| -> yield ...
#-----| -> 42
# 190| run_block
#-----| -> self
@@ -2049,10 +2049,10 @@ cfg.rb:
#-----| -> exit run_block
# 191| yield ...
#-----| -> 42
#-----| -> exit run_block (normal)
# 191| 42
#-----| -> exit run_block (normal)
#-----| -> yield ...
# 194| call to run_block
#-----| -> exit cfg.rb (normal)