changeset 49051:7ebb169ae9a0 lworld

Summary: Remove CONSTANT_Value* and related MVT code Reviewed-by: lfoltan, thartmann Contributed-by: harold.seigel@oracle.com
author hseigel
date Fri, 09 Mar 2018 12:52:30 -0500
parents 1b8f1612de58
children 17cf8bef476a
files src/hotspot/cpu/x86/templateTable_x86.cpp src/hotspot/share/c1/c1_GraphBuilder.cpp src/hotspot/share/ci/ciEnv.cpp src/hotspot/share/ci/ciReplay.cpp src/hotspot/share/ci/ciStreams.hpp src/hotspot/share/ci/ciTypeFlow.cpp src/hotspot/share/classfile/classFileParser.cpp src/hotspot/share/classfile/classFileParser.hpp src/hotspot/share/classfile/stackMapTable.cpp src/hotspot/share/classfile/systemDictionary.cpp src/hotspot/share/classfile/systemDictionary.hpp src/hotspot/share/interpreter/bytecodeInterpreter.cpp src/hotspot/share/interpreter/bytecodeTracer.cpp src/hotspot/share/interpreter/interpreterRuntime.cpp src/hotspot/share/jvmci/jvmciEnv.cpp src/hotspot/share/jvmci/vmStructs_jvmci.cpp src/hotspot/share/memory/vtBuffer.cpp src/hotspot/share/oops/constantPool.cpp src/hotspot/share/oops/constantPool.hpp src/hotspot/share/oops/generateOopMap.cpp src/hotspot/share/oops/method.cpp src/hotspot/share/opto/compile.cpp src/hotspot/share/opto/type.cpp src/hotspot/share/prims/jvm.cpp src/hotspot/share/prims/jvmtiRedefineClasses.cpp src/hotspot/share/prims/jvmtiTagMap.cpp src/hotspot/share/prims/methodComparator.cpp src/hotspot/share/runtime/arguments.cpp src/hotspot/share/runtime/deoptimization.cpp src/hotspot/share/runtime/fieldType.cpp src/hotspot/share/runtime/fieldType.hpp src/hotspot/share/runtime/globals.hpp src/hotspot/share/runtime/vmStructs.cpp src/hotspot/share/utilities/constantTag.cpp src/hotspot/share/utilities/constantTag.hpp src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantPool.java src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfig.java test/hotspot/jtreg/compiler/valhalla/valuetypes/TestBoundValueTypes.java test/hotspot/jtreg/compiler/valhalla/valuetypes/TestMinimalValueTypes.java
diffstat 39 files changed, 94 insertions(+), 486 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/cpu/x86/templateTable_x86.cpp	Fri Mar 09 09:06:30 2018 -0800
+++ b/src/hotspot/cpu/x86/templateTable_x86.cpp	Fri Mar 09 12:52:30 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -448,19 +448,6 @@
 
   // resolved class - need to call vm to get java mirror of the class
   __ cmpl(rdx, JVM_CONSTANT_Class);
-  __ jcc(Assembler::equal, call_ldc);
-
-  // unresolved value type - get the resolved class
-  __ cmpl(rdx, JVM_CONSTANT_UnresolvedValue);
-  __ jccb(Assembler::equal, call_ldc);
-
-  // unresolved value type in error state - call into runtime to throw the error
-  // from the first resolution attempt
-  __ cmpl(rdx, JVM_CONSTANT_UnresolvedValueInError);
-  __ jccb(Assembler::equal, call_ldc);
-
-  // resolved value type - need to call vm to get java mirror
-  __ cmpl(rdx, JVM_CONSTANT_Value);
   __ jcc(Assembler::notEqual, notClass);
 
   __ bind(call_ldc);
@@ -2785,7 +2772,7 @@
   }
 
 #ifdef ASSERT
-  if (EnableMVT || EnableValhalla) {
+  if (EnableValhalla) {
     if (state == atos) {
       const Register thread1 = NOT_LP64(rcx) LP64_ONLY(r15_thread);
       __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::check_areturn), rax);
--- a/src/hotspot/share/c1/c1_GraphBuilder.cpp	Fri Mar 09 09:06:30 2018 -0800
+++ b/src/hotspot/share/c1/c1_GraphBuilder.cpp	Fri Mar 09 12:52:30 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -2144,8 +2144,7 @@
   bool will_link;
   ciKlass* klass = stream()->get_klass(will_link);
   assert(klass->is_instance_klass(), "must be an instance klass");
-  NewInstance* new_instance = new NewInstance(klass->as_instance_klass(), state_before,
-                                              stream()->is_unresolved_klass() || stream()->is_unresolved_value_type());
+  NewInstance* new_instance = new NewInstance(klass->as_instance_klass(), state_before, stream()->is_unresolved_klass());
   _memory->new_instance(new_instance);
   apush(append_split(new_instance));
 }
--- a/src/hotspot/share/ci/ciEnv.cpp	Fri Mar 09 09:06:30 2018 -0800
+++ b/src/hotspot/share/ci/ciEnv.cpp	Fri Mar 09 12:52:30 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -476,7 +476,7 @@
   if (found_klass == NULL && !cpool.is_null() && cpool->has_preresolution()) {
     // Look inside the constant pool for pre-resolved class entries.
     for (int i = cpool->length() - 1; i >= 1; i--) {
-      if (cpool->tag_at(i).is_klass() || cpool->tag_at(i).is_value_type()) {
+      if (cpool->tag_at(i).is_klass()) {
         Klass* kls = cpool->resolved_klass_at(i);
         if (kls->name() == sym) {
           found_klass = kls;
@@ -499,18 +499,6 @@
   while (sym->byte_at(i) == '[') {
     i++;
   }
-  if (i > 0 && sym->byte_at(i) == 'Q') {
-    assert(EnableValhalla || EnableMVT, "only for value types");
-    // An unloaded array class of value types is an ObjArrayKlass, an
-    // unloaded value type class is an InstanceKlass. For consistency,
-    // make the signature of the unloaded array of value type use L
-    // rather than Q.
-    char *new_name = CURRENT_THREAD_ENV->name_buffer(sym->utf8_length()+1);
-    strncpy(new_name, (char*)sym->base(), sym->utf8_length());
-    new_name[i] = 'L';
-    new_name[sym->utf8_length()] = '\0';
-    return get_unloaded_klass(accessing_klass, ciSymbol::make(new_name));
-  }
   return get_unloaded_klass(accessing_klass, name);
 }
 
@@ -671,8 +659,7 @@
       assert (constant->is_instance(), "must be an instance, or not? ");
       return ciConstant(T_OBJECT, constant);
     }
-  } else if (tag.is_klass() || tag.is_unresolved_klass() ||
-             tag.is_value_type() || tag.is_unresolved_value_type()) {
+  } else if (tag.is_klass() || tag.is_unresolved_klass()) {
     // 4881222: allow ldc to take a class type
     ciKlass* klass = get_klass_by_index_impl(cpool, index, ignore_will_link, accessor);
     if (HAS_PENDING_EXCEPTION) {
--- a/src/hotspot/share/ci/ciReplay.cpp	Fri Mar 09 09:06:30 2018 -0800
+++ b/src/hotspot/share/ci/ciReplay.cpp	Fri Mar 09 12:52:30 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -706,24 +706,14 @@
           break;
         }
 
-        case JVM_CONSTANT_UnresolvedValue: {
-          if (tag == JVM_CONSTANT_Value) {
-            tty->print_cr("Resolving value type %s at %d", cp->klass_name_at(i)->as_utf8(), i);
-            Klass* k = cp->klass_at(i, CHECK);
-          }
-          break;
-        }
-
         case JVM_CONSTANT_Long:
         case JVM_CONSTANT_Double:
           parsed_two_word = i + 1;
 
         case JVM_CONSTANT_ClassIndex:
-        case JVM_CONSTANT_ValueIndex:
         case JVM_CONSTANT_StringIndex:
         case JVM_CONSTANT_String:
         case JVM_CONSTANT_UnresolvedClassInError:
-        case JVM_CONSTANT_UnresolvedValueInError:
         case JVM_CONSTANT_Fieldref:
         case JVM_CONSTANT_Methodref:
         case JVM_CONSTANT_InterfaceMethodref:
@@ -751,16 +741,6 @@
           }
           break;
 
-        case JVM_CONSTANT_Value:
-          if (tag == JVM_CONSTANT_Value) {
-          } else if (tag == JVM_CONSTANT_UnresolvedValue) {
-            tty->print_cr("Warning: entry was unresolved in the replay data");
-          } else {
-            report_error("Unexpected tag");
-            return;
-          }
-          break;
-
         case 0:
           if (parsed_two_word == i) continue;
 
--- a/src/hotspot/share/ci/ciStreams.hpp	Fri Mar 09 09:06:30 2018 -0800
+++ b/src/hotspot/share/ci/ciStreams.hpp	Fri Mar 09 12:52:30 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -249,12 +249,6 @@
     return tag.is_unresolved_klass();
   }
 
-  // True if the klass-using bytecode points to an unresolved value type
-  bool is_unresolved_value_type() const {
-    constantTag tag = get_constant_pool_tag(get_klass_index());
-    return tag.is_unresolved_value_type();
-  }
-
   // If this bytecode is one of get_field, get_static, put_field,
   // or put_static, get the referenced field.
   ciField* get_field(bool& will_link);
--- a/src/hotspot/share/ci/ciTypeFlow.cpp	Fri Mar 09 09:06:30 2018 -0800
+++ b/src/hotspot/share/ci/ciTypeFlow.cpp	Fri Mar 09 12:52:30 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -777,7 +777,7 @@
   bool will_link;
   ciKlass* klass = str->get_klass(will_link);
   assert(klass->is_valuetype(), "should be value type");
-  if (!will_link || str->is_unresolved_value_type()) {
+  if (!will_link) {
     trap(str, klass, str->get_klass_index());
   } else {
     push_object(klass);
--- a/src/hotspot/share/classfile/classFileParser.cpp	Fri Mar 09 09:06:30 2018 -0800
+++ b/src/hotspot/share/classfile/classFileParser.cpp	Fri Mar 09 12:52:30 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -156,12 +156,6 @@
         cp->klass_index_at_put(index, name_index);
         break;
       }
-      case JVM_CONSTANT_Value: {  // may be present in a retransform situation
-        cfs->guarantee_more(3, CHECK);  // name_index, tag/access_flags
-        const u2 name_index = cfs->get_u2_fast();
-        cp->value_type_index_at_put(index, name_index);
-        break;
-      }
       case JVM_CONSTANT_Fieldref: {
         cfs->guarantee_more(5, CHECK);  // class_index, name_and_type_index, tag/access_flags
         const u2 class_index = cfs->get_u2_fast();
@@ -426,9 +420,8 @@
   for (index = 1; index < length; index++) {          // Index 0 is unused
     const jbyte tag = cp->tag_at(index).value();
     switch (tag) {
-      case JVM_CONSTANT_Class:
-      case JVM_CONSTANT_Value: {
-        ShouldNotReachHere();     // Only JVM_CONSTANT_[Class|Value]Index should be present
+      case JVM_CONSTANT_Class: {
+        ShouldNotReachHere();     // Only JVM_CONSTANT_ClassIndex should be present
         break;
       }
       case JVM_CONSTANT_Fieldref:
@@ -439,10 +432,7 @@
         if (!_need_verify) break;
         const int klass_ref_index = cp->klass_ref_index_at(index);
         const int name_and_type_ref_index = cp->name_and_type_ref_index_at(index);
-        check_property(valid_klass_reference_at(klass_ref_index) ||
-                       (valid_value_type_reference_at(klass_ref_index) &&
-                        ((EnableMVT && (tag == JVM_CONSTANT_Fieldref)) ||
-                         EnableValhalla)),
+        check_property(valid_klass_reference_at(klass_ref_index),
                        "Invalid constant pool index %u in class file %s",
                        klass_ref_index, CHECK);
         check_property(valid_cp_range(name_and_type_ref_index, length) &&
@@ -499,14 +489,6 @@
         cp->unresolved_klass_at_put(index, class_index, num_klasses++);
         break;
       }
-      case JVM_CONSTANT_ValueIndex: {
-        const int class_index = cp->value_type_index_at(index);
-        check_property(valid_symbol_at(class_index),
-          "Invalid constant pool index %u in class file %s",
-          class_index, CHECK);
-        cp->unresolved_value_type_at_put(index, class_index, num_klasses++);
-        break;
-      }
       case JVM_CONSTANT_StringIndex: {
         const int string_index = cp->string_index_at(index);
         check_property(valid_symbol_at(string_index),
@@ -651,8 +633,7 @@
   for (index = 1; index < length; index++) {
     const jbyte tag = cp->tag_at(index).value();
     switch (tag) {
-      case JVM_CONSTANT_UnresolvedClass:
-      case JVM_CONSTANT_UnresolvedValue: {
+      case JVM_CONSTANT_UnresolvedClass: {
         const Symbol* const class_name = cp->klass_name_at(index);
         // check the name, even if _cp_patches will overwrite it
         verify_legal_class_name(class_name, CHECK);
@@ -3188,16 +3169,14 @@
     // Inner class index
     const u2 inner_class_info_index = cfs->get_u2_fast();
     check_property(
-      (valid_klass_reference_at(inner_class_info_index) ||
-       (EnableValhalla && valid_value_type_reference_at(inner_class_info_index))),
+      valid_klass_reference_at(inner_class_info_index),
       "inner_class_info_index %u has bad constant type in class file %s",
       inner_class_info_index, CHECK_0);
     // Outer class index
     const u2 outer_class_info_index = cfs->get_u2_fast();
     check_property(
       outer_class_info_index == 0 ||
-        (valid_klass_reference_at(outer_class_info_index) ||
-         (EnableValhalla && valid_value_type_reference_at(outer_class_info_index))),
+        valid_klass_reference_at(outer_class_info_index),
       "outer_class_info_index %u has bad constant type in class file %s",
       outer_class_info_index, CHECK_0);
     // Inner class name
@@ -3686,15 +3665,14 @@
                    super_class_index,
                    CHECK_NULL);
   } else {
-    check_property((valid_klass_reference_at(super_class_index) ||
-                    ((EnableValhalla || EnableMVT) && valid_value_type_reference_at(super_class_index))),
+    check_property(valid_klass_reference_at(super_class_index),
                    "Invalid superclass index %u in class file %s",
                    super_class_index,
                    CHECK_NULL);
     // The class name should be legal because it is checked when parsing constant pool.
     // However, make sure it is not an array type.
     bool is_array = false;
-    if (cp->tag_at(super_class_index).is_klass() || cp->tag_at(super_class_index).is_value_type()) {
+    if (cp->tag_at(super_class_index).is_klass()) {
       super_klass = InstanceKlass::cast(cp->resolved_klass_at(super_class_index));
       if (need_verify)
         is_array = super_klass->is_array_klass();
@@ -6186,9 +6164,8 @@
   // This class and superclass
   _this_class_index = stream->get_u2_fast();
   check_property(
-    (valid_cp_range(_this_class_index, cp_size) &&
-     (cp->tag_at(_this_class_index).is_unresolved_klass() ||
-      cp->tag_at(_this_class_index).is_unresolved_value_type())),
+    valid_cp_range(_this_class_index, cp_size) &&
+      cp->tag_at(_this_class_index).is_unresolved_klass(),
     "Invalid this class index %u in constant pool in class file %s",
     _this_class_index, CHECK);
 
@@ -6399,7 +6376,7 @@
     }
 
     // For a value class, only java/lang/Object is an acceptable super class
-    if ((EnableValhalla || EnableMVT) &&
+    if (EnableValhalla &&
         _access_flags.get_flags() & JVM_ACC_VALUE) {
       guarantee_property(_super_klass->name() == vmSymbols::java_lang_Object(),
                          "Value class can only inherit java/lang/Object",
--- a/src/hotspot/share/classfile/classFileParser.hpp	Fri Mar 09 09:06:30 2018 -0800
+++ b/src/hotspot/share/classfile/classFileParser.hpp	Fri Mar 09 12:52:30 2018 -0500
@@ -464,11 +464,6 @@
              _cp->tag_at(index).is_klass_or_reference();
   }
 
-  bool valid_value_type_reference_at(int index) const {
-    return _cp->is_within_bounds(index) &&
-             _cp->tag_at(index).is_value_type_or_reference();
-  }
-
   // Checks that the cpool index is in range and is a utf8
   bool valid_symbol_at(int cpool_index) const {
     return _cp->is_within_bounds(cpool_index) &&
--- a/src/hotspot/share/classfile/stackMapTable.cpp	Fri Mar 09 09:06:30 2018 -0800
+++ b/src/hotspot/share/classfile/stackMapTable.cpp	Fri Mar 09 12:52:30 2018 -0500
@@ -169,16 +169,10 @@
     int nconstants = _cp->length();
     if ((class_index <= 0 || class_index >= nconstants) ||
         (!_cp->tag_at(class_index).is_klass() &&
-         !_cp->tag_at(class_index).is_unresolved_klass() &&
-         !_cp->tag_at(class_index).is_value_type() &&
-         !_cp->tag_at(class_index).is_unresolved_value_type())) {
+         !_cp->tag_at(class_index).is_unresolved_klass())) {
       _stream->stackmap_format_error("bad class index", THREAD);
       return VerificationType::bogus_type();
     }
-    if (_cp->tag_at(class_index).is_value_type() ||
-        _cp->tag_at(class_index).is_unresolved_value_type()) {
-      return VerificationType::valuetype_type(_cp->klass_name_at(class_index));
-    }
     return VerificationType::reference_type(_cp->klass_name_at(class_index));
   }
   if (tag == ITEM_UninitializedThis) {
--- a/src/hotspot/share/classfile/systemDictionary.cpp	Fri Mar 09 09:06:30 2018 -0800
+++ b/src/hotspot/share/classfile/systemDictionary.cpp	Fri Mar 09 12:52:30 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -2091,13 +2091,7 @@
   }
 
   if (init_opt == SystemDictionary::ValhallaClasses) {
-    if (EnableValhalla || EnableMVT) {
-      must_load = true;
-    } else {
-      return false;
-    }
-  } else if (init_opt == SystemDictionary::MVTClasses) {
-    if (EnableMVT) {
+    if (EnableValhalla) {
       must_load = true;
     } else {
       return false;
--- a/src/hotspot/share/classfile/systemDictionary.hpp	Fri Mar 09 09:06:30 2018 -0800
+++ b/src/hotspot/share/classfile/systemDictionary.hpp	Fri Mar 09 12:52:30 2018 -0500
@@ -255,7 +255,6 @@
     Jvmci,                      // preload tried; error if not present if JVMCI enabled
 #endif
     ValhallaClasses,            // loaded if Valhalla enabled
-    MVTClasses,                 // loaded if MVT enabled
     OPTION_LIMIT,
     CEIL_LG_OPTION_LIMIT = 3    // OPTION_LIMIT <= (1<<CEIL_LG_OPTION_LIMIT)
   };
@@ -426,7 +425,6 @@
   static InstanceKlass* check_klass_Pre(InstanceKlass* k) { return check_klass(k); }
   static InstanceKlass* check_klass_Opt(InstanceKlass* k) { return k; }
   static InstanceKlass* check_klass_ValhallaClasses(InstanceKlass* k) { return k; }
-  static InstanceKlass* check_klass_MVTClasses(InstanceKlass* k) { return k; }
 
   JVMCI_ONLY(static InstanceKlass* check_klass_Jvmci(InstanceKlass* k) { return k; })
 
--- a/src/hotspot/share/interpreter/bytecodeInterpreter.cpp	Fri Mar 09 09:06:30 2018 -0800
+++ b/src/hotspot/share/interpreter/bytecodeInterpreter.cpp	Fri Mar 09 12:52:30 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -2357,15 +2357,12 @@
             }
 
           case JVM_CONSTANT_Class:
-          case JVM_CONSTANT_Value:
             VERIFY_OOP(constants->resolved_klass_at(index)->java_mirror());
             SET_STACK_OBJECT(constants->resolved_klass_at(index)->java_mirror(), 0);
             break;
 
           case JVM_CONSTANT_UnresolvedClass:
           case JVM_CONSTANT_UnresolvedClassInError:
-          case JVM_CONSTANT_UnresolvedValue:
-          case JVM_CONSTANT_UnresolvedValueInError:
             CALL_VM(InterpreterRuntime::ldc(THREAD, wide), handle_exception);
             SET_STACK_OBJECT(THREAD->vm_result(), 0);
             THREAD->set_vm_result(NULL);
--- a/src/hotspot/share/interpreter/bytecodeTracer.cpp	Fri Mar 09 09:06:30 2018 -0800
+++ b/src/hotspot/share/interpreter/bytecodeTracer.cpp	Fri Mar 09 12:52:30 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -331,12 +331,10 @@
   } else if (tag.is_string()) {
     const char* string = constants->string_at_noresolve(i);
     st->print_cr(" %s", string);
-  } else if (tag.is_klass() || tag.is_value_type()) {
+  } else if (tag.is_klass()) {
     st->print_cr(" %s", constants->resolved_klass_at(i)->external_name());
   } else if (tag.is_unresolved_klass()) {
     st->print_cr(" <unresolved klass at %d>", i);
-  } else if (tag.is_unresolved_value_type()) {
-    st->print_cr(" <unresolved value type at %d>", i);
   } else if (tag.is_method_type()) {
     int i2 = constants->method_type_index_at(i);
     st->print(" <MethodType> %d", i2);
--- a/src/hotspot/share/interpreter/interpreterRuntime.cpp	Fri Mar 09 09:06:30 2018 -0800
+++ b/src/hotspot/share/interpreter/interpreterRuntime.cpp	Fri Mar 09 12:52:30 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -116,9 +116,7 @@
   int index = wide ? last_frame.get_index_u2(Bytecodes::_ldc_w) : last_frame.get_index_u1(Bytecodes::_ldc);
   constantTag tag = pool->tag_at(index);
 
-  assert ((tag.is_unresolved_klass() || tag.is_klass() ||
-           tag.is_unresolved_value_type() || tag.is_value_type()),
-          "wrong ldc call");
+  assert (tag.is_unresolved_klass() || tag.is_klass(), "wrong ldc call");
   Klass* klass = pool->klass_at(index, CHECK);
     oop java_class = klass->java_mirror();
     thread->set_vm_result(java_class);
--- a/src/hotspot/share/jvmci/jvmciEnv.cpp	Fri Mar 09 09:06:30 2018 -0800
+++ b/src/hotspot/share/jvmci/jvmciEnv.cpp	Fri Mar 09 12:52:30 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -150,7 +150,7 @@
   if (found_klass == NULL && !cpool.is_null() && cpool->has_preresolution()) {
     // Look inside the constant pool for pre-resolved class entries.
     for (int i = cpool->length() - 1; i >= 1; i--) {
-      if (cpool->tag_at(i).is_klass() || cpool->tag_at(i).is_value_type()) {
+      if (cpool->tag_at(i).is_klass()) {
         Klass*  kls = cpool->resolved_klass_at(i);
         if (kls->name() == sym) {
           return kls;
--- a/src/hotspot/share/jvmci/vmStructs_jvmci.cpp	Fri Mar 09 09:06:30 2018 -0800
+++ b/src/hotspot/share/jvmci/vmStructs_jvmci.cpp	Fri Mar 09 12:52:30 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -398,7 +398,6 @@
   declare_constant(JVM_CONSTANT_Long)                                     \
   declare_constant(JVM_CONSTANT_Double)                                   \
   declare_constant(JVM_CONSTANT_Class)                                    \
-  declare_constant(JVM_CONSTANT_Value)                                    \
   declare_constant(JVM_CONSTANT_String)                                   \
   declare_constant(JVM_CONSTANT_Fieldref)                                 \
   declare_constant(JVM_CONSTANT_Methodref)                                \
@@ -412,12 +411,9 @@
   declare_constant(JVM_CONSTANT_Invalid)                                  \
   declare_constant(JVM_CONSTANT_InternalMin)                              \
   declare_constant(JVM_CONSTANT_UnresolvedClass)                          \
-  declare_constant(JVM_CONSTANT_UnresolvedValue)                          \
   declare_constant(JVM_CONSTANT_ClassIndex)                               \
-  declare_constant(JVM_CONSTANT_ValueIndex)                               \
   declare_constant(JVM_CONSTANT_StringIndex)                              \
   declare_constant(JVM_CONSTANT_UnresolvedClassInError)                   \
-  declare_constant(JVM_CONSTANT_UnresolvedValueInError)                   \
   declare_constant(JVM_CONSTANT_MethodHandleInError)                      \
   declare_constant(JVM_CONSTANT_MethodTypeInError)                        \
   declare_constant(JVM_CONSTANT_DynamicInError)                           \
--- a/src/hotspot/share/memory/vtBuffer.cpp	Fri Mar 09 09:06:30 2018 -0800
+++ b/src/hotspot/share/memory/vtBuffer.cpp	Fri Mar 09 12:52:30 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -46,7 +46,7 @@
 size_t VTBuffer::_size;
 
 void VTBuffer::init() {
-  if ((!(EnableValhalla || EnableMVT)) || ValueTypesBufferMaxMemory == 0) {
+  if ((!EnableValhalla) || ValueTypesBufferMaxMemory == 0) {
     _base = NULL;
     _commit_ptr = NULL;
     _size = 0;
--- a/src/hotspot/share/oops/constantPool.cpp	Fri Mar 09 09:06:30 2018 -0800
+++ b/src/hotspot/share/oops/constantPool.cpp	Fri Mar 09 12:52:30 2018 -0500
@@ -200,19 +200,10 @@
         unresolved_klass_at_put(i, class_index, num_klasses++);
       }
       break;
-    case JVM_CONSTANT_ValueIndex:
-      {
-        const int class_index = value_type_index_at(i);
-        unresolved_value_type_at_put(i, class_index, num_klasses++);
-      }
-      break;
 #ifndef PRODUCT
     case JVM_CONSTANT_Class:
     case JVM_CONSTANT_UnresolvedClass:
     case JVM_CONSTANT_UnresolvedClassInError:
-    case JVM_CONSTANT_Value:
-    case JVM_CONSTANT_UnresolvedValue:
-    case JVM_CONSTANT_UnresolvedValueInError:
       // All of these should have been reverted back to Unresolved before calling
       // this function.
       ShouldNotReachHere();
@@ -238,10 +229,9 @@
   // The interpreter assumes when the tag is stored, the klass is resolved
   // and the Klass* non-NULL, so we need hardware store ordering here.
   if (k != NULL) {
-    release_tag_at_put(class_index, (k->is_value() ? (jbyte)JVM_CONSTANT_Value : JVM_CONSTANT_Class));
+    release_tag_at_put(class_index, JVM_CONSTANT_Class);
   } else {
-    release_tag_at_put(class_index, (tag_at(class_index).is_value_type_or_reference() ?
-                                       JVM_CONSTANT_UnresolvedValue : JVM_CONSTANT_UnresolvedClass));
+    release_tag_at_put(class_index, JVM_CONSTANT_UnresolvedClass);
   }
 }
 
@@ -255,7 +245,7 @@
 
   // The interpreter assumes when the tag is stored, the klass is resolved
   // and the Klass* non-NULL, so we need hardware store ordering here.
-  release_tag_at_put(class_index, (k->is_value() ? (jbyte)JVM_CONSTANT_Value : JVM_CONSTANT_Class));
+  release_tag_at_put(class_index, JVM_CONSTANT_Class);
 }
 
 #if INCLUDE_CDS_JAVA_HEAP
@@ -454,14 +444,12 @@
   assert(this_cp->tag_at(name_index).is_symbol(), "sanity");
 
   Klass* klass = this_cp->resolved_klasses()->at(resolved_klass_index);
-
   if (klass != NULL) {
     return klass;
   }
 
   // This tag doesn't change back to unresolved class unless at a safepoint.
-  if (this_cp->tag_at(which).is_unresolved_klass_in_error() ||
-      this_cp->tag_at(which).is_unresolved_value_type_in_error()) {
+  if (this_cp->tag_at(which).is_unresolved_klass_in_error()) {
     // The original attempt to resolve this constant pool entry failed so find the
     // class of the original error and throw another error of the same class
     // (JVMS 5.4.3).
@@ -490,10 +478,7 @@
   // to resolve this constant pool entry fail with the same error (JVMS 5.4.3).
   if (HAS_PENDING_EXCEPTION) {
     if (save_resolution_error) {
-      bool is_value_type_tag = this_cp->tag_at(which).is_value_type_or_reference();
-      save_and_throw_exception(this_cp, which,
-                               constantTag((is_value_type_tag ? JVM_CONSTANT_UnresolvedValue : JVM_CONSTANT_UnresolvedClass)),
-                               CHECK_NULL);
+      save_and_throw_exception(this_cp, which, constantTag(JVM_CONSTANT_UnresolvedClass), CHECK_NULL);
       // If CHECK_NULL above doesn't return the exception, that means that
       // some other thread has beaten us and has resolved the class.
       // To preserve old behavior, we return the resolved class.
@@ -518,7 +503,7 @@
   // The interpreter assumes when the tag is stored, the klass is resolved
   // and the Klass* stored in _resolved_klasses is non-NULL, so we need
   // hardware store ordering here.
-  this_cp->release_tag_at_put(which, (k->is_value() ? (jbyte)JVM_CONSTANT_Value : JVM_CONSTANT_Class));
+  this_cp->release_tag_at_put(which, JVM_CONSTANT_Class);
   return k;
 }
 
@@ -756,7 +741,6 @@
   // Return specific message for the tag
   switch (tag.value()) {
   case JVM_CONSTANT_UnresolvedClass:
-  case JVM_CONSTANT_UnresolvedValue:
     // return the class name in the error message
     message = this_cp->klass_name_at(which);
     break;
@@ -811,7 +795,7 @@
                             (jbyte*)this_cp->tag_addr_at(which), (jbyte)tag.value());
     if (old_tag != error_tag && old_tag != tag.value()) {
       // MethodHandles and MethodType doesn't change to resolved version.
-      assert(this_cp->tag_at(which).is_klass() || this_cp->tag_at(which).is_value_type(), "Wrong tag value");
+      assert(this_cp->tag_at(which).is_klass(), "Wrong tag value");
       // Forget the exception and use the resolved class.
       CLEAR_PENDING_EXCEPTION;
     }
@@ -905,9 +889,6 @@
   case JVM_CONSTANT_UnresolvedClass:
   case JVM_CONSTANT_UnresolvedClassInError:
   case JVM_CONSTANT_Class:
-  case JVM_CONSTANT_UnresolvedValue:
-  case JVM_CONSTANT_UnresolvedValueInError:
-  case JVM_CONSTANT_Value:
     {
       assert(cache_index == _no_index_sentinel, "should not have been set");
       Klass* resolved = klass_at_impl(this_cp, index, true, CHECK_NULL);
@@ -1314,7 +1295,6 @@
 
   switch (t1) {
   case JVM_CONSTANT_Class:
-  case JVM_CONSTANT_Value:
   {
     Klass* k1 = klass_at(index1, CHECK_false);
     Klass* k2 = cp2->klass_at(index2, CHECK_false);
@@ -1333,16 +1313,6 @@
     }
   } break;
 
-  case JVM_CONSTANT_ValueIndex:
-  {
-    int recur1 = value_type_index_at(index1);
-    int recur2 = cp2->value_type_index_at(index2);
-    bool match = compare_entry_to(recur1, cp2, recur2, CHECK_false);
-    if (match) {
-      return true;
-    }
-  } break;
-
   case JVM_CONSTANT_Double:
   {
     jdouble d1 = double_at(index1);
@@ -1422,7 +1392,6 @@
   } break;
 
   case JVM_CONSTANT_UnresolvedClass:
-  case JVM_CONSTANT_UnresolvedValue:
   {
     Symbol* k1 = klass_name_at(index1);
     Symbol* k2 = cp2->klass_name_at(index2);
@@ -1692,12 +1661,6 @@
     to_cp->klass_index_at_put(to_i, ki);
   } break;
 
-  case JVM_CONSTANT_ValueIndex:
-  {
-    jint ki = from_cp->klass_index_at(from_i);
-    to_cp->klass_index_at_put(to_i, ki);
-  } break;
-
   case JVM_CONSTANT_Double:
   {
     jdouble d = from_cp->double_at(from_i);
@@ -1770,16 +1733,6 @@
     to_cp->klass_index_at_put(to_i, name_index);
   } break;
 
-  case JVM_CONSTANT_Value:
-  case JVM_CONSTANT_UnresolvedValue:
-  case JVM_CONSTANT_UnresolvedValueInError:
-  {
-    // Revert to JVM_CONSTANT_ValueIndex
-    int name_index = from_cp->klass_slot_at(from_i).name_index();
-    assert(from_cp->tag_at(name_index).is_symbol(), "sanity");
-    to_cp->value_type_index_at_put(to_i, name_index);
-  } break;
-
   case JVM_CONSTANT_String:
   {
     Symbol* s = from_cp->unresolved_string_at(from_i);
@@ -1904,8 +1857,7 @@
 
   if (tag.is_string()) {
     return string_at_noresolve(which);
-  } else if (tag.is_klass() || tag.is_unresolved_klass() ||
-             tag.is_value_type() || tag.is_unresolved_value_type()) {
+  } else if (tag.is_klass() || tag.is_unresolved_klass()) {
     return klass_name_at(which)->as_C_string();
   } else if (tag.is_symbol()) {
     return symbol_at(which)->as_C_string();
@@ -1987,12 +1939,6 @@
         ent_size = 2;
         break;
       }
-      case JVM_CONSTANT_Value: {
-        idx1 = Bytes::get_Java_u2(bytes);
-        printf("class        #%03d", idx1);
-        ent_size = 2;
-        break;
-      }
       case JVM_CONSTANT_String: {
         idx1 = Bytes::get_Java_u2(bytes);
         printf("String       #%03d", idx1);
@@ -2039,18 +1985,6 @@
         printf("UnresolvedClassInErr: %s", WARN_MSG);
         break;
       }
-      case JVM_CONSTANT_ValueIndex: {
-        printf("ValueIndex  %s", WARN_MSG);
-        break;
-      }
-      case JVM_CONSTANT_UnresolvedValue: {
-        printf("UnresolvedValue: %s", WARN_MSG);
-        break;
-      }
-      case JVM_CONSTANT_UnresolvedValueInError: {
-        printf("UnresolvedValueInErr: %s", WARN_MSG);
-        break;
-      }
       case JVM_CONSTANT_StringIndex: {
         printf("StringIndex: %s", WARN_MSG);
         break;
@@ -2081,10 +2015,6 @@
     case JVM_CONSTANT_ClassIndex:
     case JVM_CONSTANT_UnresolvedClass:
     case JVM_CONSTANT_UnresolvedClassInError:
-    case JVM_CONSTANT_Value:
-    case JVM_CONSTANT_ValueIndex:
-    case JVM_CONSTANT_UnresolvedValue:
-    case JVM_CONSTANT_UnresolvedValueInError:
     case JVM_CONSTANT_StringIndex:
     case JVM_CONSTANT_MethodType:
     case JVM_CONSTANT_MethodTypeInError:
@@ -2143,14 +2073,6 @@
         DBG(printf("adding class entry %s = %d\n", sym->as_utf8(), idx));
         break;
       }
-      case JVM_CONSTANT_Value:
-      case JVM_CONSTANT_UnresolvedValue:
-      case JVM_CONSTANT_UnresolvedValueInError: {
-        Symbol* sym = klass_name_at(idx);
-        classmap->add_entry(sym, idx);
-        DBG(printf("adding value type entry %s = %d\n", sym->as_utf8(), idx));
-        break;
-      }
       case JVM_CONSTANT_Long:
       case JVM_CONSTANT_Double: {
         idx++; // Both Long and Double take two cpool slots
@@ -2238,17 +2160,6 @@
         DBG(printf("JVM_CONSTANT_Class: idx=#%03hd, %s", idx1, sym->as_utf8()));
         break;
       }
-      case JVM_CONSTANT_Value:
-      case JVM_CONSTANT_UnresolvedValue:
-      case JVM_CONSTANT_UnresolvedValueInError: {
-        *bytes = JVM_CONSTANT_Value;
-        Symbol* sym = klass_name_at(idx);
-        idx1 = tbl->symbol_to_value(sym);
-        assert(idx1 != 0, "Have not found a hashtable entry");
-        Bytes::put_Java_u2((address) (bytes+1), idx1);
-        DBG(printf("JVM_CONSTANT_Value: idx=#%03hd, %s", idx1, sym->as_utf8()));
-        break;
-      }
       case JVM_CONSTANT_String: {
         *bytes = JVM_CONSTANT_String;
         Symbol* sym = unresolved_string_at(idx);
@@ -2283,13 +2194,6 @@
         DBG(printf("JVM_CONSTANT_ClassIndex: %hd", idx1));
         break;
       }
-      case JVM_CONSTANT_ValueIndex: {
-        *bytes = JVM_CONSTANT_Value;
-        idx1 = value_type_index_at(idx);
-        Bytes::put_Java_u2((address) (bytes+1), idx1);
-        DBG(printf("JVM_CONSTANT_ValueIndex: %hd", idx1));
-        break;
-      }
       case JVM_CONSTANT_StringIndex: {
         *bytes = JVM_CONSTANT_String;
         idx1 = string_index_at(idx);
@@ -2408,8 +2312,7 @@
   guarantee(cp->pool_holder() != NULL, "must be fully loaded");
 
   for (int i = 0; i< cp->length();  i++) {
-    if (cp->tag_at(i).is_unresolved_klass() ||
-        cp->tag_at(i).is_unresolved_value_type()) {
+    if (cp->tag_at(i).is_unresolved_klass()) {
       // This will force loading of the class
       Klass* klass = cp->klass_at(i, CHECK);
       if (klass->is_instance_klass()) {
@@ -2468,13 +2371,6 @@
         st->print(" {" PTR_FORMAT "}", p2i(k));
       }
       break;
-    case JVM_CONSTANT_Value :
-      { Klass* k = klass_at(index, CATCH);
-        guarantee(k != NULL, "need klass");
-        k->print_value_on(st);
-        st->print(" {" PTR_FORMAT "}", p2i(k));
-      }
-      break;
     case JVM_CONSTANT_Fieldref :
     case JVM_CONSTANT_Methodref :
     case JVM_CONSTANT_InterfaceMethodref :
@@ -2509,17 +2405,14 @@
     case JVM_CONSTANT_Utf8 :
       symbol_at(index)->print_value_on(st);
       break;
-    case JVM_CONSTANT_ClassIndex:
-    case JVM_CONSTANT_ValueIndex: {
+    case JVM_CONSTANT_ClassIndex: {
         int name_index = *int_at_addr(index);
         st->print("klass_index=%d ", name_index);
         symbol_at(name_index)->print_value_on(st);
       }
       break;
     case JVM_CONSTANT_UnresolvedClass :               // fall-through
-    case JVM_CONSTANT_UnresolvedClassInError :
-    case JVM_CONSTANT_UnresolvedValue :
-    case JVM_CONSTANT_UnresolvedValueInError : {
+    case JVM_CONSTANT_UnresolvedClassInError: {
         CPKlassSlot kslot = klass_slot_at(index);
         int resolved_klass_index = kslot.resolved_klass_index();
         int name_index = kslot.name_index();
@@ -2616,8 +2509,7 @@
   guarantee(is_constantPool(), "object must be constant pool");
   for (int i = 0; i< length();  i++) {
     constantTag tag = tag_at(i);
-    if (tag.is_klass() || tag.is_unresolved_klass() ||
-        tag.is_value_type() || tag.is_unresolved_value_type()) {
+    if (tag.is_klass() || tag.is_unresolved_klass()) {
       guarantee(klass_name_at(i)->refcount() != 0, "should have nonzero reference count");
     } else if (tag.is_symbol()) {
       CPSlot entry = slot_at(i);
--- a/src/hotspot/share/oops/constantPool.hpp	Fri Mar 09 09:06:30 2018 -0800
+++ b/src/hotspot/share/oops/constantPool.hpp	Fri Mar 09 12:52:30 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -65,9 +65,8 @@
   }
 };
 
-// This represents a (JVM_CONSTANT_Class, JVM_CONSTANT_UnresolvedClass or JVM_CONSTANT_UnresolvedClassInError) or
-//                   (JVM_CONSTANT_Value, JVM_CONSTANT_UnresolvedValue or JVM_CONSTANT_UnresolvedValueInError)
-// slot in the constant pool.
+// This represents a JVM_CONSTANT_Class, JVM_CONSTANT_UnresolvedClass, or
+// JVM_CONSTANT_UnresolvedClassInError slot in the constant pool.
 class CPKlassSlot VALUE_OBJ_CLASS_SPEC {
   // cp->symbol_at(_name_index) gives the name of the class.
   int _name_index;
@@ -146,8 +145,7 @@
 
   CPSlot slot_at(int which) const {
     assert(is_within_bounds(which), "index out of bounds");
-    assert(!tag_at(which).is_unresolved_klass() && !tag_at(which).is_unresolved_klass_in_error() &&
-           !tag_at(which).is_unresolved_value_type() && !tag_at(which).is_unresolved_value_type_in_error(), "Corrupted constant pool");
+    assert(!tag_at(which).is_unresolved_klass() && !tag_at(which).is_unresolved_klass_in_error(), "Corrupted constant pool");
     // Uses volatile because the klass slot changes without a lock.
     intptr_t adr = OrderAccess::load_acquire(obj_at_addr_raw(which));
     assert(adr != 0 || which == 0, "cp entry for klass should not be zero");
@@ -280,12 +278,6 @@
     *int_at_addr(which) = name_index;
   }
 
-  // For temporary use while constructing constant pool. Used during a retransform/class redefinition as well.
-  void value_type_index_at_put(int which, int name_index) {
-    tag_at_put(which, JVM_CONSTANT_ValueIndex);
-    *int_at_addr(which) = name_index;
-  }
-
   // Anonymous class support:
   void klass_at_put(int class_index, int name_index, int resolved_klass_index, Klass* k, Symbol* name);
   void klass_at_put(int class_index, Klass* k);
@@ -299,15 +291,6 @@
       build_int_from_shorts((jushort)resolved_klass_index, (jushort)name_index);
   }
 
-  void unresolved_value_type_at_put(int which, int name_index, int resolved_klass_index) {
-    release_tag_at_put(which, JVM_CONSTANT_UnresolvedValue);
-
-    assert((name_index & 0xffff0000) == 0, "must be");
-    assert((resolved_klass_index & 0xffff0000) == 0, "must be");
-    *int_at_addr(which) =
-      build_int_from_shorts((jushort)resolved_klass_index, (jushort)name_index);
-  }
-
   void method_handle_index_at_put(int which, int ref_kind, int ref_index) {
     tag_at_put(which, JVM_CONSTANT_MethodHandle);
     *int_at_addr(which) = ((jint) ref_index<<16) | ref_kind;
@@ -413,8 +396,7 @@
   }
 
   CPKlassSlot klass_slot_at(int which) const {
-    assert(tag_at(which).is_unresolved_klass() || tag_at(which).is_klass() ||
-           tag_at(which).is_unresolved_value_type() || tag_at(which).is_value_type(),
+    assert(tag_at(which).is_unresolved_klass() || tag_at(which).is_klass(),
            "Corrupted constant pool");
     int value = *int_at_addr(which);
     int name_index = extract_high_short_from_int(value);
@@ -428,7 +410,7 @@
   }
 
   Klass* resolved_klass_at(int which) const {  // Used by Compiler
-    guarantee(tag_at(which).is_klass() || tag_at(which).is_value_type(), "Corrupted constant pool");
+    guarantee(tag_at(which).is_klass(), "Corrupted constant pool");
     // Must do an acquire here in case another thread resolved the klass
     // behind our back, lest we later load stale values thru the oop.
     CPKlassSlot kslot = klass_slot_at(which);
@@ -445,11 +427,6 @@
     // will be initialized later by a call to initialize_unresolved_klasses().
     unresolved_klass_at_put(which, name_index, CPKlassSlot::_temp_resolved_klass_index);
   }
-  void temp_unresolved_value_type_at_put(int which, int name_index) {
-    // Used only during constant pool merging for class redefinition. The resolved klass index
-    // will be initialized later by a call to initialize_unresolved_klasses().
-    unresolved_value_type_at_put(which, name_index, CPKlassSlot::_temp_resolved_klass_index);
-  }
 
   jint int_at(int which) {
     assert(tag_at(which).is_int(), "Corrupted constant pool");
@@ -899,11 +876,6 @@
     return *int_at_addr(which);
   }
 
-  jint value_type_index_at(int which) {
-    assert(tag_at(which).is_value_type_index(), "Corrupted constant pool");
-    return *int_at_addr(which);
-  }
-
   jint string_index_at(int which) {
     assert(tag_at(which).is_string_index(), "Corrupted constant pool");
     return *int_at_addr(which);
--- a/src/hotspot/share/oops/generateOopMap.cpp	Fri Mar 09 09:06:30 2018 -0800
+++ b/src/hotspot/share/oops/generateOopMap.cpp	Fri Mar 09 12:52:30 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -1592,8 +1592,6 @@
     case Bytecodes::_jsr:               do_jsr(itr->dest());         break;
     case Bytecodes::_jsr_w:             do_jsr(itr->dest_w());       break;
 
-
-
     case Bytecodes::_getstatic:         do_field(true,  true, itr->get_index_u2_cpcache(), itr->bci()); break;
     case Bytecodes::_putstatic:         do_field(false, true, itr->get_index_u2_cpcache(), itr->bci()); break;
     case Bytecodes::_getfield:          do_field(true,  false, itr->get_index_u2_cpcache(), itr->bci()); break;
@@ -1891,7 +1889,7 @@
 #endif
   CellTypeState   cts;
   if (is_reference_type(bt)) {  // could be T_ARRAY with condy
-    assert(!tag.is_string_index() && !tag.is_klass_index() && !tag.is_value_type_index(), "Unexpected index tag");
+    assert(!tag.is_string_index() && !tag.is_klass_index(), "Unexpected index tag");
     cts = CellTypeState::make_line_ref(bci);
   } else {
     cts = valCTS;
--- a/src/hotspot/share/oops/method.cpp	Fri Mar 09 09:06:30 2018 -0800
+++ b/src/hotspot/share/oops/method.cpp	Fri Mar 09 12:52:30 2018 -0500
@@ -748,8 +748,7 @@
 
 
 bool Method::is_klass_loaded_by_klass_index(int klass_index) const {
-  if( constants()->tag_at(klass_index).is_unresolved_klass() ||
-      constants()->tag_at(klass_index).is_unresolved_value_type() ) {
+  if( constants()->tag_at(klass_index).is_unresolved_klass()) {
     Thread *thread = Thread::current();
     Symbol* klass_name = constants()->klass_name_at(klass_index);
     Handle loader(thread, method_holder()->class_loader());
@@ -765,8 +764,7 @@
   int klass_index = constants()->klass_ref_index_at(refinfo_index);
   if (must_be_resolved) {
     // Make sure klass is resolved in constantpool.
-    if (constants()->tag_at(klass_index).is_unresolved_klass() ||
-        constants()->tag_at(klass_index).is_unresolved_value_type()) {
+    if (constants()->tag_at(klass_index).is_unresolved_klass()) {
       return false;
     }
   }
--- a/src/hotspot/share/opto/compile.cpp	Fri Mar 09 09:06:30 2018 -0800
+++ b/src/hotspot/share/opto/compile.cpp	Fri Mar 09 12:52:30 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -4151,7 +4151,7 @@
     return SSC_full_test;       // Let caller generate the general case.
   }
 
-  if (!EnableMVT && !EnableValhalla && superk == env()->Object_klass()) {
+  if (!EnableValhalla && superk == env()->Object_klass()) {
     return SSC_always_true;     // (0) this test cannot fail
   }
 
--- a/src/hotspot/share/opto/type.cpp	Fri Mar 09 09:06:30 2018 -0800
+++ b/src/hotspot/share/opto/type.cpp	Fri Mar 09 12:52:30 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -604,7 +604,7 @@
 
   TypeNarrowKlass::NULL_PTR = TypeNarrowKlass::make( TypePtr::NULL_PTR );
 
-  // TypeValueTypePtr::NOTNULL = (EnableValhalla || EnableMVT) ? TypeValueTypePtr::make(TypePtr::NotNull, current->env()->___Value_klass()->as_value_klass()) : NULL;
+  // TypeValueTypePtr::NOTNULL = EnableValhalla ? TypeValueTypePtr::make(TypePtr::NotNull, current->env()->___Value_klass()->as_value_klass()) : NULL;
   TypeValueTypePtr::NOTNULL = NULL;
 
   mreg2type[Op_Node] = Type::BOTTOM;
@@ -655,7 +655,7 @@
 
   TypeKlassPtr::OBJECT = TypeKlassPtr::make(TypePtr::NotNull, current->env()->Object_klass(), Offset(0) );
   TypeKlassPtr::OBJECT_OR_NULL = TypeKlassPtr::make(TypePtr::BotPTR, current->env()->Object_klass(), Offset(0) );
-  TypeKlassPtr::BOTTOM = (EnableValhalla || EnableMVT) ? TypeKlassPtr::make(TypePtr::BotPTR, NULL, Offset(0)) : TypeKlassPtr::OBJECT_OR_NULL;
+  TypeKlassPtr::BOTTOM = EnableValhalla ? TypeKlassPtr::make(TypePtr::BotPTR, NULL, Offset(0)) : TypeKlassPtr::OBJECT_OR_NULL;
   // TypeKlassPtr::VALUE = TypeKlassPtr::make(TypePtr::NotNull, current->env()->___Value_klass(), Offset(0));
   TypeKlassPtr::VALUE = NULL;
 
--- a/src/hotspot/share/prims/jvm.cpp	Fri Mar 09 09:06:30 2018 -0800
+++ b/src/hotspot/share/prims/jvm.cpp	Fri Mar 09 12:52:30 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -1916,8 +1916,7 @@
   constantPoolHandle cp = constantPoolHandle(THREAD, reflect_ConstantPool::get_cp(JNIHandles::resolve_non_null(obj)));
   bounds_check(cp, index, CHECK_NULL);
   constantTag tag = cp->tag_at(index);
-  if (!tag.is_klass() && !tag.is_unresolved_klass() &&
-      !tag.is_value_type() && !tag.is_unresolved_value_type()) {
+  if (!tag.is_klass() && !tag.is_unresolved_klass()) {
     THROW_MSG_0(vmSymbols::java_lang_IllegalArgumentException(), "Wrong type at constant pool index");
   }
   Klass* k = cp->klass_at(index, CHECK_NULL);
@@ -1931,8 +1930,7 @@
   constantPoolHandle cp = constantPoolHandle(THREAD, reflect_ConstantPool::get_cp(JNIHandles::resolve_non_null(obj)));
   bounds_check(cp, index, CHECK_NULL);
   constantTag tag = cp->tag_at(index);
-  if (!tag.is_klass() && !tag.is_unresolved_klass() &&
-      !tag.is_value_type() && !tag.is_unresolved_value_type()) {
+  if (!tag.is_klass() && !tag.is_unresolved_klass()) {
     THROW_MSG_0(vmSymbols::java_lang_IllegalArgumentException(), "Wrong type at constant pool index");
   }
   Klass* k = ConstantPool::klass_at_if_loaded(cp, index);
@@ -2209,9 +2207,6 @@
   // sun.reflect.ConstantPool will return only tags from the JVM spec, not internal ones.
   if (tag.is_klass_or_reference()) {
       result = JVM_CONSTANT_Class;
-  } else if (tag.is_value_type_or_reference()) {
-      // Return Class, JVM_CONSTANT_Value not externally visible
-      result = JVM_CONSTANT_Class;
   } else if (tag.is_string_index()) {
       result = JVM_CONSTANT_String;
   } else if (tag.is_method_type_in_error()) {
@@ -2328,8 +2323,7 @@
     ConstantPool* cp = InstanceKlass::cast(k)->constants();
     for (int index = cp->length() - 1; index >= 0; index--) {
       constantTag tag = cp->tag_at(index);
-      // For a value type return Class, JVM_CONSTANT_Value not externally visible
-      types[index] = (tag.is_unresolved_klass() || tag.is_unresolved_value_type()) ? JVM_CONSTANT_Class : tag.value();
+      types[index] = tag.is_unresolved_klass() ? JVM_CONSTANT_Class : tag.value();
     }
   }
 JVM_END
--- a/src/hotspot/share/prims/jvmtiRedefineClasses.cpp	Fri Mar 09 09:06:30 2018 -0800
+++ b/src/hotspot/share/prims/jvmtiRedefineClasses.cpp	Fri Mar 09 12:52:30 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -332,29 +332,6 @@
       (*merge_cp_length_p)++;
     } break;
 
-    // this is an indirect CP entry so it needs special handling
-    case JVM_CONSTANT_Value:
-    case JVM_CONSTANT_UnresolvedValue:
-    {
-      int name_i = scratch_cp->klass_name_index_at(scratch_i);
-      int new_name_i = find_or_append_indirect_entry(scratch_cp, name_i, merge_cp_p,
-                                                     merge_cp_length_p, THREAD);
-
-      if (new_name_i != name_i) {
-        log_trace(redefine, class, constantpool)
-          ("Value type entry@%d name_index change: %d to %d",
-           *merge_cp_length_p, name_i, new_name_i);
-      }
-
-      (*merge_cp_p)->temp_unresolved_value_type_at_put(*merge_cp_length_p, new_name_i);
-      if (scratch_i != *merge_cp_length_p) {
-        // The new entry in *merge_cp_p is at a different index than
-        // the new entry in scratch_cp so we need to map the index values.
-        map_index(scratch_cp, scratch_i, *merge_cp_length_p);
-      }
-      (*merge_cp_length_p)++;
-    } break;
-
     // these are direct CP entries so they can be directly appended,
     // but double and long take two constant pool entries
     case JVM_CONSTANT_Double:  // fall through
@@ -556,7 +533,6 @@
     // At this stage, Class or UnresolvedClass could be in scratch_cp, but not
     // ClassIndex
     case JVM_CONSTANT_ClassIndex: // fall through
-    case JVM_CONSTANT_ValueIndex: // fall through
 
     // Invalid is used as the tag for the second constant pool entry
     // occupied by JVM_CONSTANT_Double or JVM_CONSTANT_Long. It should
@@ -569,9 +545,6 @@
     // At this stage JVM_CONSTANT_UnresolvedClassInError should not be here
     case JVM_CONSTANT_UnresolvedClassInError: // fall through
 
-    // At this stage JVM_CONSTANT_UnresolvedValueInError should not be here
-    case JVM_CONSTANT_UnresolvedValueInError: // fall through
-
     default:
     {
       // leave a breadcrumb
@@ -1019,14 +992,12 @@
        int index1, const constantPoolHandle& cp2, int index2) {
 
   jbyte t1 = cp1->tag_at(index1).value();
-  if (t1 != JVM_CONSTANT_Class && t1 != JVM_CONSTANT_UnresolvedClass &&
-      t1 != JVM_CONSTANT_Value && t1 != JVM_CONSTANT_UnresolvedValue) {
+  if (t1 != JVM_CONSTANT_Class && t1 != JVM_CONSTANT_UnresolvedClass) {
     return false;  // wrong entry type; not our special case
   }
 
   jbyte t2 = cp2->tag_at(index2).value();
-  if (t2 != JVM_CONSTANT_Class && t2 != JVM_CONSTANT_UnresolvedClass &&
-      t2 != JVM_CONSTANT_Value && t2 != JVM_CONSTANT_UnresolvedValue) {
+  if (t2 != JVM_CONSTANT_Class && t2 != JVM_CONSTANT_UnresolvedClass) {
     return false;  // wrong entry type; not our special case
   }
 
@@ -1310,7 +1281,6 @@
     // perfect fit for ConstantPool*::copy_cp_to(), but we need to
     // handle one special case:
     // - revert JVM_CONSTANT_Class to JVM_CONSTANT_UnresolvedClass
-    // - revert JVM_CONSTANT_Value to JVM_CONSTANT_UnresolvedValue
     // This will make verification happy.
 
     int old_i;  // index into old_cp
@@ -1329,15 +1299,6 @@
           old_cp->klass_name_index_at(old_i));
         break;
 
-      case JVM_CONSTANT_Value:
-      case JVM_CONSTANT_UnresolvedValue:
-        // revert the copy to JVM_CONSTANT_UnresolvedValue
-        // May be resolving while calling this so do the same for
-        // JVM_CONSTANT_UnresolvedValue (klass_name_at() deals with transition)
-        (*merge_cp_p)->temp_unresolved_value_type_at_put(old_i,
-          old_cp->klass_name_index_at(old_i));
-        break;
-
       case JVM_CONSTANT_Double:
       case JVM_CONSTANT_Long:
         // just copy the entry to *merge_cp_p, but double and long take
--- a/src/hotspot/share/prims/jvmtiTagMap.cpp	Fri Mar 09 09:06:30 2018 -0800
+++ b/src/hotspot/share/prims/jvmtiTagMap.cpp	Fri Mar 09 12:52:30 2018 -0500
@@ -2896,7 +2896,7 @@
       ConstantPool* pool = ik->constants();
       for (int i = 1; i < pool->length(); i++) {
         constantTag tag = pool->tag_at(i).value();
-        if (tag.is_string() || tag.is_klass() || tag.is_value_type()) {
+        if (tag.is_string() || tag.is_klass()) {
           oop entry;
           if (tag.is_string()) {
             entry = pool->resolved_string_at(i);
--- a/src/hotspot/share/prims/methodComparator.cpp	Fri Mar 09 09:06:30 2018 -0800
+++ b/src/hotspot/share/prims/methodComparator.cpp	Fri Mar 09 12:52:30 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -281,11 +281,9 @@
       return false;
     if (_old_cp->is_pseudo_string_at(cpi_old) || _new_cp->is_pseudo_string_at(cpi_new))
       return (_old_cp->is_pseudo_string_at(cpi_old) == _new_cp->is_pseudo_string_at(cpi_new));
-  } else if (tag_old.is_klass() || tag_old.is_unresolved_klass() ||
-             tag_old.is_value_type() || tag_old.is_unresolved_value_type()) {
+  } else if (tag_old.is_klass() || tag_old.is_unresolved_klass()) {
     // tag_old should be klass - 4881222
-    if (! (tag_new.is_unresolved_klass() || tag_new.is_klass() ||
-           tag_new.is_unresolved_value_type() || tag_new.is_value_type()))
+    if (! (tag_new.is_unresolved_klass() || tag_new.is_klass()))
       return false;
     if (_old_cp->klass_at_noresolve(cpi_old) !=
         _new_cp->klass_at_noresolve(cpi_new))
--- a/src/hotspot/share/runtime/arguments.cpp	Fri Mar 09 09:06:30 2018 -0800
+++ b/src/hotspot/share/runtime/arguments.cpp	Fri Mar 09 12:52:30 2018 -0500
@@ -2351,7 +2351,7 @@
     warning("ValueTypeReturnedAsFields is not supported on this platform");
   }
 
-  if (EnableMVT || EnableValhalla) {
+  if (EnableValhalla) {
     // C1 has no support for value types
     if (!FLAG_IS_DEFAULT(TieredCompilation)) {
       warning("TieredCompilation disabled because value types are not supported by C1");
@@ -2359,12 +2359,6 @@
     FLAG_SET_CMDLINE(bool, TieredCompilation, false);
   }
 
-  if (EnableMVT && EnableValhalla) {
-    jio_fprintf(defaultStream::error_stream(),
-        "Conflicting combination in option list: EnableMVT and EnableValhalla cannot be both enabled at the same time");
-    status = false;
-  }
-
   return status;
 }
 
@@ -3257,11 +3251,6 @@
     }
   }
 
-  if (EnableMVT) {
-    if (!create_property("valhalla.enableMVT", "true", InternalProperty)) {
-      return JNI_ENOMEM;
-    }
-  }
   if (EnableValhalla) {
     if (!create_property("valhalla.enableValhalla", "true", InternalProperty)) {
       return JNI_ENOMEM;
@@ -3493,11 +3482,6 @@
   UNSUPPORTED_OPTION(TieredCompilation);
 #endif
 
-  if (EnableMVT &&
-      !create_numbered_property("jdk.module.addmods", "jdk.incubator.mvt", addmods_count++)) {
-    return JNI_ENOMEM;
-  }
-
 #if INCLUDE_JVMCI
   if (EnableJVMCI &&
       !create_numbered_property("jdk.module.addmods", "jdk.internal.vm.ci", addmods_count++)) {
@@ -4385,7 +4369,7 @@
     FLAG_SET_DEFAULT(UseLoopCounter, true);
   }
 
-  if ((!EnableMVT && !EnableValhalla) || is_interpreter_only()) {
+  if (!EnableValhalla || is_interpreter_only()) {
     // Disable calling convention optimizations if value types are not supported
     ValueTypePassFieldsAsArgs = false;
     ValueTypeReturnedAsFields = false;
--- a/src/hotspot/share/runtime/deoptimization.cpp	Fri Mar 09 09:06:30 2018 -0800
+++ b/src/hotspot/share/runtime/deoptimization.cpp	Fri Mar 09 12:52:30 2018 -0500
@@ -1529,8 +1529,7 @@
 #if COMPILER2_OR_JVMCI
 void Deoptimization::load_class_by_index(const constantPoolHandle& constant_pool, int index, TRAPS) {
   // in case of an unresolved klass entry, load the class.
-  if (constant_pool->tag_at(index).is_unresolved_klass() ||
-      constant_pool->tag_at(index).is_unresolved_value_type()) {
+  if (constant_pool->tag_at(index).is_unresolved_klass()) {
     Klass* tk = constant_pool->klass_at_ignore_error(index, CHECK);
     return;
   }
@@ -1719,8 +1718,7 @@
       bool unresolved = false;
       if (unloaded_class_index >= 0) {
         constantPoolHandle constants (THREAD, trap_method->constants());
-        if (constants->tag_at(unloaded_class_index).is_unresolved_klass() ||
-            constants->tag_at(unloaded_class_index).is_unresolved_value_type()) {
+        if (constants->tag_at(unloaded_class_index).is_unresolved_klass()) {
           class_name = constants->klass_name_at(unloaded_class_index);
           unresolved = true;
           if (xtty != NULL)
--- a/src/hotspot/share/runtime/fieldType.cpp	Fri Mar 09 09:06:30 2018 -0800
+++ b/src/hotspot/share/runtime/fieldType.cpp	Fri Mar 09 12:52:30 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -73,32 +73,6 @@
   return false;
 }
 
-static const char dvt_postfix[] = "$Value";
-static const int dvt_postfix_len = 6;
-
-bool FieldType::is_dvt_postfix(Symbol* signature) {
-  assert(strlen(dvt_postfix) == dvt_postfix_len, "Invariant");
-  int sig_length = signature->utf8_length();
-  int pos = sig_length - dvt_postfix_len;
-  if (pos <= 0) {
-    return false;
-  }
-  for (int i = 0; i < dvt_postfix_len; i++) {
-    if (signature->byte_at(pos) != dvt_postfix[i]) {
-      return false;
-    }
-    pos++;
-  }
-  return true;
-}
-
-char* FieldType::dvt_unmangle_vcc(Symbol* signature) {
-  assert(is_dvt_postfix(signature), "Unmangle that which is not managled");
-  char* str = signature->as_C_string();
-  str[signature->utf8_length() -dvt_postfix_len] = '\0';
-  return str;
-}
-
 BasicType FieldType::get_array_info(Symbol* signature, FieldArrayInfo& fd, TRAPS) {
   assert(basic_type(signature) == T_ARRAY, "must be array");
   int index = 1;
--- a/src/hotspot/share/runtime/fieldType.hpp	Fri Mar 09 09:06:30 2018 -0800
+++ b/src/hotspot/share/runtime/fieldType.hpp	Fri Mar 09 12:52:30 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -69,10 +69,6 @@
              (signature->byte_at(sig_length - 1) == ';'));
   }
 
-  // MVT name mangling, VM derived value type naming Foo->Foo$Value
-  static bool is_dvt_postfix(Symbol* signature);
-  static char* dvt_unmangle_vcc(Symbol* signature);
-
   // Parse field and extract array information. Works for T_ARRAY only.
   static BasicType get_array_info(Symbol* signature, FieldArrayInfo& ai, TRAPS);
 };
--- a/src/hotspot/share/runtime/globals.hpp	Fri Mar 09 09:06:30 2018 -0800
+++ b/src/hotspot/share/runtime/globals.hpp	Fri Mar 09 12:52:30 2018 -0500
@@ -4117,9 +4117,6 @@
   product(bool, EnableValhalla, false,                                      \
           "Enable experimental Valhalla features")                          \
                                                                             \
-  product(bool, EnableMVT, false,                                           \
-          "Enable experimental Minimal Value Types")                        \
-                                                                            \
   product_pd(bool, ValueTypePassFieldsAsArgs,                               \
              "Pass each value type field as an argument at calls")          \
                                                                             \
--- a/src/hotspot/share/runtime/vmStructs.cpp	Fri Mar 09 09:06:30 2018 -0800
+++ b/src/hotspot/share/runtime/vmStructs.cpp	Fri Mar 09 12:52:30 2018 -0500
@@ -2348,15 +2348,11 @@
   declare_constant(JVM_CONSTANT_InternalMin)                              \
   declare_constant(JVM_CONSTANT_UnresolvedClass)                          \
   declare_constant(JVM_CONSTANT_ClassIndex)                               \
-  declare_constant(JVM_CONSTANT_ValueIndex)                               \
   declare_constant(JVM_CONSTANT_StringIndex)                              \
   declare_constant(JVM_CONSTANT_UnresolvedClassInError)                   \
   declare_constant(JVM_CONSTANT_MethodHandleInError)                      \
   declare_constant(JVM_CONSTANT_MethodTypeInError)                        \
   declare_constant(JVM_CONSTANT_DynamicInError)                           \
-  declare_constant(JVM_CONSTANT_Value)                                    \
-  declare_constant(JVM_CONSTANT_UnresolvedValue)                          \
-  declare_constant(JVM_CONSTANT_UnresolvedValueInError)                   \
   declare_constant(JVM_CONSTANT_InternalMax)                              \
                                                                           \
   /*****************************/                                         \
--- a/src/hotspot/share/utilities/constantTag.cpp	Fri Mar 09 09:06:30 2018 -0800
+++ b/src/hotspot/share/utilities/constantTag.cpp	Fri Mar 09 12:52:30 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -57,12 +57,6 @@
     case JVM_CONSTANT_MethodTypeInError :
       return T_OBJECT;
 
-    case JVM_CONSTANT_Value :
-    case JVM_CONSTANT_ValueIndex :
-    case JVM_CONSTANT_UnresolvedValue :
-    case JVM_CONSTANT_UnresolvedValueInError :
-      return T_OBJECT; // Should this eventually be migrated to T_VALUETYPE?
-
     case JVM_CONSTANT_Dynamic :
     case JVM_CONSTANT_DynamicInError :
       assert(false, "Dynamic constant has no fixed basic type");
@@ -78,8 +72,6 @@
   switch (_tag) {
   case JVM_CONSTANT_UnresolvedClassInError:
     return JVM_CONSTANT_UnresolvedClass;
-  case JVM_CONSTANT_UnresolvedValueInError:
-    return JVM_CONSTANT_UnresolvedValue;
   case JVM_CONSTANT_MethodHandleInError:
     return JVM_CONSTANT_MethodHandle;
   case JVM_CONSTANT_MethodTypeInError:
@@ -96,8 +88,6 @@
   switch (_tag) {
   case JVM_CONSTANT_UnresolvedClass:
     return JVM_CONSTANT_UnresolvedClassInError;
-  case JVM_CONSTANT_UnresolvedValue:
-    return JVM_CONSTANT_UnresolvedValueInError;
   case JVM_CONSTANT_MethodHandle:
     return JVM_CONSTANT_MethodHandleInError;
   case JVM_CONSTANT_MethodType:
@@ -158,12 +148,6 @@
       return "Unresolved Class Index";
     case JVM_CONSTANT_StringIndex :
       return "Unresolved String Index";
-    case JVM_CONSTANT_Value :
-      return "Value Type";
-    case JVM_CONSTANT_UnresolvedValue :
-      return "Unresolved Value Type";
-    case JVM_CONSTANT_UnresolvedValueInError :
-      return "Unresolved Value Type Error";
     default:
       ShouldNotReachHere();
       return "Illegal";
--- a/src/hotspot/share/utilities/constantTag.hpp	Fri Mar 09 09:06:30 2018 -0800
+++ b/src/hotspot/share/utilities/constantTag.hpp	Fri Mar 09 12:52:30 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -44,11 +44,7 @@
   JVM_CONSTANT_MethodHandleInError      = 104,  // Error tag due to resolution error
   JVM_CONSTANT_MethodTypeInError        = 105,  // Error tag due to resolution error
   JVM_CONSTANT_DynamicInError           = 106,  // Error tag due to resolution error
-  JVM_CONSTANT_Value                    = 107,  // Internal derived value type
-  JVM_CONSTANT_ValueIndex               = 108,  // Temporary tag while construction constant pool, class redefinition
-  JVM_CONSTANT_UnresolvedValue          = 109,  // Temporary tag until actual use of derived value type
-  JVM_CONSTANT_UnresolvedValueInError   = 110,  // Error tag due to resolution error
-  JVM_CONSTANT_InternalMax              = 110   // Last implementation tag
+  JVM_CONSTANT_InternalMax              = 106   // Last implementation tag
 };
 
 
@@ -57,7 +53,6 @@
   jbyte _tag;
  public:
   bool is_klass() const             { return _tag == JVM_CONSTANT_Class; }
-  bool is_value_type() const        { return _tag == JVM_CONSTANT_Value; }
   bool is_field () const            { return _tag == JVM_CONSTANT_Fieldref; }
   bool is_method() const            { return _tag == JVM_CONSTANT_Methodref; }
   bool is_interface_method() const  { return _tag == JVM_CONSTANT_InterfaceMethodref; }
@@ -79,14 +74,6 @@
     return _tag == JVM_CONSTANT_UnresolvedClassInError;
   }
 
-  bool is_unresolved_value_type() const {
-    return _tag == JVM_CONSTANT_UnresolvedValue || _tag == JVM_CONSTANT_UnresolvedValueInError;
-  }
-
-  bool is_unresolved_value_type_in_error() const {
-    return _tag == JVM_CONSTANT_UnresolvedValueInError;
-  }
-
   bool is_method_handle_in_error() const {
     return _tag == JVM_CONSTANT_MethodHandleInError;
   }
@@ -99,7 +86,6 @@
   }
 
   bool is_klass_index() const       { return _tag == JVM_CONSTANT_ClassIndex; }
-  bool is_value_type_index() const  { return _tag == JVM_CONSTANT_ValueIndex; }
   bool is_string_index() const      { return _tag == JVM_CONSTANT_StringIndex; }
 
   bool is_klass_reference() const   { return is_klass_index() || is_unresolved_klass(); }
@@ -107,8 +93,6 @@
   bool is_field_or_method() const   { return is_field() || is_method() || is_interface_method(); }
   bool is_symbol() const            { return is_utf8(); }
 
-  bool is_value_type_or_reference() const { return is_value_type_index() || is_value_type() || is_unresolved_value_type(); }
-
   bool is_method_type() const       { return _tag == JVM_CONSTANT_MethodType; }
   bool is_method_handle() const     { return _tag == JVM_CONSTANT_MethodHandle; }
   bool is_dynamic_constant() const  { return _tag == JVM_CONSTANT_Dynamic; }
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantPool.java	Fri Mar 09 09:06:30 2018 -0800
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantPool.java	Fri Mar 09 12:52:30 2018 -0500
@@ -108,9 +108,6 @@
         Class(config().jvmConstantClass),
         UnresolvedClass(config().jvmConstantUnresolvedClass),
         UnresolvedClassInError(config().jvmConstantUnresolvedClassInError),
-        Value(config().jvmConstantValue),
-        UnresolvedValue(config().jvmConstantUnresolvedValue),
-        UnresolvedValueInError(config().jvmConstantUnresolvedValueInError),
         String(config().jvmConstantString),
         Fieldref(config().jvmConstantFieldref),
         MethodRef(config().jvmConstantMethodref),
@@ -518,9 +515,6 @@
             case Class:
             case UnresolvedClass:
             case UnresolvedClassInError:
-            case Value:
-            case UnresolvedValue:
-            case UnresolvedValueInError:
                 final int opcode = -1;  // opcode is not used
                 return lookupType(cpi, opcode);
             case String:
@@ -718,15 +712,12 @@
                 index = getUncachedKlassRefIndexAt(index);
                 // Read the tag only once because it could change between multiple reads.
                 final JVM_CONSTANT klassTag = getTagAt(index);
-                assert klassTag == JVM_CONSTANT.Class || klassTag == JVM_CONSTANT.UnresolvedClass || klassTag == JVM_CONSTANT.UnresolvedClassInError ||
-                       klassTag == JVM_CONSTANT.Value || klassTag == JVM_CONSTANT.UnresolvedValue || klassTag == JVM_CONSTANT.UnresolvedValueInError : klassTag;
+                assert klassTag == JVM_CONSTANT.Class || klassTag == JVM_CONSTANT.UnresolvedClass || klassTag == JVM_CONSTANT.UnresolvedClassInError
+                       : klassTag;
                 // fall through
             case Class:
             case UnresolvedClass:
             case UnresolvedClassInError:
-            case Value:
-            case UnresolvedValue:
-            case UnresolvedValueInError:
                 final HotSpotResolvedObjectTypeImpl type = compilerToVM().resolveTypeInPool(this, index);
                 Class<?> klass = type.mirror();
                 if (!klass.isPrimitive() && !klass.isArray()) {
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfig.java	Fri Mar 09 09:06:30 2018 -0800
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfig.java	Fri Mar 09 12:52:30 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -227,9 +227,6 @@
     final int jvmConstantClass = getConstant("JVM_CONSTANT_Class", Integer.class);
     final int jvmConstantUnresolvedClass = getConstant("JVM_CONSTANT_UnresolvedClass", Integer.class);
     final int jvmConstantUnresolvedClassInError = getConstant("JVM_CONSTANT_UnresolvedClassInError", Integer.class);
-    final int jvmConstantValue = getConstant("JVM_CONSTANT_Value", Integer.class);
-    final int jvmConstantUnresolvedValue = getConstant("JVM_CONSTANT_UnresolvedValue", Integer.class);
-    final int jvmConstantUnresolvedValueInError = getConstant("JVM_CONSTANT_UnresolvedValueInError", Integer.class);
     final int jvmConstantString = getConstant("JVM_CONSTANT_String", Integer.class);
     final int jvmConstantFieldref = getConstant("JVM_CONSTANT_Fieldref", Integer.class);
     final int jvmConstantMethodref = getConstant("JVM_CONSTANT_Methodref", Integer.class);
--- a/test/hotspot/jtreg/compiler/valhalla/valuetypes/TestBoundValueTypes.java	Fri Mar 09 09:06:30 2018 -0800
+++ b/test/hotspot/jtreg/compiler/valhalla/valuetypes/TestBoundValueTypes.java	Fri Mar 09 12:52:30 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -36,7 +36,7 @@
  * @modules java.base/jdk.experimental.value
  *          jdk.incubator.mvt
  * @compile -XDenableValueTypes ValueCapableClass2.java TestBoundValueTypes.java
- * @run main/othervm -XX:+EnableMVT -XX:CompileCommand=compileonly,compiler.valhalla.valuetypes.TestBoundValueTypes::*
+ * @run main/othervm -XX:CompileCommand=compileonly,compiler.valhalla.valuetypes.TestBoundValueTypes::*
  *                   -XX:CompileCommand=compileonly,java.lang.invoke.*::* compiler.valhalla.valuetypes.TestBoundValueTypes
  */
 public class TestBoundValueTypes {
--- a/test/hotspot/jtreg/compiler/valhalla/valuetypes/TestMinimalValueTypes.java	Fri Mar 09 09:06:30 2018 -0800
+++ b/test/hotspot/jtreg/compiler/valhalla/valuetypes/TestMinimalValueTypes.java	Fri Mar 09 12:52:30 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -46,27 +46,27 @@
  * @run main ClassFileInstaller jdk.test.lib.Platform
  * @run main/othervm/timeout=120 -Xbootclasspath/a:. -ea -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions
  *                   -XX:+UnlockExperimentalVMOptions -XX:+WhiteBoxAPI -XX:+AlwaysIncrementalInline
- *                   -XX:+EnableMVT -XX:+ValueTypePassFieldsAsArgs -XX:+ValueTypeReturnedAsFields -XX:+ValueArrayFlatten
+ *                   -XX:+ValueTypePassFieldsAsArgs -XX:+ValueTypeReturnedAsFields -XX:+ValueArrayFlatten
  *                   -XX:ValueFieldMaxFlatSize=-1 -XX:ValueArrayElemMaxFlatSize=-1 -XX:ValueArrayElemMaxFlatOops=-1
  *                   compiler.valhalla.valuetypes.TestMinimalValueTypes
  * @run main/othervm/timeout=120 -Xbootclasspath/a:. -ea -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions
  *                   -XX:+UnlockExperimentalVMOptions -XX:+WhiteBoxAPI -XX:-UseCompressedOops
- *                   -XX:+EnableMVT -XX:-ValueTypePassFieldsAsArgs -XX:-ValueTypeReturnedAsFields -XX:+ValueArrayFlatten
+ *                   -XX:-ValueTypePassFieldsAsArgs -XX:-ValueTypeReturnedAsFields -XX:+ValueArrayFlatten
  *                   -XX:ValueFieldMaxFlatSize=-1 -XX:ValueArrayElemMaxFlatSize=-1 -XX:ValueArrayElemMaxFlatOops=-1
  *                   compiler.valhalla.valuetypes.TestMinimalValueTypes
  * @run main/othervm/timeout=120 -Xbootclasspath/a:. -ea -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions
  *                   -XX:+UnlockExperimentalVMOptions -XX:+WhiteBoxAPI -XX:-UseCompressedOops
- *                   -XX:+EnableMVT -XX:+ValueTypePassFieldsAsArgs -XX:+ValueTypeReturnedAsFields -XX:-ValueArrayFlatten
+ *                   -XX:+ValueTypePassFieldsAsArgs -XX:+ValueTypeReturnedAsFields -XX:-ValueArrayFlatten
  *                   -XX:ValueFieldMaxFlatSize=0 -XX:ValueArrayElemMaxFlatSize=0 -XX:ValueArrayElemMaxFlatOops=0
  *                   -DVerifyIR=false compiler.valhalla.valuetypes.TestMinimalValueTypes
  * @run main/othervm/timeout=120 -Xbootclasspath/a:. -ea -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions
  *                   -XX:+UnlockExperimentalVMOptions -XX:+WhiteBoxAPI -XX:+AlwaysIncrementalInline
- *                   -XX:+EnableMVT -XX:-ValueTypePassFieldsAsArgs -XX:-ValueTypeReturnedAsFields -XX:-ValueArrayFlatten
+ *                   -XX:-ValueTypePassFieldsAsArgs -XX:-ValueTypeReturnedAsFields -XX:-ValueArrayFlatten
  *                   -XX:ValueFieldMaxFlatSize=0 -XX:ValueArrayElemMaxFlatSize=0 -XX:ValueArrayElemMaxFlatOops=0
  *                   -DVerifyIR=false compiler.valhalla.valuetypes.TestMinimalValueTypes
  * @run main/othervm/timeout=120 -Xbootclasspath/a:. -ea -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions
  *                   -XX:+UnlockExperimentalVMOptions -XX:+WhiteBoxAPI
- *                   -XX:+EnableMVT -XX:+ValueTypePassFieldsAsArgs -XX:-ValueTypeReturnedAsFields -XX:+ValueArrayFlatten
+ *                   -XX:+ValueTypePassFieldsAsArgs -XX:-ValueTypeReturnedAsFields -XX:+ValueArrayFlatten
  *                   -XX:ValueFieldMaxFlatSize=0 -XX:ValueArrayElemMaxFlatSize=-1 -XX:ValueArrayElemMaxFlatOops=-1
  *                   -DVerifyIR=false compiler.valhalla.valuetypes.TestMinimalValueTypes
  */