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 "aot/aotLoader.hpp"
|
||||||
#include "ci/ciUtilities.inline.hpp"
|
#include "ci/ciUtilities.inline.hpp"
|
||||||
#include "classfile/javaAssertions.hpp"
|
#include "classfile/javaAssertions.hpp"
|
||||||
|
#include "classfile/vmSymbols.hpp"
|
||||||
#include "gc/shared/cardTable.hpp"
|
#include "gc/shared/cardTable.hpp"
|
||||||
#include "gc/shared/cardTableBarrierSet.hpp"
|
#include "gc/shared/cardTableBarrierSet.hpp"
|
||||||
#include "gc/shared/gcConfig.hpp"
|
#include "gc/shared/gcConfig.hpp"
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#include "ci/ciField.hpp"
|
#include "ci/ciField.hpp"
|
||||||
#include "ci/ciKlass.hpp"
|
#include "ci/ciKlass.hpp"
|
||||||
#include "ci/ciMemberName.hpp"
|
#include "ci/ciMemberName.hpp"
|
||||||
|
#include "ci/ciSymbols.hpp"
|
||||||
#include "ci/ciUtilities.inline.hpp"
|
#include "ci/ciUtilities.inline.hpp"
|
||||||
#include "compiler/compilationPolicy.hpp"
|
#include "compiler/compilationPolicy.hpp"
|
||||||
#include "compiler/compileBroker.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().
|
// The conditions for a memory barrier are described in Parse::do_exits().
|
||||||
bool need_mem_bar = false;
|
bool need_mem_bar = false;
|
||||||
if (method()->name() == ciSymbol::object_initializer_name() &&
|
if (method()->name() == ciSymbols::object_initializer_name() &&
|
||||||
(scope()->wrote_final() ||
|
(scope()->wrote_final() ||
|
||||||
(AlwaysSafeConstructors && scope()->wrote_fields()) ||
|
(AlwaysSafeConstructors && scope()->wrote_fields()) ||
|
||||||
(support_IRIW_for_not_multiple_copy_atomic_cpu && scope()->wrote_volatile()))) {
|
(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
|
// 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())) {
|
callee->holder()->is_subclass_of(ciEnv::current()->Throwable_klass())) {
|
||||||
// Throwable constructor call
|
// Throwable constructor call
|
||||||
IRScope* top = scope();
|
IRScope* top = scope();
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
|
#include "classfile/vmSymbols.hpp"
|
||||||
#include "c1/c1_InstructionPrinter.hpp"
|
#include "c1/c1_InstructionPrinter.hpp"
|
||||||
#include "c1/c1_ValueStack.hpp"
|
#include "c1/c1_ValueStack.hpp"
|
||||||
#include "ci/ciArray.hpp"
|
#include "ci/ciArray.hpp"
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
|
#include "classfile/vmIntrinsics.hpp"
|
||||||
#include "ci/bcEscapeAnalyzer.hpp"
|
#include "ci/bcEscapeAnalyzer.hpp"
|
||||||
#include "ci/ciConstant.hpp"
|
#include "ci/ciConstant.hpp"
|
||||||
#include "ci/ciField.hpp"
|
#include "ci/ciField.hpp"
|
||||||
|
@ -1204,8 +1205,8 @@ void BCEscapeAnalyzer::do_analysis() {
|
||||||
iterate_blocks(arena);
|
iterate_blocks(arena);
|
||||||
}
|
}
|
||||||
|
|
||||||
vmIntrinsics::ID BCEscapeAnalyzer::known_intrinsic() {
|
vmIntrinsicID BCEscapeAnalyzer::known_intrinsic() {
|
||||||
vmIntrinsics::ID iid = method()->intrinsic_id();
|
vmIntrinsicID iid = method()->intrinsic_id();
|
||||||
if (iid == vmIntrinsics::_getClass ||
|
if (iid == vmIntrinsics::_getClass ||
|
||||||
iid == vmIntrinsics::_hashCode) {
|
iid == vmIntrinsics::_hashCode) {
|
||||||
return iid;
|
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) {
|
switch (iid) {
|
||||||
case vmIntrinsics::_getClass:
|
case vmIntrinsics::_getClass:
|
||||||
_return_local = false;
|
_return_local = false;
|
||||||
|
@ -1293,7 +1294,7 @@ void BCEscapeAnalyzer::compute_escape_info() {
|
||||||
int i;
|
int i;
|
||||||
assert(!methodData()->has_escape_info(), "do not overwrite escape info");
|
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
|
// check if method can be analyzed
|
||||||
if (iid == vmIntrinsics::_none && (method()->is_abstract() || method()->is_native() || !method()->holder()->is_initialized()
|
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 initialize();
|
||||||
void clear_escape_info();
|
void clear_escape_info();
|
||||||
void compute_escape_info();
|
void compute_escape_info();
|
||||||
vmIntrinsics::ID known_intrinsic();
|
vmIntrinsicID known_intrinsic();
|
||||||
void compute_escape_for_intrinsic(vmIntrinsics::ID iid);
|
void compute_escape_for_intrinsic(vmIntrinsicID iid);
|
||||||
void do_analysis();
|
void do_analysis();
|
||||||
|
|
||||||
void read_escape_info();
|
void read_escape_info();
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#include "ci/ciMethod.hpp"
|
#include "ci/ciMethod.hpp"
|
||||||
#include "ci/ciNullObject.hpp"
|
#include "ci/ciNullObject.hpp"
|
||||||
#include "ci/ciReplay.hpp"
|
#include "ci/ciReplay.hpp"
|
||||||
|
#include "ci/ciSymbols.hpp"
|
||||||
#include "ci/ciUtilities.inline.hpp"
|
#include "ci/ciUtilities.inline.hpp"
|
||||||
#include "classfile/javaClasses.hpp"
|
#include "classfile/javaClasses.hpp"
|
||||||
#include "classfile/symbolTable.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.
|
// Fake a method that is equivalent to a declared method.
|
||||||
ciInstanceKlass* holder = get_instance_klass(SystemDictionary::MethodHandle_klass());
|
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));
|
ciSymbol* signature = get_symbol(cpool->signature_ref_at(index));
|
||||||
return get_unloaded_method(holder, name, signature, accessor);
|
return get_unloaded_method(holder, name, signature, accessor);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
#include "ci/ciField.hpp"
|
#include "ci/ciField.hpp"
|
||||||
#include "ci/ciInstanceKlass.hpp"
|
#include "ci/ciInstanceKlass.hpp"
|
||||||
|
#include "ci/ciSymbols.hpp"
|
||||||
#include "ci/ciUtilities.inline.hpp"
|
#include "ci/ciUtilities.inline.hpp"
|
||||||
#include "classfile/javaClasses.hpp"
|
#include "classfile/javaClasses.hpp"
|
||||||
#include "classfile/systemDictionary.hpp"
|
#include "classfile/systemDictionary.hpp"
|
||||||
|
@ -218,7 +219,7 @@ ciField::ciField(fieldDescriptor *fd) :
|
||||||
static bool trust_final_non_static_fields(ciInstanceKlass* holder) {
|
static bool trust_final_non_static_fields(ciInstanceKlass* holder) {
|
||||||
if (holder == NULL)
|
if (holder == NULL)
|
||||||
return false;
|
return false;
|
||||||
if (holder->name() == ciSymbol::java_lang_System())
|
if (holder->name() == ciSymbols::java_lang_System())
|
||||||
// Never trust strangely unstable finals: System.out, etc.
|
// Never trust strangely unstable finals: System.out, etc.
|
||||||
return false;
|
return false;
|
||||||
// Even if general trusting is disabled, trust system-built closures in these packages.
|
// 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())
|
if (holder->is_record())
|
||||||
return true;
|
return true;
|
||||||
// Trust final fields in String
|
// Trust final fields in String
|
||||||
if (holder->name() == ciSymbol::java_lang_String())
|
if (holder->name() == ciSymbols::java_lang_String())
|
||||||
return true;
|
return true;
|
||||||
// Trust Atomic*FieldUpdaters: they are very important for performance, and make up one
|
// 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.
|
// 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() ||
|
if (holder->name() == ciSymbols::java_util_concurrent_atomic_AtomicIntegerFieldUpdater_Impl() ||
|
||||||
holder->name() == ciSymbol::java_util_concurrent_atomic_AtomicLongFieldUpdater_CASUpdater() ||
|
holder->name() == ciSymbols::java_util_concurrent_atomic_AtomicLongFieldUpdater_CASUpdater() ||
|
||||||
holder->name() == ciSymbol::java_util_concurrent_atomic_AtomicLongFieldUpdater_LockedUpdater() ||
|
holder->name() == ciSymbols::java_util_concurrent_atomic_AtomicLongFieldUpdater_LockedUpdater() ||
|
||||||
holder->name() == ciSymbol::java_util_concurrent_atomic_AtomicReferenceFieldUpdater_Impl()) {
|
holder->name() == ciSymbols::java_util_concurrent_atomic_AtomicReferenceFieldUpdater_Impl()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return TrustFinalNonStaticFields;
|
return TrustFinalNonStaticFields;
|
||||||
|
@ -417,6 +418,24 @@ bool ciField::will_link(ciMethod* accessing_method,
|
||||||
return true;
|
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
|
// ciField::print
|
||||||
void ciField::print() {
|
void ciField::print() {
|
||||||
|
|
|
@ -178,23 +178,9 @@ public:
|
||||||
// (or class/initializer methods if the field is static).
|
// (or class/initializer methods if the field is static).
|
||||||
bool has_initialized_final_update() const { return flags().has_initialized_final_update(); }
|
bool has_initialized_final_update() const { return flags().has_initialized_final_update(); }
|
||||||
|
|
||||||
bool is_call_site_target() {
|
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_autobox_cache() {
|
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()));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Debugging output
|
// Debugging output
|
||||||
void print();
|
void print();
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#include "ci/ciStreams.hpp"
|
#include "ci/ciStreams.hpp"
|
||||||
#include "ci/ciSymbol.hpp"
|
#include "ci/ciSymbol.hpp"
|
||||||
#include "ci/ciReplay.hpp"
|
#include "ci/ciReplay.hpp"
|
||||||
|
#include "ci/ciSymbols.hpp"
|
||||||
#include "ci/ciUtilities.inline.hpp"
|
#include "ci/ciUtilities.inline.hpp"
|
||||||
#include "classfile/systemDictionary.hpp"
|
#include "classfile/systemDictionary.hpp"
|
||||||
#include "compiler/abstractCompiler.hpp"
|
#include "compiler/abstractCompiler.hpp"
|
||||||
|
@ -946,7 +947,7 @@ bool ciMethod::is_compiled_lambda_form() const {
|
||||||
// ciMethod::is_object_initializer
|
// ciMethod::is_object_initializer
|
||||||
//
|
//
|
||||||
bool ciMethod::is_object_initializer() const {
|
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/ciInstanceKlass.hpp"
|
||||||
#include "ci/ciObject.hpp"
|
#include "ci/ciObject.hpp"
|
||||||
#include "ci/ciSignature.hpp"
|
#include "ci/ciSignature.hpp"
|
||||||
|
#include "classfile/vmIntrinsics.hpp"
|
||||||
#include "compiler/methodLiveness.hpp"
|
#include "compiler/methodLiveness.hpp"
|
||||||
#include "runtime/handles.hpp"
|
#include "runtime/handles.hpp"
|
||||||
#include "utilities/bitMap.hpp"
|
#include "utilities/bitMap.hpp"
|
||||||
|
@ -75,7 +76,7 @@ class ciMethod : public ciMetadata {
|
||||||
int _code_size;
|
int _code_size;
|
||||||
int _max_stack;
|
int _max_stack;
|
||||||
int _max_locals;
|
int _max_locals;
|
||||||
vmIntrinsics::ID _intrinsic_id;
|
vmIntrinsicID _intrinsic_id;
|
||||||
int _handler_count;
|
int _handler_count;
|
||||||
int _nmethod_age;
|
int _nmethod_age;
|
||||||
int _interpreter_invocation_count;
|
int _interpreter_invocation_count;
|
||||||
|
@ -181,7 +182,7 @@ class ciMethod : public ciMetadata {
|
||||||
int code_size() const { check_is_loaded(); return _code_size; }
|
int code_size() const { check_is_loaded(); return _code_size; }
|
||||||
int max_stack() const { check_is_loaded(); return _max_stack; }
|
int max_stack() const { check_is_loaded(); return _max_stack; }
|
||||||
int max_locals() const { check_is_loaded(); return _max_locals; }
|
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; }
|
bool has_exception_handlers() const { check_is_loaded(); return _handler_count > 0; }
|
||||||
int exception_table_length() const { check_is_loaded(); return _handler_count; }
|
int exception_table_length() const { check_is_loaded(); return _handler_count; }
|
||||||
int interpreter_invocation_count() const { check_is_loaded(); return _interpreter_invocation_count; }
|
int interpreter_invocation_count() const { check_is_loaded(); return _interpreter_invocation_count; }
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
#include "ci/ciObject.hpp"
|
#include "ci/ciObject.hpp"
|
||||||
#include "ci/ciObjectFactory.hpp"
|
#include "ci/ciObjectFactory.hpp"
|
||||||
#include "ci/ciSymbol.hpp"
|
#include "ci/ciSymbol.hpp"
|
||||||
|
#include "ci/ciSymbols.hpp"
|
||||||
#include "ci/ciTypeArray.hpp"
|
#include "ci/ciTypeArray.hpp"
|
||||||
#include "ci/ciTypeArrayKlass.hpp"
|
#include "ci/ciTypeArrayKlass.hpp"
|
||||||
#include "ci/ciUtilities.inline.hpp"
|
#include "ci/ciUtilities.inline.hpp"
|
||||||
|
@ -136,7 +137,7 @@ void ciObjectFactory::init_shared_objects() {
|
||||||
ciSymbol* sym = vm_symbol_at(index);
|
ciSymbol* sym = vm_symbol_at(index);
|
||||||
assert(sym->get_symbol() == vmsym, "oop must match");
|
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
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
#include "ci/ciConstant.hpp"
|
#include "ci/ciConstant.hpp"
|
||||||
#include "ci/ciField.hpp"
|
#include "ci/ciField.hpp"
|
||||||
#include "ci/ciStreams.hpp"
|
#include "ci/ciStreams.hpp"
|
||||||
|
#include "ci/ciSymbols.hpp"
|
||||||
#include "ci/ciUtilities.inline.hpp"
|
#include "ci/ciUtilities.inline.hpp"
|
||||||
#include "runtime/handles.inline.hpp"
|
#include "runtime/handles.inline.hpp"
|
||||||
|
|
||||||
|
@ -476,7 +477,7 @@ ciKlass* ciBytecodeStream::get_declared_method_holder() {
|
||||||
bool ignore;
|
bool ignore;
|
||||||
// report as MethodHandle for invokedynamic, which is syntactically classless
|
// report as MethodHandle for invokedynamic, which is syntactically classless
|
||||||
if (cur_bc() == Bytecodes::_invokedynamic)
|
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);
|
return CURRENT_ENV->get_klass_by_index(cpool, get_method_holder_index(), ignore, _holder);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,10 @@
|
||||||
|
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
#include "ci/ciSymbol.hpp"
|
#include "ci/ciSymbol.hpp"
|
||||||
|
#include "ci/ciSymbols.hpp"
|
||||||
#include "ci/ciUtilities.inline.hpp"
|
#include "ci/ciUtilities.inline.hpp"
|
||||||
#include "classfile/symbolTable.hpp"
|
#include "classfile/symbolTable.hpp"
|
||||||
|
#include "classfile/vmSymbols.hpp"
|
||||||
#include "memory/oopFactory.hpp"
|
#include "memory/oopFactory.hpp"
|
||||||
#include "prims/methodHandles.hpp"
|
#include "prims/methodHandles.hpp"
|
||||||
|
|
||||||
|
@ -39,6 +41,8 @@ ciSymbol::ciSymbol(Symbol* s, vmSymbolID sid)
|
||||||
assert(sid_ok(), "sid must be consistent with vmSymbols");
|
assert(sid_ok(), "sid must be consistent with vmSymbols");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DEBUG_ONLY(bool ciSymbol::sid_ok() { return vmSymbols::find_sid(get_symbol()) == _sid; })
|
||||||
|
|
||||||
// ciSymbol
|
// ciSymbol
|
||||||
//
|
//
|
||||||
// This class represents a Symbol* in the HotSpot virtual
|
// This class represents a Symbol* in the HotSpot virtual
|
||||||
|
|
|
@ -27,8 +27,6 @@
|
||||||
|
|
||||||
#include "ci/ciBaseObject.hpp"
|
#include "ci/ciBaseObject.hpp"
|
||||||
#include "ci/ciObject.hpp"
|
#include "ci/ciObject.hpp"
|
||||||
#include "ci/ciObjectFactory.hpp"
|
|
||||||
#include "classfile/vmSymbols.hpp"
|
|
||||||
#include "oops/symbol.hpp"
|
#include "oops/symbol.hpp"
|
||||||
#include "utilities/vmEnums.hpp"
|
#include "utilities/vmEnums.hpp"
|
||||||
|
|
||||||
|
@ -50,9 +48,10 @@ class ciSymbol : public ciBaseObject {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const vmSymbolID _sid;
|
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; }
|
Symbol* get_symbol() const { return _symbol; }
|
||||||
|
|
||||||
|
@ -67,7 +66,7 @@ private:
|
||||||
static ciSymbol* make_impl(const char* s);
|
static ciSymbol* make_impl(const char* s);
|
||||||
|
|
||||||
public:
|
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; }
|
vmSymbolID sid() const { return _sid; }
|
||||||
|
|
||||||
// The text of the symbol as a null-terminated utf8 string.
|
// 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.)
|
// (Your code will be less subject to typographical bugs.)
|
||||||
static ciSymbol* make(const char* s);
|
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() {
|
void print() {
|
||||||
_symbol->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
|
#ifndef SHARE_COMPILER_COMPILERDIRECTIVES_HPP
|
||||||
#define SHARE_COMPILER_COMPILERDIRECTIVES_HPP
|
#define SHARE_COMPILER_COMPILERDIRECTIVES_HPP
|
||||||
|
|
||||||
|
#include "classfile/vmIntrinsics.hpp"
|
||||||
#include "ci/ciMetadata.hpp"
|
#include "ci/ciMetadata.hpp"
|
||||||
#include "ci/ciMethod.hpp"
|
#include "ci/ciMethod.hpp"
|
||||||
#include "compiler/methodMatcher.hpp"
|
#include "compiler/methodMatcher.hpp"
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
#include "ci/ciMethod.hpp"
|
#include "ci/ciMethod.hpp"
|
||||||
#include "ci/ciMethodBlocks.hpp"
|
#include "ci/ciMethodBlocks.hpp"
|
||||||
#include "ci/ciStreams.hpp"
|
#include "ci/ciStreams.hpp"
|
||||||
|
#include "classfile/vmIntrinsics.hpp"
|
||||||
#include "compiler/methodLiveness.hpp"
|
#include "compiler/methodLiveness.hpp"
|
||||||
#include "interpreter/bytecode.hpp"
|
#include "interpreter/bytecode.hpp"
|
||||||
#include "interpreter/bytecodes.hpp"
|
#include "interpreter/bytecodes.hpp"
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#include "aot/aotLoader.hpp"
|
#include "aot/aotLoader.hpp"
|
||||||
#include "classfile/stringTable.hpp"
|
#include "classfile/stringTable.hpp"
|
||||||
#include "classfile/symbolTable.hpp"
|
#include "classfile/symbolTable.hpp"
|
||||||
|
#include "classfile/vmSymbols.hpp"
|
||||||
#include "compiler/compilationPolicy.hpp"
|
#include "compiler/compilationPolicy.hpp"
|
||||||
#include "interpreter/linkResolver.hpp"
|
#include "interpreter/linkResolver.hpp"
|
||||||
#include "jvmci/compilerRuntime.hpp"
|
#include "jvmci/compilerRuntime.hpp"
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
#include "compiler/compileBroker.hpp"
|
#include "compiler/compileBroker.hpp"
|
||||||
#include "classfile/moduleEntry.hpp"
|
#include "classfile/moduleEntry.hpp"
|
||||||
|
#include "classfile/vmSymbols.hpp"
|
||||||
#include "jvmci/jvmciEnv.hpp"
|
#include "jvmci/jvmciEnv.hpp"
|
||||||
#include "jvmci/jvmciRuntime.hpp"
|
#include "jvmci/jvmciRuntime.hpp"
|
||||||
#include "oops/objArrayOop.inline.hpp"
|
#include "oops/objArrayOop.inline.hpp"
|
||||||
|
@ -42,6 +43,16 @@ JVMCICompiler::JVMCICompiler() : AbstractCompiler(compiler_jvmci) {
|
||||||
_instance = this;
|
_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
|
// Initialization
|
||||||
void JVMCICompiler::initialize() {
|
void JVMCICompiler::initialize() {
|
||||||
assert(!is_c1_or_interpreter_only(), "JVMCI is launched, it's not c1/interpreter only mode");
|
assert(!is_c1_or_interpreter_only(), "JVMCI is launched, it's not c1/interpreter only mode");
|
||||||
|
|
|
@ -58,15 +58,7 @@ private:
|
||||||
public:
|
public:
|
||||||
JVMCICompiler();
|
JVMCICompiler();
|
||||||
|
|
||||||
static JVMCICompiler* instance(bool require_non_null, TRAPS) {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual const char* name() { return UseJVMCINativeLibrary ? "JVMCI-native" : "JVMCI"; }
|
virtual const char* name() { return UseJVMCINativeLibrary ? "JVMCI-native" : "JVMCI"; }
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
#include "ci/ciMethodData.hpp"
|
#include "ci/ciMethodData.hpp"
|
||||||
#include "classfile/systemDictionary.hpp"
|
#include "classfile/systemDictionary.hpp"
|
||||||
|
#include "classfile/vmSymbols.hpp"
|
||||||
#include "compiler/compilationPolicy.hpp"
|
#include "compiler/compilationPolicy.hpp"
|
||||||
#include "compiler/compilerOracle.hpp"
|
#include "compiler/compilerOracle.hpp"
|
||||||
#include "interpreter/bytecode.hpp"
|
#include "interpreter/bytecode.hpp"
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
#include "ci/ciCallSite.hpp"
|
#include "ci/ciCallSite.hpp"
|
||||||
#include "ci/ciMethodHandle.hpp"
|
#include "ci/ciMethodHandle.hpp"
|
||||||
|
#include "ci/ciSymbols.hpp"
|
||||||
#include "classfile/vmSymbols.hpp"
|
#include "classfile/vmSymbols.hpp"
|
||||||
#include "compiler/compileBroker.hpp"
|
#include "compiler/compileBroker.hpp"
|
||||||
#include "compiler/compileLog.hpp"
|
#include "compiler/compileLog.hpp"
|
||||||
|
@ -1120,7 +1121,7 @@ ciMethod* Compile::optimize_inlining(ciMethod* caller, ciInstanceKlass* klass,
|
||||||
// finalize() call on array is not allowed.
|
// finalize() call on array is not allowed.
|
||||||
if (receiver_type->isa_aryptr() &&
|
if (receiver_type->isa_aryptr() &&
|
||||||
callee->holder() == env()->Object_klass() &&
|
callee->holder() == env()->Object_klass() &&
|
||||||
callee->name() != ciSymbol::finalize_method_name()) {
|
callee->name() != ciSymbols::finalize_method_name()) {
|
||||||
return callee;
|
return callee;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#include "asm/macroAssembler.hpp"
|
#include "asm/macroAssembler.hpp"
|
||||||
#include "ci/ciUtilities.inline.hpp"
|
#include "ci/ciUtilities.inline.hpp"
|
||||||
#include "classfile/systemDictionary.hpp"
|
#include "classfile/systemDictionary.hpp"
|
||||||
#include "classfile/vmSymbols.hpp"
|
#include "classfile/vmIntrinsics.hpp"
|
||||||
#include "compiler/compileBroker.hpp"
|
#include "compiler/compileBroker.hpp"
|
||||||
#include "compiler/compileLog.hpp"
|
#include "compiler/compileLog.hpp"
|
||||||
#include "gc/shared/barrierSet.hpp"
|
#include "gc/shared/barrierSet.hpp"
|
||||||
|
@ -60,7 +60,7 @@
|
||||||
|
|
||||||
//---------------------------make_vm_intrinsic----------------------------
|
//---------------------------make_vm_intrinsic----------------------------
|
||||||
CallGenerator* Compile::make_vm_intrinsic(ciMethod* m, bool is_virtual) {
|
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");
|
assert(id != vmIntrinsics::_none, "must be a VM intrinsic");
|
||||||
|
|
||||||
if (!m->is_loaded()) {
|
if (!m->is_loaded()) {
|
||||||
|
@ -89,7 +89,7 @@ CallGenerator* Compile::make_vm_intrinsic(ciMethod* m, bool is_virtual) {
|
||||||
return new LibraryIntrinsic(m, is_virtual,
|
return new LibraryIntrinsic(m, is_virtual,
|
||||||
vmIntrinsics::predicates_needed(id),
|
vmIntrinsics::predicates_needed(id),
|
||||||
vmIntrinsics::does_virtual_dispatch(id),
|
vmIntrinsics::does_virtual_dispatch(id),
|
||||||
(vmIntrinsics::ID) id);
|
id);
|
||||||
} else {
|
} else {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -672,7 +672,7 @@ bool LibraryCallKit::try_to_inline(int predicate) {
|
||||||
|
|
||||||
default:
|
default:
|
||||||
// If you get here, it may be that someone has added a new intrinsic
|
// 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
|
#ifndef PRODUCT
|
||||||
if ((PrintMiscellaneous && (Verbose || WizardMode)) || PrintOpto) {
|
if ((PrintMiscellaneous && (Verbose || WizardMode)) || PrintOpto) {
|
||||||
tty->print_cr("*** Warning: Unimplemented intrinsic %s(%d)",
|
tty->print_cr("*** Warning: Unimplemented intrinsic %s(%d)",
|
||||||
|
@ -708,7 +708,7 @@ Node* LibraryCallKit::try_to_predicate(int predicate) {
|
||||||
|
|
||||||
default:
|
default:
|
||||||
// If you get here, it may be that someone has added a new intrinsic
|
// 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
|
#ifndef PRODUCT
|
||||||
if ((PrintMiscellaneous && (Verbose || WizardMode)) || PrintOpto) {
|
if ((PrintMiscellaneous && (Verbose || WizardMode)) || PrintOpto) {
|
||||||
tty->print_cr("*** Warning: Unimplemented predicate for intrinsic %s(%d)",
|
tty->print_cr("*** Warning: Unimplemented predicate for intrinsic %s(%d)",
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
|
#include "ci/ciSymbols.hpp"
|
||||||
#include "classfile/systemDictionary.hpp"
|
#include "classfile/systemDictionary.hpp"
|
||||||
#include "compiler/compileLog.hpp"
|
#include "compiler/compileLog.hpp"
|
||||||
#include "oops/objArrayKlass.hpp"
|
#include "oops/objArrayKlass.hpp"
|
||||||
|
@ -245,7 +246,7 @@ void Parse::do_new() {
|
||||||
|
|
||||||
// Should throw an InstantiationError?
|
// Should throw an InstantiationError?
|
||||||
if (klass->is_abstract() || klass->is_interface() ||
|
if (klass->is_abstract() || klass->is_interface() ||
|
||||||
klass->name() == ciSymbol::java_lang_Class() ||
|
klass->name() == ciSymbols::java_lang_Class() ||
|
||||||
iter().is_unresolved_klass()) {
|
iter().is_unresolved_klass()) {
|
||||||
uncommon_trap(Deoptimization::Reason_unhandled,
|
uncommon_trap(Deoptimization::Reason_unhandled,
|
||||||
Deoptimization::Action_none,
|
Deoptimization::Action_none,
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
|
#include "ci/ciSymbols.hpp"
|
||||||
#include "classfile/javaClasses.hpp"
|
#include "classfile/javaClasses.hpp"
|
||||||
#include "compiler/compileLog.hpp"
|
#include "compiler/compileLog.hpp"
|
||||||
#include "opto/addnode.hpp"
|
#include "opto/addnode.hpp"
|
||||||
|
@ -417,13 +418,13 @@ StringConcat* PhaseStringOpts::build_candidate(CallStaticJavaNode* call) {
|
||||||
ciSymbol* int_sig;
|
ciSymbol* int_sig;
|
||||||
ciSymbol* char_sig;
|
ciSymbol* char_sig;
|
||||||
if (m->holder() == C->env()->StringBuilder_klass()) {
|
if (m->holder() == C->env()->StringBuilder_klass()) {
|
||||||
string_sig = ciSymbol::String_StringBuilder_signature();
|
string_sig = ciSymbols::String_StringBuilder_signature();
|
||||||
int_sig = ciSymbol::int_StringBuilder_signature();
|
int_sig = ciSymbols::int_StringBuilder_signature();
|
||||||
char_sig = ciSymbol::char_StringBuilder_signature();
|
char_sig = ciSymbols::char_StringBuilder_signature();
|
||||||
} else if (m->holder() == C->env()->StringBuffer_klass()) {
|
} else if (m->holder() == C->env()->StringBuffer_klass()) {
|
||||||
string_sig = ciSymbol::String_StringBuffer_signature();
|
string_sig = ciSymbols::String_StringBuffer_signature();
|
||||||
int_sig = ciSymbol::int_StringBuffer_signature();
|
int_sig = ciSymbols::int_StringBuffer_signature();
|
||||||
char_sig = ciSymbol::char_StringBuffer_signature();
|
char_sig = ciSymbols::char_StringBuffer_signature();
|
||||||
} else {
|
} else {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -470,14 +471,14 @@ StringConcat* PhaseStringOpts::build_candidate(CallStaticJavaNode* call) {
|
||||||
if (use != NULL &&
|
if (use != NULL &&
|
||||||
use->method() != NULL &&
|
use->method() != NULL &&
|
||||||
!use->method()->is_static() &&
|
!use->method()->is_static() &&
|
||||||
use->method()->name() == ciSymbol::object_initializer_name() &&
|
use->method()->name() == ciSymbols::object_initializer_name() &&
|
||||||
use->method()->holder() == m->holder()) {
|
use->method()->holder() == m->holder()) {
|
||||||
// Matched the constructor.
|
// Matched the constructor.
|
||||||
ciSymbol* sig = use->method()->signature()->as_symbol();
|
ciSymbol* sig = use->method()->signature()->as_symbol();
|
||||||
if (sig == ciSymbol::void_method_signature() ||
|
if (sig == ciSymbols::void_method_signature() ||
|
||||||
sig == ciSymbol::int_void_signature() ||
|
sig == ciSymbols::int_void_signature() ||
|
||||||
sig == ciSymbol::string_void_signature()) {
|
sig == ciSymbols::string_void_signature()) {
|
||||||
if (sig == ciSymbol::string_void_signature()) {
|
if (sig == ciSymbols::string_void_signature()) {
|
||||||
// StringBuilder(String) so pick this up as the first argument
|
// StringBuilder(String) so pick this up as the first argument
|
||||||
assert(use->in(TypeFunc::Parms + 1) != NULL, "what?");
|
assert(use->in(TypeFunc::Parms + 1) != NULL, "what?");
|
||||||
const Type* type = _gvn->type(use->in(TypeFunc::Parms + 1));
|
const Type* type = _gvn->type(use->in(TypeFunc::Parms + 1));
|
||||||
|
@ -534,7 +535,7 @@ StringConcat* PhaseStringOpts::build_candidate(CallStaticJavaNode* call) {
|
||||||
break;
|
break;
|
||||||
} else if (!cnode->method()->is_static() &&
|
} else if (!cnode->method()->is_static() &&
|
||||||
cnode->method()->holder() == m->holder() &&
|
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() == string_sig ||
|
||||||
cnode->method()->signature()->as_symbol() == char_sig ||
|
cnode->method()->signature()->as_symbol() == char_sig ||
|
||||||
cnode->method()->signature()->as_symbol() == int_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");
|
assert(OptimizeStringConcat, "shouldn't be here");
|
||||||
|
|
||||||
size_table_field = C->env()->Integer_klass()->get_field_by_name(ciSymbol::make("sizeTable"),
|
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) {
|
if (size_table_field == NULL) {
|
||||||
// Something wrong so give up.
|
// Something wrong so give up.
|
||||||
assert(false, "why can't we find Integer.sizeTable?");
|
assert(false, "why can't we find Integer.sizeTable?");
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
|
#include "ci/ciSymbols.hpp"
|
||||||
#include "opto/castnode.hpp"
|
#include "opto/castnode.hpp"
|
||||||
#include "opto/graphKit.hpp"
|
#include "opto/graphKit.hpp"
|
||||||
#include "opto/phaseX.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);
|
Node* vec_obj = kit.new_instance(klass_node);
|
||||||
|
|
||||||
// Store the allocated array into object.
|
// Store the allocated array into object.
|
||||||
ciField* field = ciEnv::current()->vector_VectorPayload_klass()->get_field_by_name(ciSymbol::payload_name(),
|
ciField* field = ciEnv::current()->vector_VectorPayload_klass()->get_field_by_name(ciSymbols::payload_name(),
|
||||||
ciSymbol::object_signature(),
|
ciSymbols::object_signature(),
|
||||||
false);
|
false);
|
||||||
assert(field != NULL, "");
|
assert(field != NULL, "");
|
||||||
Node* vec_field = kit.basic_plus_adr(vec_obj, field->offset_in_bytes());
|
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;
|
bt = T_BYTE;
|
||||||
}
|
}
|
||||||
|
|
||||||
ciField* field = ciEnv::current()->vector_VectorPayload_klass()->get_field_by_name(ciSymbol::payload_name(),
|
ciField* field = ciEnv::current()->vector_VectorPayload_klass()->get_field_by_name(ciSymbols::payload_name(),
|
||||||
ciSymbol::object_signature(),
|
ciSymbols::object_signature(),
|
||||||
false);
|
false);
|
||||||
assert(field != NULL, "");
|
assert(field != NULL, "");
|
||||||
int offset = field->offset_in_bytes();
|
int offset = field->offset_in_bytes();
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
|
#include "ci/ciSymbols.hpp"
|
||||||
#include "classfile/vmSymbols.hpp"
|
#include "classfile/vmSymbols.hpp"
|
||||||
#include "opto/library_call.hpp"
|
#include "opto/library_call.hpp"
|
||||||
#include "opto/runtime.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();
|
ciInstanceKlass* ik = vbox_type->klass()->as_instance_klass();
|
||||||
assert(is_vector(ik), "not a vector");
|
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");
|
assert(fd1 != NULL, "element type info is missing");
|
||||||
|
|
||||||
ciConstant val1 = fd1->constant_value();
|
ciConstant val1 = fd1->constant_value();
|
||||||
BasicType elem_bt = val1.as_object()->as_instance()->java_mirror_type()->basic_type();
|
BasicType elem_bt = val1.as_object()->as_instance()->java_mirror_type()->basic_type();
|
||||||
assert(is_java_primitive(elem_bt), "element type info is missing");
|
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");
|
assert(fd2 != NULL, "vector length info is missing");
|
||||||
|
|
||||||
ciConstant val2 = fd2->constant_value();
|
ciConstant val2 = fd2->constant_value();
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
#include "classfile/javaClasses.inline.hpp"
|
#include "classfile/javaClasses.inline.hpp"
|
||||||
#include "classfile/moduleEntry.hpp"
|
#include "classfile/moduleEntry.hpp"
|
||||||
#include "classfile/systemDictionary.hpp"
|
#include "classfile/systemDictionary.hpp"
|
||||||
|
#include "classfile/vmSymbols.hpp"
|
||||||
#include "code/nmethod.hpp"
|
#include "code/nmethod.hpp"
|
||||||
#include "code/pcDesc.hpp"
|
#include "code/pcDesc.hpp"
|
||||||
#include "code/scopeDesc.hpp"
|
#include "code/scopeDesc.hpp"
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#include "classfile/symbolTable.hpp"
|
#include "classfile/symbolTable.hpp"
|
||||||
#include "classfile/systemDictionary.hpp"
|
#include "classfile/systemDictionary.hpp"
|
||||||
#include "classfile/verifier.hpp"
|
#include "classfile/verifier.hpp"
|
||||||
|
#include "classfile/vmSymbols.hpp"
|
||||||
#include "code/codeCache.hpp"
|
#include "code/codeCache.hpp"
|
||||||
#include "compiler/compileBroker.hpp"
|
#include "compiler/compileBroker.hpp"
|
||||||
#include "interpreter/oopMapCache.hpp"
|
#include "interpreter/oopMapCache.hpp"
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#include "classfile/protectionDomainCache.hpp"
|
#include "classfile/protectionDomainCache.hpp"
|
||||||
#include "classfile/stringTable.hpp"
|
#include "classfile/stringTable.hpp"
|
||||||
#include "classfile/symbolTable.hpp"
|
#include "classfile/symbolTable.hpp"
|
||||||
|
#include "classfile/vmSymbols.hpp"
|
||||||
#include "code/codeCache.hpp"
|
#include "code/codeCache.hpp"
|
||||||
#include "compiler/compilationPolicy.hpp"
|
#include "compiler/compilationPolicy.hpp"
|
||||||
#include "compiler/methodMatcher.hpp"
|
#include "compiler/methodMatcher.hpp"
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
#include "classfile/stringTable.hpp"
|
#include "classfile/stringTable.hpp"
|
||||||
#include "classfile/symbolTable.hpp"
|
#include "classfile/symbolTable.hpp"
|
||||||
#include "classfile/systemDictionary.hpp"
|
#include "classfile/systemDictionary.hpp"
|
||||||
|
#include "classfile/vmSymbols.hpp"
|
||||||
#include "code/codeBlob.hpp"
|
#include "code/codeBlob.hpp"
|
||||||
#include "code/codeCache.hpp"
|
#include "code/codeCache.hpp"
|
||||||
#include "code/compressedStream.hpp"
|
#include "code/compressedStream.hpp"
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
#include "classfile/systemDictionary.hpp"
|
#include "classfile/systemDictionary.hpp"
|
||||||
|
#include "classfile/vmSymbols.hpp"
|
||||||
#include "gc/shared/oopStorageSet.hpp"
|
#include "gc/shared/oopStorageSet.hpp"
|
||||||
#include "memory/allocation.hpp"
|
#include "memory/allocation.hpp"
|
||||||
#include "memory/heapInspection.hpp"
|
#include "memory/heapInspection.hpp"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue