diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2018-02-27 19:49:00 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2018-02-27 19:49:00 +0000 |
commit | dd487071e8e2217456300ba74b4854b3d4795bd0 (patch) | |
tree | e2bb12f673ea166f7cd5e279a2eb07ff8d83e1e4 /java/openjdk8/files | |
parent | audio/musicpc: Changed += to =; Changed python to python:env (diff) |
Apply an upstream patch to fix Zero.
http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/8bd024c567e7
This patch complements the following commits.
http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/f8a45a60bc6b
http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/b1606443958a
http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/rev/a3e756231625
Reported by: Mikaƫl Urankar (mikael.urankar@gmail.com) (via swills)
Diffstat (limited to 'java/openjdk8/files')
-rw-r--r-- | java/openjdk8/files/patch-hotspot-src_cpu_zero_vm_methodHandles__zero.cpp | 12 | ||||
-rw-r--r-- | java/openjdk8/files/patch-hotspot_src_share_vm_interpreter_bytecodeInterpreter.cpp | 50 |
2 files changed, 62 insertions, 0 deletions
diff --git a/java/openjdk8/files/patch-hotspot-src_cpu_zero_vm_methodHandles__zero.cpp b/java/openjdk8/files/patch-hotspot-src_cpu_zero_vm_methodHandles__zero.cpp new file mode 100644 index 000000000000..abb4e5554244 --- /dev/null +++ b/java/openjdk8/files/patch-hotspot-src_cpu_zero_vm_methodHandles__zero.cpp @@ -0,0 +1,12 @@ +--- hotspot/src/cpu/zero/vm/methodHandles_zero.cpp.orig ++++ hotspot/src/cpu/zero/vm/methodHandles_zero.cpp +@@ -180,3 +180,9 @@ address MethodHandles::generate_method_handle_interpre + return NULL; + } + } ++ ++#ifndef PRODUCT ++void MethodHandles::trace_method_handle(MacroAssembler* _masm, const char* adaptername) { ++ // This is just a stub. ++} ++#endif //PRODUCT diff --git a/java/openjdk8/files/patch-hotspot_src_share_vm_interpreter_bytecodeInterpreter.cpp b/java/openjdk8/files/patch-hotspot_src_share_vm_interpreter_bytecodeInterpreter.cpp new file mode 100644 index 000000000000..a6bfa31d5dd0 --- /dev/null +++ b/java/openjdk8/files/patch-hotspot_src_share_vm_interpreter_bytecodeInterpreter.cpp @@ -0,0 +1,50 @@ +--- hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp.orig ++++ hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp +@@ -2569,13 +2569,35 @@ run: + + // this could definitely be cleaned up QQQ + Method* callee; +- Klass* iclass = cache->f1_as_klass(); +- // InstanceKlass* interface = (InstanceKlass*) iclass; ++ Method *interface_method = cache->f2_as_interface_method(); ++ InstanceKlass* iclass = interface_method->method_holder(); ++ + // get receiver + int parms = cache->parameter_size(); + oop rcvr = STACK_OBJECT(-parms); + CHECK_NULL(rcvr); + InstanceKlass* int2 = (InstanceKlass*) rcvr->klass(); ++ ++ // Receiver subtype check against resolved interface klass (REFC). ++ { ++ Klass* refc = cache->f1_as_klass(); ++ itableOffsetEntry* scan; ++ for (scan = (itableOffsetEntry*) int2->start_of_itable(); ++ scan->interface_klass() != NULL; ++ scan++) { ++ if (scan->interface_klass() == refc) { ++ break; ++ } ++ } ++ // Check that the entry is non-null. A null entry means ++ // that the receiver class doesn't implement the ++ // interface, and wasn't the same as when the caller was ++ // compiled. ++ if (scan->interface_klass() == NULL) { ++ VM_JAVA_ERROR(vmSymbols::java_lang_IncompatibleClassChangeError(), "", note_no_trap); ++ } ++ } ++ + itableOffsetEntry* ki = (itableOffsetEntry*) int2->start_of_itable(); + int i; + for ( i = 0 ; i < int2->itable_length() ; i++, ki++ ) { +@@ -2587,7 +2609,8 @@ run: + if (i == int2->itable_length()) { + VM_JAVA_ERROR(vmSymbols::java_lang_IncompatibleClassChangeError(), "", note_no_trap); + } +- int mindex = cache->f2_as_index(); ++ int mindex = interface_method->itable_index(); ++ + itableMethodEntry* im = ki->first_method_entry(rcvr->klass()); + callee = im[mindex].method(); + if (callee == NULL) { |