comparison src/share/vm/ci/ciField.hpp @ 1339:09ac706c2623

Merge
author asaha
date Wed, 24 Mar 2010 17:16:33 -0700
parents dd57230ba8fe
children a8f9f091c219 c18cbe5936b8
comparison
equal deleted inserted replaced
1338:f5dd08ad65df 1339:09ac706c2623
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