Mercurial > hg > truffle
comparison src/cpu/x86/vm/sharedRuntime_x86_64.cpp @ 3363:167b70ff3abc
6939861: JVM should handle more conversion operations
Reviewed-by: twisti, jrose
author | never |
---|---|
date | Fri, 06 May 2011 16:33:13 -0700 |
parents | 3d58a4983660 |
children | f7d55ea6ee56 |
comparison
equal
deleted
inserted
replaced
3362:d4c1fbc3de95 | 3363:167b70ff3abc |
---|---|
2528 uint SharedRuntime::out_preserve_stack_slots() { | 2528 uint SharedRuntime::out_preserve_stack_slots() { |
2529 return 0; | 2529 return 0; |
2530 } | 2530 } |
2531 | 2531 |
2532 | 2532 |
2533 //----------------------------generate_ricochet_blob--------------------------- | |
2534 void SharedRuntime::generate_ricochet_blob() { | |
2535 if (!EnableInvokeDynamic) return; // leave it as a null | |
2536 | |
2537 // allocate space for the code | |
2538 ResourceMark rm; | |
2539 // setup code generation tools | |
2540 CodeBuffer buffer("ricochet_blob", 512, 512); | |
2541 MacroAssembler* masm = new MacroAssembler(&buffer); | |
2542 | |
2543 int frame_size_in_words = -1, bounce_offset = -1, exception_offset = -1; | |
2544 MethodHandles::RicochetFrame::generate_ricochet_blob(masm, &frame_size_in_words, &bounce_offset, &exception_offset); | |
2545 | |
2546 // ------------- | |
2547 // make sure all code is generated | |
2548 masm->flush(); | |
2549 | |
2550 // failed to generate? | |
2551 if (frame_size_in_words < 0 || bounce_offset < 0 || exception_offset < 0) { | |
2552 assert(false, "bad ricochet blob"); | |
2553 return; | |
2554 } | |
2555 | |
2556 _ricochet_blob = RicochetBlob::create(&buffer, bounce_offset, exception_offset, frame_size_in_words); | |
2557 } | |
2558 | |
2533 //------------------------------generate_deopt_blob---------------------------- | 2559 //------------------------------generate_deopt_blob---------------------------- |
2534 void SharedRuntime::generate_deopt_blob() { | 2560 void SharedRuntime::generate_deopt_blob() { |
2535 // Allocate space for the code | 2561 // Allocate space for the code |
2536 ResourceMark rm; | 2562 ResourceMark rm; |
2537 // Setup code generation tools | 2563 // Setup code generation tools |
3203 | 3229 |
3204 _polling_page_return_handler_blob = | 3230 _polling_page_return_handler_blob = |
3205 generate_handler_blob(CAST_FROM_FN_PTR(address, | 3231 generate_handler_blob(CAST_FROM_FN_PTR(address, |
3206 SafepointSynchronize::handle_polling_page_exception), true); | 3232 SafepointSynchronize::handle_polling_page_exception), true); |
3207 | 3233 |
3234 generate_ricochet_blob(); | |
3235 | |
3208 generate_deopt_blob(); | 3236 generate_deopt_blob(); |
3209 | 3237 |
3210 #ifdef COMPILER2 | 3238 #ifdef COMPILER2 |
3211 generate_uncommon_trap_blob(); | 3239 generate_uncommon_trap_blob(); |
3212 #endif // COMPILER2 | 3240 #endif // COMPILER2 |