< prev index next >

src/share/vm/opto/parse3.cpp

Print this page

        

@@ -25,10 +25,11 @@
 #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,11 +212,11 @@
   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);
+    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,11 +293,11 @@
     } 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);
+      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,20 +344,21 @@
     }
   }
 }
 
 //=============================================================================
-void Parse::do_anewarray() {
+
+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, "anewarray: typeflow responsibility");
+  assert(will_link, "newarray: typeflow responsibility");
 
-  ciObjArrayKlass* array_klass = ciObjArrayKlass::make(klass);
+  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,11 +548,11 @@
 
   // 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);
+  vt->store_values(this, obj, obj, vcc_klass);
 
   // Push the new object onto the stack
   push(obj);
 }
 

@@ -565,10 +567,10 @@
   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());
+  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 >