< prev index next > src/hotspot/share/interpreter/interpreterRuntime.cpp
Print this page
// be shared by method invocation and synchronized blocks.
//%note synchronization_3
//%note monitor_1
JRT_ENTRY_NO_ASYNC(void, InterpreterRuntime::monitorenter(JavaThread* current, BasicObjectLock* elem))
+ if (!UseHeavyMonitors && UseFastLocking) {
+ // This is a hack to get around the limitation of registers in x86_32. We really
+ // send an oopDesc* instead of a BasicObjectLock*.
+ Handle h_obj(current, oop((reinterpret_cast<oopDesc*>(elem))));
+ assert(Universe::heap()->is_in_or_null(h_obj()),
+ "must be NULL or an object");
+ ObjectSynchronizer::enter(h_obj, NULL, current);
+ return;
+ }
#ifdef ASSERT
current->last_frame().interpreter_frame_verify_monitor(elem);
#endif
Handle h_obj(current, elem->obj());
assert(Universe::heap()->is_in_or_null(h_obj()),
< prev index next >