639 make_dtrace_method_entry_exit(method, true);
640 }
641 void make_dtrace_method_exit(ciMethod* method) {
642 make_dtrace_method_entry_exit(method, false);
643 }
644
645 //--------------- stub generation -------------------
646 public:
647 void gen_stub(address C_function,
648 const char *name,
649 int is_fancy_jump,
650 bool pass_tls,
651 bool return_pc);
652
653 //---------- help for generating calls --------------
654
655 // Do a null check on the receiver as it would happen before the call to
656 // callee (with all arguments still on the stack).
657 Node* null_check_receiver_before_call(ciMethod* callee) {
658 assert(!callee->is_static(), "must be a virtual method");
659 const int nargs = callee->arg_size();
660 inc_sp(nargs);
661 Node* n = null_check_receiver();
662 dec_sp(nargs);
663 return n;
664 }
665
666 // Fill in argument edges for the call from argument(0), argument(1), ...
667 // (The next step is to call set_edges_for_java_call.)
668 void set_arguments_for_java_call(CallJavaNode* call);
669
670 // Fill in non-argument edges for the call.
671 // Transform the call, and update the basics: control, i_o, memory.
672 // (The next step is usually to call set_results_for_java_call.)
673 void set_edges_for_java_call(CallJavaNode* call,
674 bool must_throw = false, bool separate_io_proj = false);
675
676 // Finish up a java call that was started by set_edges_for_java_call.
677 // Call add_exception on any throw arising from the call.
678 // Return the call result (transformed).
679 Node* set_results_for_java_call(CallJavaNode* call, bool separate_io_proj = false);
|
639 make_dtrace_method_entry_exit(method, true);
640 }
641 void make_dtrace_method_exit(ciMethod* method) {
642 make_dtrace_method_entry_exit(method, false);
643 }
644
645 //--------------- stub generation -------------------
646 public:
647 void gen_stub(address C_function,
648 const char *name,
649 int is_fancy_jump,
650 bool pass_tls,
651 bool return_pc);
652
653 //---------- help for generating calls --------------
654
655 // Do a null check on the receiver as it would happen before the call to
656 // callee (with all arguments still on the stack).
657 Node* null_check_receiver_before_call(ciMethod* callee) {
658 assert(!callee->is_static(), "must be a virtual method");
659 // Callsite signature can be different from actual method being called (i.e _linkTo* sites).
660 // Use callsite signature always.
661 ciMethod* declared_method = method()->get_method_at_bci(bci());
662 const int nargs = declared_method->arg_size();
663 inc_sp(nargs);
664 Node* n = null_check_receiver();
665 dec_sp(nargs);
666 return n;
667 }
668
669 // Fill in argument edges for the call from argument(0), argument(1), ...
670 // (The next step is to call set_edges_for_java_call.)
671 void set_arguments_for_java_call(CallJavaNode* call);
672
673 // Fill in non-argument edges for the call.
674 // Transform the call, and update the basics: control, i_o, memory.
675 // (The next step is usually to call set_results_for_java_call.)
676 void set_edges_for_java_call(CallJavaNode* call,
677 bool must_throw = false, bool separate_io_proj = false);
678
679 // Finish up a java call that was started by set_edges_for_java_call.
680 // Call add_exception on any throw arising from the call.
681 // Return the call result (transformed).
682 Node* set_results_for_java_call(CallJavaNode* call, bool separate_io_proj = false);
|