Mercurial > hg > graal-jvmci-8
comparison src/share/vm/jvmci/jvmciCodeInstaller.cpp @ 22780:b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
author | Christian Wimmer <christian.wimmer@oracle.com> |
---|---|
date | Tue, 19 Jan 2016 17:36:21 -0800 |
parents | 9273bb6ba33e |
children | 805d58f2cd8c |
comparison
equal
deleted
inserted
replaced
22779:b41377216cf9 | 22780:b4ff1a18d19c |
---|---|
388 void CodeInstaller::initialize_dependencies(oop compiled_code, TRAPS) { | 388 void CodeInstaller::initialize_dependencies(oop compiled_code, TRAPS) { |
389 JavaThread* thread = JavaThread::current(); | 389 JavaThread* thread = JavaThread::current(); |
390 CompilerThread* compilerThread = thread->is_Compiler_thread() ? thread->as_CompilerThread() : NULL; | 390 CompilerThread* compilerThread = thread->is_Compiler_thread() ? thread->as_CompilerThread() : NULL; |
391 _oop_recorder = new OopRecorder(&_arena, true); | 391 _oop_recorder = new OopRecorder(&_arena, true); |
392 _dependencies = new Dependencies(&_arena, _oop_recorder, compilerThread != NULL ? compilerThread->log() : NULL); | 392 _dependencies = new Dependencies(&_arena, _oop_recorder, compilerThread != NULL ? compilerThread->log() : NULL); |
393 objArrayHandle assumptions = CompiledCode::assumptions(compiled_code); | 393 objArrayHandle assumptions = HotSpotCompiledCode::assumptions(compiled_code); |
394 if (!assumptions.is_null()) { | 394 if (!assumptions.is_null()) { |
395 int length = assumptions->length(); | 395 int length = assumptions->length(); |
396 for (int i = 0; i < length; ++i) { | 396 for (int i = 0; i < length; ++i) { |
397 Handle assumption = assumptions->obj_at(i); | 397 Handle assumption = assumptions->obj_at(i); |
398 if (!assumption.is_null()) { | 398 if (!assumption.is_null()) { |
411 } | 411 } |
412 } | 412 } |
413 } | 413 } |
414 } | 414 } |
415 if (JvmtiExport::can_hotswap_or_post_breakpoint()) { | 415 if (JvmtiExport::can_hotswap_or_post_breakpoint()) { |
416 objArrayHandle methods = CompiledCode::methods(compiled_code); | 416 objArrayHandle methods = HotSpotCompiledCode::methods(compiled_code); |
417 if (!methods.is_null()) { | 417 if (!methods.is_null()) { |
418 int length = methods->length(); | 418 int length = methods->length(); |
419 for (int i = 0; i < length; ++i) { | 419 for (int i = 0; i < length; ++i) { |
420 Handle method_handle = methods->obj_at(i); | 420 Handle method_handle = methods->obj_at(i); |
421 methodHandle method = getMethodFromHotSpotMethod(method_handle()); | 421 methodHandle method = getMethodFromHotSpotMethod(method_handle()); |
442 } | 442 } |
443 | 443 |
444 int stack_slots = _total_frame_size / HeapWordSize; // conversion to words | 444 int stack_slots = _total_frame_size / HeapWordSize; // conversion to words |
445 | 445 |
446 if (!compiled_code->is_a(HotSpotCompiledNmethod::klass())) { | 446 if (!compiled_code->is_a(HotSpotCompiledNmethod::klass())) { |
447 oop stubName = CompiledCode::name(compiled_code_obj); | 447 oop stubName = HotSpotCompiledCode::name(compiled_code_obj); |
448 char* name = strdup(java_lang_String::as_utf8_string(stubName)); | 448 char* name = strdup(java_lang_String::as_utf8_string(stubName)); |
449 cb = RuntimeStub::new_runtime_stub(name, | 449 cb = RuntimeStub::new_runtime_stub(name, |
450 &buffer, | 450 &buffer, |
451 CodeOffsets::frame_never_safe, | 451 CodeOffsets::frame_never_safe, |
452 stack_slots, | 452 stack_slots, |
487 } else { | 487 } else { |
488 // Must be a HotSpotCompiledRuntimeStub. | 488 // Must be a HotSpotCompiledRuntimeStub. |
489 // Only used in OopMap constructor for non-product builds | 489 // Only used in OopMap constructor for non-product builds |
490 _parameter_count = 0; | 490 _parameter_count = 0; |
491 } | 491 } |
492 _sites_handle = JNIHandles::make_local(CompiledCode::sites(compiled_code)); | 492 _sites_handle = JNIHandles::make_local(HotSpotCompiledCode::sites(compiled_code)); |
493 | 493 |
494 _code_handle = JNIHandles::make_local(CompiledCode::targetCode(compiled_code)); | 494 _code_handle = JNIHandles::make_local(HotSpotCompiledCode::targetCode(compiled_code)); |
495 _code_size = CompiledCode::targetCodeSize(compiled_code); | 495 _code_size = HotSpotCompiledCode::targetCodeSize(compiled_code); |
496 _total_frame_size = HotSpotCompiledCode::totalFrameSize(compiled_code); | 496 _total_frame_size = HotSpotCompiledCode::totalFrameSize(compiled_code); |
497 _custom_stack_area_offset = HotSpotCompiledCode::customStackAreaOffset(compiled_code); | 497 _custom_stack_area_offset = HotSpotCompiledCode::customStackAreaOffset(compiled_code); |
498 | 498 |
499 // Pre-calculate the constants section size. This is required for PC-relative addressing. | 499 // Pre-calculate the constants section size. This is required for PC-relative addressing. |
500 _data_section_handle = JNIHandles::make_local(HotSpotCompiledCode::dataSection(compiled_code)); | 500 _data_section_handle = JNIHandles::make_local(HotSpotCompiledCode::dataSection(compiled_code)); |