src/cpu/x86/vm/methodHandles_x86.cpp

changeset 5800
dc261f466b6d
parent 4889
cc32ccaaf47f
child 5802
268e7a2178d7
     1.1 --- a/src/cpu/x86/vm/methodHandles_x86.cpp	Mon Sep 30 15:42:39 2013 -0700
     1.2 +++ b/src/cpu/x86/vm/methodHandles_x86.cpp	Fri Sep 27 13:36:25 2013 -0400
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -114,6 +114,11 @@
    1.11  void MethodHandles::jump_from_method_handle(MacroAssembler* _masm, Register method, Register temp,
    1.12                                              bool for_compiler_entry) {
    1.13    assert(method == rbx, "interpreter calling convention");
    1.14 +
    1.15 +   Label L_no_such_method;
    1.16 +   __ testptr(rbx, rbx);
    1.17 +   __ jcc(Assembler::zero, L_no_such_method);
    1.18 +
    1.19    __ verify_method_ptr(method);
    1.20  
    1.21    if (!for_compiler_entry && JvmtiExport::can_post_interpreter_events()) {
    1.22 @@ -138,6 +143,9 @@
    1.23    const ByteSize entry_offset = for_compiler_entry ? Method::from_compiled_offset() :
    1.24                                                       Method::from_interpreted_offset();
    1.25    __ jmp(Address(method, entry_offset));
    1.26 +
    1.27 +  __ bind(L_no_such_method);
    1.28 +  __ jump(RuntimeAddress(StubRoutines::throw_AbstractMethodError_entry()));
    1.29  }
    1.30  
    1.31  void MethodHandles::jump_to_lambda_form(MacroAssembler* _masm,

mercurial