< prev index next >

src/share/vm/opto/type.cpp

Print this page

        

@@ -2021,11 +2021,11 @@
 
   int vt_extra = 0;
   if (vt_fields_as_args) {
     for (int i = 0; i < sig->count(); i++) {
       ciType* type = sig->type_at(i);
-      if (type->basic_type() == T_VALUETYPE) {
+      if (type->basic_type() == T_VALUETYPE && type != ciEnv::current()->___Value_klass()) {
         assert(type->is_valuetype(), "inconsistent type");
         ciValueKlass* vk = (ciValueKlass*)type;
         vt_extra += vk->value_arg_slots()-1;
       }
     }

@@ -2079,12 +2079,11 @@
     case T_SHORT:
       field_array[pos++] = TypeInt::INT;
       break;
     case T_VALUETYPE: {
       assert(type->is_valuetype(), "inconsistent type");
-      assert(type != ciEnv::current()->___Value_klass(), "unsupported");
-      if (vt_fields_as_args) {
+      if (vt_fields_as_args && type != ciEnv::current()->___Value_klass()) {
         ciValueKlass* vk = (ciValueKlass*)type;
         collect_value_fields(vk, field_array, pos);
       } else {
         field_array[pos++] = get_const_type(type);
       }
< prev index next >