Mercurial > hg > truffle
comparison src/share/vm/graal/graalCodeInstaller.cpp @ 3650:0e8a2a629afb
Pass-by compilation broker.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Wed, 16 Nov 2011 21:27:28 +0100 |
parents | c7d4198a9bce |
children | 47edfca346ab |
comparison
equal
deleted
inserted
replaced
3649:5a8c44b5fb80 | 3650:0e8a2a629afb |
---|---|
255 | 255 |
256 int stack_slots = (_frame_size / HeapWordSize) + 2; // conversion to words, need to add two slots for ret address and frame pointer | 256 int stack_slots = (_frame_size / HeapWordSize) + 2; // conversion to words, need to add two slots for ret address and frame pointer |
257 ThreadToNativeFromVM t((JavaThread*) Thread::current()); | 257 ThreadToNativeFromVM t((JavaThread*) Thread::current()); |
258 nm = GraalEnv::register_method(method, -1, &_offsets, _custom_stack_area_offset, &buffer, stack_slots, _debug_recorder->_oopmaps, &_exception_handler_table, | 258 nm = GraalEnv::register_method(method, -1, &_offsets, _custom_stack_area_offset, &buffer, stack_slots, _debug_recorder->_oopmaps, &_exception_handler_table, |
259 &_implicit_exception_table, GraalCompiler::instance(), _debug_recorder, _dependencies, NULL, -1, false, false, install_code); | 259 &_implicit_exception_table, GraalCompiler::instance(), _debug_recorder, _dependencies, NULL, -1, false, false, install_code); |
260 method->clear_queued_for_compilation(); | |
260 } | 261 } |
261 | 262 |
262 // constructor used to create a stub | 263 // constructor used to create a stub |
263 CodeInstaller::CodeInstaller(Handle target_method, jlong& id) { | 264 CodeInstaller::CodeInstaller(Handle target_method, jlong& id) { |
264 No_Safepoint_Verifier no_safepoint; | 265 No_Safepoint_Verifier no_safepoint; |
361 if (assumption->is_a(CiAssumptions_ConcreteSubtype::klass())) { | 362 if (assumption->is_a(CiAssumptions_ConcreteSubtype::klass())) { |
362 assumption_ConcreteSubtype(assumption); | 363 assumption_ConcreteSubtype(assumption); |
363 } else if (assumption->is_a(CiAssumptions_ConcreteMethod::klass())) { | 364 } else if (assumption->is_a(CiAssumptions_ConcreteMethod::klass())) { |
364 assumption_ConcreteMethod(assumption); | 365 assumption_ConcreteMethod(assumption); |
365 } else { | 366 } else { |
367 assumption->print(); | |
366 fatal("unexpected Assumption subclass"); | 368 fatal("unexpected Assumption subclass"); |
367 } | 369 } |
368 } | 370 } |
369 } | 371 } |
370 } | 372 } |
472 frame = code_pos; | 474 frame = code_pos; |
473 } | 475 } |
474 | 476 |
475 oop hotspot_method = CiCodePos::method(code_pos); | 477 oop hotspot_method = CiCodePos::method(code_pos); |
476 methodOop method = getMethodFromHotSpotMethod(hotspot_method); | 478 methodOop method = getMethodFromHotSpotMethod(hotspot_method); |
477 ciMethod *cimethod = (ciMethod *) _env->get_object(method); | |
478 jint bci = CiCodePos::bci(code_pos); | 479 jint bci = CiCodePos::bci(code_pos); |
479 bool reexecute; | 480 bool reexecute; |
480 if (bci == -1) { | 481 if (bci == -1) { |
481 reexecute = false; | 482 reexecute = false; |
482 } else { | 483 } else { |
544 bool throw_exception = false; | 545 bool throw_exception = false; |
545 if (CiFrame::rethrowException(frame)) { | 546 if (CiFrame::rethrowException(frame)) { |
546 throw_exception = true; | 547 throw_exception = true; |
547 } | 548 } |
548 | 549 |
549 _debug_recorder->describe_scope(pc_offset, cimethod, bci, reexecute, throw_exception, false, false, locals_token, expressions_token, monitors_token); | 550 _debug_recorder->describe_scope(pc_offset, method, bci, reexecute, throw_exception, false, false, locals_token, expressions_token, monitors_token); |
550 } else { | 551 } else { |
551 _debug_recorder->describe_scope(pc_offset, cimethod, bci, reexecute, false, false, false, NULL, NULL, NULL); | 552 _debug_recorder->describe_scope(pc_offset, method, bci, reexecute, false, false, false, NULL, NULL, NULL); |
552 } | 553 } |
553 } | 554 } |
554 | 555 |
555 void CodeInstaller::site_Safepoint(CodeBuffer& buffer, jint pc_offset, oop site) { | 556 void CodeInstaller::site_Safepoint(CodeBuffer& buffer, jint pc_offset, oop site) { |
556 oop debug_info = CiTargetMethod_Safepoint::debugInfo(site); | 557 oop debug_info = CiTargetMethod_Safepoint::debugInfo(site); |