3806 // Temporarily set up bytecode stream so we can append instructions
3807 // (only using the bci of this stream)
3808 scope_data()->set_stream(scope_data()->parent()->stream());
3809
3810 // Pass parameters into callee state: add assignments
3811 // note: this will also ensure that all arguments are computed before being passed
3812 ValueStack* callee_state = state();
3813 ValueStack* caller_state = state()->caller_state();
3814 for (int i = args_base; i < caller_state->stack_size(); ) {
3815 const int arg_no = i - args_base;
3816 Value arg = caller_state->stack_at_inc(i);
3817 store_local(callee_state, arg, arg_no);
3818 }
3819
3820 // Remove args from stack.
3821 // Note that we preserve locals state in case we can use it later
3822 // (see use of pop_scope() below)
3823 caller_state->truncate_stack(args_base);
3824 assert(callee_state->stack_size() == 0, "callee stack must be empty");
3825
3826 Value lock;
3827 BlockBegin* sync_handler;
3828
3829 // Inline the locking of the receiver if the callee is synchronized
3830 if (callee->is_synchronized()) {
3831 lock = callee->is_static() ? append(new Constant(new InstanceConstant(callee->holder()->java_mirror())))
3832 : state()->local_at(0);
3833 sync_handler = new BlockBegin(SynchronizationEntryBCI);
3834 inline_sync_entry(lock, sync_handler);
3835 }
3836
3837 if (compilation()->env()->dtrace_method_probes()) {
3838 Values* args = new Values(1);
3839 args->push(append(new Constant(new MethodConstant(method()))));
3840 append(new RuntimeCall(voidType, "dtrace_method_entry", CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_entry), args));
3841 }
3842
3843 if (profile_inlined_calls()) {
3844 profile_invocation(callee, copy_state_before_with_bci(SynchronizationEntryBCI));
3845 }
3846
3847 BlockBegin* callee_start_block = block_at(0);
|
3806 // Temporarily set up bytecode stream so we can append instructions
3807 // (only using the bci of this stream)
3808 scope_data()->set_stream(scope_data()->parent()->stream());
3809
3810 // Pass parameters into callee state: add assignments
3811 // note: this will also ensure that all arguments are computed before being passed
3812 ValueStack* callee_state = state();
3813 ValueStack* caller_state = state()->caller_state();
3814 for (int i = args_base; i < caller_state->stack_size(); ) {
3815 const int arg_no = i - args_base;
3816 Value arg = caller_state->stack_at_inc(i);
3817 store_local(callee_state, arg, arg_no);
3818 }
3819
3820 // Remove args from stack.
3821 // Note that we preserve locals state in case we can use it later
3822 // (see use of pop_scope() below)
3823 caller_state->truncate_stack(args_base);
3824 assert(callee_state->stack_size() == 0, "callee stack must be empty");
3825
3826 Value lock = NULL;
3827 BlockBegin* sync_handler = NULL;
3828
3829 // Inline the locking of the receiver if the callee is synchronized
3830 if (callee->is_synchronized()) {
3831 lock = callee->is_static() ? append(new Constant(new InstanceConstant(callee->holder()->java_mirror())))
3832 : state()->local_at(0);
3833 sync_handler = new BlockBegin(SynchronizationEntryBCI);
3834 inline_sync_entry(lock, sync_handler);
3835 }
3836
3837 if (compilation()->env()->dtrace_method_probes()) {
3838 Values* args = new Values(1);
3839 args->push(append(new Constant(new MethodConstant(method()))));
3840 append(new RuntimeCall(voidType, "dtrace_method_entry", CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_entry), args));
3841 }
3842
3843 if (profile_inlined_calls()) {
3844 profile_invocation(callee, copy_state_before_with_bci(SynchronizationEntryBCI));
3845 }
3846
3847 BlockBegin* callee_start_block = block_at(0);
|