108 // Other map edges may contain locals or monitors, and should not
109 // be changed in meaning.
110 //
111 // If the call traps, the returned map must have a control edge of top.
112 // If the call can throw, the returned map must report has_exceptions().
113 //
114 // If the result is NULL, it means that this CallGenerator was unable
115 // to handle the given call, and another CallGenerator should be consulted.
116 virtual JVMState* generate(JVMState* jvms) = 0;
117
118 // How to generate a call site that is inlined:
119 static CallGenerator* for_inline(ciMethod* m, float expected_uses = -1);
120 // How to generate code for an on-stack replacement handler.
121 static CallGenerator* for_osr(ciMethod* m, int osr_bci);
122
123 // How to generate vanilla out-of-line call sites:
124 static CallGenerator* for_direct_call(ciMethod* m, bool separate_io_projs = false); // static, special
125 static CallGenerator* for_virtual_call(ciMethod* m, int vtable_index); // virtual, interface
126
127 static CallGenerator* for_method_handle_call( JVMState* jvms, ciMethod* caller, ciMethod* callee, bool delayed_forbidden);
128 static CallGenerator* for_method_handle_inline(JVMState* jvms, ciMethod* caller, ciMethod* callee, bool& input_not_const);
129
130 // How to generate a replace a direct call with an inline version
131 static CallGenerator* for_late_inline(ciMethod* m, CallGenerator* inline_cg);
132 static CallGenerator* for_mh_late_inline(ciMethod* caller, ciMethod* callee, bool input_not_const);
133 static CallGenerator* for_string_late_inline(ciMethod* m, CallGenerator* inline_cg);
134 static CallGenerator* for_boxing_late_inline(ciMethod* m, CallGenerator* inline_cg);
135
136 // How to make a call but defer the decision whether to inline or not.
137 static CallGenerator* for_warm_call(WarmCallInfo* ci,
138 CallGenerator* if_cold,
139 CallGenerator* if_hot);
140
141 // How to make a call that optimistically assumes a receiver type:
142 static CallGenerator* for_predicted_call(ciKlass* predicted_receiver,
143 CallGenerator* if_missed,
144 CallGenerator* if_hit,
145 float hit_prob);
146
147 // How to make a call that optimistically assumes a MethodHandle target:
148 static CallGenerator* for_predicted_dynamic_call(ciMethodHandle* predicted_method_handle,
|
108 // Other map edges may contain locals or monitors, and should not
109 // be changed in meaning.
110 //
111 // If the call traps, the returned map must have a control edge of top.
112 // If the call can throw, the returned map must report has_exceptions().
113 //
114 // If the result is NULL, it means that this CallGenerator was unable
115 // to handle the given call, and another CallGenerator should be consulted.
116 virtual JVMState* generate(JVMState* jvms) = 0;
117
118 // How to generate a call site that is inlined:
119 static CallGenerator* for_inline(ciMethod* m, float expected_uses = -1);
120 // How to generate code for an on-stack replacement handler.
121 static CallGenerator* for_osr(ciMethod* m, int osr_bci);
122
123 // How to generate vanilla out-of-line call sites:
124 static CallGenerator* for_direct_call(ciMethod* m, bool separate_io_projs = false); // static, special
125 static CallGenerator* for_virtual_call(ciMethod* m, int vtable_index); // virtual, interface
126
127 static CallGenerator* for_method_handle_call( JVMState* jvms, ciMethod* caller, ciMethod* callee, bool delayed_forbidden);
128 static CallGenerator* for_method_handle_inline(JVMState* jvms, ciMethod* caller, ciMethod* callee, bool& input_not_const, bool delayed_forbidden);
129
130 // How to generate a replace a direct call with an inline version
131 static CallGenerator* for_late_inline(ciMethod* m, CallGenerator* inline_cg);
132 static CallGenerator* for_mh_late_inline(ciMethod* caller, ciMethod* callee, bool input_not_const);
133 static CallGenerator* for_string_late_inline(ciMethod* m, CallGenerator* inline_cg);
134 static CallGenerator* for_boxing_late_inline(ciMethod* m, CallGenerator* inline_cg);
135
136 // How to make a call but defer the decision whether to inline or not.
137 static CallGenerator* for_warm_call(WarmCallInfo* ci,
138 CallGenerator* if_cold,
139 CallGenerator* if_hot);
140
141 // How to make a call that optimistically assumes a receiver type:
142 static CallGenerator* for_predicted_call(ciKlass* predicted_receiver,
143 CallGenerator* if_missed,
144 CallGenerator* if_hit,
145 float hit_prob);
146
147 // How to make a call that optimistically assumes a MethodHandle target:
148 static CallGenerator* for_predicted_dynamic_call(ciMethodHandle* predicted_method_handle,
|