Mercurial > hg > graal-jvmci-8
comparison src/share/vm/utilities/constantTag.hpp @ 8104:f16e75e0cf11
8000797: NPG: is_pseudo_string_at() doesn't work
Summary: Zero Symbol* for constant pool strings to indicate pseudo_strings (objects that aren't strings). Clean up JVM_CONSTANT_Object and unused flags.
Reviewed-by: sspitsyn, jrose
author | coleenp |
---|---|
date | Fri, 22 Feb 2013 08:36:42 -0500 |
parents | da91efe96a93 |
children | 28ca974cc21a |
comparison
equal
deleted
inserted
replaced
8103:5ed317b25e23 | 8104:f16e75e0cf11 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
41 JVM_CONSTANT_ClassIndex = 101, // Temporary tag while constructing constant pool | 41 JVM_CONSTANT_ClassIndex = 101, // Temporary tag while constructing constant pool |
42 JVM_CONSTANT_StringIndex = 102, // Temporary tag while constructing constant pool | 42 JVM_CONSTANT_StringIndex = 102, // Temporary tag while constructing constant pool |
43 JVM_CONSTANT_UnresolvedClassInError = 103, // Error tag due to resolution error | 43 JVM_CONSTANT_UnresolvedClassInError = 103, // Error tag due to resolution error |
44 JVM_CONSTANT_MethodHandleInError = 104, // Error tag due to resolution error | 44 JVM_CONSTANT_MethodHandleInError = 104, // Error tag due to resolution error |
45 JVM_CONSTANT_MethodTypeInError = 105, // Error tag due to resolution error | 45 JVM_CONSTANT_MethodTypeInError = 105, // Error tag due to resolution error |
46 JVM_CONSTANT_Object = 106, // Required for BoundMethodHandle arguments. | 46 JVM_CONSTANT_InternalMax = 105 // Last implementation tag |
47 JVM_CONSTANT_InternalMax = 106 // Last implementation tag | |
48 }; | 47 }; |
49 | 48 |
50 | 49 |
51 class constantTag VALUE_OBJ_CLASS_SPEC { | 50 class constantTag VALUE_OBJ_CLASS_SPEC { |
52 private: | 51 private: |
82 } | 81 } |
83 | 82 |
84 bool is_klass_index() const { return _tag == JVM_CONSTANT_ClassIndex; } | 83 bool is_klass_index() const { return _tag == JVM_CONSTANT_ClassIndex; } |
85 bool is_string_index() const { return _tag == JVM_CONSTANT_StringIndex; } | 84 bool is_string_index() const { return _tag == JVM_CONSTANT_StringIndex; } |
86 | 85 |
87 bool is_object() const { return _tag == JVM_CONSTANT_Object; } | |
88 | |
89 bool is_klass_reference() const { return is_klass_index() || is_unresolved_klass(); } | 86 bool is_klass_reference() const { return is_klass_index() || is_unresolved_klass(); } |
90 bool is_klass_or_reference() const{ return is_klass() || is_klass_reference(); } | 87 bool is_klass_or_reference() const{ return is_klass() || is_klass_reference(); } |
91 bool is_field_or_method() const { return is_field() || is_method() || is_interface_method(); } | 88 bool is_field_or_method() const { return is_field() || is_method() || is_interface_method(); } |
92 bool is_symbol() const { return is_utf8(); } | 89 bool is_symbol() const { return is_utf8(); } |
93 | 90 |
96 bool is_invoke_dynamic() const { return _tag == JVM_CONSTANT_InvokeDynamic; } | 93 bool is_invoke_dynamic() const { return _tag == JVM_CONSTANT_InvokeDynamic; } |
97 | 94 |
98 bool is_loadable_constant() const { | 95 bool is_loadable_constant() const { |
99 return ((_tag >= JVM_CONSTANT_Integer && _tag <= JVM_CONSTANT_String) || | 96 return ((_tag >= JVM_CONSTANT_Integer && _tag <= JVM_CONSTANT_String) || |
100 is_method_type() || is_method_handle() || | 97 is_method_type() || is_method_handle() || |
101 is_unresolved_klass() || is_object()); | 98 is_unresolved_klass()); |
102 } | 99 } |
103 | 100 |
104 constantTag() { | 101 constantTag() { |
105 _tag = JVM_CONSTANT_Invalid; | 102 _tag = JVM_CONSTANT_Invalid; |
106 } | 103 } |