< prev index next >
src/share/vm/oops/cpCache.cpp
Print this page
*** 124,144 ****
void ConstantPoolCacheEntry::set_parameter_size(int value) {
// This routine is called only in corner cases where the CPCE is not yet initialized.
// See AbstractInterpreter::deopt_continue_after_entry.
assert(_flags == 0 || parameter_size() == 0 || parameter_size() == value,
! err_msg("size must not change: parameter_size=%d, value=%d", parameter_size(), value));
// Setting the parameter size by itself is only safe if the
// current value of _flags is 0, otherwise another thread may have
// updated it and we don't want to overwrite that value. Don't
// bother trying to update it once it's nonzero but always make
// sure that the final parameter size agrees with what was passed.
if (_flags == 0) {
Atomic::cmpxchg_ptr((value & parameter_size_mask), &_flags, 0);
}
guarantee(parameter_size() == value,
! err_msg("size must not change: parameter_size=%d, value=%d", parameter_size(), value));
}
void ConstantPoolCacheEntry::set_direct_or_vtable_call(Bytecodes::Code invoke_code,
methodHandle method,
int vtable_index) {
--- 124,144 ----
void ConstantPoolCacheEntry::set_parameter_size(int value) {
// This routine is called only in corner cases where the CPCE is not yet initialized.
// See AbstractInterpreter::deopt_continue_after_entry.
assert(_flags == 0 || parameter_size() == 0 || parameter_size() == value,
! "size must not change: parameter_size=%d, value=%d", parameter_size(), value);
// Setting the parameter size by itself is only safe if the
// current value of _flags is 0, otherwise another thread may have
// updated it and we don't want to overwrite that value. Don't
// bother trying to update it once it's nonzero but always make
// sure that the final parameter size agrees with what was passed.
if (_flags == 0) {
Atomic::cmpxchg_ptr((value & parameter_size_mask), &_flags, 0);
}
guarantee(parameter_size() == value,
! "size must not change: parameter_size=%d, value=%d", parameter_size(), value);
}
void ConstantPoolCacheEntry::set_direct_or_vtable_call(Bytecodes::Code invoke_code,
methodHandle method,
int vtable_index) {
*** 591,601 ****
#ifdef ASSERT
// invokedynamic and invokehandle have more entries; check if they
// all point to the same constant pool cache entry.
for (int entry = 1; entry < ConstantPoolCacheEntry::_indy_resolved_references_entries; entry++) {
const int cpci_next = invokedynamic_references_map[ref + entry];
! assert(cpci == cpci_next, err_msg_res("%d == %d", cpci, cpci_next));
}
#endif
entry_at(cpci)->initialize_resolved_reference_index(ref);
ref += ConstantPoolCacheEntry::_indy_resolved_references_entries - 1; // skip extra entries
}
--- 591,601 ----
#ifdef ASSERT
// invokedynamic and invokehandle have more entries; check if they
// all point to the same constant pool cache entry.
for (int entry = 1; entry < ConstantPoolCacheEntry::_indy_resolved_references_entries; entry++) {
const int cpci_next = invokedynamic_references_map[ref + entry];
! assert(cpci == cpci_next, "%d == %d", cpci, cpci_next);
}
#endif
entry_at(cpci)->initialize_resolved_reference_index(ref);
ref += ConstantPoolCacheEntry::_indy_resolved_references_entries - 1; // skip extra entries
}
< prev index next >