< prev index next >

src/hotspot/cpu/zero/cppInterpreter_zero.cpp

Print this page

        

@@ -271,16 +271,16 @@
   BasicObjectLock *monitor;
   monitor = NULL;
   if (method->is_synchronized()) {
     monitor = (BasicObjectLock*) istate->stack_base();
     oop lockee = monitor->obj();
-    markWord disp = lockee->mark().set_unlocked();
+    markOop disp = lockee->mark()->set_unlocked();
 
     monitor->lock()->set_displaced_header(disp);
-    if (lockee->cas_set_mark(markWord::from_pointer(monitor), disp) != disp) {
-      if (thread->is_lock_owned((address) disp.clear_lock_bits().to_pointer())) {
-        monitor->lock()->set_displaced_header(markWord::from_pointer(NULL));
+    if (lockee->cas_set_mark((markOop)monitor, disp) != disp) {
+      if (thread->is_lock_owned((address) disp->clear_lock_bits())) {
+        monitor->lock()->set_displaced_header(NULL);
       }
       else {
         CALL_VM_NOCHECK(InterpreterRuntime::monitorenter(thread, monitor));
         if (HAS_PENDING_EXCEPTION)
           goto unwind_and_return;

@@ -411,16 +411,16 @@
  unlock_unwind_and_return:
 
   // Unlock if necessary
   if (monitor) {
     BasicLock *lock = monitor->lock();
-    markWord header = lock->displaced_header();
+    markOop header = lock->displaced_header();
     oop rcvr = monitor->obj();
     monitor->set_obj(NULL);
 
-    if (header.to_pointer() != NULL) {
-      markWord old_header = markWord::encode(lock);
+    if (header != NULL) {
+      markOop old_header = markOopDesc::encode(lock);
       if (rcvr->cas_set_mark(header, old_header) != old_header) {
         monitor->set_obj(rcvr); {
           HandleMark hm(thread);
           CALL_VM_NOCHECK(InterpreterRuntime::monitorexit(thread, monitor));
         }
< prev index next >