hotspot/src/share/vm/utilities/constantTag.cpp
changeset 24334 36096f7271f4
parent 20677 ff4fc393de4c
child 24424 2658d7834c6e
--- a/hotspot/src/share/vm/utilities/constantTag.cpp	Mon May 05 20:17:19 2014 +0200
+++ b/hotspot/src/share/vm/utilities/constantTag.cpp	Mon May 05 19:53:00 2014 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -76,6 +76,20 @@
 }
 
 
+jbyte constantTag::error_value() const {
+  switch (_tag) {
+  case JVM_CONSTANT_UnresolvedClass:
+    return JVM_CONSTANT_UnresolvedClassInError;
+  case JVM_CONSTANT_MethodHandle:
+    return JVM_CONSTANT_MethodHandleInError;
+  case JVM_CONSTANT_MethodType:
+    return JVM_CONSTANT_MethodTypeInError;
+  default:
+    ShouldNotReachHere();
+    return JVM_CONSTANT_Invalid;
+  }
+}
+
 const char* constantTag::internal_name() const {
   switch (_tag) {
     case JVM_CONSTANT_Invalid :