Merge
This commit is contained in:
commit
0be0ab5955
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2013, 2017, 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
|
||||
@ -73,7 +73,7 @@ ifeq ($(call check-jvm-feature, compiler2), true)
|
||||
OUTPUT_DIR := $(JVM_VARIANT_OUTPUTDIR)/tools/adlc, \
|
||||
PROGRAM := adlc, \
|
||||
DEBUG_SYMBOLS := false, \
|
||||
DISABLED_WARNINGS_clang := parentheses tautological-compare, \
|
||||
DISABLED_WARNINGS_clang := tautological-compare, \
|
||||
DISABLED_WARNINGS_solstudio := notemsource, \
|
||||
))
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2016, 2017, 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
|
||||
@ -52,7 +52,8 @@ else
|
||||
$(call create-mapfile)
|
||||
endif
|
||||
|
||||
# Disabling switch warning for clang because of test source.
|
||||
# Disabling undef, switch, format-nonliteral and tautological-undefined-compare
|
||||
# warnings for clang because of test source.
|
||||
|
||||
# Note: On AIX, the gtest test classes linked into the libjvm.so push the TOC
|
||||
# size beyond 64k, so we need to link with bigtoc. However, this means that
|
||||
|
@ -218,9 +218,7 @@ $(eval $(call SetupNativeCompilation, BUILD_LIBJVM, \
|
||||
CFLAGS_DEBUG_SYMBOLS := $(JVM_CFLAGS_SYMBOLS), \
|
||||
CXXFLAGS_DEBUG_SYMBOLS := $(JVM_CFLAGS_SYMBOLS), \
|
||||
vm_version.cpp_CXXFLAGS := $(CFLAGS_VM_VERSION), \
|
||||
DISABLED_WARNINGS_clang := delete-non-virtual-dtor dynamic-class-memaccess \
|
||||
empty-body format logical-op-parentheses parentheses \
|
||||
parentheses-equality switch tautological-compare, \
|
||||
DISABLED_WARNINGS_clang := tautological-compare, \
|
||||
DISABLED_WARNINGS_xlc := 1540-0216 1540-0198 1540-1090 1540-1639 \
|
||||
1540-1088 1500-010, \
|
||||
ASFLAGS := $(JVM_ASFLAGS), \
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2017, 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
|
||||
@ -1160,6 +1160,8 @@ void LIR_Assembler::mem2reg(LIR_Opr src, LIR_Opr dest, BasicType type, LIR_Patch
|
||||
__ xorptr(dest->as_register(), dest->as_register());
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
PatchingStub* patch = NULL;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2017, 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
|
||||
@ -649,8 +649,8 @@ void LIRGenerator::do_ArithmeticOp(ArithmeticOp* x) {
|
||||
case doubleTag: do_ArithmeticOp_FPU(x); return;
|
||||
case longTag: do_ArithmeticOp_Long(x); return;
|
||||
case intTag: do_ArithmeticOp_Int(x); return;
|
||||
default: ShouldNotReachHere(); return;
|
||||
}
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2017, 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
|
||||
@ -826,6 +826,9 @@ void FpuStackAllocator::check_invalid_lir_op(LIR_Op* op) {
|
||||
case lir_fld:
|
||||
assert(false, "operations only inserted by FpuStackAllocator");
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2017, 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
|
||||
@ -92,6 +92,8 @@ inline void LinearScan::pd_add_temps(LIR_Op* op) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -121,7 +121,8 @@ address JNI_FastGetField::generate_fast_get_int_field0(BasicType type) {
|
||||
case T_CHAR: slow_case_addr = jni_GetCharField_addr(); break;
|
||||
case T_SHORT: slow_case_addr = jni_GetShortField_addr(); break;
|
||||
case T_INT: slow_case_addr = jni_GetIntField_addr(); break;
|
||||
case T_LONG: slow_case_addr = jni_GetLongField_addr();
|
||||
case T_LONG: slow_case_addr = jni_GetLongField_addr(); break;
|
||||
default: break;
|
||||
}
|
||||
// tail call
|
||||
__ jump (ExternalAddress(slow_case_addr));
|
||||
@ -215,7 +216,8 @@ address JNI_FastGetField::generate_fast_get_float_field0(BasicType type) {
|
||||
address slow_case_addr = NULL;
|
||||
switch (type) {
|
||||
case T_FLOAT: slow_case_addr = jni_GetFloatField_addr(); break;
|
||||
case T_DOUBLE: slow_case_addr = jni_GetDoubleField_addr();
|
||||
case T_DOUBLE: slow_case_addr = jni_GetDoubleField_addr(); break;
|
||||
default: break;
|
||||
}
|
||||
// tail call
|
||||
__ jump (ExternalAddress(slow_case_addr));
|
||||
|
@ -894,7 +894,7 @@ void MacroAssembler::debug64(char* msg, int64_t pc, int64_t regs[]) {
|
||||
void MacroAssembler::print_state64(int64_t pc, int64_t regs[]) {
|
||||
ttyLocker ttyl;
|
||||
FlagSetting fs(Debugging, true);
|
||||
tty->print_cr("rip = 0x%016lx", pc);
|
||||
tty->print_cr("rip = 0x%016lx", (intptr_t)pc);
|
||||
#ifndef PRODUCT
|
||||
tty->cr();
|
||||
findpc(pc);
|
||||
@ -923,13 +923,13 @@ void MacroAssembler::print_state64(int64_t pc, int64_t regs[]) {
|
||||
int64_t* rsp = (int64_t*) regs[11];
|
||||
int64_t* dump_sp = rsp;
|
||||
for (int col1 = 0; col1 < 8; col1++) {
|
||||
tty->print("(rsp+0x%03x) 0x%016lx: ", (int)((intptr_t)dump_sp - (intptr_t)rsp), (int64_t)dump_sp);
|
||||
tty->print("(rsp+0x%03x) 0x%016lx: ", (int)((intptr_t)dump_sp - (intptr_t)rsp), (intptr_t)dump_sp);
|
||||
os::print_location(tty, *dump_sp++);
|
||||
}
|
||||
for (int row = 0; row < 25; row++) {
|
||||
tty->print("(rsp+0x%03x) 0x%016lx: ", (int)((intptr_t)dump_sp - (intptr_t)rsp), (int64_t)dump_sp);
|
||||
tty->print("(rsp+0x%03x) 0x%016lx: ", (int)((intptr_t)dump_sp - (intptr_t)rsp), (intptr_t)dump_sp);
|
||||
for (int col = 0; col < 4; col++) {
|
||||
tty->print(" 0x%016lx", *dump_sp++);
|
||||
tty->print(" 0x%016lx", (intptr_t)*dump_sp++);
|
||||
}
|
||||
tty->cr();
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2017, 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
|
||||
@ -715,8 +715,8 @@ inline bool NativeInstruction::is_safepoint_poll() {
|
||||
if (((ubyte_at(0) & NativeTstRegMem::instruction_rex_prefix_mask) == NativeTstRegMem::instruction_rex_prefix &&
|
||||
ubyte_at(1) == NativeTstRegMem::instruction_code_memXregl &&
|
||||
(ubyte_at(2) & NativeTstRegMem::modrm_mask) == NativeTstRegMem::modrm_reg) ||
|
||||
ubyte_at(0) == NativeTstRegMem::instruction_code_memXregl &&
|
||||
(ubyte_at(1) & NativeTstRegMem::modrm_mask) == NativeTstRegMem::modrm_reg) {
|
||||
(ubyte_at(0) == NativeTstRegMem::instruction_code_memXregl &&
|
||||
(ubyte_at(1) & NativeTstRegMem::modrm_mask) == NativeTstRegMem::modrm_reg)) {
|
||||
NOT_JVMCI(assert(Assembler::is_polling_page_far(), "unexpected poll encoding");)
|
||||
return true;
|
||||
}
|
||||
|
@ -2622,6 +2622,7 @@ void TemplateTable::resolve_cache_and_index(int byte_no,
|
||||
switch (code) {
|
||||
case Bytecodes::_nofast_getfield: code = Bytecodes::_getfield; break;
|
||||
case Bytecodes::_nofast_putfield: code = Bytecodes::_putfield; break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
assert(byte_no == f1_byte || byte_no == f2_byte, "byte_no out of range");
|
||||
@ -3287,6 +3288,7 @@ void TemplateTable::jvmti_post_fast_field_mod() {
|
||||
case Bytecodes::_fast_dputfield: __ pop(dtos); break;
|
||||
case Bytecodes::_fast_fputfield: __ pop(ftos); break;
|
||||
case Bytecodes::_fast_lputfield: __ pop_l(rax); break;
|
||||
default: break;
|
||||
}
|
||||
__ bind(L2);
|
||||
}
|
||||
|
@ -1380,7 +1380,7 @@ void VM_Version::get_processor_features() {
|
||||
#endif
|
||||
log->cr();
|
||||
log->print("Allocation");
|
||||
if (AllocatePrefetchStyle <= 0 || UseSSE == 0 && !supports_3dnow_prefetch()) {
|
||||
if (AllocatePrefetchStyle <= 0 || (UseSSE == 0 && !supports_3dnow_prefetch())) {
|
||||
log->print_cr(": no prefetching");
|
||||
} else {
|
||||
log->print(" prefetching: ");
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2017, 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
|
||||
@ -689,8 +689,8 @@ static bool ptrace_waitpid(pid_t pid) {
|
||||
// attach to a process/thread specified by "pid"
|
||||
static bool ptrace_attach(pid_t pid) {
|
||||
int res;
|
||||
if ((res = ptrace(PT_ATTACH, pid, 0, 0)) < 0) {
|
||||
print_error("ptrace(PT_ATTACH, %d) failed with %d\n", pid, res);
|
||||
if ((res = ptrace(PT_ATTACHEXC, pid, 0, 0)) < 0) {
|
||||
print_error("ptrace(PT_ATTACHEXC, %d) failed with %d\n", pid, res);
|
||||
return false;
|
||||
} else {
|
||||
return ptrace_waitpid(pid);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013 SAP SE. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@ -32,7 +32,7 @@ class AIXDecoder: public AbstractDecoder {
|
||||
AIXDecoder() {
|
||||
_decoder_status = no_error;
|
||||
}
|
||||
~AIXDecoder() {}
|
||||
virtual ~AIXDecoder() {}
|
||||
|
||||
virtual bool can_decode_C_frame_in_vm() const { return true; }
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2017, 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
|
||||
@ -34,7 +34,7 @@
|
||||
class MachODecoder : public AbstractDecoder {
|
||||
public:
|
||||
MachODecoder() { }
|
||||
~MachODecoder() { }
|
||||
virtual ~MachODecoder() { }
|
||||
virtual bool can_decode_C_frame_in_vm() const {
|
||||
return true;
|
||||
}
|
||||
@ -55,4 +55,3 @@ class MachODecoder : public AbstractDecoder {
|
||||
#endif
|
||||
|
||||
#endif // OS_BSD_VM_DECODER_MACHO_HPP
|
||||
|
||||
|
@ -1564,7 +1564,7 @@ void* os::dll_lookup(void* handle, const char* name) {
|
||||
|
||||
int _print_dll_info_cb(const char * name, address base_address, address top_address, void * param) {
|
||||
outputStream * out = (outputStream *) param;
|
||||
out->print_cr(PTR_FORMAT " \t%s", base_address, name);
|
||||
out->print_cr(INTPTR_FORMAT " \t%s", (intptr_t)base_address, name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -2118,9 +2118,9 @@ void bsd_wrap_code(char* base, size_t size) {
|
||||
|
||||
static void warn_fail_commit_memory(char* addr, size_t size, bool exec,
|
||||
int err) {
|
||||
warning("INFO: os::commit_memory(" PTR_FORMAT ", " SIZE_FORMAT
|
||||
", %d) failed; error='%s' (errno=%d)", addr, size, exec,
|
||||
os::errno_name(err), err);
|
||||
warning("INFO: os::commit_memory(" INTPTR_FORMAT ", " SIZE_FORMAT
|
||||
", %d) failed; error='%s' (errno=%d)", (intptr_t)addr, size, exec,
|
||||
os::errno_name(err), err);
|
||||
}
|
||||
|
||||
// NOTE: Bsd kernel does not really reserve the pages for us.
|
||||
@ -3630,12 +3630,12 @@ bool os::find(address addr, outputStream* st) {
|
||||
Dl_info dlinfo;
|
||||
memset(&dlinfo, 0, sizeof(dlinfo));
|
||||
if (dladdr(addr, &dlinfo) != 0) {
|
||||
st->print(PTR_FORMAT ": ", addr);
|
||||
st->print(INTPTR_FORMAT ": ", (intptr_t)addr);
|
||||
if (dlinfo.dli_sname != NULL && dlinfo.dli_saddr != NULL) {
|
||||
st->print("%s+%#x", dlinfo.dli_sname,
|
||||
addr - (intptr_t)dlinfo.dli_saddr);
|
||||
(uint)((uintptr_t)addr - (uintptr_t)dlinfo.dli_saddr));
|
||||
} else if (dlinfo.dli_fbase != NULL) {
|
||||
st->print("<offset %#x>", addr - (intptr_t)dlinfo.dli_fbase);
|
||||
st->print("<offset %#x>", (uint)((uintptr_t)addr - (uintptr_t)dlinfo.dli_fbase));
|
||||
} else {
|
||||
st->print("<absolute address>");
|
||||
}
|
||||
@ -3643,7 +3643,7 @@ bool os::find(address addr, outputStream* st) {
|
||||
st->print(" in %s", dlinfo.dli_fname);
|
||||
}
|
||||
if (dlinfo.dli_fbase != NULL) {
|
||||
st->print(" at " PTR_FORMAT, dlinfo.dli_fbase);
|
||||
st->print(" at " INTPTR_FORMAT, (intptr_t)dlinfo.dli_fbase);
|
||||
}
|
||||
st->cr();
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2017, 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
|
||||
@ -56,7 +56,7 @@ class WindowsDecoder : public AbstractDecoder {
|
||||
|
||||
public:
|
||||
WindowsDecoder();
|
||||
~WindowsDecoder() { uninitialize(); };
|
||||
virtual ~WindowsDecoder() { uninitialize(); };
|
||||
|
||||
bool can_decode_C_frame_in_vm() const;
|
||||
bool demangle(const char* symbol, char *buf, int buflen);
|
||||
@ -105,4 +105,3 @@ public:
|
||||
#endif
|
||||
|
||||
#endif // OS_WINDOWS_VM_DECODER_WINDOWS_HPP
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2017, 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
|
||||
@ -979,50 +979,50 @@ void os::print_context(outputStream *st, const void *context) {
|
||||
const ucontext_t *uc = (const ucontext_t*)context;
|
||||
st->print_cr("Registers:");
|
||||
#ifdef AMD64
|
||||
st->print( "RAX=" INTPTR_FORMAT, uc->context_rax);
|
||||
st->print(", RBX=" INTPTR_FORMAT, uc->context_rbx);
|
||||
st->print(", RCX=" INTPTR_FORMAT, uc->context_rcx);
|
||||
st->print(", RDX=" INTPTR_FORMAT, uc->context_rdx);
|
||||
st->print( "RAX=" INTPTR_FORMAT, (intptr_t)uc->context_rax);
|
||||
st->print(", RBX=" INTPTR_FORMAT, (intptr_t)uc->context_rbx);
|
||||
st->print(", RCX=" INTPTR_FORMAT, (intptr_t)uc->context_rcx);
|
||||
st->print(", RDX=" INTPTR_FORMAT, (intptr_t)uc->context_rdx);
|
||||
st->cr();
|
||||
st->print( "RSP=" INTPTR_FORMAT, uc->context_rsp);
|
||||
st->print(", RBP=" INTPTR_FORMAT, uc->context_rbp);
|
||||
st->print(", RSI=" INTPTR_FORMAT, uc->context_rsi);
|
||||
st->print(", RDI=" INTPTR_FORMAT, uc->context_rdi);
|
||||
st->print( "RSP=" INTPTR_FORMAT, (intptr_t)uc->context_rsp);
|
||||
st->print(", RBP=" INTPTR_FORMAT, (intptr_t)uc->context_rbp);
|
||||
st->print(", RSI=" INTPTR_FORMAT, (intptr_t)uc->context_rsi);
|
||||
st->print(", RDI=" INTPTR_FORMAT, (intptr_t)uc->context_rdi);
|
||||
st->cr();
|
||||
st->print( "R8 =" INTPTR_FORMAT, uc->context_r8);
|
||||
st->print(", R9 =" INTPTR_FORMAT, uc->context_r9);
|
||||
st->print(", R10=" INTPTR_FORMAT, uc->context_r10);
|
||||
st->print(", R11=" INTPTR_FORMAT, uc->context_r11);
|
||||
st->print( "R8 =" INTPTR_FORMAT, (intptr_t)uc->context_r8);
|
||||
st->print(", R9 =" INTPTR_FORMAT, (intptr_t)uc->context_r9);
|
||||
st->print(", R10=" INTPTR_FORMAT, (intptr_t)uc->context_r10);
|
||||
st->print(", R11=" INTPTR_FORMAT, (intptr_t)uc->context_r11);
|
||||
st->cr();
|
||||
st->print( "R12=" INTPTR_FORMAT, uc->context_r12);
|
||||
st->print(", R13=" INTPTR_FORMAT, uc->context_r13);
|
||||
st->print(", R14=" INTPTR_FORMAT, uc->context_r14);
|
||||
st->print(", R15=" INTPTR_FORMAT, uc->context_r15);
|
||||
st->print( "R12=" INTPTR_FORMAT, (intptr_t)uc->context_r12);
|
||||
st->print(", R13=" INTPTR_FORMAT, (intptr_t)uc->context_r13);
|
||||
st->print(", R14=" INTPTR_FORMAT, (intptr_t)uc->context_r14);
|
||||
st->print(", R15=" INTPTR_FORMAT, (intptr_t)uc->context_r15);
|
||||
st->cr();
|
||||
st->print( "RIP=" INTPTR_FORMAT, uc->context_rip);
|
||||
st->print(", EFLAGS=" INTPTR_FORMAT, uc->context_flags);
|
||||
st->print(", ERR=" INTPTR_FORMAT, uc->context_err);
|
||||
st->print( "RIP=" INTPTR_FORMAT, (intptr_t)uc->context_rip);
|
||||
st->print(", EFLAGS=" INTPTR_FORMAT, (intptr_t)uc->context_flags);
|
||||
st->print(", ERR=" INTPTR_FORMAT, (intptr_t)uc->context_err);
|
||||
st->cr();
|
||||
st->print(" TRAPNO=" INTPTR_FORMAT, uc->context_trapno);
|
||||
st->print(" TRAPNO=" INTPTR_FORMAT, (intptr_t)uc->context_trapno);
|
||||
#else
|
||||
st->print( "EAX=" INTPTR_FORMAT, uc->context_eax);
|
||||
st->print(", EBX=" INTPTR_FORMAT, uc->context_ebx);
|
||||
st->print(", ECX=" INTPTR_FORMAT, uc->context_ecx);
|
||||
st->print(", EDX=" INTPTR_FORMAT, uc->context_edx);
|
||||
st->print( "EAX=" INTPTR_FORMAT, (intptr_t)uc->context_eax);
|
||||
st->print(", EBX=" INTPTR_FORMAT, (intptr_t)uc->context_ebx);
|
||||
st->print(", ECX=" INTPTR_FORMAT, (intptr_t)uc->context_ecx);
|
||||
st->print(", EDX=" INTPTR_FORMAT, (intptr_t)uc->context_edx);
|
||||
st->cr();
|
||||
st->print( "ESP=" INTPTR_FORMAT, uc->context_esp);
|
||||
st->print(", EBP=" INTPTR_FORMAT, uc->context_ebp);
|
||||
st->print(", ESI=" INTPTR_FORMAT, uc->context_esi);
|
||||
st->print(", EDI=" INTPTR_FORMAT, uc->context_edi);
|
||||
st->print( "ESP=" INTPTR_FORMAT, (intptr_t)uc->context_esp);
|
||||
st->print(", EBP=" INTPTR_FORMAT, (intptr_t)uc->context_ebp);
|
||||
st->print(", ESI=" INTPTR_FORMAT, (intptr_t)uc->context_esi);
|
||||
st->print(", EDI=" INTPTR_FORMAT, (intptr_t)uc->context_edi);
|
||||
st->cr();
|
||||
st->print( "EIP=" INTPTR_FORMAT, uc->context_eip);
|
||||
st->print(", EFLAGS=" INTPTR_FORMAT, uc->context_eflags);
|
||||
st->print( "EIP=" INTPTR_FORMAT, (intptr_t)uc->context_eip);
|
||||
st->print(", EFLAGS=" INTPTR_FORMAT, (intptr_t)uc->context_eflags);
|
||||
#endif // AMD64
|
||||
st->cr();
|
||||
st->cr();
|
||||
|
||||
intptr_t *sp = (intptr_t *)os::Bsd::ucontext_get_sp(uc);
|
||||
st->print_cr("Top of Stack: (sp=" PTR_FORMAT ")", sp);
|
||||
st->print_cr("Top of Stack: (sp=" INTPTR_FORMAT ")", (intptr_t)sp);
|
||||
print_hex_dump(st, (address)sp, (address)(sp + 8*sizeof(intptr_t)), sizeof(intptr_t));
|
||||
st->cr();
|
||||
|
||||
@ -1030,7 +1030,7 @@ void os::print_context(outputStream *st, const void *context) {
|
||||
// point to garbage if entry point in an nmethod is corrupted. Leave
|
||||
// this at the end, and hope for the best.
|
||||
address pc = os::Bsd::ucontext_get_pc(uc);
|
||||
st->print_cr("Instructions: (pc=" PTR_FORMAT ")", pc);
|
||||
st->print_cr("Instructions: (pc=" INTPTR_FORMAT ")", (intptr_t)pc);
|
||||
print_hex_dump(st, pc - 32, pc + 32, sizeof(char));
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2017, 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
|
||||
@ -3485,8 +3485,8 @@ Opcode * ADLParser::opcode_parse(InstructForm *instr) {
|
||||
skipws();
|
||||
if (_curchar != ')') {
|
||||
// Parse primary, secondary, and tertiary opcodes, if provided.
|
||||
if ( ((primary = get_ident_or_literal_constant("primary opcode")) == NULL) ) {
|
||||
parse_err(SYNERR, "primary hex opcode expected at %c\n", _curchar);
|
||||
if ( (primary = get_ident_or_literal_constant("primary opcode")) == NULL ) {
|
||||
parse_err(SYNERR, "primary hex opcode expected at %c\n", _curchar);
|
||||
return NULL;
|
||||
}
|
||||
skipws();
|
||||
@ -3494,7 +3494,7 @@ Opcode * ADLParser::opcode_parse(InstructForm *instr) {
|
||||
next_char();
|
||||
skipws();
|
||||
// Parse secondary opcode
|
||||
if ( ((secondary = get_ident_or_literal_constant("secondary opcode")) == NULL) ) {
|
||||
if ( (secondary = get_ident_or_literal_constant("secondary opcode")) == NULL ) {
|
||||
parse_err(SYNERR, "secondary hex opcode expected at %c\n", _curchar);
|
||||
return NULL;
|
||||
}
|
||||
@ -3503,7 +3503,7 @@ Opcode * ADLParser::opcode_parse(InstructForm *instr) {
|
||||
next_char();
|
||||
skipws();
|
||||
// Parse tertiary opcode
|
||||
if ( ((tertiary = get_ident_or_literal_constant("tertiary opcode")) == NULL) ) {
|
||||
if ( (tertiary = get_ident_or_literal_constant("tertiary opcode")) == NULL ) {
|
||||
parse_err(SYNERR,"tertiary hex opcode expected at %c\n", _curchar);
|
||||
return NULL;
|
||||
}
|
||||
@ -4773,8 +4773,7 @@ int ADLParser::get_int(void) {
|
||||
skipws(); // Skip whitespace before identifier
|
||||
start = end = _ptr; // Start points at first character
|
||||
c = *end; // Grab character to test
|
||||
while ((c >= '0') && (c <= '9')
|
||||
|| ((c == '-') && (end == start))) {
|
||||
while ((c >= '0' && c <= '9') || (c == '-' && end == start)) {
|
||||
end++; // Increment end pointer
|
||||
c = *end; // Grab character to test
|
||||
}
|
||||
@ -4812,7 +4811,7 @@ char *ADLParser::get_relation_dup(void) {
|
||||
if( (first == '=') || (first == '!') || (first == '<') || (first == '>') ) {
|
||||
next_char();
|
||||
char second = *_ptr; // the second character
|
||||
if( (second == '=') ) {
|
||||
if( second == '=' ) {
|
||||
next_char();
|
||||
char tmp = *_ptr;
|
||||
*_ptr = '\0'; // NULL terminate
|
||||
|
@ -1,5 +1,5 @@
|
||||
//
|
||||
// Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
// Copyright (c) 1997, 2017, 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
|
||||
@ -307,8 +307,8 @@ void ArchDesc::inspectInstructions() {
|
||||
// Find result type for match
|
||||
const char *result = instr->reduce_result();
|
||||
|
||||
if ( instr->is_ideal_branch() && instr->label_position() == -1 ||
|
||||
!instr->is_ideal_branch() && instr->label_position() != -1) {
|
||||
if (( instr->is_ideal_branch() && instr->label_position() == -1) ||
|
||||
(!instr->is_ideal_branch() && instr->label_position() != -1)) {
|
||||
syntax_err(instr->_linenum, "%s: Only branches to a label are supported\n", rootOp);
|
||||
}
|
||||
|
||||
|
@ -3146,8 +3146,8 @@ void ArchDesc::defineClasses(FILE *fp) {
|
||||
instr->has_temps() ||
|
||||
instr->is_mach_constant() ||
|
||||
instr->needs_constant_base() ||
|
||||
instr->_matrule != NULL &&
|
||||
instr->num_opnds() != instr->num_unique_opnds() )
|
||||
(instr->_matrule != NULL &&
|
||||
instr->num_opnds() != instr->num_unique_opnds()) )
|
||||
defineExpand(_CPP_EXPAND_file._fp, instr);
|
||||
// If there is an explicit peephole rule, build it
|
||||
if ( instr->peepholes() )
|
||||
@ -3878,7 +3878,7 @@ void ArchDesc::buildMachNode(FILE *fp_cpp, InstructForm *inst, const char *inden
|
||||
// Insert operands that are not in match-rule.
|
||||
// Only insert a DEF if the do_care flag is set
|
||||
comp_list.reset();
|
||||
while ( comp = comp_list.post_match_iter() ) {
|
||||
while ( (comp = comp_list.post_match_iter()) ) {
|
||||
// Check if we don't care about DEFs or KILLs that are not USEs
|
||||
if ( dont_care && (! comp->isa(Component::USE)) ) {
|
||||
continue;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2017, 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
|
||||
@ -1844,8 +1844,8 @@ void ArchDesc::declareClasses(FILE *fp) {
|
||||
instr->has_temps() ||
|
||||
instr->is_mach_constant() ||
|
||||
instr->needs_constant_base() ||
|
||||
instr->_matrule != NULL &&
|
||||
instr->num_opnds() != instr->num_unique_opnds() ) {
|
||||
(instr->_matrule != NULL &&
|
||||
instr->num_opnds() != instr->num_unique_opnds()) ) {
|
||||
fprintf(fp," virtual MachNode *Expand(State *state, Node_List &proj_list, Node* mem);\n");
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2017, 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
|
||||
@ -258,6 +258,7 @@ void DelayedConstant::update_all() {
|
||||
switch (dcon->type) {
|
||||
case T_INT: dcon->value = (intptr_t) ((int_fn_t) dcon->value_fn)(); break;
|
||||
case T_ADDRESS: dcon->value = (intptr_t) ((address_fn_t)dcon->value_fn)(); break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2017, 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
|
||||
@ -74,10 +74,11 @@ void Canonicalizer::do_Op2(Op2* x) {
|
||||
case Bytecodes::_lsub: set_constant(jlong_cast(0)); return;
|
||||
case Bytecodes::_iand: // fall through
|
||||
case Bytecodes::_land: // fall through
|
||||
case Bytecodes::_ior: // fall through
|
||||
case Bytecodes::_ior : // fall through
|
||||
case Bytecodes::_lor : set_canonical(x->x()); return;
|
||||
case Bytecodes::_ixor: set_constant(0); return;
|
||||
case Bytecodes::_lxor: set_constant(jlong_cast(0)); return;
|
||||
default : break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -114,6 +115,7 @@ void Canonicalizer::do_Op2(Op2* x) {
|
||||
case Bytecodes::_iand: set_constant(a & b); return;
|
||||
case Bytecodes::_ior : set_constant(a | b); return;
|
||||
case Bytecodes::_ixor: set_constant(a ^ b); return;
|
||||
default : break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -139,10 +141,13 @@ void Canonicalizer::do_Op2(Op2* x) {
|
||||
case Bytecodes::_land: set_constant(a & b); return;
|
||||
case Bytecodes::_lor : set_constant(a | b); return;
|
||||
case Bytecodes::_lxor: set_constant(a ^ b); return;
|
||||
default : break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
// other cases not implemented (must be extremely careful with floats & doubles!)
|
||||
default:
|
||||
// other cases not implemented (must be extremely careful with floats & doubles!)
|
||||
break;
|
||||
}
|
||||
}
|
||||
// make sure constant is on the right side, if any
|
||||
@ -161,6 +166,7 @@ void Canonicalizer::do_Op2(Op2* x) {
|
||||
// corresponds to Java semantics!
|
||||
case Bytecodes::_iand: set_constant(0); return;
|
||||
case Bytecodes::_ior : set_canonical(x->x()); return;
|
||||
default : break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -174,9 +180,12 @@ void Canonicalizer::do_Op2(Op2* x) {
|
||||
// corresponds to Java semantics!
|
||||
case Bytecodes::_land: set_constant((jlong)0); return;
|
||||
case Bytecodes::_lor : set_canonical(x->x()); return;
|
||||
default : break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -210,6 +219,7 @@ void Canonicalizer::do_StoreField (StoreField* x) {
|
||||
case Bytecodes::_i2b: if (type == T_BYTE) value = conv->value(); break;
|
||||
case Bytecodes::_i2s: if (type == T_SHORT || type == T_BYTE) value = conv->value(); break;
|
||||
case Bytecodes::_i2c: if (type == T_CHAR || type == T_BYTE) value = conv->value(); break;
|
||||
default : break;
|
||||
}
|
||||
// limit this optimization to current block
|
||||
if (value != NULL && in_current_block(conv)) {
|
||||
@ -303,6 +313,7 @@ void Canonicalizer::do_StoreIndexed (StoreIndexed* x) {
|
||||
case Bytecodes::_i2b: if (type == T_BYTE) value = conv->value(); break;
|
||||
case Bytecodes::_i2s: if (type == T_SHORT || type == T_BYTE) value = conv->value(); break;
|
||||
case Bytecodes::_i2c: if (type == T_CHAR || type == T_BYTE) value = conv->value(); break;
|
||||
default : break;
|
||||
}
|
||||
// limit this optimization to current block
|
||||
if (value != NULL && in_current_block(conv)) {
|
||||
@ -351,6 +362,7 @@ void Canonicalizer::do_ShiftOp (ShiftOp* x) {
|
||||
case Bytecodes::_ishl: set_constant(value << shift); return;
|
||||
case Bytecodes::_ishr: set_constant(value >> shift); return;
|
||||
case Bytecodes::_iushr: set_constant((value >> shift) & mask); return;
|
||||
default: break;
|
||||
}
|
||||
} else if (t->tag() == longTag) {
|
||||
jlong value = t->as_LongConstant()->value();
|
||||
@ -361,6 +373,7 @@ void Canonicalizer::do_ShiftOp (ShiftOp* x) {
|
||||
case Bytecodes::_lshl: set_constant(value << shift); return;
|
||||
case Bytecodes::_lshr: set_constant(value >> shift); return;
|
||||
case Bytecodes::_lushr: set_constant((value >> shift) & mask); return;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -369,7 +382,7 @@ void Canonicalizer::do_ShiftOp (ShiftOp* x) {
|
||||
switch (t2->tag()) {
|
||||
case intTag : if (t2->as_IntConstant()->value() == 0) set_canonical(x->x()); return;
|
||||
case longTag : if (t2->as_LongConstant()->value() == (jlong)0) set_canonical(x->x()); return;
|
||||
default : ShouldNotReachHere();
|
||||
default : ShouldNotReachHere(); return;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -402,6 +415,8 @@ void Canonicalizer::do_CompareOp (CompareOp* x) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else if (x->x()->type()->is_constant() && x->y()->type()->is_constant()) {
|
||||
switch (x->x()->type()->tag()) {
|
||||
@ -444,8 +459,10 @@ void Canonicalizer::do_CompareOp (CompareOp* x) {
|
||||
set_constant(1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -530,6 +547,8 @@ void Canonicalizer::do_Intrinsic (Intrinsic* x) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -572,6 +591,7 @@ void Canonicalizer::do_Convert (Convert* x) {
|
||||
case Bytecodes::_i2b: type = T_BYTE; break;
|
||||
case Bytecodes::_i2s: type = T_SHORT; break;
|
||||
case Bytecodes::_i2c: type = T_CHAR; break;
|
||||
default : break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -581,6 +601,7 @@ void Canonicalizer::do_Convert (Convert* x) {
|
||||
case Bytecodes::_i2b: if (type == T_BYTE) set_canonical(x->value()); break;
|
||||
case Bytecodes::_i2s: if (type == T_SHORT || type == T_BYTE) set_canonical(x->value()); break;
|
||||
case Bytecodes::_i2c: if (type == T_CHAR) set_canonical(x->value()); break;
|
||||
default : break;
|
||||
}
|
||||
} else {
|
||||
Op2* op2 = x->value()->as_Op2();
|
||||
@ -591,6 +612,7 @@ void Canonicalizer::do_Convert (Convert* x) {
|
||||
case Bytecodes::_i2b: safebits = 0x7f; break;
|
||||
case Bytecodes::_i2s: safebits = 0x7fff; break;
|
||||
case Bytecodes::_i2c: safebits = 0xffff; break;
|
||||
default : break;
|
||||
}
|
||||
// When casting a masked integer to a smaller signed type, if
|
||||
// the mask doesn't include the sign bit the cast isn't needed.
|
||||
@ -669,9 +691,10 @@ static bool is_true(jlong x, If::Condition cond, jlong y) {
|
||||
case If::leq: return x <= y;
|
||||
case If::gtr: return x > y;
|
||||
case If::geq: return x >= y;
|
||||
default:
|
||||
ShouldNotReachHere();
|
||||
return false;
|
||||
}
|
||||
ShouldNotReachHere();
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool is_safepoint(BlockEnd* x, BlockBegin* sux) {
|
||||
@ -756,6 +779,8 @@ void Canonicalizer::do_If(If* x) {
|
||||
case Bytecodes::_dcmpl: case Bytecodes::_dcmpg:
|
||||
set_canonical(x);
|
||||
return;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
set_bci(cmp->state_before()->bci());
|
||||
|
@ -347,6 +347,9 @@ void BlockListBuilder::set_leaders() {
|
||||
current = NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1488,6 +1491,8 @@ void GraphBuilder::method_return(Value x, bool ignore_return) {
|
||||
x = append(new LogicOp(Bytecodes::_iand, x, mask));
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// Check to see whether we are inlining. If so, Return
|
||||
@ -1847,6 +1852,8 @@ void GraphBuilder::invoke(Bytecodes::Code code) {
|
||||
case Bytecodes::_invokehandle:
|
||||
code = target->is_static() ? Bytecodes::_invokestatic : Bytecodes::_invokespecial;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (bc_raw == Bytecodes::_invokehandle) {
|
||||
@ -1993,12 +2000,12 @@ void GraphBuilder::invoke(Bytecodes::Code code) {
|
||||
|
||||
// check if we could do inlining
|
||||
if (!PatchALot && Inline && target->is_loaded() &&
|
||||
(klass->is_initialized() || klass->is_interface() && target->holder()->is_initialized())
|
||||
(klass->is_initialized() || (klass->is_interface() && target->holder()->is_initialized()))
|
||||
&& !patch_for_appendix) {
|
||||
// callee is known => check if we have static binding
|
||||
if (code == Bytecodes::_invokestatic ||
|
||||
code == Bytecodes::_invokespecial ||
|
||||
code == Bytecodes::_invokevirtual && target->is_final_method() ||
|
||||
(code == Bytecodes::_invokevirtual && target->is_final_method()) ||
|
||||
code == Bytecodes::_invokedynamic) {
|
||||
ciMethod* inline_target = (cha_monomorphic_target != NULL) ? cha_monomorphic_target : target;
|
||||
// static binding => check if callee is ok
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2017, 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
|
||||
@ -239,8 +239,8 @@ bool ArithmeticOp::is_commutative() const {
|
||||
case Bytecodes::_lmul: // fall through
|
||||
case Bytecodes::_fmul: // fall through
|
||||
case Bytecodes::_dmul: return true;
|
||||
default : return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -250,8 +250,8 @@ bool ArithmeticOp::can_trap() const {
|
||||
case Bytecodes::_ldiv: // fall through
|
||||
case Bytecodes::_irem: // fall through
|
||||
case Bytecodes::_lrem: return true;
|
||||
default : return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -266,7 +266,7 @@ bool LogicOp::is_commutative() const {
|
||||
case Bytecodes::_lor : // fall through
|
||||
case Bytecodes::_ixor: // fall through
|
||||
case Bytecodes::_lxor: break;
|
||||
default : ShouldNotReachHere();
|
||||
default : ShouldNotReachHere(); break;
|
||||
}
|
||||
#endif
|
||||
// all LogicOps are commutative
|
||||
@ -447,8 +447,9 @@ bool Constant::is_equal(Value v) const {
|
||||
t1->is_loaded() && t2->is_loaded() &&
|
||||
t1->constant_value() == t2->constant_value());
|
||||
}
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Constant::CompareResult Constant::compare(Instruction::Condition cond, Value right) const {
|
||||
@ -471,6 +472,7 @@ Constant::CompareResult Constant::compare(Instruction::Condition cond, Value rig
|
||||
case If::leq: return x <= y ? cond_true : cond_false;
|
||||
case If::gtr: return x > y ? cond_true : cond_false;
|
||||
case If::geq: return x >= y ? cond_true : cond_false;
|
||||
default : break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -484,6 +486,7 @@ Constant::CompareResult Constant::compare(Instruction::Condition cond, Value rig
|
||||
case If::leq: return x <= y ? cond_true : cond_false;
|
||||
case If::gtr: return x > y ? cond_true : cond_false;
|
||||
case If::geq: return x >= y ? cond_true : cond_false;
|
||||
default : break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -495,6 +498,7 @@ Constant::CompareResult Constant::compare(Instruction::Condition cond, Value rig
|
||||
switch (cond) {
|
||||
case If::eql: return xvalue == yvalue ? cond_true : cond_false;
|
||||
case If::neq: return xvalue != yvalue ? cond_true : cond_false;
|
||||
default : break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -507,10 +511,13 @@ Constant::CompareResult Constant::compare(Instruction::Condition cond, Value rig
|
||||
switch (cond) {
|
||||
case If::eql: return xvalue == yvalue ? cond_true : cond_false;
|
||||
case If::neq: return xvalue != yvalue ? cond_true : cond_false;
|
||||
default : break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return not_comparable;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2017, 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
|
||||
@ -59,9 +59,10 @@ const char* InstructionPrinter::cond_name(If::Condition cond) {
|
||||
case If::geq: return ">=";
|
||||
case If::aeq: return "|>=|";
|
||||
case If::beq: return "|<=|";
|
||||
default:
|
||||
ShouldNotReachHere();
|
||||
return NULL;
|
||||
}
|
||||
ShouldNotReachHere();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@ -102,8 +103,8 @@ const char* InstructionPrinter::op_name(Bytecodes::Code op) {
|
||||
case Bytecodes::_lor : return "|";
|
||||
case Bytecodes::_ixor : // fall through
|
||||
case Bytecodes::_lxor : return "^";
|
||||
default : return Bytecodes::name(op);
|
||||
}
|
||||
return Bytecodes::name(op);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2017, 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
|
||||
@ -243,6 +243,8 @@ void LIR_Op2::verify() const {
|
||||
assert(in_opr1()->is_valid() && in_opr2()->is_valid(), "must be valid");
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -395,6 +397,8 @@ void LIR_Op1::verify() const {
|
||||
case lir_return:
|
||||
assert(in_opr()->is_register() || in_opr()->is_illegal(), "must be");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -394,7 +394,7 @@ void LIRGenerator::do_root(Value instr) {
|
||||
void LIRGenerator::walk(Value instr) {
|
||||
InstructionMark im(compilation(), instr);
|
||||
//stop walk when encounter a root
|
||||
if (instr->is_pinned() && instr->as_Phi() == NULL || instr->operand()->is_valid()) {
|
||||
if ((instr->is_pinned() && instr->as_Phi() == NULL) || instr->operand()->is_valid()) {
|
||||
assert(instr->operand() != LIR_OprFact::illegalOpr || instr->as_Constant() != NULL, "this root has not yet been visited");
|
||||
} else {
|
||||
assert(instr->subst() == instr, "shouldn't have missed substitution");
|
||||
@ -1434,6 +1434,8 @@ LIR_Opr LIRGenerator::load_constant(LIR_Const* c) {
|
||||
case T_OBJECT:
|
||||
if (c->as_jobject() != other->as_jobject()) continue;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return _reg_for_constants.at(i);
|
||||
}
|
||||
@ -2804,6 +2806,8 @@ void LIRGenerator::do_Base(Base* x) {
|
||||
case T_CHAR:
|
||||
t = T_INT;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
LIR_Opr dest = new_register(t);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2017, 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
|
||||
@ -1104,6 +1104,8 @@ IntervalUseKind LinearScan::use_kind_of_input_operand(LIR_Op* op, LIR_Opr opr) {
|
||||
return shouldHaveRegister;
|
||||
}
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
// FPU stack float instruction
|
||||
@ -1120,6 +1122,8 @@ IntervalUseKind LinearScan::use_kind_of_input_operand(LIR_Op* op, LIR_Opr opr) {
|
||||
return shouldHaveRegister;
|
||||
}
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
// We want to sometimes use logical operations on pointers, in particular in GC barriers.
|
||||
@ -1142,6 +1146,8 @@ IntervalUseKind LinearScan::use_kind_of_input_operand(LIR_Op* op, LIR_Opr opr) {
|
||||
return shouldHaveRegister;
|
||||
}
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif // X86 S390
|
||||
@ -1247,6 +1253,8 @@ void LinearScan::add_register_hints(LIR_Op* op) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2373,6 +2381,8 @@ void check_stack_depth(CodeEmitInfo* info, int stack_end) {
|
||||
case Bytecodes::_if_acmpne :
|
||||
assert(stack_end >= -Bytecodes::depth(code), "must have non-empty expression stack at if bytecode");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3027,8 +3037,8 @@ void LinearScan::assign_reg_num(LIR_OpList* instructions, IntervalWalker* iw) {
|
||||
LIR_Opr src = move->in_opr();
|
||||
LIR_Opr dst = move->result_opr();
|
||||
if (dst == src ||
|
||||
!dst->is_pointer() && !src->is_pointer() &&
|
||||
src->is_same_register(dst)) {
|
||||
(!dst->is_pointer() && !src->is_pointer() &&
|
||||
src->is_same_register(dst))) {
|
||||
instructions->at_put(j, NULL);
|
||||
has_dead = true;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2017, 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
|
||||
@ -173,8 +173,8 @@ class ValueStack: public CompilationResourceObj {
|
||||
case doubleTag : dpush(t); return;
|
||||
case objectTag : apush(t); return;
|
||||
case addressTag: rpush(t); return;
|
||||
default : ShouldNotReachHere(); return;
|
||||
}
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
|
||||
Value ipop() { return check(intTag , _stack.pop()); }
|
||||
@ -192,9 +192,8 @@ class ValueStack: public CompilationResourceObj {
|
||||
case doubleTag : return dpop();
|
||||
case objectTag : return apop();
|
||||
case addressTag: return rpop();
|
||||
default : ShouldNotReachHere(); return NULL;
|
||||
}
|
||||
ShouldNotReachHere();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Values* pop_arguments(int argument_size);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2017, 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
|
||||
@ -137,9 +137,9 @@ ValueType* as_ValueType(BasicType type) {
|
||||
case T_OBJECT : return objectType;
|
||||
case T_ADDRESS: return addressType;
|
||||
case T_ILLEGAL: return illegalType;
|
||||
default : ShouldNotReachHere();
|
||||
return illegalType;
|
||||
}
|
||||
ShouldNotReachHere();
|
||||
return illegalType;
|
||||
}
|
||||
|
||||
|
||||
@ -167,9 +167,9 @@ ValueType* as_ValueType(ciConstant value) {
|
||||
}
|
||||
return new ObjectConstant(obj);
|
||||
}
|
||||
default : ShouldNotReachHere();
|
||||
return illegalType;
|
||||
}
|
||||
ShouldNotReachHere();
|
||||
return illegalType;
|
||||
}
|
||||
|
||||
|
||||
@ -184,7 +184,7 @@ BasicType as_BasicType(ValueType* type) {
|
||||
case metaDataTag:return T_METADATA;
|
||||
case addressTag: return T_ADDRESS;
|
||||
case illegalTag: return T_ILLEGAL;
|
||||
default : ShouldNotReachHere();
|
||||
return T_ILLEGAL;
|
||||
}
|
||||
ShouldNotReachHere();
|
||||
return T_ILLEGAL;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2017, 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
|
||||
@ -266,6 +266,8 @@ void BCEscapeAnalyzer::invoke(StateInfo &state, Bytecodes::Code code, ciMethod*
|
||||
case Bytecodes::_invokehandle:
|
||||
code = target->is_static() ? Bytecodes::_invokestatic : Bytecodes::_invokespecial;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -301,11 +303,11 @@ void BCEscapeAnalyzer::invoke(StateInfo &state, Bytecodes::Code code, ciMethod*
|
||||
// determine actual method (use CHA if necessary)
|
||||
ciMethod* inline_target = NULL;
|
||||
if (target->is_loaded() && klass->is_loaded()
|
||||
&& (klass->is_initialized() || klass->is_interface() && target->holder()->is_initialized())
|
||||
&& (klass->is_initialized() || (klass->is_interface() && target->holder()->is_initialized()))
|
||||
&& target->is_loaded()) {
|
||||
if (code == Bytecodes::_invokestatic
|
||||
|| code == Bytecodes::_invokespecial
|
||||
|| code == Bytecodes::_invokevirtual && target->is_final_method()) {
|
||||
|| (code == Bytecodes::_invokevirtual && target->is_final_method())) {
|
||||
inline_target = target;
|
||||
} else {
|
||||
inline_target = target->find_monomorphic_target(calling_klass, callee_holder, actual_recv);
|
||||
@ -342,7 +344,8 @@ void BCEscapeAnalyzer::invoke(StateInfo &state, Bytecodes::Code code, ciMethod*
|
||||
|
||||
// record dependencies if at least one parameter retained stack-allocatable
|
||||
if (must_record_dependencies) {
|
||||
if (code == Bytecodes::_invokeinterface || code == Bytecodes::_invokevirtual && !target->is_final_method()) {
|
||||
if (code == Bytecodes::_invokeinterface ||
|
||||
(code == Bytecodes::_invokevirtual && !target->is_final_method())) {
|
||||
_dependencies.append(actual_recv);
|
||||
_dependencies.append(inline_target);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2017, 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
|
||||
@ -66,6 +66,8 @@ ciConstant ciArray::element_value_impl(BasicType elembt,
|
||||
ciObject* box = env->get_object(elem);
|
||||
return ciConstant(T_OBJECT, box);
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
assert(ary->is_typeArray(), "");
|
||||
typeArrayOop tary = (typeArrayOop) ary;
|
||||
|
@ -797,6 +797,8 @@ ciMethod* ciEnv::get_method_by_index_impl(const constantPoolHandle& cpool,
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -86,9 +86,10 @@ ciConstant ciInstance::field_value_impl(BasicType field_btype, int offset) {
|
||||
return ciConstant(field_btype, CURRENT_ENV->get_object(o));
|
||||
}
|
||||
}
|
||||
default:
|
||||
fatal("no field value: %s", type2name(field_btype));
|
||||
return ciConstant();
|
||||
}
|
||||
fatal("no field value: %s", type2name(field_btype));
|
||||
return ciConstant();
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
@ -800,7 +800,7 @@ ciMethod* ciMethod::resolve_invoke(ciKlass* caller, ciKlass* exact_receiver, boo
|
||||
// the vtable has not been setup, and the LinkResolver will fail.
|
||||
if (recv->is_array_klass()
|
||||
||
|
||||
InstanceKlass::cast(recv)->is_linked() && !exact_receiver->is_interface()) {
|
||||
(InstanceKlass::cast(recv)->is_linked() && !exact_receiver->is_interface())) {
|
||||
if (holder()->is_interface()) {
|
||||
m = LinkResolver::resolve_interface_call_or_null(recv, link_info);
|
||||
} else {
|
||||
@ -1493,6 +1493,8 @@ bool ciMethod::is_consistent_info(ciMethod* declared_method, ciMethod* resolved_
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
assert(target_sig->count() - rbase == linker_sig->count() - sbase - has_appendix, "argument count mismatch");
|
||||
int arg_count = target_sig->count() - rbase;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2006, 2017, 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
|
||||
@ -245,6 +245,9 @@ void ciMethodBlocks::do_analysis() {
|
||||
(void) make_block_at(s.next_bci());
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
// End the last block
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2017, 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
|
||||
@ -610,14 +610,10 @@ void ciMethodData::dump_replay_data(outputStream* out) {
|
||||
int elements = (data_size() + extra_data_size()) / sizeof(intptr_t);
|
||||
out->print(" data %d", elements);
|
||||
for (int i = 0; i < elements; i++) {
|
||||
// We could use INTPTR_FORMAT here but that's a zero justified
|
||||
// We could use INTPTR_FORMAT here but that's zero justified
|
||||
// which makes comparing it with the SA version of this output
|
||||
// harder.
|
||||
#ifdef _LP64
|
||||
out->print(" 0x%" FORMAT64_MODIFIER "x", data()[i]);
|
||||
#else
|
||||
out->print(" 0x%x", data()[i]);
|
||||
#endif
|
||||
// harder. data()'s element type is intptr_t.
|
||||
out->print(" " INTPTRNZ_FORMAT, data()[i]);
|
||||
}
|
||||
|
||||
// The MDO contained oop references as ciObjects, so scan for those
|
||||
|
@ -757,7 +757,7 @@ class CompileReplay : public StackObj {
|
||||
InstanceKlass* k = (InstanceKlass *)parse_klass(CHECK);
|
||||
|
||||
if (k == NULL || ReplaySuppressInitializers == 0 ||
|
||||
ReplaySuppressInitializers == 2 && k->class_loader() == NULL) {
|
||||
(ReplaySuppressInitializers == 2 && k->class_loader() == NULL)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2017, 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
|
||||
@ -2192,9 +2192,10 @@ bool ciTypeFlow::can_trap(ciBytecodeStream& str) {
|
||||
case Bytecodes::_monitorexit:
|
||||
// We can assume monitors are matched in this analysis.
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
@ -56,6 +56,7 @@ public:
|
||||
ClassPathEntry* next() const {
|
||||
return (ClassPathEntry*) OrderAccess::load_ptr_acquire(&_next);
|
||||
}
|
||||
virtual ~ClassPathEntry() {}
|
||||
void set_next(ClassPathEntry* next) {
|
||||
// may have unlocked readers, so ensure visibility.
|
||||
OrderAccess::release_store_ptr(&_next, next);
|
||||
@ -82,6 +83,7 @@ class ClassPathDirEntry: public ClassPathEntry {
|
||||
const char* name() const { return _dir; }
|
||||
JImageFile* jimage() const { return NULL; }
|
||||
ClassPathDirEntry(const char* dir);
|
||||
virtual ~ClassPathDirEntry() {}
|
||||
ClassFileStream* open_stream(const char* name, TRAPS);
|
||||
// Debugging
|
||||
NOT_PRODUCT(void compile_the_world(Handle loader, TRAPS);)
|
||||
@ -120,7 +122,7 @@ class ClassPathZipEntry: public ClassPathEntry {
|
||||
const char* name() const { return _zip_name; }
|
||||
JImageFile* jimage() const { return NULL; }
|
||||
ClassPathZipEntry(jzfile* zip, const char* zip_name, bool is_boot_append);
|
||||
~ClassPathZipEntry();
|
||||
virtual ~ClassPathZipEntry();
|
||||
u1* open_entry(const char* name, jint* filesize, bool nul_terminate, TRAPS);
|
||||
u1* open_versioned_entry(const char* name, jint* filesize, TRAPS) NOT_CDS_RETURN_(NULL);
|
||||
ClassFileStream* open_stream(const char* name, TRAPS);
|
||||
@ -143,7 +145,7 @@ public:
|
||||
const char* name() const { return _name == NULL ? "" : _name; }
|
||||
JImageFile* jimage() const { return _jimage; }
|
||||
ClassPathImageEntry(JImageFile* jimage, const char* name);
|
||||
~ClassPathImageEntry();
|
||||
virtual ~ClassPathImageEntry();
|
||||
ClassFileStream* open_stream(const char* name, TRAPS);
|
||||
|
||||
// Debugging
|
||||
|
@ -197,13 +197,13 @@ bool JavaAssertions::enabled(const char* classname, bool systemClass) {
|
||||
|
||||
// First check options that apply to classes. If we find a match we're done.
|
||||
OptionList* p;
|
||||
if (p = match_class(classname)) {
|
||||
if ((p = match_class(classname))) {
|
||||
trace(classname, "class", p->name(), p->enabled());
|
||||
return p->enabled();
|
||||
}
|
||||
|
||||
// Now check packages, from most specific to least.
|
||||
if (p = match_package(classname)) {
|
||||
if ((p = match_package(classname))) {
|
||||
trace(classname, "package", p->name(), p->enabled());
|
||||
return p->enabled();
|
||||
}
|
||||
|
@ -3045,7 +3045,7 @@ void java_lang_boxing_object::print(BasicType type, jvalue* value, outputStream*
|
||||
case T_BYTE: st->print("%d", value->b); break;
|
||||
case T_SHORT: st->print("%d", value->s); break;
|
||||
case T_INT: st->print("%d", value->i); break;
|
||||
case T_LONG: st->print(INT64_FORMAT, value->j); break;
|
||||
case T_LONG: st->print(JLONG_FORMAT, value->j); break;
|
||||
case T_FLOAT: st->print("%f", value->f); break;
|
||||
case T_DOUBLE: st->print("%lf", value->d); break;
|
||||
default: st->print("type %d?", type); break;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2010, 2017, 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
|
||||
@ -132,7 +132,7 @@ class verification_type_info {
|
||||
return ((address)this >= start &&
|
||||
(address)this < end &&
|
||||
(bci_addr() + sizeof(u2) <= end ||
|
||||
!is_object() && !is_uninitialized()));
|
||||
(!is_object() && !is_uninitialized())));
|
||||
}
|
||||
|
||||
void print_on(outputStream* st) {
|
||||
|
@ -892,6 +892,7 @@ const char* vmIntrinsics::short_name_as_C_string(vmIntrinsics::ID id, char* buf,
|
||||
case F_SN: fname = "native static "; break;
|
||||
case F_S: fname = "static "; break;
|
||||
case F_RNY:fname = "native synchronized "; break;
|
||||
default: break;
|
||||
}
|
||||
const char* kptr = strrchr(kname, '/');
|
||||
if (kptr != NULL) kname = kptr + 1;
|
||||
@ -989,6 +990,8 @@ void vmIntrinsics::verify_method(ID actual_id, Method* m) {
|
||||
declared_id = match_method_with_klass(m, vmSymbols::java_lang_Math());
|
||||
if (declared_id == actual_id) return; // acceptable alias
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2017, 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
|
||||
@ -255,6 +255,8 @@ void CompiledMethod::cleanup_inline_caches(bool clean_all/*=false*/) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -316,6 +318,7 @@ Method* CompiledMethod::attached_method(address call_instr) {
|
||||
case relocInfo::static_call_type: return iter.static_call_reloc()->method_value();
|
||||
case relocInfo::opt_virtual_call_type: return iter.opt_virtual_call_reloc()->method_value();
|
||||
case relocInfo::virtual_call_type: return iter.virtual_call_reloc()->method_value();
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -626,6 +629,9 @@ bool CompiledMethod::do_unloading_parallel(BoolObjectClosure* is_alive, bool unl
|
||||
|
||||
case relocInfo::metadata_type:
|
||||
break; // nothing to do.
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -679,6 +685,9 @@ void CompiledMethod::do_unloading_parallel_postponed(BoolObjectClosure* is_alive
|
||||
case relocInfo::static_call_type:
|
||||
clean_if_nmethod_is_unloaded(compiledStaticCall_at(iter.reloc()), is_alive, this);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2017, 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
|
||||
@ -39,9 +39,9 @@ inline jint CompressedStream::decode_sign(juint value) {
|
||||
// converts trailing zeroes (common in floats) to leading zeroes
|
||||
inline juint CompressedStream::reverse_int(juint i) {
|
||||
// Hacker's Delight, Figure 7-1
|
||||
i = (i & 0x55555555) << 1 | (i >> 1) & 0x55555555;
|
||||
i = (i & 0x33333333) << 2 | (i >> 2) & 0x33333333;
|
||||
i = (i & 0x0f0f0f0f) << 4 | (i >> 4) & 0x0f0f0f0f;
|
||||
i = (i & 0x55555555) << 1 | ((i >> 1) & 0x55555555);
|
||||
i = (i & 0x33333333) << 2 | ((i >> 2) & 0x33333333);
|
||||
i = (i & 0x0f0f0f0f) << 4 | ((i >> 4) & 0x0f0f0f0f);
|
||||
i = (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24);
|
||||
return i;
|
||||
}
|
||||
|
@ -188,7 +188,7 @@ void ConstantLongValue::write_on(DebugInfoWriteStream* stream) {
|
||||
}
|
||||
|
||||
void ConstantLongValue::print_on(outputStream* st) const {
|
||||
st->print(INT64_FORMAT, value());
|
||||
st->print(JLONG_FORMAT, value());
|
||||
}
|
||||
|
||||
// ConstantDoubleValue
|
||||
|
@ -272,6 +272,8 @@ void Dependencies::assert_common_3(DepType dept,
|
||||
case exclusive_concrete_methods_2:
|
||||
swap = (x->ident() > x2->ident() && x->as_metadata()->as_method()->holder() != ctxk);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (swap) { ciBaseObject* t = x; x = x2; x2 = t; }
|
||||
|
||||
@ -420,7 +422,7 @@ void Dependencies::sort_all_deps() {
|
||||
case 1: deps->sort(sort_dep_value_arg_1, 1); break;
|
||||
case 2: deps->sort(sort_dep_value_arg_2, 2); break;
|
||||
case 3: deps->sort(sort_dep_value_arg_3, 3); break;
|
||||
default: ShouldNotReachHere();
|
||||
default: ShouldNotReachHere(); break;
|
||||
}
|
||||
}
|
||||
return;
|
||||
@ -434,7 +436,7 @@ void Dependencies::sort_all_deps() {
|
||||
case 1: deps->sort(sort_dep_arg_1, 1); break;
|
||||
case 2: deps->sort(sort_dep_arg_2, 2); break;
|
||||
case 3: deps->sort(sort_dep_arg_3, 3); break;
|
||||
default: ShouldNotReachHere();
|
||||
default: ShouldNotReachHere(); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -466,8 +468,9 @@ ciKlass* Dependencies::ctxk_encoded_as_null(DepType dept, ciBaseObject* x) {
|
||||
case unique_concrete_method:
|
||||
case exclusive_concrete_methods_2:
|
||||
return x->as_metadata()->as_method()->holder();
|
||||
default:
|
||||
return NULL; // let NULL be NULL
|
||||
}
|
||||
return NULL; // let NULL be NULL
|
||||
}
|
||||
|
||||
Klass* Dependencies::ctxk_encoded_as_null(DepType dept, Metadata* x) {
|
||||
@ -480,8 +483,9 @@ Klass* Dependencies::ctxk_encoded_as_null(DepType dept, Metadata* x) {
|
||||
case exclusive_concrete_methods_2:
|
||||
assert(x->is_method(), "sanity");
|
||||
return ((Method*)x)->method_holder();
|
||||
default:
|
||||
return NULL; // let NULL be NULL
|
||||
}
|
||||
return NULL; // let NULL be NULL
|
||||
}
|
||||
|
||||
void Dependencies::encode_content_bytes() {
|
||||
@ -1459,7 +1463,7 @@ bool Dependencies::is_concrete_method(Method* m, Klass * k) {
|
||||
// overpass clause is false if k == NULL, implies return true if
|
||||
// answer depends on overpass clause.
|
||||
return ! ( m == NULL || m -> is_static() || m -> is_abstract() ||
|
||||
m->is_overpass() && k != NULL && k -> is_abstract() );
|
||||
(m->is_overpass() && k != NULL && k -> is_abstract()) );
|
||||
}
|
||||
|
||||
|
||||
@ -1864,6 +1868,8 @@ void DepChange::print() {
|
||||
tty->print_cr(" context interface = %s", k->external_name());
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (nsup + nint != 0) {
|
||||
|
@ -987,6 +987,8 @@ void nmethod::verify_clean_inline_caches() {
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2187,12 +2189,15 @@ void nmethod::verify_scopes() {
|
||||
//verify_interrupt_point(iter.addr());
|
||||
break;
|
||||
case relocInfo::runtime_call_type:
|
||||
case relocInfo::runtime_call_w_cp_type:
|
||||
case relocInfo::runtime_call_w_cp_type: {
|
||||
address destination = iter.reloc()->value();
|
||||
// Right now there is no way to find out which entries support
|
||||
// an interrupt point. It would be nice if we had this
|
||||
// information in a table.
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
assert(stub == NULL || stub_contains(stub), "static call stub outside stub section");
|
||||
}
|
||||
@ -2489,6 +2494,9 @@ const char* nmethod::reloc_string_for(u_char* begin, u_char* end) {
|
||||
case relocInfo::poll_type: return "poll";
|
||||
case relocInfo::poll_return_type: return "poll_return";
|
||||
case relocInfo::type_mask: return "type_bit_mask";
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return have_one ? "other" : NULL;
|
||||
@ -2674,6 +2682,8 @@ void nmethod::print_code_comment_on(outputStream* st, int column, u_char* begin,
|
||||
else
|
||||
st->print("<UNKNOWN>");
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
st->print(" {reexecute=%d rethrow=%d return_oop=%d}", sd->should_reexecute(), sd->rethrow_exception(), sd->return_oop());
|
||||
@ -2842,6 +2852,8 @@ void nmethod::print_calls(outputStream* st) {
|
||||
st->print_cr("Static call at " INTPTR_FORMAT, p2i(iter.reloc()->addr()));
|
||||
CompiledDirectStaticCall::at(iter.reloc())->print();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2981,4 +2993,3 @@ char* nmethod::jvmci_installed_code_name(char* buf, size_t buflen) {
|
||||
return buf;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2017, 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
|
||||
@ -940,6 +940,8 @@ void RelocIterator::print_current() {
|
||||
p2i(r->destination()), p2i(r->method_value()));
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
tty->cr();
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2017, 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
|
||||
@ -130,8 +130,9 @@ class CompileTask : public CHeapObj<mtCompiler> {
|
||||
case Reason_InvocationCount:
|
||||
case Reason_Tiered:
|
||||
return !_is_blocking;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#if INCLUDE_JVMCI
|
||||
bool has_waiter() const { return _has_waiter; }
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2017, 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
|
||||
@ -33,7 +33,9 @@ class G1ParScanThreadState;
|
||||
|
||||
class G1RootClosures : public CHeapObj<mtGC> {
|
||||
public:
|
||||
// Closures to process raw oops in the root set.
|
||||
virtual ~G1RootClosures() {}
|
||||
|
||||
// Closures to process raw oops in the root set.
|
||||
virtual OopClosure* weak_oops() = 0;
|
||||
virtual OopClosure* strong_oops() = 0;
|
||||
|
||||
|
@ -893,4 +893,3 @@ void G1ContiguousSpace::initialize(MemRegion mr, bool clear_space, bool mangle_s
|
||||
set_saved_mark_word(NULL);
|
||||
reset_bot();
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2017, 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
|
||||
@ -36,8 +36,9 @@ bool HeapRegionType::is_valid(Tag tag) {
|
||||
case OldTag:
|
||||
case ArchiveTag:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
const char* HeapRegionType::get_str() const {
|
||||
@ -50,10 +51,10 @@ const char* HeapRegionType::get_str() const {
|
||||
case ContinuesHumongousTag: return "HUMC";
|
||||
case OldTag: return "OLD";
|
||||
case ArchiveTag: return "ARC";
|
||||
default:
|
||||
ShouldNotReachHere();
|
||||
return NULL; // keep some compilers happy
|
||||
}
|
||||
ShouldNotReachHere();
|
||||
// keep some compilers happy
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const char* HeapRegionType::get_short_str() const {
|
||||
@ -66,10 +67,10 @@ const char* HeapRegionType::get_short_str() const {
|
||||
case ContinuesHumongousTag: return "HC";
|
||||
case OldTag: return "O";
|
||||
case ArchiveTag: return "A";
|
||||
default:
|
||||
ShouldNotReachHere();
|
||||
return NULL; // keep some compilers happy
|
||||
}
|
||||
ShouldNotReachHere();
|
||||
// keep some compilers happy
|
||||
return NULL;
|
||||
}
|
||||
|
||||
G1HeapRegionTraceType::Type HeapRegionType::get_trace_type() {
|
||||
@ -82,8 +83,8 @@ G1HeapRegionTraceType::Type HeapRegionType::get_trace_type() {
|
||||
case ContinuesHumongousTag: return G1HeapRegionTraceType::ContinuesHumongous;
|
||||
case OldTag: return G1HeapRegionTraceType::Old;
|
||||
case ArchiveTag: return G1HeapRegionTraceType::Archive;
|
||||
default:
|
||||
ShouldNotReachHere();
|
||||
return G1HeapRegionTraceType::Free; // keep some compilers happy
|
||||
}
|
||||
ShouldNotReachHere();
|
||||
// keep some compilers happy
|
||||
return G1HeapRegionTraceType::Free;
|
||||
}
|
||||
|
@ -238,8 +238,9 @@ void PtrQueue::handle_zero_index() {
|
||||
bool PtrQueueSet::process_or_enqueue_complete_buffer(BufferNode* node) {
|
||||
if (Thread::current()->is_Java_thread()) {
|
||||
// We don't lock. It is fine to be epsilon-precise here.
|
||||
if (_max_completed_queue == 0 || _max_completed_queue > 0 &&
|
||||
_n_completed_buffers >= _max_completed_queue + _completed_queue_padding) {
|
||||
if (_max_completed_queue == 0 ||
|
||||
(_max_completed_queue > 0 &&
|
||||
_n_completed_buffers >= _max_completed_queue + _completed_queue_padding)) {
|
||||
bool b = mut_process_buffer(node);
|
||||
if (b) {
|
||||
// True here means that the buffer hasn't been deallocated and the caller may reuse it.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2017, 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
|
||||
@ -120,8 +120,8 @@ void RSHashTable::clear() {
|
||||
"_capacity too large");
|
||||
|
||||
// This will put -1 == NullEntry in the key field of all entries.
|
||||
memset(_entries, NullEntry, _num_entries * SparsePRTEntry::size());
|
||||
memset(_buckets, NullEntry, _capacity * sizeof(int));
|
||||
memset((void*)_entries, NullEntry, _num_entries * SparsePRTEntry::size());
|
||||
memset((void*)_buckets, NullEntry, _capacity * sizeof(int));
|
||||
_free_list = NullEntry;
|
||||
_free_region = 0;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2017, 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
|
||||
@ -315,7 +315,7 @@ void PSPromotionManager::drain_stacks_depth(bool totally_drain) {
|
||||
process_popped_location_depth(p);
|
||||
}
|
||||
}
|
||||
} while (totally_drain && !tq->taskqueue_empty() || !tq->overflow_empty());
|
||||
} while ((totally_drain && !tq->taskqueue_empty()) || !tq->overflow_empty());
|
||||
|
||||
assert(!totally_drain || tq->taskqueue_empty(), "Sanity");
|
||||
assert(totally_drain || tq->size() <= _target_stack_size, "Sanity");
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2017, 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
|
||||
@ -136,6 +136,7 @@ AbstractInterpreter::MethodKind AbstractInterpreter::method_kind(methodHandle m)
|
||||
case vmIntrinsics::_floatToRawIntBits: return java_lang_Float_floatToRawIntBits;
|
||||
case vmIntrinsics::_longBitsToDouble: return java_lang_Double_longBitsToDouble;
|
||||
case vmIntrinsics::_doubleToRawLongBits: return java_lang_Double_doubleToRawLongBits;
|
||||
default: break;
|
||||
}
|
||||
#endif // CC_INTERP
|
||||
|
||||
@ -182,8 +183,9 @@ AbstractInterpreter::MethodKind AbstractInterpreter::method_kind(methodHandle m)
|
||||
case vmIntrinsics::_fmaD : return java_lang_math_fmaD ;
|
||||
case vmIntrinsics::_fmaF : return java_lang_math_fmaF ;
|
||||
|
||||
case vmIntrinsics::_Reference_get:
|
||||
return java_lang_ref_reference_get;
|
||||
case vmIntrinsics::_Reference_get
|
||||
: return java_lang_ref_reference_get;
|
||||
default : break;
|
||||
}
|
||||
|
||||
// Accessor method?
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2017, 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
|
||||
@ -70,10 +70,11 @@ bool Bytecodes::check_must_rewrite(Bytecodes::Code code) {
|
||||
case Bytecodes::_new:
|
||||
// (Could actually look at the class here, but the profit would be small.)
|
||||
return false; // the rewrite is not always done
|
||||
}
|
||||
|
||||
// No other special cases.
|
||||
return true;
|
||||
default:
|
||||
// No other special cases.
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Bytecodes::Code Bytecodes::code_at(Method* method, int bci) {
|
||||
@ -119,9 +120,10 @@ int Bytecodes::special_length_at(Bytecodes::Code code, address bcp, address end)
|
||||
// return -1 otherwise
|
||||
return (len > 0 && len == (int)len) ? len : -1;
|
||||
}
|
||||
default:
|
||||
// Note: Length functions must return <=0 for invalid bytecodes.
|
||||
return 0;
|
||||
}
|
||||
// Note: Length functions must return <=0 for invalid bytecodes.
|
||||
return 0;
|
||||
}
|
||||
|
||||
// At a breakpoint instruction, this returns the breakpoint's length,
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2017, 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
|
||||
@ -87,18 +87,20 @@ const char* InvocationCounter::state_as_string(State state) {
|
||||
switch (state) {
|
||||
case wait_for_nothing : return "wait_for_nothing";
|
||||
case wait_for_compile : return "wait_for_compile";
|
||||
default:
|
||||
ShouldNotReachHere();
|
||||
return NULL;
|
||||
}
|
||||
ShouldNotReachHere();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const char* InvocationCounter::state_as_short_string(State state) {
|
||||
switch (state) {
|
||||
case wait_for_nothing : return "not comp.";
|
||||
case wait_for_compile : return "compileable";
|
||||
default:
|
||||
ShouldNotReachHere();
|
||||
return NULL;
|
||||
}
|
||||
ShouldNotReachHere();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
@ -219,11 +219,12 @@ void CallInfo::verify() {
|
||||
#ifndef PRODUCT
|
||||
void CallInfo::print() {
|
||||
ResourceMark rm;
|
||||
const char* kindstr = "unknown";
|
||||
const char* kindstr;
|
||||
switch (_call_kind) {
|
||||
case direct_call: kindstr = "direct"; break;
|
||||
case vtable_call: kindstr = "vtable"; break;
|
||||
case itable_call: kindstr = "itable"; break;
|
||||
case direct_call: kindstr = "direct"; break;
|
||||
case vtable_call: kindstr = "vtable"; break;
|
||||
case itable_call: kindstr = "itable"; break;
|
||||
default : kindstr = "unknown"; break;
|
||||
}
|
||||
tty->print_cr("Call %s@%d %s", kindstr, _call_index,
|
||||
_resolved_method.is_null() ? "(none)" : _resolved_method->name_and_sig_as_C_string());
|
||||
@ -1570,6 +1571,7 @@ void LinkResolver::resolve_invoke(CallInfo& result, Handle recv, const constantP
|
||||
case Bytecodes::_invokehandle : resolve_invokehandle (result, pool, index, CHECK); break;
|
||||
case Bytecodes::_invokedynamic : resolve_invokedynamic (result, pool, index, CHECK); break;
|
||||
case Bytecodes::_invokeinterface: resolve_invokeinterface(result, recv, pool, index, CHECK); break;
|
||||
default : break;
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -1598,6 +1600,7 @@ void LinkResolver::resolve_invoke(CallInfo& result, Handle& recv,
|
||||
break;
|
||||
default:
|
||||
fatal("bad call: %s", Bytecodes::name(byte));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -140,6 +140,9 @@ void Rewriter::rewrite_Object_init(methodHandle method, TRAPS) {
|
||||
THROW_MSG(vmSymbols::java_lang_IncompatibleClassChangeError(),
|
||||
"can't overwrite local 0 in Object.<init>");
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -467,6 +470,8 @@ void Rewriter::scan_method(Method* method, bool reverse, bool* invokespecial_err
|
||||
case Bytecodes::_jsr_w : nof_jsrs++; break;
|
||||
case Bytecodes::_monitorenter : // fall through
|
||||
case Bytecodes::_monitorexit : has_monitor_bytecodes = true; break;
|
||||
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -599,10 +599,14 @@ C2V_VMENTRY(jbyteArray, getBytecode, (JNIEnv *, jobject, jobject jvmci_method))
|
||||
break;
|
||||
}
|
||||
|
||||
case Bytecodes::_invokedynamic:
|
||||
case Bytecodes::_invokedynamic: {
|
||||
int cp_index = Bytes::get_native_u4((address) reconstituted_code->byte_at_addr(bci + 1));
|
||||
Bytes::put_Java_u4((address) reconstituted_code->byte_at_addr(bci + 1), (u4) cp_index);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// Not all ldc byte code are rewritten.
|
||||
@ -622,6 +626,9 @@ C2V_VMENTRY(jbyteArray, getBytecode, (JNIEnv *, jobject, jobject jvmci_method))
|
||||
Bytes::put_Java_u2((address) reconstituted_code->byte_at_addr(bci + 1), (u2) cp_index);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -964,7 +971,7 @@ C2V_VMENTRY(jobject, resolveMethod, (JNIEnv *, jobject, jobject receiver_jvmci_t
|
||||
// Only do exact lookup if receiver klass has been linked. Otherwise,
|
||||
// the vtable has not been setup, and the LinkResolver will fail.
|
||||
if (recv_klass->is_array_klass() ||
|
||||
InstanceKlass::cast(recv_klass)->is_linked() && !recv_klass->is_interface()) {
|
||||
(InstanceKlass::cast(recv_klass)->is_linked() && !recv_klass->is_interface())) {
|
||||
if (resolved->is_interface()) {
|
||||
m = LinkResolver::resolve_interface_call_or_null(recv_klass, link_info);
|
||||
} else {
|
||||
@ -1239,7 +1246,9 @@ C2V_VMENTRY(jobject, executeInstalledCode, (JNIEnv*, jobject, jobject args, jobj
|
||||
case T_SHORT:
|
||||
value->s = (jshort) value->i;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
oop o = java_lang_boxing_object::create(jap.get_ret_type(), value, CHECK_NULL);
|
||||
return JNIHandles::make_local(THREAD, o);
|
||||
}
|
||||
|
@ -357,6 +357,8 @@ methodHandle JVMCIEnv::get_method_by_index_impl(const constantPoolHandle& cpool,
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -604,4 +606,3 @@ JVMCIEnv::CodeInstallResult JVMCIEnv::register_method(
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2017, 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
|
||||
@ -70,7 +70,7 @@ Dict::Dict(CmpKey initcmp, Hash inithash) : _hash(inithash), _cmp(initcmp),
|
||||
_size = 16; // Size is a power of 2
|
||||
_cnt = 0; // Dictionary is empty
|
||||
_bin = (bucket*)_arena->Amalloc_4(sizeof(bucket)*_size);
|
||||
memset(_bin,0,sizeof(bucket)*_size);
|
||||
memset((void*)_bin,0,sizeof(bucket)*_size);
|
||||
}
|
||||
|
||||
Dict::Dict(CmpKey initcmp, Hash inithash, Arena *arena, int size)
|
||||
@ -91,7 +91,7 @@ Dict::Dict(CmpKey initcmp, Hash inithash, Arena *arena, int size)
|
||||
_size = i; // Size is a power of 2
|
||||
_cnt = 0; // Dictionary is empty
|
||||
_bin = (bucket*)_arena->Amalloc_4(sizeof(bucket)*_size);
|
||||
memset(_bin,0,sizeof(bucket)*_size);
|
||||
memset((void*)_bin,0,sizeof(bucket)*_size);
|
||||
}
|
||||
|
||||
//------------------------------~Dict------------------------------------------
|
||||
@ -127,7 +127,7 @@ void Dict::doubhash(void) {
|
||||
uint oldsize = _size;
|
||||
_size <<= 1; // Double in size
|
||||
_bin = (bucket*)_arena->Arealloc(_bin, sizeof(bucket) * oldsize, sizeof(bucket) * _size);
|
||||
memset(&_bin[oldsize], 0, oldsize * sizeof(bucket));
|
||||
memset((void*)(&_bin[oldsize]), 0, oldsize * sizeof(bucket));
|
||||
// Rehash things to spread into new table
|
||||
for (uint i = 0; i < oldsize; i++) { // For complete OLD table do
|
||||
bucket *b = &_bin[i]; // Handy shortcut for _bin[i]
|
||||
@ -163,7 +163,7 @@ void Dict::doubhash(void) {
|
||||
// Deep copy a dictionary.
|
||||
Dict::Dict( const Dict &d ) : _size(d._size), _cnt(d._cnt), _hash(d._hash),_cmp(d._cmp), _arena(d._arena) {
|
||||
_bin = (bucket*)_arena->Amalloc_4(sizeof(bucket)*_size);
|
||||
memcpy( _bin, d._bin, sizeof(bucket)*_size );
|
||||
memcpy( (void*)_bin, (void*)d._bin, sizeof(bucket)*_size );
|
||||
for( uint i=0; i<_size; i++ ) {
|
||||
if( !_bin[i]._keyvals ) continue;
|
||||
_bin[i]._keyvals=(void**)_arena->Amalloc_4( sizeof(void *)*_bin[i]._max*2);
|
||||
@ -177,7 +177,7 @@ Dict &Dict::operator =( const Dict &d ) {
|
||||
if( _size < d._size ) { // If must have more buckets
|
||||
_arena = d._arena;
|
||||
_bin = (bucket*)_arena->Arealloc( _bin, sizeof(bucket)*_size, sizeof(bucket)*d._size );
|
||||
memset( &_bin[_size], 0, (d._size-_size)*sizeof(bucket) );
|
||||
memset( (void*)(&_bin[_size]), 0, (d._size-_size)*sizeof(bucket) );
|
||||
_size = d._size;
|
||||
}
|
||||
uint i;
|
||||
|
@ -191,7 +191,7 @@ bool LogFileOutput::parse_options(const char* options, outputStream* errstream)
|
||||
success = Arguments::atojulong(value_str, &value);
|
||||
if (!success || (value > SIZE_MAX)) {
|
||||
errstream->print_cr("Invalid option: %s must be in range [0, "
|
||||
SIZE_FORMAT "]", FileSizeOptionKey, SIZE_MAX);
|
||||
SIZE_FORMAT "]", FileSizeOptionKey, (size_t)SIZE_MAX);
|
||||
success = false;
|
||||
break;
|
||||
}
|
||||
@ -436,4 +436,3 @@ void LogFileOutput::describe(outputStream *out) {
|
||||
byte_size_in_proper_unit(_rotate_size),
|
||||
proper_unit_for_byte_size(_rotate_size));
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2017, 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
|
||||
@ -44,9 +44,6 @@
|
||||
// This is currently used in the Concurrent Mark&Sweep implementation.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
template <class Chunk_t, class FreeList_t>
|
||||
size_t TreeChunk<Chunk_t, FreeList_t>::_min_tree_chunk_size = sizeof(TreeChunk<Chunk_t, FreeList_t>)/HeapWordSize;
|
||||
|
||||
template <class Chunk_t, class FreeList_t>
|
||||
TreeChunk<Chunk_t, FreeList_t>* TreeChunk<Chunk_t, FreeList_t>::as_TreeChunk(Chunk_t* fc) {
|
||||
// Do some assertion checking here.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2017, 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
|
||||
@ -163,15 +163,17 @@ class TreeChunk : public Chunk_t {
|
||||
Chunk_t* prev() const { return Chunk_t::prev(); }
|
||||
size_t size() const volatile { return Chunk_t::size(); }
|
||||
|
||||
static size_t min_size() {
|
||||
return _min_tree_chunk_size;
|
||||
}
|
||||
static size_t min_size();
|
||||
|
||||
// debugging
|
||||
void verify_tree_chunk_list() const;
|
||||
void assert_is_mangled() const;
|
||||
};
|
||||
|
||||
template <class Chunk_t, class FreeList_t>
|
||||
size_t TreeChunk<Chunk_t, FreeList_t>::_min_tree_chunk_size = sizeof(TreeChunk<Chunk_t, FreeList_t>)/HeapWordSize;
|
||||
template <class Chunk_t, class FreeList_t>
|
||||
size_t TreeChunk<Chunk_t, FreeList_t>::min_size() { return _min_tree_chunk_size; }
|
||||
|
||||
template <class Chunk_t, class FreeList_t>
|
||||
class BinaryTreeDictionary: public FreeBlockDictionary<Chunk_t> {
|
||||
|
@ -151,7 +151,7 @@ template <int N> static void get_header_version(char (&header_version) [N]) {
|
||||
FileMapInfo::FileMapInfo() {
|
||||
assert(_current_info == NULL, "must be singleton"); // not thread safe
|
||||
_current_info = this;
|
||||
memset(this, 0, sizeof(FileMapInfo));
|
||||
memset((void*)this, 0, sizeof(FileMapInfo));
|
||||
_file_offset = 0;
|
||||
_file_open = false;
|
||||
_header = SharedClassUtil::allocate_file_map_header();
|
||||
|
@ -874,10 +874,10 @@ const char* Universe::narrow_oop_mode_to_string(Universe::NARROW_OOP_MODE mode)
|
||||
return "Non-zero disjoint base";
|
||||
case HeapBasedNarrowOop:
|
||||
return "Non-zero based";
|
||||
default:
|
||||
ShouldNotReachHere();
|
||||
return "";
|
||||
}
|
||||
|
||||
ShouldNotReachHere();
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
|
@ -1738,7 +1738,7 @@ int ConstantPool::copy_cpool_bytes(int cpool_size,
|
||||
assert(size + ent_size <= cpool_size, "Size mismatch");
|
||||
|
||||
*bytes = tag;
|
||||
DBG(printf("#%03hd tag=%03hd, ", idx, tag));
|
||||
DBG(printf("#%03hd tag=%03hd, ", (short)idx, (short)tag));
|
||||
switch(tag) {
|
||||
case JVM_CONSTANT_Invalid: {
|
||||
DBG(printf("JVM_CONSTANT_Invalid"));
|
||||
|
@ -389,6 +389,8 @@ Method* ConstantPoolCacheEntry::method_if_resolved(const constantPoolHandle& cpo
|
||||
case Bytecodes::_invokedynamic:
|
||||
assert(f1->is_method(), "");
|
||||
return (Method*)f1;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -409,6 +411,8 @@ Method* ConstantPoolCacheEntry::method_if_resolved(const constantPoolHandle& cpo
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
|
@ -237,6 +237,8 @@ void RetTable::compute_ret_table(const methodHandle& method) {
|
||||
case Bytecodes::_jsr_w:
|
||||
add_jsr(i.next_bci(), i.dest_w());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -430,6 +432,8 @@ void GenerateOopMap::mark_bbheaders_and_count_gc_points() {
|
||||
assert(!fellThrough, "should not happen");
|
||||
bb_mark_fct(this, bci + Bytecodes::length_for(bytecode), NULL);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (possible_gc_point(&bcs))
|
||||
@ -489,6 +493,8 @@ void GenerateOopMap::mark_reachable_code() {
|
||||
assert(!fell_through, "should not happen");
|
||||
reachable_basicblock(this, bci + Bytecodes::length_for(bytecode), &change);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (fell_through) {
|
||||
// Mark successor as alive
|
||||
@ -1187,6 +1193,9 @@ void GenerateOopMap::do_exception_edge(BytecodeStream* itr) {
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (_has_exceptions) {
|
||||
@ -1272,24 +1281,38 @@ void GenerateOopMap::print_states(outputStream *os,
|
||||
void GenerateOopMap::print_current_state(outputStream *os,
|
||||
BytecodeStream *currentBC,
|
||||
bool detailed) {
|
||||
|
||||
if (detailed) {
|
||||
os->print(" %4d vars = ", currentBC->bci());
|
||||
print_states(os, vars(), _max_locals);
|
||||
os->print(" %s", Bytecodes::name(currentBC->code()));
|
||||
switch(currentBC->code()) {
|
||||
case Bytecodes::_invokevirtual:
|
||||
case Bytecodes::_invokespecial:
|
||||
case Bytecodes::_invokestatic:
|
||||
case Bytecodes::_invokedynamic:
|
||||
case Bytecodes::_invokeinterface:
|
||||
int idx = currentBC->has_index_u4() ? currentBC->get_index_u4() : currentBC->get_index_u2_cpcache();
|
||||
ConstantPool* cp = method()->constants();
|
||||
int nameAndTypeIdx = cp->name_and_type_ref_index_at(idx);
|
||||
int signatureIdx = cp->signature_ref_index_at(nameAndTypeIdx);
|
||||
Symbol* signature = cp->symbol_at(signatureIdx);
|
||||
os->print("%s", signature->as_C_string());
|
||||
} else {
|
||||
os->print(" %4d vars = '%s' ", currentBC->bci(), state_vec_to_string(vars(), _max_locals));
|
||||
os->print(" stack = '%s' ", state_vec_to_string(stack(), _stack_top));
|
||||
if (_monitor_top != bad_monitors) {
|
||||
os->print(" monitors = '%s' \t%s", state_vec_to_string(monitors(), _monitor_top), Bytecodes::name(currentBC->code()));
|
||||
} else {
|
||||
os->print(" [bad monitor stack]");
|
||||
}
|
||||
}
|
||||
|
||||
switch(currentBC->code()) {
|
||||
case Bytecodes::_invokevirtual:
|
||||
case Bytecodes::_invokespecial:
|
||||
case Bytecodes::_invokestatic:
|
||||
case Bytecodes::_invokedynamic:
|
||||
case Bytecodes::_invokeinterface: {
|
||||
int idx = currentBC->has_index_u4() ? currentBC->get_index_u4() : currentBC->get_index_u2_cpcache();
|
||||
ConstantPool* cp = method()->constants();
|
||||
int nameAndTypeIdx = cp->name_and_type_ref_index_at(idx);
|
||||
int signatureIdx = cp->signature_ref_index_at(nameAndTypeIdx);
|
||||
Symbol* signature = cp->symbol_at(signatureIdx);
|
||||
os->print("%s", signature->as_C_string());
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (detailed) {
|
||||
os->cr();
|
||||
os->print(" stack = ");
|
||||
print_states(os, stack(), _stack_top);
|
||||
@ -1300,30 +1323,9 @@ void GenerateOopMap::print_current_state(outputStream *os,
|
||||
} else {
|
||||
os->print(" [bad monitor stack]");
|
||||
}
|
||||
os->cr();
|
||||
} else {
|
||||
os->print(" %4d vars = '%s' ", currentBC->bci(), state_vec_to_string(vars(), _max_locals));
|
||||
os->print(" stack = '%s' ", state_vec_to_string(stack(), _stack_top));
|
||||
if (_monitor_top != bad_monitors) {
|
||||
os->print(" monitors = '%s' \t%s", state_vec_to_string(monitors(), _monitor_top), Bytecodes::name(currentBC->code()));
|
||||
} else {
|
||||
os->print(" [bad monitor stack]");
|
||||
}
|
||||
switch(currentBC->code()) {
|
||||
case Bytecodes::_invokevirtual:
|
||||
case Bytecodes::_invokespecial:
|
||||
case Bytecodes::_invokestatic:
|
||||
case Bytecodes::_invokedynamic:
|
||||
case Bytecodes::_invokeinterface:
|
||||
int idx = currentBC->has_index_u4() ? currentBC->get_index_u4() : currentBC->get_index_u2_cpcache();
|
||||
ConstantPool* cp = method()->constants();
|
||||
int nameAndTypeIdx = cp->name_and_type_ref_index_at(idx);
|
||||
int signatureIdx = cp->signature_ref_index_at(nameAndTypeIdx);
|
||||
Symbol* signature = cp->symbol_at(signatureIdx);
|
||||
os->print("%s", signature->as_C_string());
|
||||
}
|
||||
os->cr();
|
||||
}
|
||||
|
||||
os->cr();
|
||||
}
|
||||
|
||||
// Sets the current state to be the state after executing the
|
||||
@ -2476,8 +2478,9 @@ bool GenerateOopMap::is_astore(BytecodeStream *itr, int *index) {
|
||||
case Bytecodes::_astore:
|
||||
*index = itr->get_index();
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool GenerateOopMap::is_aload(BytecodeStream *itr, int *index) {
|
||||
@ -2493,8 +2496,10 @@ bool GenerateOopMap::is_aload(BytecodeStream *itr, int *index) {
|
||||
case Bytecodes::_aload:
|
||||
*index = itr->get_index();
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1078,7 +1078,7 @@ Method* InstanceKlass::class_initializer() const {
|
||||
void InstanceKlass::call_class_initializer(TRAPS) {
|
||||
if (ReplayCompiles &&
|
||||
(ReplaySuppressInitializers == 1 ||
|
||||
ReplaySuppressInitializers >= 2 && class_loader() != NULL)) {
|
||||
(ReplaySuppressInitializers >= 2 && class_loader() != NULL))) {
|
||||
// Hide the existence of the initializer for the purpose of replaying the compile
|
||||
return;
|
||||
}
|
||||
|
@ -550,6 +550,9 @@ bool Method::compute_has_loops_flag() {
|
||||
case Bytecodes::_jsr_w:
|
||||
if( bcs.dest_w() < bcs.next_bci() ) _access_flags.set_has_loops();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
_access_flags.set_loops_flag_init();
|
||||
@ -1390,7 +1393,10 @@ methodHandle Method::clone_with_new_data(methodHandle m, u_char* new_code, int n
|
||||
ConstMethod* newcm = newm->constMethod();
|
||||
int new_const_method_size = newm->constMethod()->size();
|
||||
|
||||
memcpy(newm(), m(), sizeof(Method));
|
||||
// This works because the source and target are both Methods. Some compilers
|
||||
// (e.g., clang) complain that the target vtable pointer will be stomped,
|
||||
// so cast away newm()'s and m()'s Methodness.
|
||||
memcpy((void*)newm(), (void*)m(), sizeof(Method));
|
||||
|
||||
// Create shallow copy of ConstMethod.
|
||||
memcpy(newcm, m->constMethod(), sizeof(ConstMethod));
|
||||
@ -1513,6 +1519,8 @@ void Method::init_intrinsic_id() {
|
||||
klass_id = vmSymbols::VM_SYMBOL_ENUM_NAME(java_lang_Math);
|
||||
id = vmIntrinsics::find_id(klass_id, name_id, sig_id, flags);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1524,6 +1532,9 @@ void Method::init_intrinsic_id() {
|
||||
if (is_static() != MethodHandles::is_signature_polymorphic_static(id))
|
||||
id = vmIntrinsics::_none;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (id != vmIntrinsics::_none) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2017, 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
|
||||
@ -779,8 +779,9 @@ int MethodData::bytecode_cell_count(Bytecodes::Code code) {
|
||||
case Bytecodes::_lookupswitch:
|
||||
case Bytecodes::_tableswitch:
|
||||
return variable_cell_count;
|
||||
default:
|
||||
return no_profile_data;
|
||||
}
|
||||
return no_profile_data;
|
||||
}
|
||||
|
||||
// Compute the size of the profiling information corresponding to
|
||||
@ -1048,6 +1049,8 @@ int MethodData::initialize_data(BytecodeStream* stream,
|
||||
cell_count = MultiBranchData::compute_cell_count(stream);
|
||||
tag = DataLayout::multi_branch_data_tag;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
assert(tag == DataLayout::multi_branch_data_tag ||
|
||||
((MethodData::profile_arguments() || MethodData::profile_return()) &&
|
||||
|
@ -521,9 +521,9 @@ Node *RegionNode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
||||
// Loop node may have only one input because entry path
|
||||
// is removed in PhaseIdealLoop::Dominators().
|
||||
assert(!this->is_Loop() || cnt_orig <= 3, "Loop node should have 3 or less inputs");
|
||||
if (this->is_Loop() && (del_it == LoopNode::EntryControl ||
|
||||
del_it == 0 && is_unreachable_region(phase)) ||
|
||||
!this->is_Loop() && has_phis && is_unreachable_region(phase)) {
|
||||
if ((this->is_Loop() && (del_it == LoopNode::EntryControl ||
|
||||
(del_it == 0 && is_unreachable_region(phase)))) ||
|
||||
(!this->is_Loop() && has_phis && is_unreachable_region(phase))) {
|
||||
// Yes, the region will be removed during the next step below.
|
||||
// Cut the backedge input and remove phis since no data paths left.
|
||||
// We don't cut outputs to other nodes here since we need to put them
|
||||
@ -1689,8 +1689,8 @@ Node *PhiNode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
||||
bool is_loop = (r->is_Loop() && r->req() == 3);
|
||||
// Then, check if there is a data loop when phi references itself directly
|
||||
// or through other data nodes.
|
||||
if (is_loop && !uin->eqv_uncast(in(LoopNode::EntryControl)) ||
|
||||
!is_loop && is_unsafe_data_reference(uin)) {
|
||||
if ((is_loop && !uin->eqv_uncast(in(LoopNode::EntryControl))) ||
|
||||
(!is_loop && is_unsafe_data_reference(uin))) {
|
||||
// Break this data loop to avoid creation of a dead loop.
|
||||
if (can_reshape) {
|
||||
return top;
|
||||
|
@ -1301,7 +1301,7 @@ void PhaseChaitin::Simplify( ) {
|
||||
if( iscore < score ||
|
||||
(iscore == score && iarea > area && lrgs(lo_score)._was_spilled2) ||
|
||||
(iscore == score && iarea == area &&
|
||||
( (ibound && !bound) || ibound == bound && (icost < cost) )) ) {
|
||||
( (ibound && !bound) || (ibound == bound && (icost < cost)) )) ) {
|
||||
lo_score = i;
|
||||
score = iscore;
|
||||
area = iarea;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2017, 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
|
||||
@ -3405,7 +3405,7 @@ void Compile::final_graph_reshaping_walk( Node_Stack &nstack, Node *root, Final_
|
||||
for (uint i = 0; i < in->outcnt(); i++) {
|
||||
Node* u = in->raw_out(i);
|
||||
if (!u->is_SafePoint() ||
|
||||
u->is_Call() && u->as_Call()->has_non_debug_use(n)) {
|
||||
(u->is_Call() && u->as_Call()->has_non_debug_use(n))) {
|
||||
safe_to_skip = false;
|
||||
}
|
||||
}
|
||||
@ -3837,9 +3837,8 @@ bool Compile::Constant::operator==(const Constant& other) {
|
||||
case T_ADDRESS: return (_v._value.l == other._v._value.l);
|
||||
case T_VOID: return (_v._value.l == other._v._value.l); // jump-table entries
|
||||
case T_METADATA: return (_v._metadata == other._v._metadata);
|
||||
default: ShouldNotReachHere();
|
||||
default: ShouldNotReachHere(); return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static int type_to_size_in_bytes(BasicType t) {
|
||||
@ -3854,10 +3853,10 @@ static int type_to_size_in_bytes(BasicType t) {
|
||||
case T_VOID:
|
||||
case T_ADDRESS:
|
||||
case T_OBJECT: return sizeof(jobject);
|
||||
default:
|
||||
ShouldNotReachHere();
|
||||
return -1;
|
||||
}
|
||||
|
||||
ShouldNotReachHere();
|
||||
return -1;
|
||||
}
|
||||
|
||||
int Compile::ConstantTable::qsort_comparator(Constant* a, Constant* b) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2017, 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
|
||||
@ -95,13 +95,13 @@ class NodeCloneInfo {
|
||||
public:
|
||||
|
||||
void set_idx(node_idx_t idx) {
|
||||
_idx_clone_orig = _idx_clone_orig & CONST64(0xFFFFFFFF00000000) | idx;
|
||||
_idx_clone_orig = (_idx_clone_orig & CONST64(0xFFFFFFFF00000000)) | idx;
|
||||
}
|
||||
node_idx_t idx() const { return (node_idx_t)(_idx_clone_orig & 0xFFFFFFFF); }
|
||||
|
||||
void set_gen(int generation) {
|
||||
uint64_t g = (uint64_t)generation << 32;
|
||||
_idx_clone_orig = _idx_clone_orig & 0xFFFFFFFF | g;
|
||||
_idx_clone_orig = (_idx_clone_orig & 0xFFFFFFFF) | g;
|
||||
}
|
||||
int gen() const { return (int)(_idx_clone_orig >> 32); }
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2017, 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
|
||||
@ -61,9 +61,8 @@ ConNode *ConNode::make(const Type *t) {
|
||||
// r -XX:+PrintOpto -XX:CIStart=285 -XX:+CompileTheWorld -XX:CompileTheWorldStartAt=660
|
||||
// %%%% Stop using TypePtr::NULL_PTR to represent nulls: use either TypeRawPtr::NULL_PTR
|
||||
// or else TypeOopPtr::NULL_PTR. Then set Type::_basic_type[AnyPtr] = T_ILLEGAL
|
||||
default:
|
||||
ShouldNotReachHere();
|
||||
return NULL;
|
||||
}
|
||||
ShouldNotReachHere();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2017, 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
|
||||
@ -512,11 +512,11 @@ void ConnectionGraph::add_node_to_connection_graph(Node *n, Unique_Node_List *de
|
||||
if (adr_type == NULL) {
|
||||
break; // skip dead nodes
|
||||
}
|
||||
if (adr_type->isa_oopptr() ||
|
||||
(opcode == Op_StoreP || opcode == Op_StoreN || opcode == Op_StoreNKlass) &&
|
||||
(adr_type == TypeRawPtr::NOTNULL &&
|
||||
adr->in(AddPNode::Address)->is_Proj() &&
|
||||
adr->in(AddPNode::Address)->in(0)->is_Allocate())) {
|
||||
if ( adr_type->isa_oopptr()
|
||||
|| ( (opcode == Op_StoreP || opcode == Op_StoreN || opcode == Op_StoreNKlass)
|
||||
&& adr_type == TypeRawPtr::NOTNULL
|
||||
&& adr->in(AddPNode::Address)->is_Proj()
|
||||
&& adr->in(AddPNode::Address)->in(0)->is_Allocate())) {
|
||||
delayed_worklist->push(n); // Process it later.
|
||||
#ifdef ASSERT
|
||||
assert(adr->is_AddP(), "expecting an AddP");
|
||||
@ -725,11 +725,11 @@ void ConnectionGraph::add_final_edges(Node *n) {
|
||||
opcode == Op_CompareAndExchangeN || opcode == Op_CompareAndExchangeP) {
|
||||
add_local_var_and_edge(n, PointsToNode::NoEscape, adr, NULL);
|
||||
}
|
||||
if (adr_type->isa_oopptr() ||
|
||||
(opcode == Op_StoreP || opcode == Op_StoreN || opcode == Op_StoreNKlass) &&
|
||||
(adr_type == TypeRawPtr::NOTNULL &&
|
||||
adr->in(AddPNode::Address)->is_Proj() &&
|
||||
adr->in(AddPNode::Address)->in(0)->is_Allocate())) {
|
||||
if ( adr_type->isa_oopptr()
|
||||
|| ( (opcode == Op_StoreP || opcode == Op_StoreN || opcode == Op_StoreNKlass)
|
||||
&& adr_type == TypeRawPtr::NOTNULL
|
||||
&& adr->in(AddPNode::Address)->is_Proj()
|
||||
&& adr->in(AddPNode::Address)->in(0)->is_Allocate())) {
|
||||
// Point Address to Value
|
||||
PointsToNode* adr_ptn = ptnode_adr(adr->_idx);
|
||||
assert(adr_ptn != NULL &&
|
||||
@ -1964,8 +1964,8 @@ Node* ConnectionGraph::optimize_ptr_compare(Node* n) {
|
||||
bool set2_has_unknown_ptr = ptn2->points_to(phantom_obj);
|
||||
bool set1_has_null_ptr = ptn1->points_to(null_obj);
|
||||
bool set2_has_null_ptr = ptn2->points_to(null_obj);
|
||||
if (set1_has_unknown_ptr && set2_has_null_ptr ||
|
||||
set2_has_unknown_ptr && set1_has_null_ptr) {
|
||||
if ((set1_has_unknown_ptr && set2_has_null_ptr) ||
|
||||
(set2_has_unknown_ptr && set1_has_null_ptr)) {
|
||||
// Check nullness of unknown object.
|
||||
return NULL;
|
||||
}
|
||||
@ -2624,7 +2624,7 @@ void ConnectionGraph::move_inst_mem(Node* n, GrowableArray<PhiNode *> &orig_phi
|
||||
continue;
|
||||
}
|
||||
tp = use->as_MemBar()->adr_type()->isa_ptr();
|
||||
if (tp != NULL && C->get_alias_index(tp) == alias_idx ||
|
||||
if ((tp != NULL && C->get_alias_index(tp) == alias_idx) ||
|
||||
alias_idx == general_idx) {
|
||||
continue; // Nothing to do
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2017, 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
|
||||
@ -512,7 +512,7 @@ Block* PhaseCFG::insert_anti_dependences(Block* LCA, Node* load, bool verify) {
|
||||
#ifdef ASSERT
|
||||
if (load_alias_idx == Compile::AliasIdxBot && C->AliasLevel() > 0 &&
|
||||
(PrintOpto || VerifyAliases ||
|
||||
PrintMiscellaneous && (WizardMode || Verbose))) {
|
||||
(PrintMiscellaneous && (WizardMode || Verbose)))) {
|
||||
// Load nodes should not consume all of memory.
|
||||
// Reporting a bottom type indicates a bug in adlc.
|
||||
// If some particular type of node validly consumes all of memory,
|
||||
@ -931,7 +931,7 @@ void PhaseCFG::compute_latencies_backwards(VectorSet &visited, Node_Stack &stack
|
||||
Node *n;
|
||||
|
||||
// Walk over all the nodes from last to first
|
||||
while (n = iter.next()) {
|
||||
while ((n = iter.next())) {
|
||||
// Set the latency for the definitions of this instruction
|
||||
partial_latency_of_defs(n);
|
||||
}
|
||||
@ -1206,7 +1206,7 @@ void PhaseCFG::schedule_late(VectorSet &visited, Node_Stack &stack) {
|
||||
Node *self;
|
||||
|
||||
// Walk over all the nodes from last to first
|
||||
while (self = iter.next()) {
|
||||
while ((self = iter.next())) {
|
||||
Block* early = get_block_for_node(self); // Earliest legal placement
|
||||
|
||||
if (self->is_top()) {
|
||||
@ -1234,7 +1234,7 @@ void PhaseCFG::schedule_late(VectorSet &visited, Node_Stack &stack) {
|
||||
early->add_inst(self);
|
||||
continue;
|
||||
break;
|
||||
case Op_CheckCastPP:
|
||||
case Op_CheckCastPP: {
|
||||
// Don't move CheckCastPP nodes away from their input, if the input
|
||||
// is a rawptr (5071820).
|
||||
Node *def = self->in(1);
|
||||
@ -1247,6 +1247,9 @@ void PhaseCFG::schedule_late(VectorSet &visited, Node_Stack &stack) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Gather LCA of all uses
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2017, 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
|
||||
@ -584,6 +584,8 @@ void GraphKit::builtin_throw(Deoptimization::DeoptReason reason, Node* arg) {
|
||||
ex_obj = env()->ClassCastException_instance();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (failing()) { stop(); return; } // exception allocation might fail
|
||||
if (ex_obj != NULL) {
|
||||
@ -821,7 +823,7 @@ static bool should_reexecute_implied_by_bytecode(JVMState *jvms, bool is_anewarr
|
||||
if (cur_method != NULL && cur_bci != InvocationEntryBci) {
|
||||
Bytecodes::Code code = cur_method->java_code_at_bci(cur_bci);
|
||||
return Interpreter::bytecode_should_reexecute(code) ||
|
||||
is_anewarray && code == Bytecodes::_multianewarray;
|
||||
(is_anewarray && code == Bytecodes::_multianewarray);
|
||||
// Reexecute _multianewarray bytecode which was replaced with
|
||||
// sequence of [a]newarray. See Parse::do_multianewarray().
|
||||
//
|
||||
@ -1106,6 +1108,7 @@ bool GraphKit::compute_stack_effects(int& inputs, int& depth) {
|
||||
case Bytecodes::_aload_0: assert(inputs == 0 && outputs == 1, ""); break;
|
||||
case Bytecodes::_return: assert(inputs == 0 && outputs == 0, ""); break;
|
||||
case Bytecodes::_drem: assert(inputs == 4 && outputs == 2, ""); break;
|
||||
default: break;
|
||||
}
|
||||
#endif //ASSERT
|
||||
|
||||
@ -1500,7 +1503,7 @@ Node* GraphKit::make_load(Node* ctl, Node* adr, const Type* t, BasicType bt,
|
||||
ld = LoadNode::make(_gvn, ctl, mem, adr, adr_type, t, bt, mo, control_dependency, unaligned, mismatched);
|
||||
}
|
||||
ld = _gvn.transform(ld);
|
||||
if ((bt == T_OBJECT) && C->do_escape_analysis() || C->eliminate_boxing()) {
|
||||
if (((bt == T_OBJECT) && C->do_escape_analysis()) || C->eliminate_boxing()) {
|
||||
// Improve graph before escape analysis and boxing elimination.
|
||||
record_for_igvn(ld);
|
||||
}
|
||||
@ -2024,14 +2027,14 @@ void GraphKit::uncommon_trap(int trap_request,
|
||||
case Deoptimization::Action_make_not_entrant:
|
||||
C->set_trap_can_recompile(true);
|
||||
break;
|
||||
#ifdef ASSERT
|
||||
case Deoptimization::Action_none:
|
||||
case Deoptimization::Action_make_not_compilable:
|
||||
break;
|
||||
default:
|
||||
#ifdef ASSERT
|
||||
fatal("unknown action %d: %s", action, Deoptimization::trap_action_name(action));
|
||||
break;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
if (TraceOptoParse) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2017, 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
|
||||
@ -48,7 +48,7 @@ void PhaseIFG::init( uint maxlrg ) {
|
||||
_adjs = (IndexSet*)_arena->Amalloc(sizeof(IndexSet)*maxlrg);
|
||||
// Also make empty live range structures
|
||||
_lrgs = (LRG *)_arena->Amalloc( maxlrg * sizeof(LRG) );
|
||||
memset(_lrgs,0,sizeof(LRG)*maxlrg);
|
||||
memset((void*)_lrgs,0,sizeof(LRG)*maxlrg);
|
||||
// Init all to empty
|
||||
for( uint i = 0; i < maxlrg; i++ ) {
|
||||
_adjs[i].initialize(maxlrg);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2017, 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
|
||||
@ -672,6 +672,8 @@ const TypeInt* IfNode::filtered_int_type(PhaseGVN* gvn, Node *val, Node* if_proj
|
||||
// lo unchanged
|
||||
hi = TypeInt::INT->_hi;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
const TypeInt* rtn_t = TypeInt::make(lo, hi, cmp2_t->_widen);
|
||||
return rtn_t;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2017, 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
|
||||
@ -224,7 +224,7 @@ void PhaseCFG::implicit_null_check(Block* block, Node *proj, Node *val, int allo
|
||||
continue; // Not an memory op; skip it
|
||||
}
|
||||
if (val == base ||
|
||||
val == index && val->bottom_type()->isa_narrowoop()) {
|
||||
(val == index && val->bottom_type()->isa_narrowoop())) {
|
||||
break; // Found it
|
||||
} else {
|
||||
continue; // Skip it
|
||||
|
@ -1991,6 +1991,8 @@ LibraryCallKit::generate_min_max(vmIntrinsics::ID id, Node* x0, Node* y0) {
|
||||
case BoolTest::gt: // x > y
|
||||
case BoolTest::ge: // x >= y
|
||||
return (want_max ? xvalue : yvalue);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2624,6 +2626,8 @@ bool LibraryCallKit::inline_unsafe_access(bool is_store, const BasicType type, c
|
||||
val = ConvL2X(val);
|
||||
val = _gvn.transform(new CastX2PNode(val));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (type == T_OBJECT) {
|
||||
@ -6183,6 +6187,8 @@ bool LibraryCallKit::inline_aescrypt_Block(vmIntrinsics::ID id) {
|
||||
stubAddr = StubRoutines::aescrypt_decryptBlock();
|
||||
stubName = "aescrypt_decryptBlock";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (stubAddr == NULL) return false;
|
||||
|
||||
@ -6250,6 +6256,8 @@ bool LibraryCallKit::inline_cipherBlockChaining_AESCrypt(vmIntrinsics::ID id) {
|
||||
stubAddr = StubRoutines::cipherBlockChaining_decryptAESCrypt();
|
||||
stubName = "cipherBlockChaining_decryptAESCrypt";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (stubAddr == NULL) return false;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2017, 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
|
||||
@ -347,18 +347,18 @@ void PhaseChaitin::verify_base_ptrs( ResourceArea *a ) const {
|
||||
}
|
||||
}
|
||||
} else if( check->bottom_type()->is_ptr()->_offset == 0 ) {
|
||||
if(check->is_Proj() || check->is_Mach() &&
|
||||
if(check->is_Proj() || (check->is_Mach() &&
|
||||
(check->as_Mach()->ideal_Opcode() == Op_CreateEx ||
|
||||
check->as_Mach()->ideal_Opcode() == Op_ThreadLocal ||
|
||||
check->as_Mach()->ideal_Opcode() == Op_CMoveP ||
|
||||
check->as_Mach()->ideal_Opcode() == Op_CheckCastPP ||
|
||||
#ifdef _LP64
|
||||
UseCompressedOops && check->as_Mach()->ideal_Opcode() == Op_CastPP ||
|
||||
UseCompressedOops && check->as_Mach()->ideal_Opcode() == Op_DecodeN ||
|
||||
UseCompressedClassPointers && check->as_Mach()->ideal_Opcode() == Op_DecodeNKlass ||
|
||||
(UseCompressedOops && check->as_Mach()->ideal_Opcode() == Op_CastPP) ||
|
||||
(UseCompressedOops && check->as_Mach()->ideal_Opcode() == Op_DecodeN) ||
|
||||
(UseCompressedClassPointers && check->as_Mach()->ideal_Opcode() == Op_DecodeNKlass) ||
|
||||
#endif
|
||||
check->as_Mach()->ideal_Opcode() == Op_LoadP ||
|
||||
check->as_Mach()->ideal_Opcode() == Op_LoadKlass)) {
|
||||
check->as_Mach()->ideal_Opcode() == Op_LoadKlass))) {
|
||||
// Valid nodes
|
||||
} else {
|
||||
check->dump();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2017, 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
|
||||
@ -662,9 +662,13 @@ BoolNode* PhaseIdealLoop::rc_predicate(IdealLoopTree *loop, Node* ctrl,
|
||||
if (offset && (!offset->is_Con() || offset->get_int() != 0)){
|
||||
max_idx_expr = new AddINode(max_idx_expr, offset);
|
||||
register_new_node(max_idx_expr, ctrl);
|
||||
if (TraceLoopPredicate)
|
||||
if (offset->is_Con()) predString->print("+ %d ", offset->get_int());
|
||||
else predString->print("+ offset ");
|
||||
if (TraceLoopPredicate) {
|
||||
if (offset->is_Con()) {
|
||||
predString->print("+ %d ", offset->get_int());
|
||||
} else {
|
||||
predString->print("+ offset ");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CmpUNode* cmp = new CmpUNode(max_idx_expr, range);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2017, 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
|
||||
@ -208,7 +208,7 @@ int IdealLoopTree::is_invariant_addition(Node* n, PhaseIdealLoop *phase) {
|
||||
// inv1 - (x + inv2) => ( inv1 - inv2) - x
|
||||
//
|
||||
Node* IdealLoopTree::reassociate_add_sub(Node* n1, PhaseIdealLoop *phase) {
|
||||
if (!n1->is_Add() && !n1->is_Sub() || n1->outcnt() == 0) return NULL;
|
||||
if ((!n1->is_Add() && !n1->is_Sub()) || n1->outcnt() == 0) return NULL;
|
||||
if (is_invariant(n1)) return NULL;
|
||||
int inv1_idx = is_invariant_addition(n1, phase);
|
||||
if (!inv1_idx) return NULL;
|
||||
@ -729,8 +729,8 @@ bool IdealLoopTree::policy_unroll(PhaseIdealLoop *phase) {
|
||||
// After unroll limit will be adjusted: new_limit = limit-stride.
|
||||
// Bailout if adjustment overflow.
|
||||
const TypeInt* limit_type = phase->_igvn.type(limit_n)->is_int();
|
||||
if (stride_con > 0 && ((limit_type->_hi - stride_con) >= limit_type->_hi) ||
|
||||
stride_con < 0 && ((limit_type->_lo - stride_con) <= limit_type->_lo))
|
||||
if ((stride_con > 0 && ((limit_type->_hi - stride_con) >= limit_type->_hi)) ||
|
||||
(stride_con < 0 && ((limit_type->_lo - stride_con) <= limit_type->_lo)))
|
||||
return false; // overflow
|
||||
|
||||
// Adjust body_size to determine if we unroll or not
|
||||
@ -1413,7 +1413,7 @@ void PhaseIdealLoop::do_unroll( IdealLoopTree *loop, Node_List &old_new, bool ad
|
||||
loop->dump_head();
|
||||
}
|
||||
|
||||
if (C->do_vector_loop() && (PrintOpto && VerifyLoopOptimizations || TraceLoopOpts)) {
|
||||
if (C->do_vector_loop() && (PrintOpto && (VerifyLoopOptimizations || TraceLoopOpts))) {
|
||||
Arena* arena = Thread::current()->resource_area();
|
||||
Node_Stack stack(arena, C->live_nodes() >> 2);
|
||||
Node_List rpo_list;
|
||||
@ -1516,8 +1516,8 @@ void PhaseIdealLoop::do_unroll( IdealLoopTree *loop, Node_List &old_new, bool ad
|
||||
limit = new Opaque2Node( C, limit );
|
||||
register_new_node( limit, opaq_ctrl );
|
||||
}
|
||||
if (stride_con > 0 && (java_subtract(limit_type->_lo, stride_con) < limit_type->_lo) ||
|
||||
stride_con < 0 && (java_subtract(limit_type->_hi, stride_con) > limit_type->_hi)) {
|
||||
if ((stride_con > 0 && (java_subtract(limit_type->_lo, stride_con) < limit_type->_lo)) ||
|
||||
(stride_con < 0 && (java_subtract(limit_type->_hi, stride_con) > limit_type->_hi))) {
|
||||
// No underflow.
|
||||
new_limit = new SubINode(limit, stride);
|
||||
} else {
|
||||
@ -1652,7 +1652,7 @@ void PhaseIdealLoop::do_unroll( IdealLoopTree *loop, Node_List &old_new, bool ad
|
||||
loop->record_for_igvn();
|
||||
|
||||
#ifndef PRODUCT
|
||||
if (C->do_vector_loop() && (PrintOpto && VerifyLoopOptimizations || TraceLoopOpts)) {
|
||||
if (C->do_vector_loop() && (PrintOpto && (VerifyLoopOptimizations || TraceLoopOpts))) {
|
||||
tty->print("\nnew loop after unroll\n"); loop->dump_head();
|
||||
for (uint i = 0; i < loop->_body.size(); i++) {
|
||||
loop->_body.at(i)->dump();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2017, 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
|
||||
@ -385,8 +385,8 @@ bool PhaseIdealLoop::is_counted_loop( Node *x, IdealLoopTree *loop ) {
|
||||
// Phi must be of loop header; backedge must wrap to increment
|
||||
if (phi->region() != x)
|
||||
return false;
|
||||
if (trunc1 == NULL && phi->in(LoopNode::LoopBackControl) != incr ||
|
||||
trunc1 != NULL && phi->in(LoopNode::LoopBackControl) != trunc1) {
|
||||
if ((trunc1 == NULL && phi->in(LoopNode::LoopBackControl) != incr) ||
|
||||
(trunc1 != NULL && phi->in(LoopNode::LoopBackControl) != trunc1)) {
|
||||
return false;
|
||||
}
|
||||
Node *init_trip = phi->in(LoopNode::EntryControl);
|
||||
@ -430,11 +430,11 @@ bool PhaseIdealLoop::is_counted_loop( Node *x, IdealLoopTree *loop ) {
|
||||
// through MININT to MAXINT, then bail out.
|
||||
if (bt == BoolTest::eq || // Bail out, but this loop trips at most twice!
|
||||
// Odd stride
|
||||
bt == BoolTest::ne && stride_con != 1 && stride_con != -1 ||
|
||||
(bt == BoolTest::ne && stride_con != 1 && stride_con != -1) ||
|
||||
// Count down loop rolls through MAXINT
|
||||
(bt == BoolTest::le || bt == BoolTest::lt) && stride_con < 0 ||
|
||||
((bt == BoolTest::le || bt == BoolTest::lt) && stride_con < 0) ||
|
||||
// Count up loop rolls through MININT
|
||||
(bt == BoolTest::ge || bt == BoolTest::gt) && stride_con > 0) {
|
||||
((bt == BoolTest::ge || bt == BoolTest::gt) && stride_con > 0)) {
|
||||
return false; // Bail out
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2017, 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
|
||||
@ -1910,7 +1910,7 @@ int PhaseIdealLoop::stride_of_possible_iv(Node* iff) {
|
||||
}
|
||||
BoolNode* bl = iff->in(1)->as_Bool();
|
||||
Node* cmp = bl->in(1);
|
||||
if (!cmp || cmp->Opcode() != Op_CmpI && cmp->Opcode() != Op_CmpU) {
|
||||
if (!cmp || (cmp->Opcode() != Op_CmpI && cmp->Opcode() != Op_CmpU)) {
|
||||
return 0;
|
||||
}
|
||||
// Must have an invariant operand
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2017, 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
|
||||
@ -1359,7 +1359,7 @@ void PhaseMacroExpand::expand_allocate_common(
|
||||
}
|
||||
|
||||
if (C->env()->dtrace_alloc_probes() ||
|
||||
!UseTLAB && (!Universe::heap()->supports_inline_contig_alloc())) {
|
||||
(!UseTLAB && !Universe::heap()->supports_inline_contig_alloc())) {
|
||||
// Force slow-path allocation
|
||||
always_slow = true;
|
||||
initial_slow_test = NULL;
|
||||
|
@ -1680,14 +1680,14 @@ MachNode *Matcher::ReduceInst( State *s, int rule, Node *&mem ) {
|
||||
}
|
||||
const Type* mach_at = mach->adr_type();
|
||||
// DecodeN node consumed by an address may have different type
|
||||
// then its input. Don't compare types for such case.
|
||||
// than its input. Don't compare types for such case.
|
||||
if (m->adr_type() != mach_at &&
|
||||
(m->in(MemNode::Address)->is_DecodeNarrowPtr() ||
|
||||
m->in(MemNode::Address)->is_AddP() &&
|
||||
m->in(MemNode::Address)->in(AddPNode::Address)->is_DecodeNarrowPtr() ||
|
||||
m->in(MemNode::Address)->is_AddP() &&
|
||||
m->in(MemNode::Address)->in(AddPNode::Address)->is_AddP() &&
|
||||
m->in(MemNode::Address)->in(AddPNode::Address)->in(AddPNode::Address)->is_DecodeNarrowPtr())) {
|
||||
(m->in(MemNode::Address)->is_AddP() &&
|
||||
m->in(MemNode::Address)->in(AddPNode::Address)->is_DecodeNarrowPtr()) ||
|
||||
(m->in(MemNode::Address)->is_AddP() &&
|
||||
m->in(MemNode::Address)->in(AddPNode::Address)->is_AddP() &&
|
||||
m->in(MemNode::Address)->in(AddPNode::Address)->in(AddPNode::Address)->is_DecodeNarrowPtr()))) {
|
||||
mach_at = m->adr_type();
|
||||
}
|
||||
if (m->adr_type() != mach_at) {
|
||||
|
@ -205,10 +205,10 @@ Node *MemNode::optimize_memory_chain(Node *mchain, const TypePtr *t_adr, Node *l
|
||||
assert(mphi->bottom_type() == Type::MEMORY, "memory phi required");
|
||||
const TypePtr *t = mphi->adr_type();
|
||||
if (t == TypePtr::BOTTOM || t == TypeRawPtr::BOTTOM ||
|
||||
t->isa_oopptr() && !t->is_oopptr()->is_known_instance() &&
|
||||
t->is_oopptr()->cast_to_exactness(true)
|
||||
->is_oopptr()->cast_to_ptr_type(t_oop->ptr())
|
||||
->is_oopptr()->cast_to_instance_id(t_oop->instance_id()) == t_oop) {
|
||||
(t->isa_oopptr() && !t->is_oopptr()->is_known_instance() &&
|
||||
t->is_oopptr()->cast_to_exactness(true)
|
||||
->is_oopptr()->cast_to_ptr_type(t_oop->ptr())
|
||||
->is_oopptr()->cast_to_instance_id(t_oop->instance_id()) == t_oop)) {
|
||||
// clone the Phi with our address type
|
||||
result = mphi->split_out_instance(t_adr, igvn);
|
||||
} else {
|
||||
@ -321,7 +321,7 @@ Node *MemNode::Ideal_common(PhaseGVN *phase, bool can_reshape) {
|
||||
|
||||
if (can_reshape && igvn != NULL &&
|
||||
(igvn->_worklist.member(address) ||
|
||||
igvn->_worklist.size() > 0 && (t_adr != adr_type())) ) {
|
||||
(igvn->_worklist.size() > 0 && t_adr != adr_type())) ) {
|
||||
// The address's base and type may change when the address is processed.
|
||||
// Delay this mem node transformation until the address is processed.
|
||||
phase->is_IterGVN()->_worklist.push(this);
|
||||
@ -821,6 +821,9 @@ Node *LoadNode::make(PhaseGVN& gvn, Node *ctl, Node *mem, Node *adr, const TypeP
|
||||
load = new LoadPNode(ctl, mem, adr, adr_type, rt->is_ptr(), mo, control_dependency);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
// ShouldNotReachHere(); ???
|
||||
break;
|
||||
}
|
||||
assert(load != NULL, "LoadNode should have been created");
|
||||
if (unaligned) {
|
||||
@ -1203,7 +1206,7 @@ Node* LoadNode::eliminate_autobox(PhaseGVN* phase) {
|
||||
// of the original value. It is done in split_through_phi().
|
||||
return NULL;
|
||||
} else if (base->is_Load() ||
|
||||
base->is_DecodeN() && base->in(1)->is_Load()) {
|
||||
(base->is_DecodeN() && base->in(1)->is_Load())) {
|
||||
// Eliminate the load of boxed value for integer types from the cache
|
||||
// array by deriving the value from the index into the array.
|
||||
// Capture the offset of the load and then reverse the computation.
|
||||
@ -1227,10 +1230,10 @@ Node* LoadNode::eliminate_autobox(PhaseGVN* phase) {
|
||||
Node* elements[4];
|
||||
int shift = exact_log2(type2aelembytes(T_OBJECT));
|
||||
int count = address->unpack_offsets(elements, ARRAY_SIZE(elements));
|
||||
if ((count > 0) && elements[0]->is_Con() &&
|
||||
((count == 1) ||
|
||||
(count == 2) && elements[1]->Opcode() == Op_LShiftX &&
|
||||
elements[1]->in(2) == phase->intcon(shift))) {
|
||||
if (count > 0 && elements[0]->is_Con() &&
|
||||
(count == 1 ||
|
||||
(count == 2 && elements[1]->Opcode() == Op_LShiftX &&
|
||||
elements[1]->in(2) == phase->intcon(shift)))) {
|
||||
ciObjArray* array = base_type->const_oop()->as_obj_array();
|
||||
// Fetch the box object cache[0] at the base of the array and get its value
|
||||
ciInstance* box = array->obj_at(0)->as_instance();
|
||||
@ -2364,9 +2367,10 @@ StoreNode* StoreNode::make(PhaseGVN& gvn, Node* ctl, Node* mem, Node* adr, const
|
||||
{
|
||||
return new StorePNode(ctl, mem, adr, adr_type, val, mo);
|
||||
}
|
||||
default:
|
||||
ShouldNotReachHere();
|
||||
return (StoreNode*)NULL;
|
||||
}
|
||||
ShouldNotReachHere();
|
||||
return (StoreNode*)NULL;
|
||||
}
|
||||
|
||||
StoreLNode* StoreLNode::make_atomic(Node* ctl, Node* mem, Node* adr, const TypePtr* adr_type, Node* val, MemOrd mo) {
|
||||
@ -4306,8 +4310,9 @@ Node *MergeMemNode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
||||
if( base_memory()->is_MergeMem() ) {
|
||||
MergeMemNode *new_mbase = base_memory()->as_MergeMem();
|
||||
Node *m = phase->transform(new_mbase); // Rollup any cycles
|
||||
if( m != NULL && (m->is_top() ||
|
||||
m->is_MergeMem() && m->as_MergeMem()->base_memory() == empty_mem) ) {
|
||||
if( m != NULL &&
|
||||
(m->is_top() ||
|
||||
(m->is_MergeMem() && m->as_MergeMem()->base_memory() == empty_mem)) ) {
|
||||
// propagate rollup of dead cycle to self
|
||||
set_req(Compile::AliasIdxBot, empty_mem);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2017, 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
|
||||
@ -88,9 +88,9 @@ Node *MulNode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
||||
// Check for dead loop
|
||||
int op1 = mul1->Opcode();
|
||||
if( phase->eqv( mul1, this ) || phase->eqv( in(2), this ) ||
|
||||
( op1 == mul_opcode() || op1 == add_opcode() ) &&
|
||||
( phase->eqv( mul1->in(1), this ) || phase->eqv( mul1->in(2), this ) ||
|
||||
phase->eqv( mul1->in(1), mul1 ) || phase->eqv( mul1->in(2), mul1 ) ) )
|
||||
( ( op1 == mul_opcode() || op1 == add_opcode() ) &&
|
||||
( phase->eqv( mul1->in(1), this ) || phase->eqv( mul1->in(2), this ) ||
|
||||
phase->eqv( mul1->in(1), mul1 ) || phase->eqv( mul1->in(2), mul1 ) ) ) )
|
||||
assert(false, "dead loop in MulNode::Ideal");
|
||||
#endif
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2017, 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
|
||||
@ -2719,7 +2719,7 @@ void Scheduling::ComputeRegisterAntidependencies(Block *b) {
|
||||
// Kill projections on a branch should appear to occur on the
|
||||
// branch, not afterwards, so grab the masks from the projections
|
||||
// and process them.
|
||||
if (n->is_MachBranch() || n->is_Mach() && n->as_Mach()->ideal_Opcode() == Op_Jump) {
|
||||
if (n->is_MachBranch() || (n->is_Mach() && n->as_Mach()->ideal_Opcode() == Op_Jump)) {
|
||||
for (DUIterator_Fast imax, i = n->fast_outs(imax); i < imax; i++) {
|
||||
Node* use = n->fast_out(i);
|
||||
if (use->is_Proj()) {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user