comparison src/share/vm/utilities/constantTag.hpp @ 1138:dd57230ba8fe

6893268: additional dynamic language related optimizations in C2 Summary: C2 needs some additional optimizations to be able to handle MethodHandle invokes and invokedynamic instructions at the best performance. Reviewed-by: kvn, never
author twisti
date Tue, 05 Jan 2010 15:21:25 +0100
parents ad8c8ca4ab0f
children c18cbe5936b8
comparison
equal deleted inserted replaced
1137:97125851f396 1138:dd57230ba8fe
34 JVM_CONSTANT_UnresolvedClass = 100, // Temporary tag until actual use 34 JVM_CONSTANT_UnresolvedClass = 100, // Temporary tag until actual use
35 JVM_CONSTANT_ClassIndex = 101, // Temporary tag while constructing constant pool 35 JVM_CONSTANT_ClassIndex = 101, // Temporary tag while constructing constant pool
36 JVM_CONSTANT_UnresolvedString = 102, // Temporary tag until actual use 36 JVM_CONSTANT_UnresolvedString = 102, // Temporary tag until actual use
37 JVM_CONSTANT_StringIndex = 103, // Temporary tag while constructing constant pool 37 JVM_CONSTANT_StringIndex = 103, // Temporary tag while constructing constant pool
38 JVM_CONSTANT_UnresolvedClassInError = 104, // Error tag due to resolution error 38 JVM_CONSTANT_UnresolvedClassInError = 104, // Error tag due to resolution error
39 JVM_CONSTANT_InternalMax = 104 // Last implementation tag 39 JVM_CONSTANT_Object = 105, // Required for BoundMethodHandle arguments.
40 JVM_CONSTANT_InternalMax = 105 // Last implementation tag
40 }; 41 };
41 42
42 43
43 class constantTag VALUE_OBJ_CLASS_SPEC { 44 class constantTag VALUE_OBJ_CLASS_SPEC {
44 private: 45 private:
68 69
69 bool is_klass_index() const { return _tag == JVM_CONSTANT_ClassIndex; } 70 bool is_klass_index() const { return _tag == JVM_CONSTANT_ClassIndex; }
70 bool is_unresolved_string() const { return _tag == JVM_CONSTANT_UnresolvedString; } 71 bool is_unresolved_string() const { return _tag == JVM_CONSTANT_UnresolvedString; }
71 bool is_string_index() const { return _tag == JVM_CONSTANT_StringIndex; } 72 bool is_string_index() const { return _tag == JVM_CONSTANT_StringIndex; }
72 73
74 bool is_object() const { return _tag == JVM_CONSTANT_Object; }
75
73 bool is_klass_reference() const { return is_klass_index() || is_unresolved_klass(); } 76 bool is_klass_reference() const { return is_klass_index() || is_unresolved_klass(); }
74 bool is_klass_or_reference() const{ return is_klass() || is_klass_reference(); } 77 bool is_klass_or_reference() const{ return is_klass() || is_klass_reference(); }
75 bool is_field_or_method() const { return is_field() || is_method() || is_interface_method(); } 78 bool is_field_or_method() const { return is_field() || is_method() || is_interface_method(); }
76 bool is_symbol() const { return is_utf8(); } 79 bool is_symbol() const { return is_utf8(); }
77 80