changeset 462:01bca62ccfe7

meth: misc fixes
author jrose
date Sun, 08 Jul 2012 01:25:22 -0700
parents b06d7d2b0f2f
children a1bae6849a0b
files meth-lazy-7023639.jit.patch meth-lazy-7023639.patch
diffstat 2 files changed, 49 insertions(+), 33 deletions(-) [+]
line wrap: on
line diff
--- a/meth-lazy-7023639.jit.patch	Sat Jul 07 22:03:41 2012 -0700
+++ b/meth-lazy-7023639.jit.patch	Sun Jul 08 01:25:22 2012 -0700
@@ -4,7 +4,15 @@
 diff --git a/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp b/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp
 --- a/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp
 +++ b/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp
-@@ -2984,9 +2984,11 @@
+@@ -2956,6 +2956,7 @@
+ void LIR_Assembler::emit_profile_call(LIR_OpProfileCall* op) {
+   ciMethod* method = op->profiled_method();
+   int bci          = op->profiled_bci();
++  ciMethod* callee = op->profiled_callee();
+ 
+   // Update counter for all call types
+   ciMethodData* md = method->method_data_or_null();
+@@ -2984,9 +2985,11 @@
  
    Address counter_addr(mdo, md->byte_offset_of_slot(data, CounterData::count_offset()) - mdo_offset_bias);
    Bytecodes::Code bc = method->java_code_at_bci(bci);
@@ -3555,7 +3563,7 @@
 diff --git a/src/share/vm/opto/library_call.cpp b/src/share/vm/opto/library_call.cpp
 --- a/src/share/vm/opto/library_call.cpp
 +++ b/src/share/vm/opto/library_call.cpp
-@@ -2114,7 +2114,7 @@
+@@ -2171,7 +2171,7 @@
    if (id == vmIntrinsics::_reverseBytes_l && !Matcher::has_match_rule(Op_ReverseBytesL))  return false;
    if (id == vmIntrinsics::_reverseBytes_c && !Matcher::has_match_rule(Op_ReverseBytesUS)) return false;
    if (id == vmIntrinsics::_reverseBytes_s && !Matcher::has_match_rule(Op_ReverseBytesS))  return false;
@@ -3564,7 +3572,7 @@
    switch (id) {
    case vmIntrinsics::_reverseBytes_i:
      push(_gvn.transform(new (C, 2) ReverseBytesINode(0, pop())));
-@@ -2287,6 +2287,7 @@
+@@ -2344,6 +2344,7 @@
  
    // Argument words:  "this" plus (oop/offset) or (lo/hi) args plus maybe 1 or 2 value words
    int nargs = 1 + (is_native_ptr ? 2 : 3) + (is_store ? type_words : 0);
@@ -3660,7 +3668,7 @@
 diff --git a/src/share/vm/runtime/fieldDescriptor.hpp b/src/share/vm/runtime/fieldDescriptor.hpp
 --- a/src/share/vm/runtime/fieldDescriptor.hpp
 +++ b/src/share/vm/runtime/fieldDescriptor.hpp
-@@ -115,6 +115,7 @@
+@@ -116,6 +116,7 @@
    void initialize(klassOop k, int index);
  
    // Print
--- a/meth-lazy-7023639.patch	Sat Jul 07 22:03:41 2012 -0700
+++ b/meth-lazy-7023639.patch	Sun Jul 08 01:25:22 2012 -0700
@@ -856,7 +856,7 @@
 +    __ BIND(L);
 +  }
 +
-+  jump_from_method_handle(_masm, method_temp, temp2, temp3);
++  jump_from_method_handle(_masm, method_temp, temp2, temp3, for_compiler_entry);
 +  BLOCK_COMMENT("} jump_to_lambda_form");
 +}
 +
@@ -1057,10 +1057,10 @@
 -  __ ldsw(vmargslot_addr, result);
 -}
 +  // temps used in this code are not used in *either* compiled or interpreted calling sequences
-+  Register temp1 = (for_compiler_entry ? G1_scratch : O1_scratch);
-+  Register temp2 = (for_compiler_entry ? G4_scratch : O4_scratch);
++  Register temp1 = (for_compiler_entry ? G1_scratch : O1);
++  Register temp2 = (for_compiler_entry ? G4_scratch : O4);
 +  Register temp3 = G3_scratch;
-+  Register temp4 = (for_compiler_entry ? noreg : O2_scratch);
++  Register temp4 = (for_compiler_entry ? noreg      : O2);
 +  if (for_compiler_entry) {
 +    assert(receiver_reg == O0, "only valid assignment");
 +    assert_different_registers(member_reg, O0, O1, O2, O3, O4, O5);
@@ -3130,15 +3130,7 @@
 diff --git a/src/cpu/sparc/vm/sharedRuntime_sparc.cpp b/src/cpu/sparc/vm/sharedRuntime_sparc.cpp
 --- a/src/cpu/sparc/vm/sharedRuntime_sparc.cpp
 +++ b/src/cpu/sparc/vm/sharedRuntime_sparc.cpp
-@@ -822,6 +822,7 @@
-     bool G1_forced = false;
- #endif // ASSERT
-     if (r_1->is_stack()) {        // Pretend stack targets are loaded into G1
-+@@@
- #ifdef _LP64
-       Register ld_off = Rdisp;
-       __ set(reg2offset(r_1) + extraspace + bias, ld_off);
-@@ -1937,20 +1938,131 @@
+@@ -1937,20 +1937,131 @@
    __ bind(done);
  }
  
@@ -7731,6 +7723,22 @@
 diff --git a/src/cpu/x86/vm/templateTable_x86_32.cpp b/src/cpu/x86/vm/templateTable_x86_32.cpp
 --- a/src/cpu/x86/vm/templateTable_x86_32.cpp
 +++ b/src/cpu/x86/vm/templateTable_x86_32.cpp
+@@ -446,13 +446,13 @@
+   const Register cache = rcx;
+   const Register index = rdx;
+ 
+-  resolve_cache_and_index(f1_oop, rax, cache, index, wide ? sizeof(u2) : sizeof(u1));
++  resolve_cache_and_index(f12_oop, rax, cache, index, wide ? sizeof(u2) : sizeof(u1));
+   if (VerifyOops) {
+     __ verify_oop(rax);
+   }
+ 
+   Label L_done, L_throw_exception;
+-  const Register con_klass_temp = rcx;  // same as Rcache
++  const Register con_klass_temp = rcx;  // same as cache
+   __ load_klass(con_klass_temp, rax);
+   __ cmpptr(con_klass_temp, ExternalAddress((address)Universe::systemObjArrayKlassObj_addr()));
+   __ jcc(Assembler::notEqual, L_done);
 @@ -2084,15 +2084,15 @@
                                              Register Rcache,
                                              Register index,
@@ -9635,7 +9643,7 @@
 diff --git a/src/share/vm/classfile/javaClasses.cpp b/src/share/vm/classfile/javaClasses.cpp
 --- a/src/share/vm/classfile/javaClasses.cpp
 +++ b/src/share/vm/classfile/javaClasses.cpp
-@@ -125,6 +125,13 @@
+@@ -126,6 +126,13 @@
    if (!find_field(ik, name_symbol, signature_symbol, &fd, allow_super)) {
      ResourceMark rm;
      tty->print_cr("Invalid layout of %s at %s", ik->external_name(), name_symbol->as_C_string());
@@ -9649,7 +9657,7 @@
      fatal("Invalid layout of preloaded class");
    }
    dest_offset = fd.offset();
-@@ -2363,8 +2370,7 @@
+@@ -2377,8 +2384,7 @@
  // Support for java_lang_invoke_MethodHandle
  
  int java_lang_invoke_MethodHandle::_type_offset;
@@ -9659,7 +9667,7 @@
  
  int java_lang_invoke_MemberName::_clazz_offset;
  int java_lang_invoke_MemberName::_name_offset;
-@@ -2373,21 +2379,18 @@
+@@ -2387,21 +2393,18 @@
  int java_lang_invoke_MemberName::_vmtarget_offset;
  int java_lang_invoke_MemberName::_vmindex_offset;
  
@@ -9687,7 +9695,7 @@
    }
  }
  
-@@ -2398,30 +2401,14 @@
+@@ -2412,30 +2415,14 @@
      compute_offset(_name_offset,      klass_oop, vmSymbols::name_name(),      vmSymbols::string_signature());
      compute_offset(_type_offset,      klass_oop, vmSymbols::type_name(),      vmSymbols::object_signature());
      compute_offset(_flags_offset,     klass_oop, vmSymbols::flags_name(),     vmSymbols::int_signature());
@@ -9722,7 +9730,7 @@
    }
  }
  
-@@ -2450,31 +2437,14 @@
+@@ -2464,31 +2451,14 @@
    mh->obj_field_put(_type_offset, mtype);
  }
  
@@ -9760,7 +9768,7 @@
  }
  
  /// MemberName accessors
-@@ -2526,57 +2496,40 @@
+@@ -2540,57 +2510,40 @@
  
  void java_lang_invoke_MemberName::set_vmtarget(oop mname, oop ref) {
    assert(is_instance(mname), "wrong type");
@@ -9843,7 +9851,7 @@
  }
  
  
-@@ -2621,6 +2574,8 @@
+@@ -2635,6 +2588,8 @@
  }
  
  bool java_lang_invoke_MethodType::equals(oop mt1, oop mt2) {
@@ -9852,7 +9860,7 @@
    if (rtype(mt1) != rtype(mt2))
      return false;
    if (ptype_count(mt1) != ptype_count(mt2))
-@@ -2655,62 +2610,25 @@
+@@ -2669,62 +2624,25 @@
    return ptypes(mt)->length();
  }
  
@@ -9923,7 +9931,7 @@
  }
  
  
-@@ -2795,10 +2713,26 @@
+@@ -2809,10 +2727,26 @@
  }
  
  oop java_lang_ClassLoader::parent(oop loader) {
@@ -9951,7 +9959,7 @@
  
  // For class loader classes, parallelCapable defined
  // based on non-null field
-@@ -3058,9 +2992,7 @@
+@@ -3072,9 +3006,7 @@
    if (EnableInvokeDynamic) {
      java_lang_invoke_MethodHandle::compute_offsets();
      java_lang_invoke_MemberName::compute_offsets();
@@ -9962,7 +9970,7 @@
      java_lang_invoke_MethodType::compute_offsets();
      java_lang_invoke_MethodTypeForm::compute_offsets();
      java_lang_invoke_CallSite::compute_offsets();
-@@ -3292,7 +3224,14 @@
+@@ -3306,7 +3238,14 @@
      }
    }
    ResourceMark rm;
@@ -10310,7 +10318,7 @@
 diff --git a/src/share/vm/classfile/symbolTable.hpp b/src/share/vm/classfile/symbolTable.hpp
 --- a/src/share/vm/classfile/symbolTable.hpp
 +++ b/src/share/vm/classfile/symbolTable.hpp
-@@ -56,12 +56,15 @@
+@@ -57,12 +57,15 @@
  
    // Operator= increments reference count.
    void operator=(const TempNewSymbol &s) {
@@ -13965,7 +13973,7 @@
 diff --git a/src/share/vm/opto/library_call.cpp b/src/share/vm/opto/library_call.cpp
 --- a/src/share/vm/opto/library_call.cpp
 +++ b/src/share/vm/opto/library_call.cpp
-@@ -3990,7 +3990,8 @@
+@@ -4047,7 +4047,8 @@
        }
      }
    }
@@ -21051,7 +21059,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
-@@ -3055,15 +3055,6 @@
+@@ -3057,15 +3057,6 @@
    }
  #endif // PRODUCT
  
@@ -21194,7 +21202,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
-@@ -3827,12 +3827,6 @@
+@@ -3830,12 +3830,6 @@
    product(bool, AnonymousClasses, false,                                    \
            "support sun.misc.Unsafe.defineAnonymousClass (deprecated)")      \
                                                                              \
@@ -21207,7 +21215,7 @@
    diagnostic(bool, PrintMethodHandleStubs, false,                           \
            "Print generated stub code for method handles")                   \
                                                                              \
-@@ -3842,19 +3836,12 @@
+@@ -3845,19 +3839,12 @@
    diagnostic(bool, VerifyMethodHandles, trueInDebug,                        \
            "perform extra checks when constructing method handles")          \
                                                                              \