Mercurial > hg > truffle
comparison src/share/vm/opto/library_call.cpp @ 856:75596850f863
6862576: vmIntrinsics needs cleanup in order to support JSR 292 intrinsics
Summary: remove useless lazy evaluation of intrinsics; add LAST_COMPILER_INLINE to help categorize them
Reviewed-by: kvn
author | jrose |
---|---|
date | Tue, 21 Jul 2009 16:56:06 -0700 |
parents | fc4be448891f |
children | 1cef5ec3ca56 |
comparison
equal
deleted
inserted
replaced
854:606c988ff684 | 856:75596850f863 |
---|---|
308 case vmIntrinsics::_get_AtomicLong: | 308 case vmIntrinsics::_get_AtomicLong: |
309 case vmIntrinsics::_attemptUpdate: | 309 case vmIntrinsics::_attemptUpdate: |
310 if (!InlineAtomicLong) return NULL; | 310 if (!InlineAtomicLong) return NULL; |
311 break; | 311 break; |
312 | 312 |
313 case vmIntrinsics::_Object_init: | |
314 case vmIntrinsics::_invoke: | |
315 // We do not intrinsify these; they are marked for other purposes. | |
316 return NULL; | |
317 | |
318 case vmIntrinsics::_getCallerClass: | 313 case vmIntrinsics::_getCallerClass: |
319 if (!UseNewReflection) return NULL; | 314 if (!UseNewReflection) return NULL; |
320 if (!InlineReflectionGetCallerClass) return NULL; | 315 if (!InlineReflectionGetCallerClass) return NULL; |
321 if (!JDK_Version::is_gte_jdk14x_version()) return NULL; | 316 if (!JDK_Version::is_gte_jdk14x_version()) return NULL; |
322 break; | 317 break; |
325 case vmIntrinsics::_bitCount_l: | 320 case vmIntrinsics::_bitCount_l: |
326 if (!UsePopCountInstruction) return NULL; | 321 if (!UsePopCountInstruction) return NULL; |
327 break; | 322 break; |
328 | 323 |
329 default: | 324 default: |
325 assert(id <= vmIntrinsics::LAST_COMPILER_INLINE, "caller responsibility"); | |
326 assert(id != vmIntrinsics::_Object_init && id != vmIntrinsics::_invoke, "enum out of order?"); | |
330 break; | 327 break; |
331 } | 328 } |
332 | 329 |
333 // -XX:-InlineClassNatives disables natives from the Class class. | 330 // -XX:-InlineClassNatives disables natives from the Class class. |
334 // The flag applies to all reflective calls, notably Array.newArray | 331 // The flag applies to all reflective calls, notably Array.newArray |
392 } | 389 } |
393 return kit.transfer_exceptions_into_jvms(); | 390 return kit.transfer_exceptions_into_jvms(); |
394 } | 391 } |
395 | 392 |
396 if (PrintIntrinsics) { | 393 if (PrintIntrinsics) { |
397 switch (intrinsic_id()) { | 394 tty->print("Did not inline intrinsic %s%s at bci:%d in", |
398 case vmIntrinsics::_invoke: | 395 vmIntrinsics::name_at(intrinsic_id()), |
399 case vmIntrinsics::_Object_init: | 396 (is_virtual() ? " (virtual)" : ""), kit.bci()); |
400 // We do not expect to inline these, so do not produce any noise about them. | 397 kit.caller()->print_short_name(tty); |
401 break; | 398 tty->print_cr(" (%d bytes)", kit.caller()->code_size()); |
402 default: | |
403 tty->print("Did not inline intrinsic %s%s at bci:%d in", | |
404 vmIntrinsics::name_at(intrinsic_id()), | |
405 (is_virtual() ? " (virtual)" : ""), kit.bci()); | |
406 kit.caller()->print_short_name(tty); | |
407 tty->print_cr(" (%d bytes)", kit.caller()->code_size()); | |
408 } | |
409 } | 399 } |
410 C->gather_intrinsic_statistics(intrinsic_id(), is_virtual(), Compile::_intrinsic_failed); | 400 C->gather_intrinsic_statistics(intrinsic_id(), is_virtual(), Compile::_intrinsic_failed); |
411 return NULL; | 401 return NULL; |
412 } | 402 } |
413 | 403 |