< prev index next >

src/hotspot/cpu/x86/methodHandles_x86.cpp

Print this page
*** 109,16 ***
    __ movl(temp, Address(member_reg, NONZERO(java_lang_invoke_MemberName::flags_offset())));
    __ shrl(temp, java_lang_invoke_MemberName::MN_REFERENCE_KIND_SHIFT);
    __ 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, mtInternal);
!     jio_snprintf(buf, 100, "verify_ref_kind expected %x", ref_kind);
      if (ref_kind == JVM_REF_invokeVirtual ||
!         ref_kind == JVM_REF_invokeSpecial)
        // could do this for all ref_kinds, but would explode assembly code size
        trace_method_handle(_masm, buf);
      __ STOP(buf);
    }
    BLOCK_COMMENT("} verify_ref_kind");
    __ bind(L);
  }
--- 109,18 ---
    __ movl(temp, Address(member_reg, NONZERO(java_lang_invoke_MemberName::flags_offset())));
    __ shrl(temp, java_lang_invoke_MemberName::MN_REFERENCE_KIND_SHIFT);
    __ 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, mtInternal);
!     //jio_snprintf(buf, 100, "verify_ref_kind expected %x", ref_kind);
+     const char* buf = "verify_ref_kind"; // avoid allocating new strings
      if (ref_kind == JVM_REF_invokeVirtual ||
!         ref_kind == JVM_REF_invokeSpecial) {
        // could do this for all ref_kinds, but would explode assembly code size
        trace_method_handle(_masm, buf);
+     }
      __ STOP(buf);
    }
    BLOCK_COMMENT("} verify_ref_kind");
    __ bind(L);
  }
< prev index next >