src/share/vm/c1/c1_Optimizer.cpp

changeset 3393
e5ac210043cd
parent 3386
7bca37d28f32
child 3592
701a83c86f28
     1.1 --- a/src/share/vm/c1/c1_Optimizer.cpp	Tue Dec 20 16:56:50 2011 +0100
     1.2 +++ b/src/share/vm/c1/c1_Optimizer.cpp	Thu Dec 22 10:55:53 2011 +0100
     1.3 @@ -125,9 +125,16 @@
     1.4    // inlining depths must match
     1.5    ValueStack* if_state = if_->state();
     1.6    ValueStack* sux_state = sux->state();
     1.7 -  while (sux_state->scope() != if_state->scope()) {
     1.8 -    if_state = if_state->caller_state();
     1.9 -    assert(if_state != NULL, "states do not match up");
    1.10 +  if (if_state->scope()->level() > sux_state->scope()->level()) {
    1.11 +    while (sux_state->scope() != if_state->scope()) {
    1.12 +      if_state = if_state->caller_state();
    1.13 +      assert(if_state != NULL, "states do not match up");
    1.14 +    }
    1.15 +  } else if (if_state->scope()->level() < sux_state->scope()->level()) {
    1.16 +    while (sux_state->scope() != if_state->scope()) {
    1.17 +      sux_state = sux_state->caller_state();
    1.18 +      assert(sux_state != NULL, "states do not match up");
    1.19 +    }
    1.20    }
    1.21  
    1.22    if (sux_state->stack_size() <= if_state->stack_size()) return;

mercurial