comparison src/cpu/x86/vm/sharedRuntime_x86_32.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
2251 2251
2252 uint SharedRuntime::out_preserve_stack_slots() { 2252 uint SharedRuntime::out_preserve_stack_slots() {
2253 return 0; 2253 return 0;
2254 } 2254 }
2255 2255
2256 //----------------------------generate_ricochet_blob---------------------------
2257 void SharedRuntime::generate_ricochet_blob() {
2258 if (!EnableInvokeDynamic) return; // leave it as a null
2259
2260 // allocate space for the code
2261 ResourceMark rm;
2262 // setup code generation tools
2263 CodeBuffer buffer("ricochet_blob", 256, 256);
2264 MacroAssembler* masm = new MacroAssembler(&buffer);
2265
2266 int frame_size_in_words = -1, bounce_offset = -1, exception_offset = -1;
2267 MethodHandles::RicochetFrame::generate_ricochet_blob(masm, &frame_size_in_words, &bounce_offset, &exception_offset);
2268
2269 // -------------
2270 // make sure all code is generated
2271 masm->flush();
2272
2273 // failed to generate?
2274 if (frame_size_in_words < 0 || bounce_offset < 0 || exception_offset < 0) {
2275 assert(false, "bad ricochet blob");
2276 return;
2277 }
2278
2279 _ricochet_blob = RicochetBlob::create(&buffer, bounce_offset, exception_offset, frame_size_in_words);
2280 }
2256 2281
2257 //------------------------------generate_deopt_blob---------------------------- 2282 //------------------------------generate_deopt_blob----------------------------
2258 void SharedRuntime::generate_deopt_blob() { 2283 void SharedRuntime::generate_deopt_blob() {
2259 // allocate space for the code 2284 // allocate space for the code
2260 ResourceMark rm; 2285 ResourceMark rm;
2994 3019
2995 _polling_page_return_handler_blob = 3020 _polling_page_return_handler_blob =
2996 generate_handler_blob(CAST_FROM_FN_PTR(address, 3021 generate_handler_blob(CAST_FROM_FN_PTR(address,
2997 SafepointSynchronize::handle_polling_page_exception), true); 3022 SafepointSynchronize::handle_polling_page_exception), true);
2998 3023
3024 generate_ricochet_blob();
3025
2999 generate_deopt_blob(); 3026 generate_deopt_blob();
3000 #ifdef COMPILER2 3027 #ifdef COMPILER2
3001 generate_uncommon_trap_blob(); 3028 generate_uncommon_trap_blob();
3002 #endif // COMPILER2 3029 #endif // COMPILER2
3003 } 3030 }