From a1d8ddfaf09545f99bc326dff97ab604d4574eb6 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Mon, 29 Feb 2016 11:46:58 +0000 Subject: Bug fix for polymorphic inlining. The code used to wrongly propagate try/catch information to new blocks. Since it has the same logic as Hraph::InlineInto, extract the code that updates loop and try/catch information to blocks to a shared method. bug:27330865 bug:27372101 bug:27360329 Change-Id: I4386f724d8d412bde5bcc04fda6955bc3bacf5a9 --- compiler/optimizing/nodes.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'compiler/optimizing/nodes.h') diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index 9eddfc7e0e..e3dbe16547 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -353,6 +353,13 @@ class HGraph : public ArenaObject { // and removing the invoke instruction. HInstruction* InlineInto(HGraph* outer_graph, HInvoke* invoke); + // Update the loop and try membership of `block`, which was spawned from `reference`. + // In case `reference` is a back edge, `replace_if_back_edge` notifies whether `block` + // should be the new back edge. + void UpdateLoopAndTryInformationOfNewBlock(HBasicBlock* block, + HBasicBlock* reference, + bool replace_if_back_edge); + // Need to add a couple of blocks to test if the loop body is entered and // put deoptimization instructions, etc. void TransformLoopHeaderForBCE(HBasicBlock* header); -- cgit v1.2.3-59-g8ed1b