3919 // Note that we preserve locals state in case we can use it later |
3919 // Note that we preserve locals state in case we can use it later |
3920 // (see use of pop_scope() below) |
3920 // (see use of pop_scope() below) |
3921 caller_state->truncate_stack(args_base); |
3921 caller_state->truncate_stack(args_base); |
3922 assert(callee_state->stack_size() == 0, "callee stack must be empty"); |
3922 assert(callee_state->stack_size() == 0, "callee stack must be empty"); |
3923 |
3923 |
3924 Value lock; |
3924 Value lock = NULL; |
3925 BlockBegin* sync_handler; |
3925 BlockBegin* sync_handler = NULL; |
3926 |
3926 |
3927 // Inline the locking of the receiver if the callee is synchronized |
3927 // Inline the locking of the receiver if the callee is synchronized |
3928 if (callee->is_synchronized()) { |
3928 if (callee->is_synchronized()) { |
3929 lock = callee->is_static() ? append(new Constant(new InstanceConstant(callee->holder()->java_mirror()))) |
3929 lock = callee->is_static() ? append(new Constant(new InstanceConstant(callee->holder()->java_mirror()))) |
3930 : state()->local_at(0); |
3930 : state()->local_at(0); |