< prev index next >
src/hotspot/share/opto/valuetypenode.hpp
Print this page
@@ -44,11 +44,11 @@
// Nodes are connected in increasing order of the index of the field they correspond to.
};
virtual const TypeInstPtr* value_ptr() const = 0;
// Get the klass defining the field layout of the value type
- virtual ciValueKlass* value_klass() const = 0;
+ ciValueKlass* value_klass() const { return type()->value_klass(); }
int make_scalar_in_safepoint(PhaseIterGVN* igvn, Unique_Node_List& worklist, SafePointNode* sfpt);
const TypePtr* field_adr_type(Node* base, int offset, ciInstanceKlass* holder, DecoratorSet decorators, PhaseGVN& gvn) const;
@@ -84,11 +84,11 @@
void store(GraphKit* kit, Node* base, Node* ptr, ciInstanceKlass* holder, int holder_offset = 0, bool deoptimize_on_exception = false, DecoratorSet decorators = IN_HEAP | MO_UNORDERED) const;
// Initialize the value type by loading its field values from memory
void load(GraphKit* kit, Node* base, Node* ptr, ciInstanceKlass* holder, int holder_offset = 0, DecoratorSet decorators = IN_HEAP | MO_UNORDERED);
// Allocates the value type (if not yet allocated)
- ValueTypeBaseNode* allocate(GraphKit* kit, bool deoptimize_on_exception = false);
+ ValueTypeBaseNode* allocate(GraphKit* kit, bool deoptimize_on_exception = false, bool safe_for_replace = true);
bool is_allocated(PhaseGVN* phase) const;
void replace_call_results(GraphKit* kit, Node* call, Compile* C);
};
@@ -109,11 +109,10 @@
// Checks if the value type fields are all set to default values
bool is_default(PhaseGVN& gvn) const;
const TypeInstPtr* value_ptr() const { return TypeInstPtr::make(TypePtr::BotPTR, value_klass()); }
- ciValueKlass* value_klass() const { return type()->is_valuetype()->value_klass(); }
public:
// Create uninitialized
static ValueTypeNode* make_uninitialized(PhaseGVN& gvn, ciValueKlass* vk);
// Create with default field values
@@ -153,11 +152,10 @@
//------------------------------ValueTypePtrNode-------------------------------------
// Node representing a value type as a pointer in C2 IR
class ValueTypePtrNode : public ValueTypeBaseNode {
private:
const TypeInstPtr* value_ptr() const { return type()->isa_instptr(); }
- ciValueKlass* value_klass() const { return value_ptr()->value_klass(); }
ValueTypePtrNode(ciValueKlass* vk, Node* oop)
: ValueTypeBaseNode(TypeInstPtr::make(TypePtr::NotNull, vk), Values + vk->nof_declared_nonstatic_fields()) {
init_class_id(Class_ValueTypePtr);
init_req(Oop, oop);
< prev index next >