Mercurial > hg > shark > hotspot
changeset 2253:dc88189cc93a
More refactoring
author | Gary Benson <gbenson@redhat.com> |
---|---|
date | Tue, 01 Mar 2011 11:36:56 +0000 |
parents | a8faa91173e7 |
children | 6029e0ac16fb |
files | src/cpu/zero/vm/cppInterpreter_zero.cpp |
diffstat | 1 files changed, 11 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/cpu/zero/vm/cppInterpreter_zero.cpp Tue Mar 01 11:33:15 2011 +0000 +++ b/src/cpu/zero/vm/cppInterpreter_zero.cpp Tue Mar 01 11:36:56 2011 +0000 @@ -831,12 +831,7 @@ sun_dyn_AdapterMethodHandle::conversion(method_handle) >> sun_dyn_AdapterMethodHandle::CONV_STACK_MOVE_SHIFT; - // Move everything down - for (int i = arg_slot - 1; i >= 0; i--) - SET_VMSLOTS_SLOT(VMSLOTS_SLOT(i), i + num_slots); - - // Deallocate the space - stack->set_sp(stack->sp() + num_slots); + remove_vmslots(arg_slot, num_slots, THREAD); // doesn't trap vmslots = stack->sp(); // unused, but let the compiler figure that out } break; @@ -949,6 +944,16 @@ } void CppInterpreter::remove_vmslots(int first_slot, int num_slots, TRAPS) { + JavaThread *thread = (JavaThread *) THREAD; + ZeroStack *stack = thread->zero_stack(); + intptr_t *vmslots = stack->sp(); + + // Move everything down + for (int i = first_slot - 1; i >= 0; i--) + SET_VMSLOTS_SLOT(VMSLOTS_SLOT(i), i + num_slots); + + // Deallocate the space + stack->set_sp(stack->sp() + num_slots); } BasicType CppInterpreter::result_type_of_handle(oop method_handle) {