src/share/vm/c1/c1_Instruction.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 6965570 Cdiff src/share/vm/c1/c1_Instruction.hpp

src/share/vm/c1/c1_Instruction.hpp

Print this page

        

*** 321,332 **** enum InstructionFlag { NeedsNullCheckFlag = 0, CanTrapFlag, DirectCompareFlag, IsEliminatedFlag, - IsInitializedFlag, - IsLoadedFlag, IsSafepointFlag, IsStaticFlag, IsStrictfpFlag, NeedsStoreCheckFlag, NeedsWriteBarrierFlag, --- 321,330 ----
*** 691,718 **** NullCheck* _explicit_null_check; // For explicit null check elimination public: // creation AccessField(Value obj, int offset, ciField* field, bool is_static, ! ValueStack* state_before, bool is_loaded, bool is_initialized) : Instruction(as_ValueType(field->type()->basic_type()), state_before) , _obj(obj) , _offset(offset) , _field(field) , _explicit_null_check(NULL) { set_needs_null_check(!is_static); - set_flag(IsLoadedFlag, is_loaded); - set_flag(IsInitializedFlag, is_initialized); set_flag(IsStaticFlag, is_static); ASSERT_VALUES - if (!is_loaded || (PatchALot && !field->is_volatile())) { - // need to patch if the holder wasn't loaded or we're testing - // using PatchALot. Don't allow PatchALot for fields which are - // known to be volatile they aren't patchable. - set_flag(NeedsPatchingFlag, true); - } // pin of all instructions with memory access pin(); } // accessors --- 689,709 ---- NullCheck* _explicit_null_check; // For explicit null check elimination public: // creation AccessField(Value obj, int offset, ciField* field, bool is_static, ! ValueStack* state_before, bool needs_patching) : Instruction(as_ValueType(field->type()->basic_type()), state_before) , _obj(obj) , _offset(offset) , _field(field) , _explicit_null_check(NULL) { set_needs_null_check(!is_static); set_flag(IsStaticFlag, is_static); + set_flag(NeedsPatchingFlag, needs_patching); ASSERT_VALUES // pin of all instructions with memory access pin(); } // accessors
*** 719,733 **** Value obj() const { return _obj; } int offset() const { return _offset; } ciField* field() const { return _field; } BasicType field_type() const { return _field->type()->basic_type(); } bool is_static() const { return check_flag(IsStaticFlag); } - bool is_loaded() const { return check_flag(IsLoadedFlag); } - bool is_initialized() const { return check_flag(IsInitializedFlag); } NullCheck* explicit_null_check() const { return _explicit_null_check; } bool needs_patching() const { return check_flag(NeedsPatchingFlag); } // manipulation // Under certain circumstances, if a previous NullCheck instruction // proved the target object non-null, we can eliminate the explicit // null check and do an implicit one, simply specifying the debug --- 710,727 ---- Value obj() const { return _obj; } int offset() const { return _offset; } ciField* field() const { return _field; } BasicType field_type() const { return _field->type()->basic_type(); } bool is_static() const { return check_flag(IsStaticFlag); } NullCheck* explicit_null_check() const { return _explicit_null_check; } bool needs_patching() const { return check_flag(NeedsPatchingFlag); } + // Unresolved getstatic and putstatic can cause initialization. + // Technically it occurs at the Constant that materializes the base + // of the static fields but it's simpler to model it here. + bool is_init_point() const { return is_static() && (needs_patching() || !_field->holder()->is_initialized()); } + // manipulation // Under certain circumstances, if a previous NullCheck instruction // proved the target object non-null, we can eliminate the explicit // null check and do an implicit one, simply specifying the debug
*** 743,761 **** LEAF(LoadField, AccessField) public: // creation LoadField(Value obj, int offset, ciField* field, bool is_static, ! ValueStack* state_before, bool is_loaded, bool is_initialized) ! : AccessField(obj, offset, field, is_static, state_before, is_loaded, is_initialized) {} ciType* declared_type() const; ciType* exact_type() const; // generic ! HASHING2(LoadField, is_loaded() && !field()->is_volatile(), obj()->subst(), offset()) // cannot be eliminated if not yet loaded or if volatile }; LEAF(StoreField, AccessField) private: --- 737,755 ---- LEAF(LoadField, AccessField) public: // creation LoadField(Value obj, int offset, ciField* field, bool is_static, ! ValueStack* state_before, bool needs_patching) ! : AccessField(obj, offset, field, is_static, state_before, needs_patching) {} ciType* declared_type() const; ciType* exact_type() const; // generic ! HASHING2(LoadField, !needs_patching() && !field()->is_volatile(), obj()->subst(), offset()) // cannot be eliminated if needs patching or if volatile }; LEAF(StoreField, AccessField) private:
*** 762,773 **** Value _value; public: // creation StoreField(Value obj, int offset, ciField* field, Value value, bool is_static, ! ValueStack* state_before, bool is_loaded, bool is_initialized) ! : AccessField(obj, offset, field, is_static, state_before, is_loaded, is_initialized) , _value(value) { set_flag(NeedsWriteBarrierFlag, as_ValueType(field_type())->is_object()); ASSERT_VALUES pin(); --- 756,767 ---- Value _value; public: // creation StoreField(Value obj, int offset, ciField* field, Value value, bool is_static, ! ValueStack* state_before, bool needs_patching) ! : AccessField(obj, offset, field, is_static, state_before, needs_patching) , _value(value) { set_flag(NeedsWriteBarrierFlag, as_ValueType(field_type())->is_object()); ASSERT_VALUES pin();
src/share/vm/c1/c1_Instruction.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File