src/share/vm/opto/parse.hpp

Print this page




 321 
 322  private:
 323   friend class Block;
 324 
 325   // Variables which characterize this compilation as a whole:
 326 
 327   JVMState*     _caller;        // JVMS which carries incoming args & state.
 328   float         _expected_uses; // expected number of calls to this code
 329   float         _prof_factor;   // discount applied to my profile counts
 330   int           _depth;         // Inline tree depth, for debug printouts
 331   const TypeFunc*_tf;           // My kind of function type
 332   int           _entry_bci;     // the osr bci or InvocationEntryBci
 333 
 334   ciTypeFlow*   _flow;          // Results of previous flow pass.
 335   Block*        _blocks;        // Array of basic-block structs.
 336   int           _block_count;   // Number of elements in _blocks.
 337 
 338   GraphKit      _exits;         // Record all normal returns and throws here.
 339   bool          _wrote_final;   // Did we write a final field?
 340   bool          _wrote_volatile;     // Did we write a volatile field?

 341   bool          _count_invocations;  // update and test invocation counter
 342   bool          _method_data_update; // update method data oop
 343   Node*         _alloc_with_final;   // An allocation node with final field
 344 
 345   // Variables which track Java semantics during bytecode parsing:
 346 
 347   Block*            _block;     // block currently getting parsed
 348   ciBytecodeStream  _iter;      // stream of this method's bytecodes
 349 
 350   int           _blocks_merged; // Progress meter: state merges from BB preds
 351   int           _blocks_parsed; // Progress meter: BBs actually parsed
 352 
 353   const FastLockNode* _synch_lock; // FastLockNode for synchronized method
 354 
 355 #ifndef PRODUCT
 356   int _max_switch_depth;        // Debugging SwitchRanges.
 357   int _est_switch_depth;        // Debugging SwitchRanges.
 358 #endif
 359 
 360   // parser for the caller of the method of this object


 366 
 367   virtual Parse* is_Parse() const { return (Parse*)this; }
 368 
 369   // Accessors.
 370   JVMState*     caller()        const { return _caller; }
 371   float         expected_uses() const { return _expected_uses; }
 372   float         prof_factor()   const { return _prof_factor; }
 373   int           depth()         const { return _depth; }
 374   const TypeFunc* tf()          const { return _tf; }
 375   //            entry_bci()     -- see osr_bci, etc.
 376 
 377   ciTypeFlow*   flow()          const { return _flow; }
 378   //            blocks()        -- see rpo_at, start_block, etc.
 379   int           block_count()   const { return _block_count; }
 380 
 381   GraphKit&     exits()               { return _exits; }
 382   bool          wrote_final() const   { return _wrote_final; }
 383   void      set_wrote_final(bool z)   { _wrote_final = z; }
 384   bool          wrote_volatile() const { return _wrote_volatile; }
 385   void      set_wrote_volatile(bool z) { _wrote_volatile = z; }


 386   bool          count_invocations() const  { return _count_invocations; }
 387   bool          method_data_update() const { return _method_data_update; }
 388   Node*    alloc_with_final() const   { return _alloc_with_final; }
 389   void set_alloc_with_final(Node* n)  {
 390     assert((_alloc_with_final == NULL) || (_alloc_with_final == n), "different init objects?");
 391     _alloc_with_final = n;
 392   }
 393 
 394   Block*             block()    const { return _block; }
 395   ciBytecodeStream&  iter()           { return _iter; }
 396   Bytecodes::Code    bc()       const { return _iter.cur_bc(); }
 397 
 398   void set_block(Block* b)            { _block = b; }
 399 
 400   // Derived accessors:
 401   bool is_normal_parse() const  { return _entry_bci == InvocationEntryBci; }
 402   bool is_osr_parse() const     { return _entry_bci != InvocationEntryBci; }
 403   int osr_bci() const           { assert(is_osr_parse(),""); return _entry_bci; }
 404 
 405   void set_parse_bci(int bci);




 321 
 322  private:
 323   friend class Block;
 324 
 325   // Variables which characterize this compilation as a whole:
 326 
 327   JVMState*     _caller;        // JVMS which carries incoming args & state.
 328   float         _expected_uses; // expected number of calls to this code
 329   float         _prof_factor;   // discount applied to my profile counts
 330   int           _depth;         // Inline tree depth, for debug printouts
 331   const TypeFunc*_tf;           // My kind of function type
 332   int           _entry_bci;     // the osr bci or InvocationEntryBci
 333 
 334   ciTypeFlow*   _flow;          // Results of previous flow pass.
 335   Block*        _blocks;        // Array of basic-block structs.
 336   int           _block_count;   // Number of elements in _blocks.
 337 
 338   GraphKit      _exits;         // Record all normal returns and throws here.
 339   bool          _wrote_final;   // Did we write a final field?
 340   bool          _wrote_volatile;     // Did we write a volatile field?
 341   bool          _wrote_fields;       // Did we write any field?
 342   bool          _count_invocations;  // update and test invocation counter
 343   bool          _method_data_update; // update method data oop
 344   Node*         _alloc_with_final;   // An allocation node with final field
 345 
 346   // Variables which track Java semantics during bytecode parsing:
 347 
 348   Block*            _block;     // block currently getting parsed
 349   ciBytecodeStream  _iter;      // stream of this method's bytecodes
 350 
 351   int           _blocks_merged; // Progress meter: state merges from BB preds
 352   int           _blocks_parsed; // Progress meter: BBs actually parsed
 353 
 354   const FastLockNode* _synch_lock; // FastLockNode for synchronized method
 355 
 356 #ifndef PRODUCT
 357   int _max_switch_depth;        // Debugging SwitchRanges.
 358   int _est_switch_depth;        // Debugging SwitchRanges.
 359 #endif
 360 
 361   // parser for the caller of the method of this object


 367 
 368   virtual Parse* is_Parse() const { return (Parse*)this; }
 369 
 370   // Accessors.
 371   JVMState*     caller()        const { return _caller; }
 372   float         expected_uses() const { return _expected_uses; }
 373   float         prof_factor()   const { return _prof_factor; }
 374   int           depth()         const { return _depth; }
 375   const TypeFunc* tf()          const { return _tf; }
 376   //            entry_bci()     -- see osr_bci, etc.
 377 
 378   ciTypeFlow*   flow()          const { return _flow; }
 379   //            blocks()        -- see rpo_at, start_block, etc.
 380   int           block_count()   const { return _block_count; }
 381 
 382   GraphKit&     exits()               { return _exits; }
 383   bool          wrote_final() const   { return _wrote_final; }
 384   void      set_wrote_final(bool z)   { _wrote_final = z; }
 385   bool          wrote_volatile() const { return _wrote_volatile; }
 386   void      set_wrote_volatile(bool z) { _wrote_volatile = z; }
 387   bool         wrote_fields() const   { return _wrote_fields; }
 388   void     set_wrote_fields(bool z)   { _wrote_fields = z; }
 389   bool          count_invocations() const  { return _count_invocations; }
 390   bool          method_data_update() const { return _method_data_update; }
 391   Node*    alloc_with_final() const   { return _alloc_with_final; }
 392   void set_alloc_with_final(Node* n)  {
 393     assert((_alloc_with_final == NULL) || (_alloc_with_final == n), "different init objects?");
 394     _alloc_with_final = n;
 395   }
 396 
 397   Block*             block()    const { return _block; }
 398   ciBytecodeStream&  iter()           { return _iter; }
 399   Bytecodes::Code    bc()       const { return _iter.cur_bc(); }
 400 
 401   void set_block(Block* b)            { _block = b; }
 402 
 403   // Derived accessors:
 404   bool is_normal_parse() const  { return _entry_bci == InvocationEntryBci; }
 405   bool is_osr_parse() const     { return _entry_bci != InvocationEntryBci; }
 406   int osr_bci() const           { assert(is_osr_parse(),""); return _entry_bci; }
 407 
 408   void set_parse_bci(int bci);