< prev index next >

src/share/vm/opto/callGenerator.cpp

Print this page
rev 10544 : call to __Value methods can't pass fields as arguments

@@ -151,16 +151,11 @@
     // (see SharedRuntime::resolve_static_call_C).
     call->set_override_symbolic_info(true);
   }
   _call_node = call;  // Save the call node in case we need it later
   if (!is_static) {
-    if (kit.argument(0)->is_ValueType()) {
-      if (!ValueTypePassFieldsAsArgs) {
-        ValueTypeNode* vt = kit.argument(0)->as_ValueType();
-        vt->store_to_memory(&kit);
-      }
-    } else {
+    if (!kit.argument(0)->is_ValueType()) {
       // Make an explicit receiver null_check as part of this call.
       // Since we share a map with the caller, his JVMS gets adjusted.
       kit.null_check_receiver_before_call(method());
     }
     if (kit.stopped()) {

@@ -430,11 +425,11 @@
       if (t->isa_valuetypeptr()) {
         arg = ValueTypeNode::make(gvn, map->memory(), arg);
       }
       map->set_argument(jvms, i1, arg);
     } else {
-      if (t->isa_valuetypeptr()) {
+      if (t->isa_valuetypeptr() && t->is_valuetypeptr()->klass() != C->env()->___Value_klass()) {
         ciValueKlass* vk = t->is_valuetypeptr()->value_type()->value_klass();
         Node* vt = C->create_vt_node(call, vk, vk, 0, j);
         map->set_argument(jvms, i1, gvn.transform(vt));
         j += vk->value_arg_slots();
       } else {
< prev index next >