hotspot/src/share/vm/utilities/constantTag.hpp
changeset 7114 65d21c4c6337
parent 6062 bab93afe9df7
child 7397 5b173b4ca846
--- a/hotspot/src/share/vm/utilities/constantTag.hpp	Sat Oct 30 12:19:07 2010 -0700
+++ b/hotspot/src/share/vm/utilities/constantTag.hpp	Sat Oct 30 13:08:23 2010 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2010, 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
@@ -82,6 +82,13 @@
   bool is_method_handle() const            { return _tag == JVM_CONSTANT_MethodHandle; }
   bool is_invoke_dynamic() const           { return _tag == JVM_CONSTANT_InvokeDynamic; }
 
+  bool is_loadable_constant() const {
+    return ((_tag >= JVM_CONSTANT_Integer && _tag <= JVM_CONSTANT_String) ||
+            is_method_type() || is_method_handle() ||
+            is_unresolved_klass() || is_unresolved_string() ||
+            is_object());
+  }
+
   constantTag() {
     _tag = JVM_CONSTANT_Invalid;
   }