src/hotspot/share/jvmci/jvmciCodeInstaller.cpp
changeset 50104 4ea7917929b9
parent 49593 4dd58ecc9912
child 50729 7755c93d3923
equal deleted inserted replaced
50103:b99e90f885bf 50104:4ea7917929b9
   589   metadata.set_oop_recorder(recorder);
   589   metadata.set_oop_recorder(recorder);
   590 
   590 
   591   // Get instructions and constants CodeSections early because we need it.
   591   // Get instructions and constants CodeSections early because we need it.
   592   _instructions = buffer.insts();
   592   _instructions = buffer.insts();
   593   _constants = buffer.consts();
   593   _constants = buffer.consts();
       
   594 #if INCLUDE_AOT
       
   595   buffer.set_immutable_PIC(_immutable_pic_compilation);
       
   596 #endif
   594 
   597 
   595   initialize_fields(target(), JNIHandles::resolve(compiled_code_obj), CHECK_OK);
   598   initialize_fields(target(), JNIHandles::resolve(compiled_code_obj), CHECK_OK);
   596   JVMCIEnv::CodeInstallResult result = initialize_buffer(buffer, false, CHECK_OK);
   599   JVMCIEnv::CodeInstallResult result = initialize_buffer(buffer, false, CHECK_OK);
   597   if (result != JVMCIEnv::ok) {
   600   if (result != JVMCIEnv::ok) {
   598     return result;
   601     return result;
   622   initialize_dependencies(JNIHandles::resolve(compiled_code_obj), recorder, CHECK_OK);
   625   initialize_dependencies(JNIHandles::resolve(compiled_code_obj), recorder, CHECK_OK);
   623 
   626 
   624   // Get instructions and constants CodeSections early because we need it.
   627   // Get instructions and constants CodeSections early because we need it.
   625   _instructions = buffer.insts();
   628   _instructions = buffer.insts();
   626   _constants = buffer.consts();
   629   _constants = buffer.consts();
       
   630 #if INCLUDE_AOT
       
   631   buffer.set_immutable_PIC(_immutable_pic_compilation);
       
   632 #endif
   627 
   633 
   628   initialize_fields(target(), JNIHandles::resolve(compiled_code_obj), CHECK_OK);
   634   initialize_fields(target(), JNIHandles::resolve(compiled_code_obj), CHECK_OK);
   629   JVMCIEnv::CodeInstallResult result = initialize_buffer(buffer, true, CHECK_OK);
   635   JVMCIEnv::CodeInstallResult result = initialize_buffer(buffer, true, CHECK_OK);
   630   if (result != JVMCIEnv::ok) {
   636   if (result != JVMCIEnv::ok) {
   631     return result;
   637     return result;