Mercurial > hg > truffle
diff src/share/vm/c1/c1_Instruction.hpp @ 6133:c8289830e172
7172843: C1: fix "assert(has_printable_bci()) failed: _printable_bci should have been set"
Reviewed-by: twisti
Contributed-by: Krystal Mok <sajia@taobao.com>
author | twisti |
---|---|
date | Wed, 30 May 2012 12:17:07 -0700 |
parents | 701a83c86f28 |
children | 1d7922586cf6 |
line wrap: on
line diff
--- a/src/share/vm/c1/c1_Instruction.hpp Fri May 25 11:39:13 2012 -0700 +++ b/src/share/vm/c1/c1_Instruction.hpp Wed May 30 12:17:07 2012 -0700 @@ -302,8 +302,6 @@ void update_exception_state(ValueStack* state); - bool has_printable_bci() const { return NOT_PRODUCT(_printable_bci != -99) PRODUCT_ONLY(false); } - protected: void set_type(ValueType* type) { assert(type != NULL, "type must exist"); @@ -392,8 +390,9 @@ // accessors int id() const { return _id; } #ifndef PRODUCT + bool has_printable_bci() const { return _printable_bci != -99; } int printable_bci() const { assert(has_printable_bci(), "_printable_bci should have been set"); return _printable_bci; } - void set_printable_bci(int bci) { NOT_PRODUCT(_printable_bci = bci;) } + void set_printable_bci(int bci) { _printable_bci = bci; } #endif int use_count() const { return _use_count; } int pin_state() const { return _pin_state; } @@ -576,6 +575,7 @@ , _block(b) , _index(index) { + NOT_PRODUCT(set_printable_bci(Value(b)->printable_bci())); if (type->is_illegal()) { make_illegal(); } @@ -631,7 +631,9 @@ : Instruction(type) , _java_index(index) , _declared_type(declared) - {} + { + NOT_PRODUCT(set_printable_bci(-1)); + } // accessors int java_index() const { return _java_index; }