mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8256424: Move ciSymbol::symbol_name() to ciSymbols::symbol_name()
Reviewed-by: kvn, iklam
This commit is contained in:
parent
1e5e790ba0
commit
f57405617e
32 changed files with 153 additions and 81 deletions
|
@ -27,6 +27,7 @@
|
|||
#include "aot/aotLoader.hpp"
|
||||
#include "ci/ciUtilities.inline.hpp"
|
||||
#include "classfile/javaAssertions.hpp"
|
||||
#include "classfile/vmSymbols.hpp"
|
||||
#include "gc/shared/cardTable.hpp"
|
||||
#include "gc/shared/cardTableBarrierSet.hpp"
|
||||
#include "gc/shared/gcConfig.hpp"
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include "ci/ciField.hpp"
|
||||
#include "ci/ciKlass.hpp"
|
||||
#include "ci/ciMemberName.hpp"
|
||||
#include "ci/ciSymbols.hpp"
|
||||
#include "ci/ciUtilities.inline.hpp"
|
||||
#include "compiler/compilationPolicy.hpp"
|
||||
#include "compiler/compileBroker.hpp"
|
||||
|
@ -1477,7 +1478,7 @@ void GraphBuilder::method_return(Value x, bool ignore_return) {
|
|||
|
||||
// The conditions for a memory barrier are described in Parse::do_exits().
|
||||
bool need_mem_bar = false;
|
||||
if (method()->name() == ciSymbol::object_initializer_name() &&
|
||||
if (method()->name() == ciSymbols::object_initializer_name() &&
|
||||
(scope()->wrote_final() ||
|
||||
(AlwaysSafeConstructors && scope()->wrote_fields()) ||
|
||||
(support_IRIW_for_not_multiple_copy_atomic_cpu && scope()->wrote_volatile()))) {
|
||||
|
@ -3820,7 +3821,7 @@ bool GraphBuilder::try_inline_full(ciMethod* callee, bool holder_known, bool ign
|
|||
}
|
||||
|
||||
// don't inline throwable methods unless the inlining tree is rooted in a throwable class
|
||||
if (callee->name() == ciSymbol::object_initializer_name() &&
|
||||
if (callee->name() == ciSymbols::object_initializer_name() &&
|
||||
callee->holder()->is_subclass_of(ciEnv::current()->Throwable_klass())) {
|
||||
// Throwable constructor call
|
||||
IRScope* top = scope();
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "classfile/vmSymbols.hpp"
|
||||
#include "c1/c1_InstructionPrinter.hpp"
|
||||
#include "c1/c1_ValueStack.hpp"
|
||||
#include "ci/ciArray.hpp"
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "classfile/vmIntrinsics.hpp"
|
||||
#include "ci/bcEscapeAnalyzer.hpp"
|
||||
#include "ci/ciConstant.hpp"
|
||||
#include "ci/ciField.hpp"
|
||||
|
@ -1204,8 +1205,8 @@ void BCEscapeAnalyzer::do_analysis() {
|
|||
iterate_blocks(arena);
|
||||
}
|
||||
|
||||
vmIntrinsics::ID BCEscapeAnalyzer::known_intrinsic() {
|
||||
vmIntrinsics::ID iid = method()->intrinsic_id();
|
||||
vmIntrinsicID BCEscapeAnalyzer::known_intrinsic() {
|
||||
vmIntrinsicID iid = method()->intrinsic_id();
|
||||
if (iid == vmIntrinsics::_getClass ||
|
||||
iid == vmIntrinsics::_hashCode) {
|
||||
return iid;
|
||||
|
@ -1214,7 +1215,7 @@ vmIntrinsics::ID BCEscapeAnalyzer::known_intrinsic() {
|
|||
}
|
||||
}
|
||||
|
||||
void BCEscapeAnalyzer::compute_escape_for_intrinsic(vmIntrinsics::ID iid) {
|
||||
void BCEscapeAnalyzer::compute_escape_for_intrinsic(vmIntrinsicID iid) {
|
||||
switch (iid) {
|
||||
case vmIntrinsics::_getClass:
|
||||
_return_local = false;
|
||||
|
@ -1293,7 +1294,7 @@ void BCEscapeAnalyzer::compute_escape_info() {
|
|||
int i;
|
||||
assert(!methodData()->has_escape_info(), "do not overwrite escape info");
|
||||
|
||||
vmIntrinsics::ID iid = known_intrinsic();
|
||||
vmIntrinsicID iid = known_intrinsic();
|
||||
|
||||
// check if method can be analyzed
|
||||
if (iid == vmIntrinsics::_none && (method()->is_abstract() || method()->is_native() || !method()->holder()->is_initialized()
|
||||
|
|
|
@ -98,8 +98,8 @@ class BCEscapeAnalyzer : public ResourceObj {
|
|||
void initialize();
|
||||
void clear_escape_info();
|
||||
void compute_escape_info();
|
||||
vmIntrinsics::ID known_intrinsic();
|
||||
void compute_escape_for_intrinsic(vmIntrinsics::ID iid);
|
||||
vmIntrinsicID known_intrinsic();
|
||||
void compute_escape_for_intrinsic(vmIntrinsicID iid);
|
||||
void do_analysis();
|
||||
|
||||
void read_escape_info();
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include "ci/ciMethod.hpp"
|
||||
#include "ci/ciNullObject.hpp"
|
||||
#include "ci/ciReplay.hpp"
|
||||
#include "ci/ciSymbols.hpp"
|
||||
#include "ci/ciUtilities.inline.hpp"
|
||||
#include "classfile/javaClasses.hpp"
|
||||
#include "classfile/symbolTable.hpp"
|
||||
|
@ -798,7 +799,7 @@ ciMethod* ciEnv::get_method_by_index_impl(const constantPoolHandle& cpool,
|
|||
|
||||
// Fake a method that is equivalent to a declared method.
|
||||
ciInstanceKlass* holder = get_instance_klass(SystemDictionary::MethodHandle_klass());
|
||||
ciSymbol* name = ciSymbol::invokeBasic_name();
|
||||
ciSymbol* name = ciSymbols::invokeBasic_name();
|
||||
ciSymbol* signature = get_symbol(cpool->signature_ref_at(index));
|
||||
return get_unloaded_method(holder, name, signature, accessor);
|
||||
} else {
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "precompiled.hpp"
|
||||
#include "ci/ciField.hpp"
|
||||
#include "ci/ciInstanceKlass.hpp"
|
||||
#include "ci/ciSymbols.hpp"
|
||||
#include "ci/ciUtilities.inline.hpp"
|
||||
#include "classfile/javaClasses.hpp"
|
||||
#include "classfile/systemDictionary.hpp"
|
||||
|
@ -218,7 +219,7 @@ ciField::ciField(fieldDescriptor *fd) :
|
|||
static bool trust_final_non_static_fields(ciInstanceKlass* holder) {
|
||||
if (holder == NULL)
|
||||
return false;
|
||||
if (holder->name() == ciSymbol::java_lang_System())
|
||||
if (holder->name() == ciSymbols::java_lang_System())
|
||||
// Never trust strangely unstable finals: System.out, etc.
|
||||
return false;
|
||||
// Even if general trusting is disabled, trust system-built closures in these packages.
|
||||
|
@ -239,14 +240,14 @@ static bool trust_final_non_static_fields(ciInstanceKlass* holder) {
|
|||
if (holder->is_record())
|
||||
return true;
|
||||
// Trust final fields in String
|
||||
if (holder->name() == ciSymbol::java_lang_String())
|
||||
if (holder->name() == ciSymbols::java_lang_String())
|
||||
return true;
|
||||
// Trust Atomic*FieldUpdaters: they are very important for performance, and make up one
|
||||
// more reason not to use Unsafe, if their final fields are trusted. See more in JDK-8140483.
|
||||
if (holder->name() == ciSymbol::java_util_concurrent_atomic_AtomicIntegerFieldUpdater_Impl() ||
|
||||
holder->name() == ciSymbol::java_util_concurrent_atomic_AtomicLongFieldUpdater_CASUpdater() ||
|
||||
holder->name() == ciSymbol::java_util_concurrent_atomic_AtomicLongFieldUpdater_LockedUpdater() ||
|
||||
holder->name() == ciSymbol::java_util_concurrent_atomic_AtomicReferenceFieldUpdater_Impl()) {
|
||||
if (holder->name() == ciSymbols::java_util_concurrent_atomic_AtomicIntegerFieldUpdater_Impl() ||
|
||||
holder->name() == ciSymbols::java_util_concurrent_atomic_AtomicLongFieldUpdater_CASUpdater() ||
|
||||
holder->name() == ciSymbols::java_util_concurrent_atomic_AtomicLongFieldUpdater_LockedUpdater() ||
|
||||
holder->name() == ciSymbols::java_util_concurrent_atomic_AtomicReferenceFieldUpdater_Impl()) {
|
||||
return true;
|
||||
}
|
||||
return TrustFinalNonStaticFields;
|
||||
|
@ -417,6 +418,24 @@ bool ciField::will_link(ciMethod* accessing_method,
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ciField::is_call_site_target() {
|
||||
ciInstanceKlass* callsite_klass = CURRENT_ENV->CallSite_klass();
|
||||
if (callsite_klass == NULL)
|
||||
return false;
|
||||
return (holder()->is_subclass_of(callsite_klass) && (name() == ciSymbols::target_name()));
|
||||
}
|
||||
|
||||
bool ciField::is_autobox_cache() {
|
||||
ciSymbol* klass_name = holder()->name();
|
||||
return (name() == ciSymbols::cache_field_name() &&
|
||||
holder()->uses_default_loader() &&
|
||||
(klass_name == ciSymbols::java_lang_Character_CharacterCache() ||
|
||||
klass_name == ciSymbols::java_lang_Byte_ByteCache() ||
|
||||
klass_name == ciSymbols::java_lang_Short_ShortCache() ||
|
||||
klass_name == ciSymbols::java_lang_Integer_IntegerCache() ||
|
||||
klass_name == ciSymbols::java_lang_Long_LongCache()));
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// ciField::print
|
||||
void ciField::print() {
|
||||
|
|
|
@ -178,23 +178,9 @@ public:
|
|||
// (or class/initializer methods if the field is static).
|
||||
bool has_initialized_final_update() const { return flags().has_initialized_final_update(); }
|
||||
|
||||
bool is_call_site_target() {
|
||||
ciInstanceKlass* callsite_klass = CURRENT_ENV->CallSite_klass();
|
||||
if (callsite_klass == NULL)
|
||||
return false;
|
||||
return (holder()->is_subclass_of(callsite_klass) && (name() == ciSymbol::target_name()));
|
||||
}
|
||||
bool is_call_site_target();
|
||||
|
||||
bool is_autobox_cache() {
|
||||
ciSymbol* klass_name = holder()->name();
|
||||
return (name() == ciSymbol::cache_field_name() &&
|
||||
holder()->uses_default_loader() &&
|
||||
(klass_name == ciSymbol::java_lang_Character_CharacterCache() ||
|
||||
klass_name == ciSymbol::java_lang_Byte_ByteCache() ||
|
||||
klass_name == ciSymbol::java_lang_Short_ShortCache() ||
|
||||
klass_name == ciSymbol::java_lang_Integer_IntegerCache() ||
|
||||
klass_name == ciSymbol::java_lang_Long_LongCache()));
|
||||
}
|
||||
bool is_autobox_cache();
|
||||
|
||||
// Debugging output
|
||||
void print();
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include "ci/ciStreams.hpp"
|
||||
#include "ci/ciSymbol.hpp"
|
||||
#include "ci/ciReplay.hpp"
|
||||
#include "ci/ciSymbols.hpp"
|
||||
#include "ci/ciUtilities.inline.hpp"
|
||||
#include "classfile/systemDictionary.hpp"
|
||||
#include "compiler/abstractCompiler.hpp"
|
||||
|
@ -946,7 +947,7 @@ bool ciMethod::is_compiled_lambda_form() const {
|
|||
// ciMethod::is_object_initializer
|
||||
//
|
||||
bool ciMethod::is_object_initializer() const {
|
||||
return name() == ciSymbol::object_initializer_name();
|
||||
return name() == ciSymbols::object_initializer_name();
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include "ci/ciInstanceKlass.hpp"
|
||||
#include "ci/ciObject.hpp"
|
||||
#include "ci/ciSignature.hpp"
|
||||
#include "classfile/vmIntrinsics.hpp"
|
||||
#include "compiler/methodLiveness.hpp"
|
||||
#include "runtime/handles.hpp"
|
||||
#include "utilities/bitMap.hpp"
|
||||
|
@ -75,7 +76,7 @@ class ciMethod : public ciMetadata {
|
|||
int _code_size;
|
||||
int _max_stack;
|
||||
int _max_locals;
|
||||
vmIntrinsics::ID _intrinsic_id;
|
||||
vmIntrinsicID _intrinsic_id;
|
||||
int _handler_count;
|
||||
int _nmethod_age;
|
||||
int _interpreter_invocation_count;
|
||||
|
@ -181,7 +182,7 @@ class ciMethod : public ciMetadata {
|
|||
int code_size() const { check_is_loaded(); return _code_size; }
|
||||
int max_stack() const { check_is_loaded(); return _max_stack; }
|
||||
int max_locals() const { check_is_loaded(); return _max_locals; }
|
||||
vmIntrinsics::ID intrinsic_id() const { check_is_loaded(); return _intrinsic_id; }
|
||||
vmIntrinsicID intrinsic_id() const { check_is_loaded(); return _intrinsic_id; }
|
||||
bool has_exception_handlers() const { check_is_loaded(); return _handler_count > 0; }
|
||||
int exception_table_length() const { check_is_loaded(); return _handler_count; }
|
||||
int interpreter_invocation_count() const { check_is_loaded(); return _interpreter_invocation_count; }
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
#include "ci/ciObject.hpp"
|
||||
#include "ci/ciObjectFactory.hpp"
|
||||
#include "ci/ciSymbol.hpp"
|
||||
#include "ci/ciSymbols.hpp"
|
||||
#include "ci/ciTypeArray.hpp"
|
||||
#include "ci/ciTypeArrayKlass.hpp"
|
||||
#include "ci/ciUtilities.inline.hpp"
|
||||
|
@ -136,7 +137,7 @@ void ciObjectFactory::init_shared_objects() {
|
|||
ciSymbol* sym = vm_symbol_at(index);
|
||||
assert(sym->get_symbol() == vmsym, "oop must match");
|
||||
}
|
||||
assert(ciSymbol::void_class_signature()->get_symbol() == vmSymbols::void_class_signature(), "spot check");
|
||||
assert(ciSymbols::void_class_signature()->get_symbol() == vmSymbols::void_class_signature(), "spot check");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include "ci/ciConstant.hpp"
|
||||
#include "ci/ciField.hpp"
|
||||
#include "ci/ciStreams.hpp"
|
||||
#include "ci/ciSymbols.hpp"
|
||||
#include "ci/ciUtilities.inline.hpp"
|
||||
#include "runtime/handles.inline.hpp"
|
||||
|
||||
|
@ -476,7 +477,7 @@ ciKlass* ciBytecodeStream::get_declared_method_holder() {
|
|||
bool ignore;
|
||||
// report as MethodHandle for invokedynamic, which is syntactically classless
|
||||
if (cur_bc() == Bytecodes::_invokedynamic)
|
||||
return CURRENT_ENV->get_klass_by_name(_holder, ciSymbol::java_lang_invoke_MethodHandle(), false);
|
||||
return CURRENT_ENV->get_klass_by_name(_holder, ciSymbols::java_lang_invoke_MethodHandle(), false);
|
||||
return CURRENT_ENV->get_klass_by_index(cpool, get_method_holder_index(), ignore, _holder);
|
||||
}
|
||||
|
||||
|
|
|
@ -24,8 +24,10 @@
|
|||
|
||||
#include "precompiled.hpp"
|
||||
#include "ci/ciSymbol.hpp"
|
||||
#include "ci/ciSymbols.hpp"
|
||||
#include "ci/ciUtilities.inline.hpp"
|
||||
#include "classfile/symbolTable.hpp"
|
||||
#include "classfile/vmSymbols.hpp"
|
||||
#include "memory/oopFactory.hpp"
|
||||
#include "prims/methodHandles.hpp"
|
||||
|
||||
|
@ -39,6 +41,8 @@ ciSymbol::ciSymbol(Symbol* s, vmSymbolID sid)
|
|||
assert(sid_ok(), "sid must be consistent with vmSymbols");
|
||||
}
|
||||
|
||||
DEBUG_ONLY(bool ciSymbol::sid_ok() { return vmSymbols::find_sid(get_symbol()) == _sid; })
|
||||
|
||||
// ciSymbol
|
||||
//
|
||||
// This class represents a Symbol* in the HotSpot virtual
|
||||
|
|
|
@ -27,8 +27,6 @@
|
|||
|
||||
#include "ci/ciBaseObject.hpp"
|
||||
#include "ci/ciObject.hpp"
|
||||
#include "ci/ciObjectFactory.hpp"
|
||||
#include "classfile/vmSymbols.hpp"
|
||||
#include "oops/symbol.hpp"
|
||||
#include "utilities/vmEnums.hpp"
|
||||
|
||||
|
@ -50,9 +48,10 @@ class ciSymbol : public ciBaseObject {
|
|||
|
||||
private:
|
||||
const vmSymbolID _sid;
|
||||
DEBUG_ONLY( bool sid_ok() { return vmSymbols::find_sid(get_symbol()) == _sid; } )
|
||||
|
||||
ciSymbol(Symbol* s, vmSymbolID sid = vmSymbolID::NO_SID);
|
||||
ciSymbol(Symbol* s, vmSymbolID sid);
|
||||
|
||||
DEBUG_ONLY(bool sid_ok();)
|
||||
|
||||
Symbol* get_symbol() const { return _symbol; }
|
||||
|
||||
|
@ -67,7 +66,7 @@ private:
|
|||
static ciSymbol* make_impl(const char* s);
|
||||
|
||||
public:
|
||||
// The enumeration ID from vmSymbols, or vmSymbols::NO_SID if none.
|
||||
// The enumeration ID from vmSymbols, or vmSymbolID::NO_SID if none.
|
||||
vmSymbolID sid() const { return _sid; }
|
||||
|
||||
// The text of the symbol as a null-terminated utf8 string.
|
||||
|
@ -97,11 +96,6 @@ public:
|
|||
// (Your code will be less subject to typographical bugs.)
|
||||
static ciSymbol* make(const char* s);
|
||||
|
||||
#define CI_SYMBOL_DECLARE(name, ignore_def) \
|
||||
static ciSymbol* name() { return ciObjectFactory::vm_symbol_at(VM_SYMBOL_ENUM_NAME(name)); }
|
||||
VM_SYMBOLS_DO(CI_SYMBOL_DECLARE, CI_SYMBOL_DECLARE)
|
||||
#undef CI_SYMBOL_DECLARE
|
||||
|
||||
void print() {
|
||||
_symbol->print();
|
||||
}
|
||||
|
|
43
src/hotspot/share/ci/ciSymbols.hpp
Normal file
43
src/hotspot/share/ci/ciSymbols.hpp
Normal file
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
* Copyright (c) 2020, 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
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SHARE_CI_CISYMBOLS_HPP
|
||||
#define SHARE_CI_CISYMBOLS_HPP
|
||||
|
||||
#include "ci/ciObjectFactory.hpp"
|
||||
#include "ci/ciSymbol.hpp"
|
||||
#include "classfile/vmSymbols.hpp"
|
||||
#include "oops/symbol.hpp"
|
||||
|
||||
class ciSymbols {
|
||||
public:
|
||||
#define CI_SYMBOL_DECLARE(name, ignore_def) \
|
||||
static ciSymbol* name() { return ciObjectFactory::vm_symbol_at(VM_SYMBOL_ENUM_NAME(name)); }
|
||||
|
||||
VM_SYMBOLS_DO(CI_SYMBOL_DECLARE, CI_SYMBOL_DECLARE)
|
||||
#undef CI_SYMBOL_DECLARE
|
||||
|
||||
};
|
||||
|
||||
#endif // SHARE_CI_CISYMBOLS_HPP
|
|
@ -25,6 +25,7 @@
|
|||
#ifndef SHARE_COMPILER_COMPILERDIRECTIVES_HPP
|
||||
#define SHARE_COMPILER_COMPILERDIRECTIVES_HPP
|
||||
|
||||
#include "classfile/vmIntrinsics.hpp"
|
||||
#include "ci/ciMetadata.hpp"
|
||||
#include "ci/ciMethod.hpp"
|
||||
#include "compiler/methodMatcher.hpp"
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "ci/ciMethod.hpp"
|
||||
#include "ci/ciMethodBlocks.hpp"
|
||||
#include "ci/ciStreams.hpp"
|
||||
#include "classfile/vmIntrinsics.hpp"
|
||||
#include "compiler/methodLiveness.hpp"
|
||||
#include "interpreter/bytecode.hpp"
|
||||
#include "interpreter/bytecodes.hpp"
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "aot/aotLoader.hpp"
|
||||
#include "classfile/stringTable.hpp"
|
||||
#include "classfile/symbolTable.hpp"
|
||||
#include "classfile/vmSymbols.hpp"
|
||||
#include "compiler/compilationPolicy.hpp"
|
||||
#include "interpreter/linkResolver.hpp"
|
||||
#include "jvmci/compilerRuntime.hpp"
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "precompiled.hpp"
|
||||
#include "compiler/compileBroker.hpp"
|
||||
#include "classfile/moduleEntry.hpp"
|
||||
#include "classfile/vmSymbols.hpp"
|
||||
#include "jvmci/jvmciEnv.hpp"
|
||||
#include "jvmci/jvmciRuntime.hpp"
|
||||
#include "oops/objArrayOop.inline.hpp"
|
||||
|
@ -42,6 +43,16 @@ JVMCICompiler::JVMCICompiler() : AbstractCompiler(compiler_jvmci) {
|
|||
_instance = this;
|
||||
}
|
||||
|
||||
JVMCICompiler* JVMCICompiler::instance(bool require_non_null, TRAPS) {
|
||||
if (!EnableJVMCI) {
|
||||
THROW_MSG_NULL(vmSymbols::java_lang_InternalError(), "JVMCI is not enabled")
|
||||
}
|
||||
if (_instance == NULL && require_non_null) {
|
||||
THROW_MSG_NULL(vmSymbols::java_lang_InternalError(), "The JVMCI compiler instance has not been created");
|
||||
}
|
||||
return _instance;
|
||||
}
|
||||
|
||||
// Initialization
|
||||
void JVMCICompiler::initialize() {
|
||||
assert(!is_c1_or_interpreter_only(), "JVMCI is launched, it's not c1/interpreter only mode");
|
||||
|
|
|
@ -58,15 +58,7 @@ private:
|
|||
public:
|
||||
JVMCICompiler();
|
||||
|
||||
static JVMCICompiler* instance(bool require_non_null, TRAPS) {
|
||||
if (!EnableJVMCI) {
|
||||
THROW_MSG_NULL(vmSymbols::java_lang_InternalError(), "JVMCI is not enabled")
|
||||
}
|
||||
if (_instance == NULL && require_non_null) {
|
||||
THROW_MSG_NULL(vmSymbols::java_lang_InternalError(), "The JVMCI compiler instance has not been created");
|
||||
}
|
||||
return _instance;
|
||||
}
|
||||
static JVMCICompiler* instance(bool require_non_null, TRAPS);
|
||||
|
||||
virtual const char* name() { return UseJVMCINativeLibrary ? "JVMCI-native" : "JVMCI"; }
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "precompiled.hpp"
|
||||
#include "ci/ciMethodData.hpp"
|
||||
#include "classfile/systemDictionary.hpp"
|
||||
#include "classfile/vmSymbols.hpp"
|
||||
#include "compiler/compilationPolicy.hpp"
|
||||
#include "compiler/compilerOracle.hpp"
|
||||
#include "interpreter/bytecode.hpp"
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "precompiled.hpp"
|
||||
#include "ci/ciCallSite.hpp"
|
||||
#include "ci/ciMethodHandle.hpp"
|
||||
#include "ci/ciSymbols.hpp"
|
||||
#include "classfile/vmSymbols.hpp"
|
||||
#include "compiler/compileBroker.hpp"
|
||||
#include "compiler/compileLog.hpp"
|
||||
|
@ -1120,7 +1121,7 @@ ciMethod* Compile::optimize_inlining(ciMethod* caller, ciInstanceKlass* klass,
|
|||
// finalize() call on array is not allowed.
|
||||
if (receiver_type->isa_aryptr() &&
|
||||
callee->holder() == env()->Object_klass() &&
|
||||
callee->name() != ciSymbol::finalize_method_name()) {
|
||||
callee->name() != ciSymbols::finalize_method_name()) {
|
||||
return callee;
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "asm/macroAssembler.hpp"
|
||||
#include "ci/ciUtilities.inline.hpp"
|
||||
#include "classfile/systemDictionary.hpp"
|
||||
#include "classfile/vmSymbols.hpp"
|
||||
#include "classfile/vmIntrinsics.hpp"
|
||||
#include "compiler/compileBroker.hpp"
|
||||
#include "compiler/compileLog.hpp"
|
||||
#include "gc/shared/barrierSet.hpp"
|
||||
|
@ -60,7 +60,7 @@
|
|||
|
||||
//---------------------------make_vm_intrinsic----------------------------
|
||||
CallGenerator* Compile::make_vm_intrinsic(ciMethod* m, bool is_virtual) {
|
||||
vmIntrinsics::ID id = m->intrinsic_id();
|
||||
vmIntrinsicID id = m->intrinsic_id();
|
||||
assert(id != vmIntrinsics::_none, "must be a VM intrinsic");
|
||||
|
||||
if (!m->is_loaded()) {
|
||||
|
@ -89,7 +89,7 @@ CallGenerator* Compile::make_vm_intrinsic(ciMethod* m, bool is_virtual) {
|
|||
return new LibraryIntrinsic(m, is_virtual,
|
||||
vmIntrinsics::predicates_needed(id),
|
||||
vmIntrinsics::does_virtual_dispatch(id),
|
||||
(vmIntrinsics::ID) id);
|
||||
id);
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
|
@ -672,7 +672,7 @@ bool LibraryCallKit::try_to_inline(int predicate) {
|
|||
|
||||
default:
|
||||
// If you get here, it may be that someone has added a new intrinsic
|
||||
// to the list in vmSymbols.hpp without implementing it here.
|
||||
// to the list in vmIntrinsics.hpp without implementing it here.
|
||||
#ifndef PRODUCT
|
||||
if ((PrintMiscellaneous && (Verbose || WizardMode)) || PrintOpto) {
|
||||
tty->print_cr("*** Warning: Unimplemented intrinsic %s(%d)",
|
||||
|
@ -708,7 +708,7 @@ Node* LibraryCallKit::try_to_predicate(int predicate) {
|
|||
|
||||
default:
|
||||
// If you get here, it may be that someone has added a new intrinsic
|
||||
// to the list in vmSymbols.hpp without implementing it here.
|
||||
// to the list in vmIntrinsics.hpp without implementing it here.
|
||||
#ifndef PRODUCT
|
||||
if ((PrintMiscellaneous && (Verbose || WizardMode)) || PrintOpto) {
|
||||
tty->print_cr("*** Warning: Unimplemented predicate for intrinsic %s(%d)",
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "ci/ciSymbols.hpp"
|
||||
#include "classfile/systemDictionary.hpp"
|
||||
#include "compiler/compileLog.hpp"
|
||||
#include "oops/objArrayKlass.hpp"
|
||||
|
@ -245,7 +246,7 @@ void Parse::do_new() {
|
|||
|
||||
// Should throw an InstantiationError?
|
||||
if (klass->is_abstract() || klass->is_interface() ||
|
||||
klass->name() == ciSymbol::java_lang_Class() ||
|
||||
klass->name() == ciSymbols::java_lang_Class() ||
|
||||
iter().is_unresolved_klass()) {
|
||||
uncommon_trap(Deoptimization::Reason_unhandled,
|
||||
Deoptimization::Action_none,
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "ci/ciSymbols.hpp"
|
||||
#include "classfile/javaClasses.hpp"
|
||||
#include "compiler/compileLog.hpp"
|
||||
#include "opto/addnode.hpp"
|
||||
|
@ -417,13 +418,13 @@ StringConcat* PhaseStringOpts::build_candidate(CallStaticJavaNode* call) {
|
|||
ciSymbol* int_sig;
|
||||
ciSymbol* char_sig;
|
||||
if (m->holder() == C->env()->StringBuilder_klass()) {
|
||||
string_sig = ciSymbol::String_StringBuilder_signature();
|
||||
int_sig = ciSymbol::int_StringBuilder_signature();
|
||||
char_sig = ciSymbol::char_StringBuilder_signature();
|
||||
string_sig = ciSymbols::String_StringBuilder_signature();
|
||||
int_sig = ciSymbols::int_StringBuilder_signature();
|
||||
char_sig = ciSymbols::char_StringBuilder_signature();
|
||||
} else if (m->holder() == C->env()->StringBuffer_klass()) {
|
||||
string_sig = ciSymbol::String_StringBuffer_signature();
|
||||
int_sig = ciSymbol::int_StringBuffer_signature();
|
||||
char_sig = ciSymbol::char_StringBuffer_signature();
|
||||
string_sig = ciSymbols::String_StringBuffer_signature();
|
||||
int_sig = ciSymbols::int_StringBuffer_signature();
|
||||
char_sig = ciSymbols::char_StringBuffer_signature();
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
|
@ -470,14 +471,14 @@ StringConcat* PhaseStringOpts::build_candidate(CallStaticJavaNode* call) {
|
|||
if (use != NULL &&
|
||||
use->method() != NULL &&
|
||||
!use->method()->is_static() &&
|
||||
use->method()->name() == ciSymbol::object_initializer_name() &&
|
||||
use->method()->name() == ciSymbols::object_initializer_name() &&
|
||||
use->method()->holder() == m->holder()) {
|
||||
// Matched the constructor.
|
||||
ciSymbol* sig = use->method()->signature()->as_symbol();
|
||||
if (sig == ciSymbol::void_method_signature() ||
|
||||
sig == ciSymbol::int_void_signature() ||
|
||||
sig == ciSymbol::string_void_signature()) {
|
||||
if (sig == ciSymbol::string_void_signature()) {
|
||||
if (sig == ciSymbols::void_method_signature() ||
|
||||
sig == ciSymbols::int_void_signature() ||
|
||||
sig == ciSymbols::string_void_signature()) {
|
||||
if (sig == ciSymbols::string_void_signature()) {
|
||||
// StringBuilder(String) so pick this up as the first argument
|
||||
assert(use->in(TypeFunc::Parms + 1) != NULL, "what?");
|
||||
const Type* type = _gvn->type(use->in(TypeFunc::Parms + 1));
|
||||
|
@ -534,7 +535,7 @@ StringConcat* PhaseStringOpts::build_candidate(CallStaticJavaNode* call) {
|
|||
break;
|
||||
} else if (!cnode->method()->is_static() &&
|
||||
cnode->method()->holder() == m->holder() &&
|
||||
cnode->method()->name() == ciSymbol::append_name() &&
|
||||
cnode->method()->name() == ciSymbols::append_name() &&
|
||||
(cnode->method()->signature()->as_symbol() == string_sig ||
|
||||
cnode->method()->signature()->as_symbol() == char_sig ||
|
||||
cnode->method()->signature()->as_symbol() == int_sig)) {
|
||||
|
@ -599,7 +600,7 @@ PhaseStringOpts::PhaseStringOpts(PhaseGVN* gvn, Unique_Node_List*):
|
|||
assert(OptimizeStringConcat, "shouldn't be here");
|
||||
|
||||
size_table_field = C->env()->Integer_klass()->get_field_by_name(ciSymbol::make("sizeTable"),
|
||||
ciSymbol::make("[I"), true);
|
||||
ciSymbols::int_array_signature(), true);
|
||||
if (size_table_field == NULL) {
|
||||
// Something wrong so give up.
|
||||
assert(false, "why can't we find Integer.sizeTable?");
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "ci/ciSymbols.hpp"
|
||||
#include "opto/castnode.hpp"
|
||||
#include "opto/graphKit.hpp"
|
||||
#include "opto/phaseX.hpp"
|
||||
|
@ -358,8 +359,8 @@ Node* PhaseVector::expand_vbox_alloc_node(VectorBoxAllocateNode* vbox_alloc,
|
|||
Node* vec_obj = kit.new_instance(klass_node);
|
||||
|
||||
// Store the allocated array into object.
|
||||
ciField* field = ciEnv::current()->vector_VectorPayload_klass()->get_field_by_name(ciSymbol::payload_name(),
|
||||
ciSymbol::object_signature(),
|
||||
ciField* field = ciEnv::current()->vector_VectorPayload_klass()->get_field_by_name(ciSymbols::payload_name(),
|
||||
ciSymbols::object_signature(),
|
||||
false);
|
||||
assert(field != NULL, "");
|
||||
Node* vec_field = kit.basic_plus_adr(vec_obj, field->offset_in_bytes());
|
||||
|
@ -403,8 +404,8 @@ void PhaseVector::expand_vunbox_node(VectorUnboxNode* vec_unbox) {
|
|||
bt = T_BYTE;
|
||||
}
|
||||
|
||||
ciField* field = ciEnv::current()->vector_VectorPayload_klass()->get_field_by_name(ciSymbol::payload_name(),
|
||||
ciSymbol::object_signature(),
|
||||
ciField* field = ciEnv::current()->vector_VectorPayload_klass()->get_field_by_name(ciSymbols::payload_name(),
|
||||
ciSymbols::object_signature(),
|
||||
false);
|
||||
assert(field != NULL, "");
|
||||
int offset = field->offset_in_bytes();
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "ci/ciSymbols.hpp"
|
||||
#include "classfile/vmSymbols.hpp"
|
||||
#include "opto/library_call.hpp"
|
||||
#include "opto/runtime.hpp"
|
||||
|
@ -40,14 +41,14 @@ static bool check_vbox(const TypeInstPtr* vbox_type) {
|
|||
ciInstanceKlass* ik = vbox_type->klass()->as_instance_klass();
|
||||
assert(is_vector(ik), "not a vector");
|
||||
|
||||
ciField* fd1 = ik->get_field_by_name(ciSymbol::ETYPE_name(), ciSymbol::class_signature(), /* is_static */ true);
|
||||
ciField* fd1 = ik->get_field_by_name(ciSymbols::ETYPE_name(), ciSymbols::class_signature(), /* is_static */ true);
|
||||
assert(fd1 != NULL, "element type info is missing");
|
||||
|
||||
ciConstant val1 = fd1->constant_value();
|
||||
BasicType elem_bt = val1.as_object()->as_instance()->java_mirror_type()->basic_type();
|
||||
assert(is_java_primitive(elem_bt), "element type info is missing");
|
||||
|
||||
ciField* fd2 = ik->get_field_by_name(ciSymbol::VLENGTH_name(), ciSymbol::int_signature(), /* is_static */ true);
|
||||
ciField* fd2 = ik->get_field_by_name(ciSymbols::VLENGTH_name(), ciSymbols::int_signature(), /* is_static */ true);
|
||||
assert(fd2 != NULL, "vector length info is missing");
|
||||
|
||||
ciConstant val2 = fd2->constant_value();
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "classfile/javaClasses.inline.hpp"
|
||||
#include "classfile/moduleEntry.hpp"
|
||||
#include "classfile/systemDictionary.hpp"
|
||||
#include "classfile/vmSymbols.hpp"
|
||||
#include "code/nmethod.hpp"
|
||||
#include "code/pcDesc.hpp"
|
||||
#include "code/scopeDesc.hpp"
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include "classfile/symbolTable.hpp"
|
||||
#include "classfile/systemDictionary.hpp"
|
||||
#include "classfile/verifier.hpp"
|
||||
#include "classfile/vmSymbols.hpp"
|
||||
#include "code/codeCache.hpp"
|
||||
#include "compiler/compileBroker.hpp"
|
||||
#include "interpreter/oopMapCache.hpp"
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include "classfile/protectionDomainCache.hpp"
|
||||
#include "classfile/stringTable.hpp"
|
||||
#include "classfile/symbolTable.hpp"
|
||||
#include "classfile/vmSymbols.hpp"
|
||||
#include "code/codeCache.hpp"
|
||||
#include "compiler/compilationPolicy.hpp"
|
||||
#include "compiler/methodMatcher.hpp"
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include "classfile/stringTable.hpp"
|
||||
#include "classfile/symbolTable.hpp"
|
||||
#include "classfile/systemDictionary.hpp"
|
||||
#include "classfile/vmSymbols.hpp"
|
||||
#include "code/codeBlob.hpp"
|
||||
#include "code/codeCache.hpp"
|
||||
#include "code/compressedStream.hpp"
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
#include "precompiled.hpp"
|
||||
#include "classfile/systemDictionary.hpp"
|
||||
#include "classfile/vmSymbols.hpp"
|
||||
#include "gc/shared/oopStorageSet.hpp"
|
||||
#include "memory/allocation.hpp"
|
||||
#include "memory/heapInspection.hpp"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue