6987763: assert(kind() == EmptyExceptionState) failed: only EmptyExceptionStates can be modified

Mon, 27 Sep 2010 20:44:18 -0700

author
never
date
Mon, 27 Sep 2010 20:44:18 -0700
changeset 2177
1375bc8922e4
parent 2176
df015ec64052
child 2178
8aa5fd5d2046

6987763: assert(kind() == EmptyExceptionState) failed: only EmptyExceptionStates can be modified
Reviewed-by: roland, kvn, iveresov

src/share/vm/c1/c1_ValueStack.hpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/vm/c1/c1_ValueStack.hpp	Mon Sep 27 15:04:40 2010 -0700
     1.2 +++ b/src/share/vm/c1/c1_ValueStack.hpp	Mon Sep 27 20:44:18 2010 -0700
     1.3 @@ -68,7 +68,12 @@
     1.4    ValueStack* copy(Kind new_kind, int new_bci)   { return new ValueStack(this, new_kind, new_bci); }
     1.5    ValueStack* copy_for_parsing()                 { return new ValueStack(this, Parsing, -99); }
     1.6  
     1.7 -  void set_caller_state(ValueStack* s)           { assert(kind() == EmptyExceptionState, "only EmptyExceptionStates can be modified"); _caller_state = s; }
     1.8 +  void set_caller_state(ValueStack* s)           {
     1.9 +    assert(kind() == EmptyExceptionState ||
    1.10 +           (Compilation::current()->env()->jvmti_can_access_local_variables() && kind() == ExceptionState),
    1.11 +           "only EmptyExceptionStates can be modified");
    1.12 +    _caller_state = s;
    1.13 +  }
    1.14  
    1.15    bool is_same(ValueStack* s);                   // returns true if this & s's types match (w/o checking locals)
    1.16  

mercurial