< prev index next >

src/hotspot/share/c1/c1_Instruction.hpp

Print this page

*** 70,79 **** --- 70,80 ---- class OsrEntry; class ExceptionObject; class StateSplit; class Invoke; class NewInstance; + class NewValueTypeInstance; class NewArray; class NewTypeArray; class NewObjectArray; class NewMultiArray; class TypeCheck;
*** 175,184 **** --- 176,186 ---- virtual void do_Convert (Convert* x) = 0; virtual void do_NullCheck (NullCheck* x) = 0; virtual void do_TypeCast (TypeCast* x) = 0; virtual void do_Invoke (Invoke* x) = 0; virtual void do_NewInstance (NewInstance* x) = 0; + virtual void do_NewValueTypeInstance(NewValueTypeInstance* x) = 0; virtual void do_NewTypeArray (NewTypeArray* x) = 0; virtual void do_NewObjectArray (NewObjectArray* x) = 0; virtual void do_NewMultiArray (NewMultiArray* x) = 0; virtual void do_CheckCast (CheckCast* x) = 0; virtual void do_InstanceOf (InstanceOf* x) = 0;
*** 501,510 **** --- 503,514 ---- set_next(i); i->set_next(n); return _next; } + bool is_flattened_array() const; + Instruction *insert_after_same_bci(Instruction *i) { #ifndef PRODUCT i->set_printable_bci(printable_bci()); #endif return insert_after(i);
*** 548,557 **** --- 552,562 ---- virtual NullCheck* as_NullCheck() { return NULL; } virtual OsrEntry* as_OsrEntry() { return NULL; } virtual StateSplit* as_StateSplit() { return NULL; } virtual Invoke* as_Invoke() { return NULL; } virtual NewInstance* as_NewInstance() { return NULL; } + virtual NewValueTypeInstance* as_NewValueTypeInstance() { return NULL; } virtual NewArray* as_NewArray() { return NULL; } virtual NewTypeArray* as_NewTypeArray() { return NULL; } virtual NewObjectArray* as_NewObjectArray() { return NULL; } virtual NewMultiArray* as_NewMultiArray() { return NULL; } virtual TypeCheck* as_TypeCheck() { return NULL; }
*** 945,954 **** --- 950,960 ---- LEAF(LoadIndexed, AccessIndexed) private: NullCheck* _explicit_null_check; // For explicit null check elimination + NewValueTypeInstance* _vt; public: // creation LoadIndexed(Value array, Value index, Value length, BasicType elt_type, ValueStack* state_before, bool mismatched = false) : AccessIndexed(array, index, length, elt_type, state_before, mismatched)
*** 962,971 **** --- 968,980 ---- void set_explicit_null_check(NullCheck* check) { _explicit_null_check = check; } ciType* exact_type() const; ciType* declared_type() const; + NewValueTypeInstance* vt() { return _vt; } + void set_vt(NewValueTypeInstance* vt) { _vt = vt; } + // generic HASHING2(LoadIndexed, true, array()->subst(), index()->subst()) };
*** 1313,1322 **** --- 1322,1367 ---- virtual bool can_trap() const { return true; } ciType* exact_type() const; ciType* declared_type() const; }; + LEAF(NewValueTypeInstance, StateSplit) + bool _is_unresolved; + ciValueKlass* _klass; + Value _depends_on; // Link to instance on with withfield was called on + + public: + + // Default creation, always allocated for now + NewValueTypeInstance(ciValueKlass* klass, ValueStack* state_before, bool is_unresolved, Value depends_on = NULL) + : StateSplit(instanceType, state_before) + , _is_unresolved(is_unresolved) + , _klass(klass) + { + if (depends_on == NULL) { + _depends_on = this; + } else { + _depends_on = depends_on; + } + } + + // accessors + bool is_unresolved() const { return _is_unresolved; } + Value depends_on(); + + ciValueKlass* klass() const { return _klass; } + + virtual bool needs_exception_state() const { return false; } + + // generic + virtual bool can_trap() const { return true; } + ciType* exact_type() const; + ciType* declared_type() const; + + // Only done in LIR Generator -> map everything to object + void set_to_object_type() { set_type(instanceType); } + }; BASE(NewArray, StateSplit) private: Value _length;
< prev index next >