142 ((is_volatile ? 1 : 0) << is_volatile_shift) |
143 ((is_final ? 1 : 0) << is_final_shift),
144 field_index);
145 set_bytecode_1(get_code);
146 set_bytecode_2(put_code);
147 NOT_PRODUCT(verify(tty));
148 }
149
150 void ConstantPoolCacheEntry::set_parameter_size(int value) {
151 // This routine is called only in corner cases where the CPCE is not yet initialized.
152 // See AbstractInterpreter::deopt_continue_after_entry.
153 assert(_flags == 0 || parameter_size() == 0 || parameter_size() == value,
154 "size must not change: parameter_size=%d, value=%d", parameter_size(), value);
155 // Setting the parameter size by itself is only safe if the
156 // current value of _flags is 0, otherwise another thread may have
157 // updated it and we don't want to overwrite that value. Don't
158 // bother trying to update it once it's nonzero but always make
159 // sure that the final parameter size agrees with what was passed.
160 if (_flags == 0) {
161 intx newflags = (value & parameter_size_mask);
162 Atomic::cmpxchg(newflags, &_flags, (intx)0);
163 }
164 guarantee(parameter_size() == value,
165 "size must not change: parameter_size=%d, value=%d", parameter_size(), value);
166 }
167
168 void ConstantPoolCacheEntry::set_direct_or_vtable_call(Bytecodes::Code invoke_code,
169 const methodHandle& method,
170 int vtable_index,
171 bool sender_is_interface) {
172 bool is_vtable_call = (vtable_index >= 0); // FIXME: split this method on this boolean
173 assert(method->interpreter_entry() != NULL, "should have been set at this point");
174 assert(!method->is_obsolete(), "attempt to write obsolete method to cpCache");
175
176 int byte_no = -1;
177 bool change_to_virtual = false;
178 InstanceKlass* holder = NULL; // have to declare this outside the switch
179 switch (invoke_code) {
180 case Bytecodes::_invokeinterface:
181 holder = method->method_holder();
182 // check for private interface method invocations
|
142 ((is_volatile ? 1 : 0) << is_volatile_shift) |
143 ((is_final ? 1 : 0) << is_final_shift),
144 field_index);
145 set_bytecode_1(get_code);
146 set_bytecode_2(put_code);
147 NOT_PRODUCT(verify(tty));
148 }
149
150 void ConstantPoolCacheEntry::set_parameter_size(int value) {
151 // This routine is called only in corner cases where the CPCE is not yet initialized.
152 // See AbstractInterpreter::deopt_continue_after_entry.
153 assert(_flags == 0 || parameter_size() == 0 || parameter_size() == value,
154 "size must not change: parameter_size=%d, value=%d", parameter_size(), value);
155 // Setting the parameter size by itself is only safe if the
156 // current value of _flags is 0, otherwise another thread may have
157 // updated it and we don't want to overwrite that value. Don't
158 // bother trying to update it once it's nonzero but always make
159 // sure that the final parameter size agrees with what was passed.
160 if (_flags == 0) {
161 intx newflags = (value & parameter_size_mask);
162 Atomic::cmpxchg(&_flags, (intx)0, newflags);
163 }
164 guarantee(parameter_size() == value,
165 "size must not change: parameter_size=%d, value=%d", parameter_size(), value);
166 }
167
168 void ConstantPoolCacheEntry::set_direct_or_vtable_call(Bytecodes::Code invoke_code,
169 const methodHandle& method,
170 int vtable_index,
171 bool sender_is_interface) {
172 bool is_vtable_call = (vtable_index >= 0); // FIXME: split this method on this boolean
173 assert(method->interpreter_entry() != NULL, "should have been set at this point");
174 assert(!method->is_obsolete(), "attempt to write obsolete method to cpCache");
175
176 int byte_no = -1;
177 bool change_to_virtual = false;
178 InstanceKlass* holder = NULL; // have to declare this outside the switch
179 switch (invoke_code) {
180 case Bytecodes::_invokeinterface:
181 holder = method->method_holder();
182 // check for private interface method invocations
|