182 int max_stack() const { check_is_loaded(); return _max_stack; }
183 int max_locals() const { check_is_loaded(); return _max_locals; }
184 vmIntrinsics::ID intrinsic_id() const { check_is_loaded(); return _intrinsic_id; }
185 bool has_exception_handlers() const { check_is_loaded(); return _handler_count > 0; }
186 int exception_table_length() const { check_is_loaded(); return _handler_count; }
187 int interpreter_invocation_count() const { check_is_loaded(); return _interpreter_invocation_count; }
188 int interpreter_throwout_count() const { check_is_loaded(); return _interpreter_throwout_count; }
189 int size_of_parameters() const { check_is_loaded(); return _size_of_parameters; }
190 int nmethod_age() const { check_is_loaded(); return _nmethod_age; }
191
192 // Should the method be compiled with an age counter?
193 bool profile_aging() const;
194
195 // Code size for inlining decisions.
196 int code_size_for_inlining();
197
198 bool caller_sensitive() const { return get_Method()->caller_sensitive(); }
199 bool force_inline() const { return get_Method()->force_inline(); }
200 bool dont_inline() const { return get_Method()->dont_inline(); }
201 bool intrinsic_candidate() const { return get_Method()->intrinsic_candidate(); }
202 bool is_static_initializer() const { return get_Method()->is_static_initializer(); }
203
204 int comp_level();
205 int highest_osr_comp_level();
206
207 Bytecodes::Code java_code_at_bci(int bci) {
208 address bcp = code() + bci;
209 return Bytecodes::java_code_at(NULL, bcp);
210 }
211 Bytecodes::Code raw_code_at_bci(int bci) {
212 address bcp = code() + bci;
213 return Bytecodes::code_at(NULL, bcp);
214 }
215 BCEscapeAnalyzer *get_bcea();
216 ciMethodBlocks *get_method_blocks();
217
218 bool has_linenumber_table() const; // length unknown until decompression
219 u_char* compressed_linenumber_table() const; // not preserved by gc
220
221 int line_number_from_bci(int bci) const;
222
247 // used when gc'ing an interpreter frame we need to use its viewpoint
248 // during OSR when loading the locals.
249
250 ResourceBitMap live_local_oops_at_bci(int bci);
251
252 bool needs_clinit_barrier() const;
253
254 #ifdef COMPILER1
255 const BitMap& bci_block_start();
256 #endif
257
258 ciTypeFlow* get_flow_analysis();
259 ciTypeFlow* get_osr_flow_analysis(int osr_bci); // alternate entry point
260 ciCallProfile call_profile_at_bci(int bci);
261 int interpreter_call_site_count(int bci);
262
263 // Does type profiling provide any useful information at this point?
264 bool argument_profiled_type(int bci, int i, ciKlass*& type, ProfilePtrKind& ptr_kind);
265 bool parameter_profiled_type(int i, ciKlass*& type, ProfilePtrKind& ptr_kind);
266 bool return_profiled_type(int bci, ciKlass*& type, ProfilePtrKind& ptr_kind);
267
268 ciField* get_field_at_bci( int bci, bool &will_link);
269 ciMethod* get_method_at_bci(int bci, bool &will_link, ciSignature* *declared_signature);
270 ciMethod* get_method_at_bci(int bci) {
271 bool ignored_will_link;
272 ciSignature* ignored_declared_signature;
273 return get_method_at_bci(bci, ignored_will_link, &ignored_declared_signature);
274 }
275
276 ciKlass* get_declared_method_holder_at_bci(int bci);
277
278 ciSignature* get_declared_signature_at_bci(int bci) {
279 bool ignored_will_link;
280 ciSignature* declared_signature;
281 get_method_at_bci(bci, ignored_will_link, &declared_signature);
282 assert(declared_signature != NULL, "cannot be null");
283 return declared_signature;
284 }
285
286 // Given a certain calling environment, find the monomorphic target
321
322 // JSR 292 support
323 bool is_method_handle_intrinsic() const;
324 bool is_compiled_lambda_form() const;
325 bool has_member_arg() const;
326
327 // What kind of ciObject is this?
328 bool is_method() const { return true; }
329
330 // Java access flags
331 bool is_public () const { return flags().is_public(); }
332 bool is_private () const { return flags().is_private(); }
333 bool is_protected () const { return flags().is_protected(); }
334 bool is_static () const { return flags().is_static(); }
335 bool is_final () const { return flags().is_final(); }
336 bool is_synchronized() const { return flags().is_synchronized(); }
337 bool is_native () const { return flags().is_native(); }
338 bool is_interface () const { return flags().is_interface(); }
339 bool is_abstract () const { return flags().is_abstract(); }
340 bool is_strict () const { return flags().is_strict(); }
341
342 // Other flags
343 bool is_empty_method() const;
344 bool is_vanilla_constructor() const;
345 bool is_final_method() const { return is_final() || holder()->is_final(); }
346 bool is_default_method() const { return !is_abstract() && !is_private() &&
347 holder()->is_interface(); }
348 bool is_overpass () const { check_is_loaded(); return _is_overpass; }
349 bool has_loops () const;
350 bool has_jsrs () const;
351 bool is_getter () const;
352 bool is_setter () const;
353 bool is_accessor () const;
354 bool is_initializer () const;
355 bool can_be_statically_bound() const { return _can_be_statically_bound; }
356 bool has_reserved_stack_access() const { return _has_reserved_stack_access; }
357 bool is_boxing_method() const;
358 bool is_unboxing_method() const;
359 bool is_object_initializer() const;
360
361 bool can_be_statically_bound(ciInstanceKlass* context) const;
362
363 // Replay data methods
364 void dump_name_as_ascii(outputStream* st);
365 void dump_replay_data(outputStream* st);
366
367 // Print the bytecodes of this method.
368 void print_codes_on(outputStream* st);
369 void print_codes() {
370 print_codes_on(tty);
371 }
372 void print_codes_on(int from, int to, outputStream* st);
373
374 // Print the name of this method in various incarnations.
375 void print_name(outputStream* st = tty);
376 void print_short_name(outputStream* st = tty);
377
378 static bool is_consistent_info(ciMethod* declared_method, ciMethod* resolved_method);
379 };
380
381 #endif // SHARE_CI_CIMETHOD_HPP
|
182 int max_stack() const { check_is_loaded(); return _max_stack; }
183 int max_locals() const { check_is_loaded(); return _max_locals; }
184 vmIntrinsics::ID intrinsic_id() const { check_is_loaded(); return _intrinsic_id; }
185 bool has_exception_handlers() const { check_is_loaded(); return _handler_count > 0; }
186 int exception_table_length() const { check_is_loaded(); return _handler_count; }
187 int interpreter_invocation_count() const { check_is_loaded(); return _interpreter_invocation_count; }
188 int interpreter_throwout_count() const { check_is_loaded(); return _interpreter_throwout_count; }
189 int size_of_parameters() const { check_is_loaded(); return _size_of_parameters; }
190 int nmethod_age() const { check_is_loaded(); return _nmethod_age; }
191
192 // Should the method be compiled with an age counter?
193 bool profile_aging() const;
194
195 // Code size for inlining decisions.
196 int code_size_for_inlining();
197
198 bool caller_sensitive() const { return get_Method()->caller_sensitive(); }
199 bool force_inline() const { return get_Method()->force_inline(); }
200 bool dont_inline() const { return get_Method()->dont_inline(); }
201 bool intrinsic_candidate() const { return get_Method()->intrinsic_candidate(); }
202 bool is_class_initializer() const { return get_Method()->is_class_initializer(); }
203
204 int comp_level();
205 int highest_osr_comp_level();
206
207 Bytecodes::Code java_code_at_bci(int bci) {
208 address bcp = code() + bci;
209 return Bytecodes::java_code_at(NULL, bcp);
210 }
211 Bytecodes::Code raw_code_at_bci(int bci) {
212 address bcp = code() + bci;
213 return Bytecodes::code_at(NULL, bcp);
214 }
215 BCEscapeAnalyzer *get_bcea();
216 ciMethodBlocks *get_method_blocks();
217
218 bool has_linenumber_table() const; // length unknown until decompression
219 u_char* compressed_linenumber_table() const; // not preserved by gc
220
221 int line_number_from_bci(int bci) const;
222
247 // used when gc'ing an interpreter frame we need to use its viewpoint
248 // during OSR when loading the locals.
249
250 ResourceBitMap live_local_oops_at_bci(int bci);
251
252 bool needs_clinit_barrier() const;
253
254 #ifdef COMPILER1
255 const BitMap& bci_block_start();
256 #endif
257
258 ciTypeFlow* get_flow_analysis();
259 ciTypeFlow* get_osr_flow_analysis(int osr_bci); // alternate entry point
260 ciCallProfile call_profile_at_bci(int bci);
261 int interpreter_call_site_count(int bci);
262
263 // Does type profiling provide any useful information at this point?
264 bool argument_profiled_type(int bci, int i, ciKlass*& type, ProfilePtrKind& ptr_kind);
265 bool parameter_profiled_type(int i, ciKlass*& type, ProfilePtrKind& ptr_kind);
266 bool return_profiled_type(int bci, ciKlass*& type, ProfilePtrKind& ptr_kind);
267 bool array_access_profiled_type(int bci, ciKlass*& array_type, ciKlass*& element_type, ProfilePtrKind& element_ptr, bool &flat_array, bool &null_free);
268
269 ciField* get_field_at_bci( int bci, bool &will_link);
270 ciMethod* get_method_at_bci(int bci, bool &will_link, ciSignature* *declared_signature);
271 ciMethod* get_method_at_bci(int bci) {
272 bool ignored_will_link;
273 ciSignature* ignored_declared_signature;
274 return get_method_at_bci(bci, ignored_will_link, &ignored_declared_signature);
275 }
276
277 ciKlass* get_declared_method_holder_at_bci(int bci);
278
279 ciSignature* get_declared_signature_at_bci(int bci) {
280 bool ignored_will_link;
281 ciSignature* declared_signature;
282 get_method_at_bci(bci, ignored_will_link, &declared_signature);
283 assert(declared_signature != NULL, "cannot be null");
284 return declared_signature;
285 }
286
287 // Given a certain calling environment, find the monomorphic target
322
323 // JSR 292 support
324 bool is_method_handle_intrinsic() const;
325 bool is_compiled_lambda_form() const;
326 bool has_member_arg() const;
327
328 // What kind of ciObject is this?
329 bool is_method() const { return true; }
330
331 // Java access flags
332 bool is_public () const { return flags().is_public(); }
333 bool is_private () const { return flags().is_private(); }
334 bool is_protected () const { return flags().is_protected(); }
335 bool is_static () const { return flags().is_static(); }
336 bool is_final () const { return flags().is_final(); }
337 bool is_synchronized() const { return flags().is_synchronized(); }
338 bool is_native () const { return flags().is_native(); }
339 bool is_interface () const { return flags().is_interface(); }
340 bool is_abstract () const { return flags().is_abstract(); }
341 bool is_strict () const { return flags().is_strict(); }
342 bool has_vararg () const { return flags().has_vararg(); }
343
344 // Other flags
345 bool is_empty_method() const;
346 bool is_vanilla_constructor() const;
347 bool is_final_method() const { return is_final() || holder()->is_final(); }
348 bool is_default_method() const { return !is_abstract() && !is_private() &&
349 holder()->is_interface(); }
350 bool is_overpass () const { check_is_loaded(); return _is_overpass; }
351 bool has_loops () const;
352 bool has_jsrs () const;
353 bool is_getter () const;
354 bool is_setter () const;
355 bool is_accessor () const;
356 bool can_be_statically_bound() const { return _can_be_statically_bound; }
357 bool has_reserved_stack_access() const { return _has_reserved_stack_access; }
358 bool is_boxing_method() const;
359 bool is_unboxing_method() const;
360 bool is_object_constructor() const;
361 bool is_static_init_factory() const;
362 bool is_object_constructor_or_class_initializer() const;
363
364 bool can_be_statically_bound(ciInstanceKlass* context) const;
365
366 // Replay data methods
367 void dump_name_as_ascii(outputStream* st);
368 void dump_replay_data(outputStream* st);
369
370 // Print the bytecodes of this method.
371 void print_codes_on(outputStream* st);
372 void print_codes() {
373 print_codes_on(tty);
374 }
375 void print_codes_on(int from, int to, outputStream* st);
376
377 // Print the name of this method in various incarnations.
378 void print_name(outputStream* st = tty);
379 void print_short_name(outputStream* st = tty);
380
381 static bool is_consistent_info(ciMethod* declared_method, ciMethod* resolved_method);
382
383 // Support for the inline type calling convention
384 bool has_scalarized_args() const;
385 const GrowableArray<SigEntry>* get_sig_cc();
386 };
387
388 #endif // SHARE_CI_CIMETHOD_HPP
|