# HG changeset patch # User jrose # Date 1327022439 28800 # Node ID 2017a13c9271ea213f55978e85c2c274242ab84c # Parent 364a6c04b8e5353e12d05e6620cfeea69c92df90# Parent f45d945367d435bd9a2e6a2b5dd0fdcd553a2b15 Merge diff -r 364a6c04b8e5 -r 2017a13c9271 hotspot/src/cpu/sparc/vm/methodHandles_sparc.cpp --- a/hotspot/src/cpu/sparc/vm/methodHandles_sparc.cpp Thu Jan 19 10:56:51 2012 -0800 +++ b/hotspot/src/cpu/sparc/vm/methodHandles_sparc.cpp Thu Jan 19 17:20:39 2012 -0800 @@ -1045,7 +1045,7 @@ |(1<is_in((address) rfp->saved_args_base())) { + if (Universe::heap()->is_in((address) rfp->saved_args_base())) { // Probably an interpreter frame. base_sp = (intptr_t*) saved_bp[frame::interpreter_frame_monitor_block_top_offset]; } @@ -1104,7 +1104,7 @@ |(1<.cpp -frame MethodHandles::ricochet_frame_sender(const frame& fr, RegisterMap *map) { - ShouldNotCallThis(); - return fr; -} -void MethodHandles::ricochet_frame_oops_do(const frame& fr, OopClosure* f, const RegisterMap* reg_map) { - ShouldNotCallThis(); -} -#endif //TARGET_ARCH_NYI_6939861 - - //------------------------------------------------------------------------------ // MethodHandles::ek_supported // @@ -251,28 +236,11 @@ case _adapter_unused_13: return false; // not defined yet case _adapter_prim_to_ref: - return UseRicochetFrames && conv_op_supported(java_lang_invoke_AdapterMethodHandle::OP_PRIM_TO_REF); + return conv_op_supported(java_lang_invoke_AdapterMethodHandle::OP_PRIM_TO_REF); case _adapter_collect_args: - return UseRicochetFrames && conv_op_supported(java_lang_invoke_AdapterMethodHandle::OP_COLLECT_ARGS); + return conv_op_supported(java_lang_invoke_AdapterMethodHandle::OP_COLLECT_ARGS); case _adapter_fold_args: - return UseRicochetFrames && conv_op_supported(java_lang_invoke_AdapterMethodHandle::OP_FOLD_ARGS); - case _adapter_opt_return_any: - return UseRicochetFrames; -#ifdef TARGET_ARCH_NYI_6939861 - // ports before 6939861 supported only three kinds of spread ops - case _adapter_spread_args: - // restrict spreads to three kinds: - switch (ek) { - case _adapter_opt_spread_0: - case _adapter_opt_spread_1: - case _adapter_opt_spread_more: - break; - default: - return false; - break; - } - break; -#endif //TARGET_ARCH_NYI_6939861 + return conv_op_supported(java_lang_invoke_AdapterMethodHandle::OP_FOLD_ARGS); } return true; } @@ -1988,9 +1956,6 @@ case _adapter_prim_to_ref: // boxer MH to use case _adapter_collect_args: // method handle which collects the args case _adapter_fold_args: // method handle which collects the args - if (!UseRicochetFrames) { - { err = "box/collect/fold operators are not supported"; break; } - } if (!java_lang_invoke_MethodHandle::is_instance(argument())) { err = "MethodHandle adapter argument required"; break; } arg_mtype = Handle(THREAD, java_lang_invoke_MethodHandle::type(argument())); @@ -2370,7 +2335,6 @@ case _adapter_prim_to_ref: { - assert(UseRicochetFrames, "else don't come here"); // vminfo will be the location to insert the return value vminfo = argslot; ek_opt = _adapter_opt_collect_ref; @@ -2436,20 +2400,6 @@ case _adapter_spread_args: { -#ifdef TARGET_ARCH_NYI_6939861 - // ports before 6939861 supported only three kinds of spread ops - if (!UseRicochetFrames) { - int array_size = slots_pushed + 1; - assert(array_size >= 0, ""); - vminfo = array_size; - switch (array_size) { - case 0: ek_opt = _adapter_opt_spread_0; break; - case 1: ek_opt = _adapter_opt_spread_1; break; - default: ek_opt = _adapter_opt_spread_more; break; - } - break; - } -#endif //TARGET_ARCH_NYI_6939861 // vminfo will be the required length of the array int array_size = (slots_pushed + 1) / (type2size[dest] == 2 ? 2 : 1); vminfo = array_size; @@ -2494,7 +2444,6 @@ case _adapter_collect_args: { - assert(UseRicochetFrames, "else don't come here"); int elem_slots = argument_slot_count(java_lang_invoke_MethodHandle::type(argument())); // vminfo will be the location to insert the return value vminfo = argslot; @@ -2563,7 +2512,6 @@ case _adapter_fold_args: { - assert(UseRicochetFrames, "else don't come here"); int elem_slots = argument_slot_count(java_lang_invoke_MethodHandle::type(argument())); // vminfo will be the location to insert the return value vminfo = argslot + elem_slots; diff -r 364a6c04b8e5 -r 2017a13c9271 hotspot/src/share/vm/prims/methodHandles.hpp --- a/hotspot/src/share/vm/prims/methodHandles.hpp Thu Jan 19 10:56:51 2012 -0800 +++ b/hotspot/src/share/vm/prims/methodHandles.hpp Thu Jan 19 17:20:39 2012 -0800 @@ -738,46 +738,6 @@ #ifdef TARGET_ARCH_ppc # include "methodHandles_ppc.hpp" #endif - -#ifdef TARGET_ARCH_NYI_6939861 - // Here are some backward compatible declarations until the 6939861 ports are updated. - #define _adapter_flyby (_EK_LIMIT + 10) - #define _adapter_ricochet (_EK_LIMIT + 11) - #define _adapter_opt_spread_1 _adapter_opt_spread_1_ref - #define _adapter_opt_spread_more _adapter_opt_spread_ref - enum { - _INSERT_NO_MASK = -1, - _INSERT_REF_MASK = 0, - _INSERT_INT_MASK = 1, - _INSERT_LONG_MASK = 3 - }; - static void get_ek_bound_mh_info(EntryKind ek, BasicType& arg_type, int& arg_mask, int& arg_slots) { - arg_type = ek_bound_mh_arg_type(ek); - arg_mask = 0; - arg_slots = type2size[arg_type];; - } - static void get_ek_adapter_opt_swap_rot_info(EntryKind ek, int& swap_bytes, int& rotate) { - int swap_slots = ek_adapter_opt_swap_slots(ek); - rotate = ek_adapter_opt_swap_mode(ek); - swap_bytes = swap_slots * Interpreter::stackElementSize; - } - static int get_ek_adapter_opt_spread_info(EntryKind ek) { - return ek_adapter_opt_spread_count(ek); - } - - static void insert_arg_slots(MacroAssembler* _masm, - RegisterOrConstant arg_slots, - int arg_mask, - Register argslot_reg, - Register temp_reg, Register temp2_reg, Register temp3_reg = noreg); - - static void remove_arg_slots(MacroAssembler* _masm, - RegisterOrConstant arg_slots, - Register argslot_reg, - Register temp_reg, Register temp2_reg, Register temp3_reg = noreg); - - static void trace_method_handle(MacroAssembler* _masm, const char* adaptername) PRODUCT_RETURN; -#endif //TARGET_ARCH_NYI_6939861 }; diff -r 364a6c04b8e5 -r 2017a13c9271 hotspot/src/share/vm/runtime/globals.hpp --- a/hotspot/src/share/vm/runtime/globals.hpp Thu Jan 19 10:56:51 2012 -0800 +++ b/hotspot/src/share/vm/runtime/globals.hpp Thu Jan 19 17:20:39 2012 -0800 @@ -3826,10 +3826,6 @@ develop(bool, StressMethodHandleWalk, false, \ "Process all method handles with MethodHandleWalk") \ \ - diagnostic(bool, UseRicochetFrames, true, \ - "use ricochet stack frames for method handle combination, " \ - "if the platform supports them") \ - \ experimental(bool, TrustFinalNonStaticFields, false, \ "trust final non-static declarations for constant folding") \ \ diff -r 364a6c04b8e5 -r 2017a13c9271 hotspot/src/share/vm/runtime/sharedRuntime.cpp --- a/hotspot/src/share/vm/runtime/sharedRuntime.cpp Thu Jan 19 10:56:51 2012 -0800 +++ b/hotspot/src/share/vm/runtime/sharedRuntime.cpp Thu Jan 19 17:20:39 2012 -0800 @@ -121,7 +121,6 @@ void SharedRuntime::generate_ricochet_blob() { if (!EnableInvokeDynamic) return; // leave it as a null -#ifndef TARGET_ARCH_NYI_6939861 // allocate space for the code ResourceMark rm; // setup code generation tools @@ -142,7 +141,6 @@ } _ricochet_blob = RicochetBlob::create(&buffer, bounce_offset, exception_offset, frame_size_in_words); -#endif }