diff src/share/vm/utilities/constantTag.hpp @ 1913:3b2dea75431e

6984311: JSR 292 needs optional bootstrap method parameters Summary: Allow CONSTANT_InvokeDynamic nodes to have any number of extra operands. Reviewed-by: twisti
author jrose
date Sat, 30 Oct 2010 13:08:23 -0700
parents 083fde3b838e
children f95d63e2154a
line wrap: on
line diff
--- a/src/share/vm/utilities/constantTag.hpp	Sat Oct 30 12:19:07 2010 -0700
+++ b/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;
   }