Mercurial > hg > graal-jvmci-8
comparison src/share/vm/ci/ciField.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 | d1605aabd0a1 |
children | a8f9f091c219 c18cbe5936b8 |
comparison
equal
deleted
inserted
replaced
1137:97125851f396 | 1138:dd57230ba8fe |
---|---|
136 // Note: the check for case 4 is not yet implemented. | 136 // Note: the check for case 4 is not yet implemented. |
137 bool is_constant() { return _is_constant; } | 137 bool is_constant() { return _is_constant; } |
138 | 138 |
139 // Get the constant value of this field. | 139 // Get the constant value of this field. |
140 ciConstant constant_value() { | 140 ciConstant constant_value() { |
141 assert(is_constant(), "illegal call to constant_value()"); | 141 assert(is_static() && is_constant(), "illegal call to constant_value()"); |
142 return _constant_value; | 142 return _constant_value; |
143 } | |
144 | |
145 // Get the constant value of non-static final field in the given | |
146 // object. | |
147 ciConstant constant_value_of(ciObject* object) { | |
148 assert(!is_static() && is_constant(), "only if field is non-static constant"); | |
149 assert(object->is_instance(), "must be instance"); | |
150 return object->as_instance()->field_value(this); | |
143 } | 151 } |
144 | 152 |
145 // Check for link time errors. Accessing a field from a | 153 // Check for link time errors. Accessing a field from a |
146 // certain class via a certain bytecode may or may not be legal. | 154 // certain class via a certain bytecode may or may not be legal. |
147 // This call checks to see if an exception may be raised by | 155 // This call checks to see if an exception may be raised by |