Mercurial > hg > graal-jvmci-8
comparison src/share/vm/opto/doCall.cpp @ 7194:beebba0acc11
7172640: C2: instrinsic implementations in LibraryCallKit should use argument() instead of pop()
Reviewed-by: kvn, jrose
author | twisti |
---|---|
date | Mon, 26 Nov 2012 17:25:11 -0800 |
parents | bb33c6fdcf0d |
children | ad5dd04754ee |
comparison
equal
deleted
inserted
replaced
7193:ee32440febeb | 7194:beebba0acc11 |
---|---|
348 kill_dead_locals(); | 348 kill_dead_locals(); |
349 | 349 |
350 // Set frequently used booleans | 350 // Set frequently used booleans |
351 const bool is_virtual = bc() == Bytecodes::_invokevirtual; | 351 const bool is_virtual = bc() == Bytecodes::_invokevirtual; |
352 const bool is_virtual_or_interface = is_virtual || bc() == Bytecodes::_invokeinterface; | 352 const bool is_virtual_or_interface = is_virtual || bc() == Bytecodes::_invokeinterface; |
353 const bool has_receiver = is_virtual_or_interface || bc() == Bytecodes::_invokespecial; | 353 const bool has_receiver = Bytecodes::has_receiver(bc()); |
354 | 354 |
355 // Find target being called | 355 // Find target being called |
356 bool will_link; | 356 bool will_link; |
357 ciSignature* declared_signature = NULL; | 357 ciSignature* declared_signature = NULL; |
358 ciMethod* orig_callee = iter().get_method(will_link, &declared_signature); // callee in the bytecode | 358 ciMethod* orig_callee = iter().get_method(will_link, &declared_signature); // callee in the bytecode |
378 // which should be invokevirtuals but according to the VM spec may be invokeinterfaces | 378 // which should be invokevirtuals but according to the VM spec may be invokeinterfaces |
379 assert(holder_klass->is_interface() || holder_klass->super() == NULL || (bc() != Bytecodes::_invokeinterface), "must match bc"); | 379 assert(holder_klass->is_interface() || holder_klass->super() == NULL || (bc() != Bytecodes::_invokeinterface), "must match bc"); |
380 // Note: In the absence of miranda methods, an abstract class K can perform | 380 // Note: In the absence of miranda methods, an abstract class K can perform |
381 // an invokevirtual directly on an interface method I.m if K implements I. | 381 // an invokevirtual directly on an interface method I.m if K implements I. |
382 | 382 |
383 // orig_callee is the resolved callee which's signature includes the | |
384 // appendix argument. | |
383 const int nargs = orig_callee->arg_size(); | 385 const int nargs = orig_callee->arg_size(); |
384 | 386 |
385 // Push appendix argument (MethodType, CallSite, etc.), if one. | 387 // Push appendix argument (MethodType, CallSite, etc.), if one. |
386 if (iter().has_appendix()) { | 388 if (iter().has_appendix()) { |
387 ciObject* appendix_arg = iter().get_appendix(); | 389 ciObject* appendix_arg = iter().get_appendix(); |
570 C->log()->elem("assert_null reason='return' klass='%d'", | 572 C->log()->elem("assert_null reason='return' klass='%d'", |
571 C->log()->identify(rtype)); | 573 C->log()->identify(rtype)); |
572 } | 574 } |
573 // If there is going to be a trap, put it at the next bytecode: | 575 // If there is going to be a trap, put it at the next bytecode: |
574 set_bci(iter().next_bci()); | 576 set_bci(iter().next_bci()); |
575 do_null_assert(peek(), T_OBJECT); | 577 null_assert(peek()); |
576 set_bci(iter().cur_bci()); // put it back | 578 set_bci(iter().cur_bci()); // put it back |
577 } | 579 } |
578 } | 580 } |
579 | 581 |
580 // Restart record of parsing work after possible inlining of call | 582 // Restart record of parsing work after possible inlining of call |