changeset 487:88f29874d717

rebase to current hsx/hotspot-comp
author twisti
date Wed, 18 Jul 2012 18:57:43 -0700
parents 65906046e5fd
children 13510fe048e4
files meth-lazy-7023639.patch meth-lazy-7023639.review.patch series
diffstat 3 files changed, 122 insertions(+), 110 deletions(-) [+]
line wrap: on
line diff
--- a/meth-lazy-7023639.patch	Wed Jul 18 17:11:47 2012 -0700
+++ b/meth-lazy-7023639.patch	Wed Jul 18 18:57:43 2012 -0700
@@ -4343,7 +4343,7 @@
  // Implementation of AddressLiteral
  
  AddressLiteral::AddressLiteral(address target, relocInfo::relocType rtype) {
-@@ -5483,23 +5492,7 @@
+@@ -5508,23 +5517,7 @@
      // To see where a verify_oop failed, get $ebx+40/X for this frame.
      // This is the value of eip which points to where verify_oop will return.
      if (os::message_box(msg, "Execution stopped, print registers?")) {
@@ -4368,7 +4368,7 @@
        BREAKPOINT;
        assert(false, "start up GDB");
      }
-@@ -5511,12 +5504,53 @@
+@@ -5536,12 +5529,53 @@
    ThreadStateTransition::transition(thread, _thread_in_vm, saved_state);
  }
  
@@ -4423,7 +4423,7 @@
    call(RuntimeAddress(CAST_FROM_FN_PTR(address, MacroAssembler::debug32)));
    hlt();
  }
-@@ -5533,6 +5567,18 @@
+@@ -5558,6 +5592,18 @@
    pop_CPU_state();
  }
  
@@ -4442,7 +4442,7 @@
  #else // _LP64
  
  // 64 bit versions
-@@ -5998,14 +6044,33 @@
+@@ -6023,14 +6069,33 @@
  }
  
  void MacroAssembler::warn(const char* msg) {
@@ -4479,7 +4479,7 @@
  }
  
  #ifndef PRODUCT
-@@ -6014,7 +6079,7 @@
+@@ -6039,7 +6104,7 @@
  
  void MacroAssembler::debug64(char* msg, int64_t pc, int64_t regs[]) {
    // In order to get locks to work, we need to fake a in_VM state
@@ -4488,7 +4488,7 @@
      JavaThread* thread = JavaThread::current();
      JavaThreadState saved_state = thread->thread_state();
      thread->set_thread_state(_thread_in_vm);
-@@ -6028,30 +6093,9 @@
+@@ -6053,30 +6118,9 @@
      // XXX correct this offset for amd64
      // This is the value of eip which points to where verify_oop will return.
      if (os::message_box(msg, "Execution stopped, print registers?")) {
@@ -4521,7 +4521,7 @@
      }
      ThreadStateTransition::transition(thread, _thread_in_vm, saved_state);
    } else {
-@@ -6062,6 +6106,54 @@
+@@ -6087,6 +6131,54 @@
    }
  }
  
@@ -4576,7 +4576,7 @@
  #endif // _LP64
  
  // Now versions that are common to 32/64 bit
-@@ -6431,7 +6523,7 @@
+@@ -6456,7 +6548,7 @@
        get_thread(rax);
        cmpptr(java_thread, rax);
        jcc(Assembler::equal, L);
@@ -4585,7 +4585,7 @@
        bind(L);
      }
      pop(rax);
-@@ -7171,7 +7263,7 @@
+@@ -7196,7 +7288,7 @@
        jcc(Assembler::notZero, integer);
        cmpl(tmp3, 0x80000000);
        jcc(Assembler::notZero, integer);
@@ -4594,7 +4594,7 @@
        bind(integer);
      }
  #else
-@@ -7181,7 +7273,7 @@
+@@ -7206,7 +7298,7 @@
        shlq(tmp3, 1);
        jcc(Assembler::carryClear, integer);
        jcc(Assembler::notZero, integer);
@@ -4603,7 +4603,7 @@
        bind(integer);
      }
  #endif
-@@ -8345,7 +8437,7 @@
+@@ -8388,7 +8480,7 @@
      shlptr(tsize, LogHeapWordSize);
      cmpptr(t1, tsize);
      jcc(Assembler::equal, ok);
@@ -4612,7 +4612,7 @@
      should_not_reach_here();
  
      bind(ok);
-@@ -8684,6 +8776,19 @@
+@@ -8727,6 +8819,19 @@
  }
  
  
@@ -4632,7 +4632,7 @@
  void MacroAssembler::check_klass_subtype(Register sub_klass,
                             Register super_klass,
                             Register temp_reg,
-@@ -8933,6 +9038,7 @@
+@@ -8976,6 +9081,7 @@
    // Pass register number to verify_oop_subroutine
    char* b = new char[strlen(s) + 50];
    sprintf(b, "verify_oop: %s: %s", reg->name(), s);
@@ -4640,7 +4640,7 @@
  #ifdef _LP64
    push(rscratch1);                    // save r10, trashed by movptr()
  #endif
-@@ -8947,6 +9053,7 @@
+@@ -8990,6 +9096,7 @@
    movptr(rax, ExternalAddress(StubRoutines::verify_oop_subroutine_entry_address()));
    call(rax);
    // Caller pops the arguments (oop, message) and restores rax, r10
@@ -4648,7 +4648,7 @@
  }
  
  
-@@ -8967,7 +9074,7 @@
+@@ -9010,7 +9117,7 @@
        jcc(Assembler::notZero, L);
        char* buf = new char[40];
        sprintf(buf, "DelayedValue="INTPTR_FORMAT, delayed_value_addr[1]);
@@ -4657,7 +4657,7 @@
      } else {
        jccb(Assembler::notZero, L);
        hlt();
-@@ -8983,60 +9090,6 @@
+@@ -9026,60 +9133,6 @@
  }
  
  
@@ -4718,7 +4718,7 @@
  Address MacroAssembler::argument_address(RegisterOrConstant arg_slot,
                                           int extra_slot_offset) {
    // cf. TemplateTable::prepare_invoke(), if (load_receiver).
-@@ -9109,14 +9162,14 @@
+@@ -9152,14 +9205,14 @@
      movptr(t1, Address(thread_reg, in_bytes(JavaThread::tlab_top_offset())));
      cmpptr(t1, Address(thread_reg, in_bytes(JavaThread::tlab_start_offset())));
      jcc(Assembler::aboveEqual, next);
@@ -4735,7 +4735,7 @@
      should_not_reach_here();
  
      bind(ok);
-@@ -9549,6 +9602,25 @@
+@@ -9592,6 +9645,25 @@
      movptr(dst, src);
  }
  
@@ -4761,7 +4761,7 @@
  // Used for storing NULLs.
  void MacroAssembler::store_heap_oop_null(Address dst) {
  #ifdef _LP64
-@@ -9579,7 +9651,7 @@
+@@ -9622,7 +9694,7 @@
      push(rscratch1); // cmpptr trashes rscratch1
      cmpptr(r12_heapbase, ExternalAddress((address)Universe::narrow_oop_base_addr()));
      jcc(Assembler::equal, ok);
@@ -4770,7 +4770,7 @@
      bind(ok);
      pop(rscratch1);
    }
-@@ -9612,7 +9684,7 @@
+@@ -9655,7 +9727,7 @@
      Label ok;
      testq(r, r);
      jcc(Assembler::notEqual, ok);
@@ -4779,7 +4779,7 @@
      bind(ok);
    }
  #endif
-@@ -9633,7 +9705,7 @@
+@@ -9676,7 +9748,7 @@
      Label ok;
      testq(src, src);
      jcc(Assembler::notEqual, ok);
@@ -4788,7 +4788,7 @@
      bind(ok);
    }
  #endif
-@@ -9824,7 +9896,7 @@
+@@ -9867,7 +9939,7 @@
      cmpptr(rax, StackAlignmentInBytes-wordSize);
      pop(rax);
      jcc(Assembler::equal, L);
@@ -4797,7 +4797,7 @@
      bind(L);
    }
  #endif
-@@ -10498,13 +10570,6 @@
+@@ -10541,13 +10613,6 @@
    bind(DONE);
  }
  
@@ -4814,7 +4814,7 @@
 diff --git a/src/cpu/x86/vm/assembler_x86.hpp b/src/cpu/x86/vm/assembler_x86.hpp
 --- a/src/cpu/x86/vm/assembler_x86.hpp
 +++ b/src/cpu/x86/vm/assembler_x86.hpp
-@@ -1935,6 +1935,7 @@
+@@ -1940,6 +1940,7 @@
    void load_heap_oop(Register dst, Address src);
    void load_heap_oop_not_null(Register dst, Address src);
    void store_heap_oop(Address dst, Register src);
@@ -4822,7 +4822,7 @@
  
    // Used for storing NULL. All other oop constants should be
    // stored using routines that take a jobject.
-@@ -2112,6 +2113,11 @@
+@@ -2117,6 +2118,11 @@
                                 Register scan_temp,
                                 Label& no_such_interface);
  
@@ -4834,7 +4834,7 @@
    // Test sub_klass against super_klass, with fast and slow paths.
  
    // The fast path produces a tri-state answer: yes / no / maybe-slow.
-@@ -2147,15 +2153,8 @@
+@@ -2152,15 +2158,8 @@
                             Label& L_success);
  
    // method handles (JSR 292)
@@ -4850,7 +4850,7 @@
    //----
    void set_word_if_not_zero(Register reg); // sets reg to 1 if not zero, otherwise 0
  
-@@ -2174,8 +2173,13 @@
+@@ -2179,8 +2178,13 @@
    // prints msg and continues
    void warn(const char* msg);
  
@@ -11563,7 +11563,7 @@
 diff --git a/src/share/vm/ci/ciMethod.cpp b/src/share/vm/ci/ciMethod.cpp
 --- a/src/share/vm/ci/ciMethod.cpp
 +++ b/src/share/vm/ci/ciMethod.cpp
-@@ -770,39 +770,37 @@
+@@ -769,39 +769,37 @@
  // invokedynamic support
  
  // ------------------------------------------------------------------
@@ -11624,7 +11624,7 @@
  // ------------------------------------------------------------------
  // ciMethod::ensure_method_data
  //
-@@ -1025,28 +1023,13 @@
+@@ -1024,28 +1022,13 @@
  // ------------------------------------------------------------------
  // ciMethod::code_size_for_inlining
  //
@@ -11657,7 +11657,7 @@
    return code_size();
  }
  
-@@ -1128,7 +1111,8 @@
+@@ -1127,7 +1110,8 @@
      constantPoolHandle pool (THREAD, get_methodOop()->constants());
      methodHandle spec_method;
      KlassHandle  spec_klass;
@@ -11667,7 +11667,7 @@
      if (HAS_PENDING_EXCEPTION) {
        CLEAR_PENDING_EXCEPTION;
        return false;
-@@ -1208,8 +1192,16 @@
+@@ -1207,8 +1191,16 @@
  //
  // Print the name of this method, without signature.
  void ciMethod::print_short_name(outputStream* st) {
@@ -11686,7 +11686,7 @@
  }
  
  // ------------------------------------------------------------------
-@@ -1224,6 +1216,7 @@
+@@ -1223,6 +1215,7 @@
    holder()->print_name_on(st);
    st->print(" signature=");
    signature()->as_symbol()->print_symbol_on(st);
@@ -12132,7 +12132,7 @@
 diff --git a/src/share/vm/classfile/classFileParser.cpp b/src/share/vm/classfile/classFileParser.cpp
 --- a/src/share/vm/classfile/classFileParser.cpp
 +++ b/src/share/vm/classfile/classFileParser.cpp
-@@ -1777,6 +1777,15 @@
+@@ -1773,6 +1773,15 @@
    case vmSymbols::VM_SYMBOL_ENUM_NAME(java_lang_invoke_ForceInline_signature):
      if (_location != _in_method)  break;  // only allow for methods
      return _method_ForceInline;
@@ -12148,7 +12148,7 @@
    default: break;
    }
    return AnnotationCollector::_unknown;
-@@ -1789,6 +1798,12 @@
+@@ -1785,6 +1794,12 @@
  void ClassFileParser::MethodAnnotationCollector::apply_to(methodHandle m) {
    if (has_annotation(_method_ForceInline))
      m->set_force_inline(true);
@@ -12171,7 +12171,7 @@
    // Copy line number table
    if (linenumber_table != NULL) {
      memcpy(m->compressed_linenumber_table(),
-@@ -2328,12 +2346,6 @@
+@@ -2336,12 +2354,6 @@
      _has_vanilla_constructor = true;
    }
  
@@ -12187,7 +12187,7 @@
 diff --git a/src/share/vm/classfile/classFileParser.hpp b/src/share/vm/classfile/classFileParser.hpp
 --- a/src/share/vm/classfile/classFileParser.hpp
 +++ b/src/share/vm/classfile/classFileParser.hpp
-@@ -86,6 +86,9 @@
+@@ -89,6 +89,9 @@
      enum ID {
        _unknown = 0,
        _method_ForceInline,
@@ -12509,7 +12509,7 @@
  }
  
  
-@@ -2809,10 +2734,26 @@
+@@ -2798,10 +2723,26 @@
  }
  
  oop java_lang_ClassLoader::parent(oop loader) {
@@ -12537,7 +12537,7 @@
  
  // For class loader classes, parallelCapable defined
  // based on non-null field
-@@ -3072,9 +3013,7 @@
+@@ -3061,9 +3002,7 @@
    if (EnableInvokeDynamic) {
      java_lang_invoke_MethodHandle::compute_offsets();
      java_lang_invoke_MemberName::compute_offsets();
@@ -12548,7 +12548,7 @@
      java_lang_invoke_MethodType::compute_offsets();
      java_lang_invoke_MethodTypeForm::compute_offsets();
      java_lang_invoke_CallSite::compute_offsets();
-@@ -3306,7 +3245,14 @@
+@@ -3295,7 +3234,14 @@
      }
    }
    ResourceMark rm;
@@ -13342,7 +13342,7 @@
 diff --git a/src/share/vm/classfile/systemDictionary.hpp b/src/share/vm/classfile/systemDictionary.hpp
 --- a/src/share/vm/classfile/systemDictionary.hpp
 +++ b/src/share/vm/classfile/systemDictionary.hpp
-@@ -147,13 +147,10 @@
+@@ -148,13 +148,10 @@
    template(MethodHandle_klass,             java_lang_invoke_MethodHandle,             Pre_JSR292) \
    template(MemberName_klass,               java_lang_invoke_MemberName,               Pre_JSR292) \
    template(MethodHandleNatives_klass,      java_lang_invoke_MethodHandleNatives,      Pre_JSR292) \
@@ -13357,7 +13357,7 @@
    template(CallSite_klass,                 java_lang_invoke_CallSite,                 Pre_JSR292) \
    template(CountingMethodHandle_klass,     java_lang_invoke_CountingMethodHandle,     Opt)        \
    template(ConstantCallSite_klass,         java_lang_invoke_ConstantCallSite,         Pre_JSR292) \
-@@ -484,17 +481,24 @@
+@@ -485,17 +482,24 @@
                                         Handle loader2, bool is_method, TRAPS);
  
    // JSR 292
@@ -13390,7 +13390,7 @@
    // ask Java to compute a java.lang.invoke.MethodHandle object for a given CP entry
    static Handle    link_method_handle_constant(KlassHandle caller,
                                                 int ref_kind, //e.g., JVM_REF_invokeVirtual
-@@ -502,23 +506,14 @@
+@@ -503,23 +507,14 @@
                                                 Symbol* name,
                                                 Symbol* signature,
                                                 TRAPS);
@@ -14332,7 +14332,7 @@
    }
  #endif
  }
-@@ -674,7 +674,7 @@
+@@ -656,7 +656,7 @@
    JvmtiExport::post_raw_breakpoint(thread, method, bcp);
  IRT_END
  
@@ -14341,7 +14341,7 @@
    // extract receiver from the outgoing argument list if necessary
    Handle receiver(thread, NULL);
    if (bytecode == Bytecodes::_invokevirtual || bytecode == Bytecodes::_invokeinterface) {
-@@ -742,86 +742,54 @@
+@@ -724,86 +724,54 @@
        info.resolved_method(),
        info.vtable_index());
    }
@@ -14465,7 +14465,7 @@
  }
  IRT_END
  
-@@ -993,7 +961,7 @@
+@@ -975,7 +943,7 @@
  
    // check the access_flags for the field in the klass
  
@@ -14474,7 +14474,7 @@
    int index = cp_entry->field_index();
    if ((ik->field_access_flags(index) & JVM_ACC_FIELD_ACCESS_WATCHED) == 0) return;
  
-@@ -1016,15 +984,15 @@
+@@ -998,15 +966,15 @@
      // non-static field accessors have an object, but we need a handle
      h_obj = Handle(thread, obj);
    }
@@ -14493,7 +14493,7 @@
  
    // check the access_flags for the field in the klass
    instanceKlass* ik = instanceKlass::cast(k);
-@@ -1049,7 +1017,7 @@
+@@ -1031,7 +999,7 @@
  
    HandleMark hm(thread);
    instanceKlassHandle h_klass(thread, k);
@@ -16288,7 +16288,7 @@
 diff --git a/src/share/vm/oops/instanceKlass.cpp b/src/share/vm/oops/instanceKlass.cpp
 --- a/src/share/vm/oops/instanceKlass.cpp
 +++ b/src/share/vm/oops/instanceKlass.cpp
-@@ -2416,6 +2416,22 @@
+@@ -2429,6 +2429,22 @@
    } else if (java_lang_boxing_object::is_instance(obj)) {
      st->print(" = ");
      java_lang_boxing_object::print(obj, st);
@@ -16354,7 +16354,7 @@
  #include "prims/nativeLookup.hpp"
  #include "runtime/arguments.hpp"
  #include "runtime/compilationPolicy.hpp"
-@@ -400,41 +400,39 @@
+@@ -396,41 +396,39 @@
  }
  
  
@@ -16423,7 +16423,7 @@
  }
  
  
-@@ -556,6 +554,7 @@
+@@ -552,6 +550,7 @@
  
  void methodOopDesc::set_native_function(address function, bool post_event_flag) {
    assert(function != NULL, "use clear_native_function to unregister natives");
@@ -16431,7 +16431,7 @@
    address* native_function = native_function_addr();
  
    // We can see racers trying to place the same native function into place. Once
-@@ -585,12 +584,14 @@
+@@ -581,12 +580,14 @@
  
  
  bool methodOopDesc::has_native_function() const {
@@ -16446,7 +16446,7 @@
    set_native_function(
      SharedRuntime::native_method_throw_unsatisfied_link_error_entry(),
      !native_bind_event_is_interesting);
-@@ -610,10 +611,6 @@
+@@ -606,10 +607,6 @@
  
  
  bool methodOopDesc::is_not_compilable(int comp_level) const {
@@ -16457,7 +16457,7 @@
    if (number_of_breakpoints() > 0) {
      return true;
    }
-@@ -713,7 +710,7 @@
+@@ -709,7 +706,7 @@
    assert(entry != NULL, "interpreter entry must be non-null");
    // Sets both _i2i_entry and _from_interpreted_entry
    set_interpreter_entry(entry);
@@ -16466,7 +16466,7 @@
      set_native_function(
        SharedRuntime::native_method_throw_unsatisfied_link_error_entry(),
        !native_bind_event_is_interesting);
-@@ -801,13 +798,13 @@
+@@ -797,13 +794,13 @@
    OrderAccess::storestore();
  #ifdef SHARK
    mh->_from_interpreted_entry = code->insts_begin();
@@ -16484,7 +16484,7 @@
  }
  
  
-@@ -859,106 +856,51 @@
+@@ -855,106 +852,51 @@
    return false;
  }
  
@@ -16614,7 +16614,7 @@
    constantPoolHandle cp;
    {
      constantPoolOop cp_oop = oopFactory::new_constantPool(cp_length, IsSafeConc, CHECK_(empty));
-@@ -966,19 +908,17 @@
+@@ -962,19 +904,17 @@
    }
    cp->symbol_at_put(_imcp_invoke_name,       name);
    cp->symbol_at_put(_imcp_invoke_signature,  signature);
@@ -16638,9 +16638,9 @@
    {
 -    int flags_bits = (JVM_MH_INVOKE_BITS | JVM_ACC_PUBLIC | JVM_ACC_FINAL);
      methodOop m_oop = oopFactory::new_method(0, accessFlags_from(flags_bits),
-                                              0, 0, 0, IsSafeConc, CHECK_(empty));
+                                              0, 0, 0, 0, IsSafeConc, CHECK_(empty));
      m = methodHandle(THREAD, m_oop);
-@@ -986,9 +926,8 @@
+@@ -982,33 +922,26 @@
    m->set_constants(cp());
    m->set_name_index(_imcp_invoke_name);
    m->set_signature_index(_imcp_invoke_signature);
@@ -16651,9 +16651,8 @@
  #ifdef CC_INTERP
    ResultTypeFinder rtf(signature);
    m->set_result_index(rtf.type());
-@@ -996,24 +935,18 @@
+ #endif
    m->compute_size_of_parameters(THREAD);
-   m->set_exception_table(Universe::the_empty_int_array());
    m->init_intrinsic_id();
 -  assert(m->intrinsic_id() == vmIntrinsics::_invokeExact ||
 -         m->intrinsic_id() == vmIntrinsics::_invokeGeneric, "must be an invoker");
@@ -16682,7 +16681,7 @@
    if (TraceMethodHandles && (Verbose || WizardMode))
      m->print_on(tty);
  
-@@ -1030,7 +963,7 @@
+@@ -1025,7 +958,7 @@
  }
  
  
@@ -16691,7 +16690,7 @@
                                                  u_char* new_compressed_linenumber_table, int new_compressed_linenumber_size, TRAPS) {
    // Code below does not work for native methods - they should never get rewritten anyway
    assert(!m->is_native(), "cannot rewrite native methods");
-@@ -1138,7 +1071,9 @@
+@@ -1142,7 +1075,9 @@
  
    // ditto for method and signature:
    vmSymbols::SID  name_id = vmSymbols::find_sid(name());
@@ -16702,7 +16701,7 @@
    vmSymbols::SID   sig_id = vmSymbols::find_sid(signature());
    if (klass_id != vmSymbols::VM_SYMBOL_ENUM_NAME(java_lang_invoke_MethodHandle)
        && sig_id == vmSymbols::NO_SID)  return;
-@@ -1167,21 +1102,10 @@
+@@ -1171,21 +1106,10 @@
  
    // Signature-polymorphic methods: MethodHandle.invoke*, InvokeDynamic.*.
    case vmSymbols::VM_SYMBOL_ENUM_NAME(java_lang_invoke_MethodHandle):
@@ -16728,7 +16727,7 @@
      break;
    }
  
-@@ -1194,6 +1118,12 @@
+@@ -1198,6 +1122,12 @@
  
  // These two methods are static since a GC may move the methodOopDesc
  bool methodOopDesc::load_signature_classes(methodHandle m, TRAPS) {
@@ -16741,7 +16740,7 @@
    bool sig_is_loaded = true;
    Handle class_loader(THREAD, instanceKlass::cast(m->method_holder())->class_loader());
    Handle protection_domain(THREAD, Klass::cast(m->method_holder())->protection_domain());
-@@ -1247,6 +1177,13 @@
+@@ -1251,6 +1181,13 @@
  #endif
    name()->print_symbol_on(st);
    if (WizardMode) signature()->print_symbol_on(st);
@@ -18154,7 +18153,7 @@
 diff --git a/src/share/vm/prims/jvmtiTagMap.cpp b/src/share/vm/prims/jvmtiTagMap.cpp
 --- a/src/share/vm/prims/jvmtiTagMap.cpp
 +++ b/src/share/vm/prims/jvmtiTagMap.cpp
-@@ -3162,9 +3162,6 @@
+@@ -3164,9 +3164,6 @@
          if (fr->is_entry_frame()) {
            last_entry_frame = fr;
          }
@@ -18168,9 +18167,9 @@
 deleted file mode 100644
 --- a/src/share/vm/prims/methodHandleWalk.cpp
 +++ /dev/null
-@@ -1,2089 +0,0 @@
+@@ -1,2086 +0,0 @@
 -/*
-- * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+- * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 - *
 - * This code is free software; you can redistribute it and/or modify it
@@ -19967,7 +19966,7 @@
 -  {
 -    methodOop m_oop = oopFactory::new_method(bytecode_length(),
 -                                             accessFlags_from(flags_bits),
--                                             0, 0, 0, oopDesc::IsSafeConc, CHECK_(empty));
+-                                             0, 0, 0, 0, oopDesc::IsSafeConc, CHECK_(empty));
 -    m = methodHandle(THREAD, m_oop);
 -  }
 -
@@ -19983,9 +19982,6 @@
 -  m->set_max_locals(max_locals());
 -  m->set_size_of_parameters(_num_params);
 -
--  typeArrayHandle exception_handlers(THREAD, Universe::the_empty_int_array());
--  m->set_exception_table(exception_handlers());
--
 -  // Rewrite the method and set up the constant pool cache.
 -  objArrayOop m_array = oopFactory::new_system_objArray(1, CHECK_(empty));
 -  objArrayHandle methods(THREAD, m_array);
@@ -24231,7 +24227,7 @@
    if (!EnableInvokeDynamic) {
      warning("JSR 292 is disabled in this JVM.  Use -XX:+UnlockDiagnosticVMOptions -XX:+EnableInvokeDynamic to enable.");
      return;  // bind nothing
-@@ -3171,36 +1199,32 @@
+@@ -3171,34 +1199,32 @@
    assert(!MethodHandles::enabled(), "must not be enabled");
    bool enable_MH = true;
  
@@ -24258,6 +24254,9 @@
 +    if (status == JNI_OK && !env->ExceptionOccurred()) {
        status = env->RegisterNatives(MH_class, invoke_methods, sizeof(invoke_methods)/sizeof(JNINativeMethod));
      }
+-    if (!env->ExceptionOccurred()) {
+-      status = env->RegisterNatives(MHN_class, call_site_methods, sizeof(call_site_methods)/sizeof(JNINativeMethod));
+-    }
 -    if (env->ExceptionOccurred()) {
 +    if (status != JNI_OK || env->ExceptionOccurred()) {
        warning("JSR 292 method handle code is mismatched to this JVM.  Disabling support.");
@@ -24265,11 +24264,6 @@
        env->ExceptionClear();
      }
 -
--    status = env->RegisterNatives(MHN_class, call_site_methods, sizeof(call_site_methods)/sizeof(JNINativeMethod));
--    if (env->ExceptionOccurred()) {
--      // Exception is okay until 7087357
--      env->ExceptionClear();
--    }
    }
  
 -  if (enable_MH) {
@@ -25154,7 +25148,7 @@
 diff --git a/src/share/vm/prims/unsafe.cpp b/src/share/vm/prims/unsafe.cpp
 --- a/src/share/vm/prims/unsafe.cpp
 +++ b/src/share/vm/prims/unsafe.cpp
-@@ -779,16 +779,33 @@
+@@ -761,16 +761,33 @@
    return JNIHandles::make_local(env, JNIHandles::resolve_non_null(clazz));
  UNSAFE_END
  
@@ -25191,7 +25185,7 @@
  UNSAFE_END
  
  static void getBaseAndScale(int& base, int& scale, jclass acls, TRAPS) {
-@@ -1584,6 +1601,10 @@
+@@ -1566,6 +1583,10 @@
      {CC"defineAnonymousClass", CC"("DAC_Args")"CLS,      FN_PTR(Unsafe_DefineAnonymousClass)},
  };
  
@@ -25202,7 +25196,7 @@
  #undef CC
  #undef FN_PTR
  
-@@ -1654,6 +1675,15 @@
+@@ -1636,6 +1657,15 @@
          env->ExceptionClear();
        }
      }
@@ -25221,7 +25215,7 @@
 diff --git a/src/share/vm/runtime/arguments.cpp b/src/share/vm/runtime/arguments.cpp
 --- a/src/share/vm/runtime/arguments.cpp
 +++ b/src/share/vm/runtime/arguments.cpp
-@@ -3057,15 +3057,6 @@
+@@ -3087,15 +3087,6 @@
    }
  #endif // PRODUCT
  
@@ -25384,7 +25378,7 @@
 diff --git a/src/share/vm/runtime/globals.hpp b/src/share/vm/runtime/globals.hpp
 --- a/src/share/vm/runtime/globals.hpp
 +++ b/src/share/vm/runtime/globals.hpp
-@@ -928,6 +928,9 @@
+@@ -930,6 +930,9 @@
    diagnostic(bool, PrintAdapterHandlers, false,                             \
            "Print code generated for i2c/c2i adapters")                      \
                                                                              \
@@ -25394,7 +25388,7 @@
    develop(bool, VerifyAdapterSharing, false,                                \
            "Verify that the code for shared adapters is the equivalent")     \
                                                                              \
-@@ -3830,12 +3833,6 @@
+@@ -3832,12 +3835,6 @@
    product(bool, AnonymousClasses, false,                                    \
            "support sun.misc.Unsafe.defineAnonymousClass (deprecated)")      \
                                                                              \
@@ -25407,7 +25401,7 @@
    diagnostic(bool, PrintMethodHandleStubs, false,                           \
            "Print generated stub code for method handles")                   \
                                                                              \
-@@ -3845,19 +3842,12 @@
+@@ -3847,19 +3844,12 @@
    diagnostic(bool, VerifyMethodHandles, trueInDebug,                        \
            "perform extra checks when constructing method handles")          \
                                                                              \
@@ -25432,7 +25426,7 @@
 diff --git a/src/share/vm/runtime/os.cpp b/src/share/vm/runtime/os.cpp
 --- a/src/share/vm/runtime/os.cpp
 +++ b/src/share/vm/runtime/os.cpp
-@@ -807,7 +807,7 @@
+@@ -822,7 +822,7 @@
        // the interpreter is generated into a buffer blob
        InterpreterCodelet* i = Interpreter::codelet_containing(addr);
        if (i != NULL) {
@@ -25441,7 +25435,7 @@
          i->print_on(st);
          return;
        }
-@@ -818,14 +818,15 @@
+@@ -833,14 +833,15 @@
        }
        //
        if (AdapterHandlerLibrary::contains(b)) {
@@ -25459,7 +25453,7 @@
          return;
        }
        if (StubRoutines::contains(addr)) {
-@@ -840,26 +841,25 @@
+@@ -855,26 +856,25 @@
        }
        VtableStub* v = VtableStubs::stub_containing(addr);
        if (v != NULL) {
@@ -25855,7 +25849,7 @@
    size_t msglen = strlen(objName) + strlen(desc) + strlen(targetKlassName) + 1;
 @@ -2119,8 +1985,17 @@
  // that allows sharing of adapters for the same calling convention.
- class AdapterFingerPrint : public CHeapObj {
+ class AdapterFingerPrint : public CHeapObj<mtCode> {
   private:
 +  enum {
 +    _basic_type_bits = 4,
@@ -26125,7 +26119,7 @@
 +  AdapterFingerPrint* fingerprint() const { return _fingerprint; }
  
    AdapterHandlerEntry* next() {
-     return (AdapterHandlerEntry*)BasicHashtableEntry::next();
+     return (AdapterHandlerEntry*)BasicHashtableEntry<mtCode>::next();
 @@ -665,7 +637,8 @@
    bool compare_code(unsigned char* code, int length, int total_args_passed, BasicType* sig_bt);
  #endif
@@ -26282,7 +26276,7 @@
 diff --git a/src/share/vm/runtime/vmStructs.cpp b/src/share/vm/runtime/vmStructs.cpp
 --- a/src/share/vm/runtime/vmStructs.cpp
 +++ b/src/share/vm/runtime/vmStructs.cpp
-@@ -824,13 +824,6 @@
+@@ -836,13 +836,6 @@
    /* CodeBlobs (NOTE: incomplete, but only a little) */                                                                              \
    /***************************************************/                                                                              \
                                                                                                                                       \
@@ -26296,7 +26290,7 @@
    nonstatic_field(CodeBlob,                    _name,                                         const char*)                           \
    nonstatic_field(CodeBlob,                    _size,                                         int)                                   \
    nonstatic_field(CodeBlob,                    _header_size,                                  int)                                   \
-@@ -875,11 +868,8 @@
+@@ -887,11 +880,8 @@
    nonstatic_field(nmethod,             _compile_id,                                   int)                                   \
    nonstatic_field(nmethod,             _exception_cache,                              ExceptionCache*)                       \
    nonstatic_field(nmethod,             _marked_for_deoptimization,                    bool)                                  \
@@ -26310,7 +26304,7 @@
                                                                                                                                       \
    /********************************/                                                                                                 \
    /* JavaCalls (NOTE: incomplete) */                                                                                                 \
-@@ -1620,7 +1610,6 @@
+@@ -1633,7 +1623,6 @@
    /*************************************************************/         \
                                                                            \
    declare_toplevel_type(SharedRuntime)                                    \
@@ -26318,7 +26312,7 @@
                                                                            \
    declare_toplevel_type(CodeBlob)                                         \
    declare_type(BufferBlob,               CodeBlob)                        \
-@@ -1631,7 +1620,6 @@
+@@ -1644,7 +1633,6 @@
    declare_type(SingletonBlob,            CodeBlob)                        \
    declare_type(SafepointBlob,            SingletonBlob)                   \
    declare_type(DeoptimizationBlob,       SingletonBlob)                   \
@@ -26326,7 +26320,7 @@
    declare_c2_type(ExceptionBlob,         SingletonBlob)                   \
    declare_c2_type(UncommonTrapBlob,      CodeBlob)                        \
                                                                            \
-@@ -2230,7 +2218,7 @@
+@@ -2243,7 +2231,7 @@
    declare_constant(JVM_ACC_MONITOR_MATCH)                                 \
    declare_constant(JVM_ACC_HAS_MONITOR_BYTECODES)                         \
    declare_constant(JVM_ACC_HAS_LOOPS)                                     \
@@ -26335,7 +26329,7 @@
    declare_constant(JVM_ACC_QUEUED)                                        \
    declare_constant(JVM_ACC_NOT_OSR_COMPILABLE)                            \
    declare_constant(JVM_ACC_HAS_LINE_NUMBER_TABLE)                         \
-@@ -2333,7 +2321,7 @@
+@@ -2347,7 +2335,7 @@
    declare_constant(instanceKlass::initialization_error)                   \
                                                                            \
    /*********************************/                                     \
@@ -26344,7 +26338,7 @@
    /*********************************/                                     \
                                                                            \
    declare_constant(Symbol::max_symbol_length)                             \
-@@ -2346,21 +2334,16 @@
+@@ -2360,21 +2348,16 @@
    declare_constant(constantPoolOopDesc::_indy_argc_offset)                \
    declare_constant(constantPoolOopDesc::_indy_argv_offset)                \
                                                                            \
--- a/meth-lazy-7023639.review.patch	Wed Jul 18 17:11:47 2012 -0700
+++ b/meth-lazy-7023639.review.patch	Wed Jul 18 18:57:43 2012 -0700
@@ -1,5 +1,5 @@
 # HG changeset patch
-# Parent 640c887b5e2ec7135ab36c38220de7050228608d
+# Parent fe6edd334f2d863f8b842505ef37ea0b4c608f68
 
 diff --git a/src/cpu/sparc/vm/interpreter_sparc.cpp b/src/cpu/sparc/vm/interpreter_sparc.cpp
 --- a/src/cpu/sparc/vm/interpreter_sparc.cpp
@@ -16,6 +16,15 @@
 diff --git a/src/cpu/sparc/vm/methodHandles_sparc.cpp b/src/cpu/sparc/vm/methodHandles_sparc.cpp
 --- a/src/cpu/sparc/vm/methodHandles_sparc.cpp
 +++ b/src/cpu/sparc/vm/methodHandles_sparc.cpp
+@@ -106,7 +106,7 @@
+   __ srl( temp, java_lang_invoke_MemberName::MN_REFERENCE_KIND_SHIFT, temp);
+   __ and3(temp, java_lang_invoke_MemberName::MN_REFERENCE_KIND_MASK,  temp);
+   __ cmp_and_br_short(temp, ref_kind, Assembler::equal, Assembler::pt, L);
+-  { char* buf = NEW_C_HEAP_ARRAY(char, 100);
++  { char* buf = NEW_C_HEAP_ARRAY(char, 100, mtInternal);
+     jio_snprintf(buf, 100, "verify_ref_kind expected %x", ref_kind);
+     if (ref_kind == JVM_REF_invokeVirtual ||
+         ref_kind == JVM_REF_invokeSpecial)
 @@ -133,9 +133,7 @@
      __ verify_thread();
      const Address interp_only(G2_thread, JavaThread::interp_only_mode_offset());
@@ -33,7 +42,7 @@
      if (*name == '_')  name += 1;
 -    char* qname = NEW_C_HEAP_ARRAY(char, 100);
 +    const size_t len = strlen(name) + 50;
-+    char* qname = NEW_C_HEAP_ARRAY(char, len);
++    char* qname = NEW_C_HEAP_ARRAY(char, len, mtInternal);
      const char* suffix = "";
      if (vmIntrinsics::method_for(iid) == NULL ||
          !vmIntrinsics::method_for(iid)->access_flags().is_public()) {
@@ -109,13 +118,22 @@
 diff --git a/src/cpu/x86/vm/methodHandles_x86.cpp b/src/cpu/x86/vm/methodHandles_x86.cpp
 --- a/src/cpu/x86/vm/methodHandles_x86.cpp
 +++ b/src/cpu/x86/vm/methodHandles_x86.cpp
+@@ -103,7 +103,7 @@
+   __ andl(temp, java_lang_invoke_MemberName::MN_REFERENCE_KIND_MASK);
+   __ cmpl(temp, ref_kind);
+   __ jcc(Assembler::equal, L);
+-  { char* buf = NEW_C_HEAP_ARRAY(char, 100);
++  { char* buf = NEW_C_HEAP_ARRAY(char, 100, mtInternal);
+     jio_snprintf(buf, 100, "verify_ref_kind expected %x", ref_kind);
+     if (ref_kind == JVM_REF_invokeVirtual ||
+         ref_kind == JVM_REF_invokeSpecial)
 @@ -257,7 +257,8 @@
    if (TraceMethodHandles) {
      const char* name = vmIntrinsics::name_at(iid);
      if (*name == '_')  name += 1;
 -    char* qname = NEW_C_HEAP_ARRAY(char, 100);
 +    const size_t len = strlen(name) + 50;
-+    char* qname = NEW_C_HEAP_ARRAY(char, len);
++    char* qname = NEW_C_HEAP_ARRAY(char, len, mtInternal);
      const char* suffix = "";
      if (vmIntrinsics::method_for(iid) == NULL ||
          !vmIntrinsics::method_for(iid)->access_flags().is_public()) {
@@ -601,7 +619,7 @@
  }
  
  
-@@ -3015,9 +2989,7 @@
+@@ -3004,9 +2978,7 @@
      java_lang_invoke_MemberName::compute_offsets();
      java_lang_invoke_LambdaForm::compute_offsets();
      java_lang_invoke_MethodType::compute_offsets();
@@ -720,7 +738,7 @@
 diff --git a/src/share/vm/classfile/systemDictionary.hpp b/src/share/vm/classfile/systemDictionary.hpp
 --- a/src/share/vm/classfile/systemDictionary.hpp
 +++ b/src/share/vm/classfile/systemDictionary.hpp
-@@ -149,10 +149,8 @@
+@@ -150,10 +150,8 @@
    template(MethodHandleNatives_klass,      java_lang_invoke_MethodHandleNatives,      Pre_JSR292) \
    template(LambdaForm_klass,               java_lang_invoke_LambdaForm,               Opt)        \
    template(MethodType_klass,               java_lang_invoke_MethodType,               Pre_JSR292) \
@@ -826,7 +844,7 @@
 diff --git a/src/share/vm/oops/methodOop.cpp b/src/share/vm/oops/methodOop.cpp
 --- a/src/share/vm/oops/methodOop.cpp
 +++ b/src/share/vm/oops/methodOop.cpp
-@@ -1177,13 +1177,8 @@
+@@ -1181,13 +1181,8 @@
  #endif
    name()->print_symbol_on(st);
    if (WizardMode) signature()->print_symbol_on(st);
--- a/series	Wed Jul 18 17:11:47 2012 -0700
+++ b/series	Wed Jul 18 18:57:43 2012 -0700
@@ -1,17 +1,17 @@
-# base = ed21db7b3fda in http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot [2012-07-02]
+# base = dd785aabe02b in http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot [2012-07-18]
 
 # review pending before push to hotspot-comp:
-meth-lazy-7023639.patch         #-/meth #+ed21db7b3fda
-meth-lazy-7023639.review.patch  #-/meth #+ed21db7b3fda
+meth-lazy-7023639.patch         #-/meth #+dd785aabe02b
+meth-lazy-7023639.review.patch  #-/meth #+dd785aabe02b
 
 # non-pushed files are under review or development, or merely experimental:
-meth.patch                      #-/meth #+ed21db7b3fda
+meth.patch                      #-/meth #+dd785aabe02b
 
 meth.proj.patch                 #-/meth #+projects
 anonk.proj.patch                #-/anonk #+projects
 
 # Keep these separate, for debugging and review:
-tagu.patch      #+tagu          #-/tagu #+ed21db7b3fda #-buildable
+tagu.patch      #+tagu          #-/tagu #+dd785aabe02b #-buildable
 inti.patch      #+inti          #-/inti #+d1605aabd0a1 #+jdk7-b30 #-buildable
 callcc_old.patch #+callcc_old   #-/callcc_old #+d6d1af32c5f9 #-testable
 continuation.patch  #+continuation #-/continuation #+4afae810a801
@@ -23,7 +23,7 @@
 # coro-standalone and coro-meth contain parts that have to be applied differently with/without meth
 # no explicit rev guard on coro-standalone, since the positive guard is needed for /meth
 #coro-standalone.patch          #+/meth #-/coro
-coro-meth.patch         #+coro  #-/meth #-/coro #(ed21db7b3fda)
-coro.patch    	        #+coro          #-/coro #(ed21db7b3fda)
+coro-meth.patch         #+coro  #-/meth #-/coro #(dd785aabe02b)
+coro.patch    	        #+coro          #-/coro #(dd785aabe02b)
 
 tuple-tsig.patch        #+tuple #-/tuple #-testable