src/share/vm/runtime/sharedRuntime.cpp

changeset 5784
190899198332
parent 5628
f98f5d48f511
child 5785
a5ac0873476c
equal deleted inserted replaced
5783:c1fbf21c7397 5784:190899198332
1 /* 1 /*
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
575 575
576 oop SharedRuntime::retrieve_receiver( Symbol* sig, frame caller ) { 576 oop SharedRuntime::retrieve_receiver( Symbol* sig, frame caller ) {
577 assert(caller.is_interpreted_frame(), ""); 577 assert(caller.is_interpreted_frame(), "");
578 int args_size = ArgumentSizeComputer(sig).size() + 1; 578 int args_size = ArgumentSizeComputer(sig).size() + 1;
579 assert(args_size <= caller.interpreter_frame_expression_stack_size(), "receiver must be on interpreter stack"); 579 assert(args_size <= caller.interpreter_frame_expression_stack_size(), "receiver must be on interpreter stack");
580 oop result = (oop) *caller.interpreter_frame_tos_at(args_size - 1); 580 oop result = cast_to_oop(*caller.interpreter_frame_tos_at(args_size - 1));
581 assert(Universe::heap()->is_in(result) && result->is_oop(), "receiver must be an oop"); 581 assert(Universe::heap()->is_in(result) && result->is_oop(), "receiver must be an oop");
582 return result; 582 return result;
583 } 583 }
584 584
585 585
2870 // Inflate so the displaced header becomes position-independent 2870 // Inflate so the displaced header becomes position-independent
2871 if (lock->displaced_header()->is_unlocked()) 2871 if (lock->displaced_header()->is_unlocked())
2872 ObjectSynchronizer::inflate_helper(kptr2->obj()); 2872 ObjectSynchronizer::inflate_helper(kptr2->obj());
2873 // Now the displaced header is free to move 2873 // Now the displaced header is free to move
2874 buf[i++] = (intptr_t)lock->displaced_header(); 2874 buf[i++] = (intptr_t)lock->displaced_header();
2875 buf[i++] = (intptr_t)kptr2->obj(); 2875 buf[i++] = cast_from_oop<intptr_t>(kptr2->obj());
2876 } 2876 }
2877 } 2877 }
2878 assert( i - max_locals == active_monitor_count*2, "found the expected number of monitors" ); 2878 assert( i - max_locals == active_monitor_count*2, "found the expected number of monitors" );
2879 2879
2880 return buf; 2880 return buf;

mercurial