< prev index next >

src/share/vm/opto/parse3.cpp

Print this page

        

*** 25,34 **** --- 25,35 ---- #include "precompiled.hpp" #include "compiler/compileLog.hpp" #include "interpreter/linkResolver.hpp" #include "memory/universe.inline.hpp" #include "oops/objArrayKlass.hpp" + #include "oops/valueArrayKlass.hpp" #include "opto/addnode.hpp" #include "opto/castnode.hpp" #include "opto/memnode.hpp" #include "opto/parse.hpp" #include "opto/rootnode.hpp"
*** 211,221 **** MemNode::MemOrd mo = is_vol ? MemNode::acquire : MemNode::unordered; bool needs_atomic_access = is_vol || AlwaysAtomicAccesses; Node* ld = NULL; if (bt == T_VALUETYPE && !field->is_static()) { // Load flattened value type from non-static field ! ld = ValueTypeNode::make(_gvn, field_klass->as_value_klass(), map()->memory(), field->holder(), obj, offset); } else { ld = make_load(NULL, adr, type, bt, adr_type, mo, LoadNode::DependsOnlyOnTest, needs_atomic_access); } // Adjust Java stack --- 212,222 ---- MemNode::MemOrd mo = is_vol ? MemNode::acquire : MemNode::unordered; bool needs_atomic_access = is_vol || AlwaysAtomicAccesses; Node* ld = NULL; if (bt == T_VALUETYPE && !field->is_static()) { // Load flattened value type from non-static field ! ld = ValueTypeNode::make(_gvn, field_klass->as_value_klass(), map()->memory(), obj, obj, field->holder(), offset); } else { ld = make_load(NULL, adr, type, bt, adr_type, mo, LoadNode::DependsOnlyOnTest, needs_atomic_access); } // Adjust Java stack
*** 292,302 **** } else { field_type = TypeOopPtr::make_from_klass(field->type()->as_klass()); } if (bt == T_VALUETYPE && !field->is_static()) { // Store flattened value type to non-static field ! val->as_ValueType()->store_to_field(this, field->holder(), obj, offset); } else { store_oop_to_object(control(), obj, adr, adr_type, val, field_type, bt, mo); } } else { bool needs_atomic_access = is_vol || AlwaysAtomicAccesses; --- 293,303 ---- } else { field_type = TypeOopPtr::make_from_klass(field->type()->as_klass()); } if (bt == T_VALUETYPE && !field->is_static()) { // Store flattened value type to non-static field ! val->as_ValueType()->store_to_field(this, obj, obj, field->holder(), offset); } else { store_oop_to_object(control(), obj, adr, adr_type, val, field_type, bt, mo); } } else { bool needs_atomic_access = is_vol || AlwaysAtomicAccesses;
*** 343,362 **** } } } //============================================================================= ! void Parse::do_anewarray() { bool will_link; ciKlass* klass = iter().get_klass(will_link); // Uncommon Trap when class that array contains is not loaded // we need the loaded class for the rest of graph; do not // initialize the container class (see Java spec)!!! ! assert(will_link, "anewarray: typeflow responsibility"); ! ciObjArrayKlass* array_klass = ciObjArrayKlass::make(klass); // Check that array_klass object is loaded if (!array_klass->is_loaded()) { // Generate uncommon_trap for unloaded array_class uncommon_trap(Deoptimization::Reason_unloaded, Deoptimization::Action_reinterpret, --- 344,364 ---- } } } //============================================================================= ! ! void Parse::do_newarray() { bool will_link; ciKlass* klass = iter().get_klass(will_link); // Uncommon Trap when class that array contains is not loaded // we need the loaded class for the rest of graph; do not // initialize the container class (see Java spec)!!! ! assert(will_link, "newarray: typeflow responsibility"); ! ciArrayKlass* array_klass = ciArrayKlass::make(klass); // Check that array_klass object is loaded if (!array_klass->is_loaded()) { // Generate uncommon_trap for unloaded array_class uncommon_trap(Deoptimization::Reason_unloaded, Deoptimization::Action_reinterpret,
*** 546,556 **** // Store all field values to the newly created object. // The code below relies on the assumption that the VCC has the // same memory layout as the derived value type. // TODO: Once the layout of the two is not the same, update code below. ! vt->store_values(this, vcc_klass, obj); // Push the new object onto the stack push(obj); } --- 548,558 ---- // Store all field values to the newly created object. // The code below relies on the assumption that the VCC has the // same memory layout as the derived value type. // TODO: Once the layout of the two is not the same, update code below. ! vt->store_values(this, obj, obj, vcc_klass); // Push the new object onto the stack push(obj); }
*** 565,574 **** guarantee(will_link, "derived value type must be loaded"); // TOOD: Generate all the checks. Similar to vbox // Create a value type node with the corresponding type ! Node* vt = ValueTypeNode::make(gvn(), dvt_klass, map()->memory(), vcc_klass, obj, dvt_klass->first_field_offset()); // Push the value type onto the stack push(vt); } --- 567,576 ---- guarantee(will_link, "derived value type must be loaded"); // TOOD: Generate all the checks. Similar to vbox // Create a value type node with the corresponding type ! Node* vt = ValueTypeNode::make(gvn(), dvt_klass, map()->memory(), obj, obj, vcc_klass, dvt_klass->first_field_offset()); // Push the value type onto the stack push(vt); }
< prev index next >