comparison src/cpu/sparc/vm/methodHandles_sparc.cpp @ 2116:d810e9a3fc33

7010180: JSR 292 InvokeDynamicPrintArgs fails with: assert(_adapter == NULL) failed: init'd to NULL Reviewed-by: never
author twisti
date Mon, 10 Jan 2011 00:56:39 -0800
parents 8d0b933dda2d
children 28bf941f445e
comparison
equal deleted inserted replaced
2115:78e248949382 2116:d810e9a3fc33
1 /* 1 /*
2 * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2008, 2011, 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.
393 //------------------------------------------------------------------------------ 393 //------------------------------------------------------------------------------
394 // MethodHandles::generate_method_handle_stub 394 // MethodHandles::generate_method_handle_stub
395 // 395 //
396 // Generate an "entry" field for a method handle. 396 // Generate an "entry" field for a method handle.
397 // This determines how the method handle will respond to calls. 397 // This determines how the method handle will respond to calls.
398 void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHandles::EntryKind ek, TRAPS) { 398 void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHandles::EntryKind ek) {
399 // Here is the register state during an interpreted call, 399 // Here is the register state during an interpreted call,
400 // as set up by generate_method_handle_interpreter_entry(): 400 // as set up by generate_method_handle_interpreter_entry():
401 // - G5: garbage temp (was MethodHandle.invoke methodOop, unused) 401 // - G5: garbage temp (was MethodHandle.invoke methodOop, unused)
402 // - G3: receiver method handle 402 // - G3: receiver method handle
403 // - O5_savedSP: sender SP (must preserve) 403 // - O5_savedSP: sender SP (must preserve)
445 { 445 {
446 // Not a real MH entry, but rather shared code for raising an 446 // Not a real MH entry, but rather shared code for raising an
447 // exception. Since we use a C2I adapter to set up the 447 // exception. Since we use a C2I adapter to set up the
448 // interpreter state, arguments are expected in compiler 448 // interpreter state, arguments are expected in compiler
449 // argument registers. 449 // argument registers.
450 methodHandle mh(raise_exception_method()); 450 assert(raise_exception_method(), "must be set");
451 address c2i_entry = methodOopDesc::make_adapters(mh, CATCH); 451 address c2i_entry = raise_exception_method()->get_c2i_entry();
452 assert(c2i_entry, "method must be linked");
452 453
453 __ mov(O5_savedSP, SP); // Cut the stack back to where the caller started. 454 __ mov(O5_savedSP, SP); // Cut the stack back to where the caller started.
454 455
455 Label L_no_method; 456 Label L_no_method;
456 // FIXME: fill in _raise_exception_method with a suitable sun.dyn method 457 // FIXME: fill in _raise_exception_method with a suitable sun.dyn method