< prev index next >
src/hotspot/share/jvmci/jvmciCodeInstaller.cpp
Print this page
*** 207,216 ****
--- 207,217 ----
}
}
return map;
}
+ #if INCLUDE_AOT
AOTOopRecorder::AOTOopRecorder(Arena* arena, bool deduplicate) : OopRecorder(arena, deduplicate) {
_meta_refs = new GrowableArray<jobject>();
}
int AOTOopRecorder::nr_meta_refs() const {
*** 266,275 ****
--- 267,277 ----
index -= 1; // reduce by one to convert to array index
assert(index == _meta_refs->length(), "must be last");
_meta_refs->append(o);
}
+ #endif // INCLUDE_AOT
void* CodeInstaller::record_metadata_reference(CodeSection* section, address dest, Handle constant, TRAPS) {
/*
* This method needs to return a raw (untyped) pointer, since the value of a pointer to the base
* class is in general not equal to the pointer of the subclass. When patching metaspace pointers,
*** 553,562 ****
--- 555,565 ----
}
}
}
}
+ #if INCLUDE_AOT
RelocBuffer::~RelocBuffer() {
if (_buffer != NULL) {
FREE_C_HEAP_ARRAY(char, _buffer);
}
}
*** 591,603 ****
metadata.set_oop_recorder(recorder);
// Get instructions and constants CodeSections early because we need it.
_instructions = buffer.insts();
_constants = buffer.consts();
- #if INCLUDE_AOT
buffer.set_immutable_PIC(_immutable_pic_compilation);
- #endif
initialize_fields(target(), JNIHandles::resolve(compiled_code_obj), CHECK_OK);
JVMCIEnv::CodeInstallResult result = initialize_buffer(buffer, false, CHECK_OK);
if (result != JVMCIEnv::ok) {
return result;
--- 594,604 ----
*** 616,625 ****
--- 617,627 ----
reloc_buffer->ensure_size(buffer.total_relocation_size());
size_t size = (size_t) buffer.copy_relocations_to(reloc_buffer->begin(), (CodeBuffer::csize_t) reloc_buffer->size(), true);
reloc_buffer->set_size(size);
return JVMCIEnv::ok;
}
+ #endif // INCLUDE_AOT
// constructor used to create a method
JVMCIEnv::CodeInstallResult CodeInstaller::install(JVMCICompiler* compiler, Handle target, Handle compiled_code, CodeBlob*& cb, Handle installed_code, Handle speculation_log, TRAPS) {
CodeBuffer buffer("JVMCI Compiler CodeBuffer");
jobject compiled_code_obj = JNIHandles::make_local(compiled_code());
*** 767,784 ****
--- 769,788 ----
default:
break;
}
}
}
+ #if INCLUDE_AOT
if (UseAOT && site->is_a(site_Call::klass())) {
oop target = site_Call::target(site);
InstanceKlass* target_klass = InstanceKlass::cast(target->klass());
if (!target_klass->is_subclass_of(SystemDictionary::HotSpotForeignCallTarget_klass())) {
// Add far aot trampolines.
aot_call_stubs++;
}
}
+ #endif
}
}
int size = static_call_stubs * CompiledStaticCall::to_interp_stub_size();
size += trampoline_stubs * CompiledStaticCall::to_trampoline_stub_size();
#if INCLUDE_AOT
*** 1276,1289 ****
--- 1280,1295 ----
}
} else if (constant->is_a(HotSpotMetaspaceConstantImpl::klass())) {
if (!_immutable_pic_compilation) {
pd_patch_MetaspaceConstant(pc_offset, constant, CHECK);
}
+ #if INCLUDE_AOT
} else if (constant->is_a(HotSpotSentinelConstant::klass())) {
if (!_immutable_pic_compilation) {
JVMCI_ERROR("sentinel constant not supported for normal compiles: %s", constant->klass()->signature_name());
}
+ #endif
} else {
JVMCI_ERROR("unknown constant type in data patch: %s", constant->klass()->signature_name());
}
} else if (reference->is_a(site_DataSectionReference::klass())) {
int data_offset = site_DataSectionReference::offset(reference);
< prev index next >