351 } |
351 } |
352 Node* last_out(DUIterator_Last i) const { return *i; } |
352 Node* last_out(DUIterator_Last i) const { return *i; } |
353 #endif |
353 #endif |
354 |
354 |
355 // Reference to the i'th input Node. Error if out of bounds. |
355 // Reference to the i'th input Node. Error if out of bounds. |
356 Node* in(uint i) const { assert(i < _max, err_msg_res("oob: i=%d, _max=%d", i, _max)); return _in[i]; } |
356 Node* in(uint i) const { assert(i < _max, "oob: i=%d, _max=%d", i, _max); return _in[i]; } |
357 // Reference to the i'th input Node. NULL if out of bounds. |
357 // Reference to the i'th input Node. NULL if out of bounds. |
358 Node* lookup(uint i) const { return ((i < _max) ? _in[i] : NULL); } |
358 Node* lookup(uint i) const { return ((i < _max) ? _in[i] : NULL); } |
359 // Reference to the i'th output Node. Error if out of bounds. |
359 // Reference to the i'th output Node. Error if out of bounds. |
360 // Use this accessor sparingly. We are going trying to use iterators instead. |
360 // Use this accessor sparingly. We are going trying to use iterators instead. |
361 Node* raw_out(uint i) const { assert(i < _outcnt,"oob"); return _out[i]; } |
361 Node* raw_out(uint i) const { assert(i < _outcnt,"oob"); return _out[i]; } |
391 void del_req( uint idx ); // Delete required edge & compact |
391 void del_req( uint idx ); // Delete required edge & compact |
392 void del_req_ordered( uint idx ); // Delete required edge & compact with preserved order |
392 void del_req_ordered( uint idx ); // Delete required edge & compact with preserved order |
393 void ins_req( uint i, Node *n ); // Insert a NEW required input |
393 void ins_req( uint i, Node *n ); // Insert a NEW required input |
394 void set_req( uint i, Node *n ) { |
394 void set_req( uint i, Node *n ) { |
395 assert( is_not_dead(n), "can not use dead node"); |
395 assert( is_not_dead(n), "can not use dead node"); |
396 assert( i < _cnt, err_msg_res("oob: i=%d, _cnt=%d", i, _cnt)); |
396 assert( i < _cnt, "oob: i=%d, _cnt=%d", i, _cnt); |
397 assert( !VerifyHashTableKeys || _hash_lock == 0, |
397 assert( !VerifyHashTableKeys || _hash_lock == 0, |
398 "remove node from hash table before modifying it"); |
398 "remove node from hash table before modifying it"); |
399 Node** p = &_in[i]; // cache this._in, across the del_out call |
399 Node** p = &_in[i]; // cache this._in, across the del_out call |
400 if (*p != NULL) (*p)->del_out((Node *)this); |
400 if (*p != NULL) (*p)->del_out((Node *)this); |
401 (*p) = n; |
401 (*p) = n; |