Print this page


Split
Expand all
Collapse all
          --- old/src/cpu/x86/vm/templateTable_x86_32.cpp
          +++ new/src/cpu/x86/vm/templateTable_x86_32.cpp
↓ open down ↓ 3066 lines elided ↑ open up ↑
3067 3067    __ restore_bcp();      // rsi must be correct for exception handler   (was destroyed)
3068 3068    __ restore_locals();   // make sure locals pointer is correct as well (was destroyed)
3069 3069    __ call_VM(noreg, CAST_FROM_FN_PTR(address,
3070 3070                     InterpreterRuntime::throw_IncompatibleClassChangeError));
3071 3071    // the call_VM checks for exception, so we should never return here.
3072 3072    __ should_not_reach_here();
3073 3073  }
3074 3074  
3075 3075  void TemplateTable::invokedynamic(int byte_no) {
3076 3076    transition(vtos, vtos);
     3077 +  assert(byte_no == f1_oop, "use this argument");
3077 3078  
3078 3079    if (!EnableInvokeDynamic) {
3079 3080      // We should not encounter this bytecode if !EnableInvokeDynamic.
3080 3081      // The verifier will stop it.  However, if we get past the verifier,
3081 3082      // this will stop the thread in a reasonable way, without crashing the JVM.
3082 3083      __ call_VM(noreg, CAST_FROM_FN_PTR(address,
3083 3084                       InterpreterRuntime::throw_IncompatibleClassChangeError));
3084 3085      // the call_VM checks for exception, so we should never return here.
3085 3086      __ should_not_reach_here();
3086 3087      return;
3087 3088    }
3088 3089  
3089      -  assert(byte_no == f1_oop, "use this argument");
3090 3090    prepare_invoke(rax, rbx, byte_no);
3091 3091  
3092 3092    // rax: CallSite object (f1)
3093 3093    // rbx: unused (f2)
3094 3094    // rcx: receiver address
3095 3095    // rdx: flags (unused)
3096 3096  
3097 3097    Register rax_callsite      = rax;
3098 3098    Register rcx_method_handle = rcx;
3099 3099  
3100      -  if (ProfileInterpreter) {
3101      -    // %%% should make a type profile for any invokedynamic that takes a ref argument
3102      -    // profile this call
3103      -    __ profile_call(rsi);
3104      -  }
     3100 +  // %%% should make a type profile for any invokedynamic that takes a ref argument
     3101 +  // profile this call
     3102 +  __ profile_call(rsi);
3105 3103  
3106      -  __ load_heap_oop(rcx_method_handle, Address(rax_callsite, __ delayed_value(java_lang_invoke_CallSite::target_offset_in_bytes, rcx)));
     3104 +  __ verify_oop(rax_callsite);
     3105 +  __ load_heap_oop(rcx_method_handle, Address(rax_callsite, __ delayed_value(java_lang_invoke_CallSite::target_offset_in_bytes, rdx)));
3107 3106    __ null_check(rcx_method_handle);
     3107 +  __ verify_oop(rcx_method_handle);
3108 3108    __ prepare_to_jump_from_interpreted();
3109 3109    __ jump_to_method_handle_entry(rcx_method_handle, rdx);
3110 3110  }
3111 3111  
3112 3112  //----------------------------------------------------------------------------------------------------
3113 3113  // Allocation
3114 3114  
3115 3115  void TemplateTable::_new() {
3116 3116    transition(vtos, atos);
3117 3117    __ get_unsigned_2_byte_index_at_bcp(rdx, 1);
↓ open down ↓ 484 lines elided ↑ open up ↑