64 ciMethodBlocks* _method_blocks;
65
66 // Code attributes.
67 int _code_size;
68 int _max_stack;
69 int _max_locals;
70 vmIntrinsics::ID _intrinsic_id;
71 int _handler_count;
72 int _nmethod_age;
73 int _interpreter_invocation_count;
74 int _interpreter_throwout_count;
75 int _instructions_size;
76 int _size_of_parameters;
77
78 bool _uses_monitors;
79 bool _balanced_monitors;
80 bool _is_c1_compilable;
81 bool _is_c2_compilable;
82 bool _can_be_statically_bound;
83 bool _has_reserved_stack_access;
84
85 // Lazy fields, filled in on demand
86 address _code;
87 ciExceptionHandler** _exception_handlers;
88
89 // Optional liveness analyzer.
90 MethodLiveness* _liveness;
91 #if defined(COMPILER2) || defined(SHARK)
92 ciTypeFlow* _flow;
93 BCEscapeAnalyzer* _bcea;
94 #endif
95
96 ciMethod(methodHandle h_m, ciInstanceKlass* holder);
97 ciMethod(ciInstanceKlass* holder, ciSymbol* name, ciSymbol* signature, ciInstanceKlass* accessor);
98
99 oop loader() const { return _holder->loader(); }
100
101 const char* type_string() { return "ciMethod"; }
102
103 void print_impl(outputStream* st);
243 #endif
244
245 ciTypeFlow* get_flow_analysis();
246 ciTypeFlow* get_osr_flow_analysis(int osr_bci); // alternate entry point
247 ciCallProfile call_profile_at_bci(int bci);
248 int interpreter_call_site_count(int bci);
249
250 // Does type profiling provide any useful information at this point?
251 bool argument_profiled_type(int bci, int i, ciKlass*& type, bool& maybe_null);
252 bool parameter_profiled_type(int i, ciKlass*& type, bool& maybe_null);
253 bool return_profiled_type(int bci, ciKlass*& type, bool& maybe_null);
254
255 ciField* get_field_at_bci( int bci, bool &will_link);
256 ciMethod* get_method_at_bci(int bci, bool &will_link, ciSignature* *declared_signature);
257 ciMethod* get_method_at_bci(int bci) {
258 bool ignored_will_link;
259 ciSignature* ignored_declared_signature;
260 return get_method_at_bci(bci, ignored_will_link, &ignored_declared_signature);
261 }
262
263 ciSignature* get_declared_signature_at_bci(int bci) {
264 bool ignored_will_link;
265 ciSignature* declared_signature;
266 get_method_at_bci(bci, ignored_will_link, &declared_signature);
267 assert(declared_signature != NULL, "cannot be null");
268 return declared_signature;
269 }
270
271 // Given a certain calling environment, find the monomorphic target
272 // for the call. Return NULL if the call is not monomorphic in
273 // its calling environment.
274 ciMethod* find_monomorphic_target(ciInstanceKlass* caller,
275 ciInstanceKlass* callee_holder,
276 ciInstanceKlass* actual_receiver,
277 bool check_access = true);
278
279 // Given a known receiver klass, find the target for the call.
280 // Return NULL if the call has no target or is abstract.
281 ciMethod* resolve_invoke(ciKlass* caller, ciKlass* exact_receiver, bool check_access = true);
282
310
311 // What kind of ciObject is this?
312 bool is_method() const { return true; }
313
314 // Java access flags
315 bool is_public () const { return flags().is_public(); }
316 bool is_private () const { return flags().is_private(); }
317 bool is_protected () const { return flags().is_protected(); }
318 bool is_static () const { return flags().is_static(); }
319 bool is_final () const { return flags().is_final(); }
320 bool is_synchronized() const { return flags().is_synchronized(); }
321 bool is_native () const { return flags().is_native(); }
322 bool is_interface () const { return flags().is_interface(); }
323 bool is_abstract () const { return flags().is_abstract(); }
324 bool is_strict () const { return flags().is_strict(); }
325
326 // Other flags
327 bool is_empty_method() const;
328 bool is_vanilla_constructor() const;
329 bool is_final_method() const { return is_final() || holder()->is_final(); }
330 bool has_loops () const;
331 bool has_jsrs () const;
332 bool is_getter () const;
333 bool is_setter () const;
334 bool is_accessor () const;
335 bool is_initializer () const;
336 bool can_be_statically_bound() const { return _can_be_statically_bound; }
337 bool has_reserved_stack_access() const { return _has_reserved_stack_access; }
338 bool is_boxing_method() const;
339 bool is_unboxing_method() const;
340
341 // Replay data methods
342 void dump_name_as_ascii(outputStream* st);
343 void dump_replay_data(outputStream* st);
344
345 // Print the bytecodes of this method.
346 void print_codes_on(outputStream* st);
347 void print_codes() {
348 print_codes_on(tty);
349 }
|
64 ciMethodBlocks* _method_blocks;
65
66 // Code attributes.
67 int _code_size;
68 int _max_stack;
69 int _max_locals;
70 vmIntrinsics::ID _intrinsic_id;
71 int _handler_count;
72 int _nmethod_age;
73 int _interpreter_invocation_count;
74 int _interpreter_throwout_count;
75 int _instructions_size;
76 int _size_of_parameters;
77
78 bool _uses_monitors;
79 bool _balanced_monitors;
80 bool _is_c1_compilable;
81 bool _is_c2_compilable;
82 bool _can_be_statically_bound;
83 bool _has_reserved_stack_access;
84 bool _is_overpass;
85
86 // Lazy fields, filled in on demand
87 address _code;
88 ciExceptionHandler** _exception_handlers;
89
90 // Optional liveness analyzer.
91 MethodLiveness* _liveness;
92 #if defined(COMPILER2) || defined(SHARK)
93 ciTypeFlow* _flow;
94 BCEscapeAnalyzer* _bcea;
95 #endif
96
97 ciMethod(methodHandle h_m, ciInstanceKlass* holder);
98 ciMethod(ciInstanceKlass* holder, ciSymbol* name, ciSymbol* signature, ciInstanceKlass* accessor);
99
100 oop loader() const { return _holder->loader(); }
101
102 const char* type_string() { return "ciMethod"; }
103
104 void print_impl(outputStream* st);
244 #endif
245
246 ciTypeFlow* get_flow_analysis();
247 ciTypeFlow* get_osr_flow_analysis(int osr_bci); // alternate entry point
248 ciCallProfile call_profile_at_bci(int bci);
249 int interpreter_call_site_count(int bci);
250
251 // Does type profiling provide any useful information at this point?
252 bool argument_profiled_type(int bci, int i, ciKlass*& type, bool& maybe_null);
253 bool parameter_profiled_type(int i, ciKlass*& type, bool& maybe_null);
254 bool return_profiled_type(int bci, ciKlass*& type, bool& maybe_null);
255
256 ciField* get_field_at_bci( int bci, bool &will_link);
257 ciMethod* get_method_at_bci(int bci, bool &will_link, ciSignature* *declared_signature);
258 ciMethod* get_method_at_bci(int bci) {
259 bool ignored_will_link;
260 ciSignature* ignored_declared_signature;
261 return get_method_at_bci(bci, ignored_will_link, &ignored_declared_signature);
262 }
263
264 ciKlass* get_declared_method_holder_at_bci(int bci);
265
266 ciSignature* get_declared_signature_at_bci(int bci) {
267 bool ignored_will_link;
268 ciSignature* declared_signature;
269 get_method_at_bci(bci, ignored_will_link, &declared_signature);
270 assert(declared_signature != NULL, "cannot be null");
271 return declared_signature;
272 }
273
274 // Given a certain calling environment, find the monomorphic target
275 // for the call. Return NULL if the call is not monomorphic in
276 // its calling environment.
277 ciMethod* find_monomorphic_target(ciInstanceKlass* caller,
278 ciInstanceKlass* callee_holder,
279 ciInstanceKlass* actual_receiver,
280 bool check_access = true);
281
282 // Given a known receiver klass, find the target for the call.
283 // Return NULL if the call has no target or is abstract.
284 ciMethod* resolve_invoke(ciKlass* caller, ciKlass* exact_receiver, bool check_access = true);
285
313
314 // What kind of ciObject is this?
315 bool is_method() const { return true; }
316
317 // Java access flags
318 bool is_public () const { return flags().is_public(); }
319 bool is_private () const { return flags().is_private(); }
320 bool is_protected () const { return flags().is_protected(); }
321 bool is_static () const { return flags().is_static(); }
322 bool is_final () const { return flags().is_final(); }
323 bool is_synchronized() const { return flags().is_synchronized(); }
324 bool is_native () const { return flags().is_native(); }
325 bool is_interface () const { return flags().is_interface(); }
326 bool is_abstract () const { return flags().is_abstract(); }
327 bool is_strict () const { return flags().is_strict(); }
328
329 // Other flags
330 bool is_empty_method() const;
331 bool is_vanilla_constructor() const;
332 bool is_final_method() const { return is_final() || holder()->is_final(); }
333 bool is_default_method() const { return !is_abstract() && !is_private() &&
334 holder()->is_interface(); }
335 bool is_overpass () const { check_is_loaded(); return _is_overpass; }
336 bool has_loops () const;
337 bool has_jsrs () const;
338 bool is_getter () const;
339 bool is_setter () const;
340 bool is_accessor () const;
341 bool is_initializer () const;
342 bool can_be_statically_bound() const { return _can_be_statically_bound; }
343 bool has_reserved_stack_access() const { return _has_reserved_stack_access; }
344 bool is_boxing_method() const;
345 bool is_unboxing_method() const;
346
347 // Replay data methods
348 void dump_name_as_ascii(outputStream* st);
349 void dump_replay_data(outputStream* st);
350
351 // Print the bytecodes of this method.
352 void print_codes_on(outputStream* st);
353 void print_codes() {
354 print_codes_on(tty);
355 }
|