Mercurial > hg > graal-jvmci-8
changeset 22468:f58e7b5fe0ab
made JavaThread::_jvmci a union
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 25 Aug 2015 22:58:03 +0200 |
parents | d1019456c4d2 |
children | eaf97ec55a78 |
files | src/cpu/sparc/vm/sharedRuntime_sparc.cpp src/cpu/x86/vm/sharedRuntime_x86_64.cpp src/share/vm/runtime/thread.cpp src/share/vm/runtime/thread.hpp |
diffstat | 4 files changed, 7 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/src/cpu/sparc/vm/sharedRuntime_sparc.cpp Tue Aug 25 09:50:46 2015 -0700 +++ b/src/cpu/sparc/vm/sharedRuntime_sparc.cpp Tue Aug 25 22:58:03 2015 +0200 @@ -3542,7 +3542,7 @@ masm->block_comment("BEGIN JVMCI"); int implicit_exception_uncommon_trap_offset = __ offset() - start; __ ld_ptr(G2_thread, in_bytes(JavaThread::jvmci_implicit_exception_pc_offset()), O7); - DEBUG_ONLY(__ st(G0, Address(G2_thread, in_bytes(JavaThread::jvmci_implicit_exception_pc_offset())));) + __ st(G0, Address(G2_thread, in_bytes(JavaThread::jvmci_implicit_exception_pc_offset()))); __ add(O7, -8, O7); int uncommon_trap_offset = __ offset() - start;
--- a/src/cpu/x86/vm/sharedRuntime_x86_64.cpp Tue Aug 25 09:50:46 2015 -0700 +++ b/src/cpu/x86/vm/sharedRuntime_x86_64.cpp Tue Aug 25 22:58:03 2015 +0200 @@ -3397,7 +3397,7 @@ int implicit_exception_uncommon_trap_offset = __ pc() - start; __ pushptr(Address(r15_thread, in_bytes(JavaThread::jvmci_implicit_exception_pc_offset()))); - DEBUG_ONLY(__ movptr(Address(r15_thread, in_bytes(JavaThread::jvmci_implicit_exception_pc_offset())), (int32_t)NULL_WORD);) + __ movptr(Address(r15_thread, in_bytes(JavaThread::jvmci_implicit_exception_pc_offset())), (int32_t)NULL_WORD); int uncommon_trap_offset = __ pc() - start;
--- a/src/share/vm/runtime/thread.cpp Tue Aug 25 09:50:46 2015 -0700 +++ b/src/share/vm/runtime/thread.cpp Tue Aug 25 22:58:03 2015 +0200 @@ -1489,9 +1489,7 @@ _pending_failed_speculation = NULL; _pending_transfer_to_interpreter = false; _jvmci._alternate_call_target = NULL; - // TODO: If _jvmci becomes a union, then this assignment - // should be converted to an assertion or guarantee - _jvmci._implicit_exception_pc = NULL; + assert(_jvmci._implicit_exception_pc == NULL, "must be"); if (JVMCICounterSize > 0) { _jvmci_counters = NEW_C_HEAP_ARRAY(jlong, JVMCICounterSize, mtInternal); memset(_jvmci_counters, 0, sizeof(jlong) * JVMCICounterSize);
--- a/src/share/vm/runtime/thread.hpp Tue Aug 25 09:50:46 2015 -0700 +++ b/src/share/vm/runtime/thread.hpp Tue Aug 25 22:58:03 2015 +0200 @@ -934,15 +934,14 @@ // Specifies if the DeoptReason for the last uncommon trap was Reason_transfer_to_interpreter bool _pending_transfer_to_interpreter; - // These fields are mutually exclusive in terms of live ranges - // so this could be a union instead of a struct. - struct { + // These fields are mutually exclusive in terms of live ranges. + union { // Communicates the pc at which the most recent implicit exception occurred // from the signal handler to a deoptimization stub. address _implicit_exception_pc; - // Communicates an alternative call target to an i2c stub from a JavaCall. - address _alternate_call_target; // + // Communicates an alternative call target to an i2c stub from a JavaCall . + address _alternate_call_target; } _jvmci; // Support for high precision, thread sensitive counters in JVMCI compiled code.