src/share/vm/opto/node.hpp

changeset 6478
044b28168e20
parent 5997
59e8ad757e19
child 6488
4cdf4f71177d
equal deleted inserted replaced
6477:eb178e97560c 6478:044b28168e20
355 Node* last_out(DUIterator_Last i) const { return *i; } 355 Node* last_out(DUIterator_Last i) const { return *i; }
356 #endif 356 #endif
357 357
358 // Reference to the i'th input Node. Error if out of bounds. 358 // Reference to the i'th input Node. Error if out of bounds.
359 Node* in(uint i) const { assert(i < _max, err_msg_res("oob: i=%d, _max=%d", i, _max)); return _in[i]; } 359 Node* in(uint i) const { assert(i < _max, err_msg_res("oob: i=%d, _max=%d", i, _max)); return _in[i]; }
360 // Reference to the i'th input Node. NULL if out of bounds.
361 Node* lookup(uint i) const { return ((i < _max) ? _in[i] : NULL); }
360 // Reference to the i'th output Node. Error if out of bounds. 362 // Reference to the i'th output Node. Error if out of bounds.
361 // Use this accessor sparingly. We are going trying to use iterators instead. 363 // Use this accessor sparingly. We are going trying to use iterators instead.
362 Node* raw_out(uint i) const { assert(i < _outcnt,"oob"); return _out[i]; } 364 Node* raw_out(uint i) const { assert(i < _outcnt,"oob"); return _out[i]; }
363 // Return the unique out edge. 365 // Return the unique out edge.
364 Node* unique_out() const { assert(_outcnt==1,"not unique"); return _out[0]; } 366 Node* unique_out() const { assert(_outcnt==1,"not unique"); return _out[0]; }
382 // Check whether node has become unreachable 384 // Check whether node has become unreachable
383 bool is_unreachable(PhaseIterGVN &igvn) const; 385 bool is_unreachable(PhaseIterGVN &igvn) const;
384 386
385 // Set a required input edge, also updates corresponding output edge 387 // Set a required input edge, also updates corresponding output edge
386 void add_req( Node *n ); // Append a NEW required input 388 void add_req( Node *n ); // Append a NEW required input
389 void add_req( Node *n0, Node *n1 ) {
390 add_req(n0); add_req(n1); }
391 void add_req( Node *n0, Node *n1, Node *n2 ) {
392 add_req(n0); add_req(n1); add_req(n2); }
387 void add_req_batch( Node* n, uint m ); // Append m NEW required inputs (all n). 393 void add_req_batch( Node* n, uint m ); // Append m NEW required inputs (all n).
388 void del_req( uint idx ); // Delete required edge & compact 394 void del_req( uint idx ); // Delete required edge & compact
389 void del_req_ordered( uint idx ); // Delete required edge & compact with preserved order 395 void del_req_ordered( uint idx ); // Delete required edge & compact with preserved order
390 void ins_req( uint i, Node *n ); // Insert a NEW required input 396 void ins_req( uint i, Node *n ); // Insert a NEW required input
391 void set_req( uint i, Node *n ) { 397 void set_req( uint i, Node *n ) {
1348 friend class VMStructs; 1354 friend class VMStructs;
1349 uint _cnt; 1355 uint _cnt;
1350 public: 1356 public:
1351 Node_List() : Node_Array(Thread::current()->resource_area()), _cnt(0) {} 1357 Node_List() : Node_Array(Thread::current()->resource_area()), _cnt(0) {}
1352 Node_List(Arena *a) : Node_Array(a), _cnt(0) {} 1358 Node_List(Arena *a) : Node_Array(a), _cnt(0) {}
1353 bool contains(Node* n) { 1359 bool contains(const Node* n) const {
1354 for (uint e = 0; e < size(); e++) { 1360 for (uint e = 0; e < size(); e++) {
1355 if (at(e) == n) return true; 1361 if (at(e) == n) return true;
1356 } 1362 }
1357 return false; 1363 return false;
1358 } 1364 }

mercurial