src/share/vm/opto/node.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 8129847-9 Sdiff src/share/vm/opto

src/share/vm/opto/node.cpp

Print this page




 299   }
 300   // If there are default notes floating around, capture them:
 301   Node_Notes* nn = C->default_node_notes();
 302   if (nn != NULL)  init_node_notes(C, idx, nn);
 303 
 304   // Note:  At this point, C is dead,
 305   // and we begin to initialize the new Node.
 306 
 307   _cnt = _max = req;
 308   _outcnt = _outmax = 0;
 309   _class_id = Class_Node;
 310   _flags = 0;
 311   _out = NO_OUT_ARRAY;
 312   return idx;
 313 }
 314 
 315 //------------------------------Node-------------------------------------------
 316 // Create a Node, with a given number of required edges.
 317 Node::Node(uint req)
 318   : _idx(Init(req))



 319 {
 320   assert( req < Compile::current()->max_node_limit() - NodeLimitFudgeFactor, "Input limit exceeded" );
 321   debug_only( verify_construction() );
 322   NOT_PRODUCT(nodes_created++);
 323   if (req == 0) {
 324     assert( _in == (Node**)this, "Must not pass arg count to 'new'" );
 325     _in = NULL;
 326   } else {
 327     assert( _in[req-1] == this, "Must pass arg count to 'new'" );
 328     Node** to = _in;
 329     for(uint i = 0; i < req; i++) {
 330       to[i] = NULL;
 331     }
 332   }
 333 }
 334 
 335 //------------------------------Node-------------------------------------------
 336 Node::Node(Node *n0)
 337   : _idx(Init(1))



 338 {
 339   debug_only( verify_construction() );
 340   NOT_PRODUCT(nodes_created++);
 341   // Assert we allocated space for input array already
 342   assert( _in[0] == this, "Must pass arg count to 'new'" );
 343   assert( is_not_dead(n0), "can not use dead node");
 344   _in[0] = n0; if (n0 != NULL) n0->add_out((Node *)this);
 345 }
 346 
 347 //------------------------------Node-------------------------------------------
 348 Node::Node(Node *n0, Node *n1)
 349   : _idx(Init(2))



 350 {
 351   debug_only( verify_construction() );
 352   NOT_PRODUCT(nodes_created++);
 353   // Assert we allocated space for input array already
 354   assert( _in[1] == this, "Must pass arg count to 'new'" );
 355   assert( is_not_dead(n0), "can not use dead node");
 356   assert( is_not_dead(n1), "can not use dead node");
 357   _in[0] = n0; if (n0 != NULL) n0->add_out((Node *)this);
 358   _in[1] = n1; if (n1 != NULL) n1->add_out((Node *)this);
 359 }
 360 
 361 //------------------------------Node-------------------------------------------
 362 Node::Node(Node *n0, Node *n1, Node *n2)
 363   : _idx(Init(3))



 364 {
 365   debug_only( verify_construction() );
 366   NOT_PRODUCT(nodes_created++);
 367   // Assert we allocated space for input array already
 368   assert( _in[2] == this, "Must pass arg count to 'new'" );
 369   assert( is_not_dead(n0), "can not use dead node");
 370   assert( is_not_dead(n1), "can not use dead node");
 371   assert( is_not_dead(n2), "can not use dead node");
 372   _in[0] = n0; if (n0 != NULL) n0->add_out((Node *)this);
 373   _in[1] = n1; if (n1 != NULL) n1->add_out((Node *)this);
 374   _in[2] = n2; if (n2 != NULL) n2->add_out((Node *)this);
 375 }
 376 
 377 //------------------------------Node-------------------------------------------
 378 Node::Node(Node *n0, Node *n1, Node *n2, Node *n3)
 379   : _idx(Init(4))



 380 {
 381   debug_only( verify_construction() );
 382   NOT_PRODUCT(nodes_created++);
 383   // Assert we allocated space for input array already
 384   assert( _in[3] == this, "Must pass arg count to 'new'" );
 385   assert( is_not_dead(n0), "can not use dead node");
 386   assert( is_not_dead(n1), "can not use dead node");
 387   assert( is_not_dead(n2), "can not use dead node");
 388   assert( is_not_dead(n3), "can not use dead node");
 389   _in[0] = n0; if (n0 != NULL) n0->add_out((Node *)this);
 390   _in[1] = n1; if (n1 != NULL) n1->add_out((Node *)this);
 391   _in[2] = n2; if (n2 != NULL) n2->add_out((Node *)this);
 392   _in[3] = n3; if (n3 != NULL) n3->add_out((Node *)this);
 393 }
 394 
 395 //------------------------------Node-------------------------------------------
 396 Node::Node(Node *n0, Node *n1, Node *n2, Node *n3, Node *n4)
 397   : _idx(Init(5))



 398 {
 399   debug_only( verify_construction() );
 400   NOT_PRODUCT(nodes_created++);
 401   // Assert we allocated space for input array already
 402   assert( _in[4] == this, "Must pass arg count to 'new'" );
 403   assert( is_not_dead(n0), "can not use dead node");
 404   assert( is_not_dead(n1), "can not use dead node");
 405   assert( is_not_dead(n2), "can not use dead node");
 406   assert( is_not_dead(n3), "can not use dead node");
 407   assert( is_not_dead(n4), "can not use dead node");
 408   _in[0] = n0; if (n0 != NULL) n0->add_out((Node *)this);
 409   _in[1] = n1; if (n1 != NULL) n1->add_out((Node *)this);
 410   _in[2] = n2; if (n2 != NULL) n2->add_out((Node *)this);
 411   _in[3] = n3; if (n3 != NULL) n3->add_out((Node *)this);
 412   _in[4] = n4; if (n4 != NULL) n4->add_out((Node *)this);
 413 }
 414 
 415 //------------------------------Node-------------------------------------------
 416 Node::Node(Node *n0, Node *n1, Node *n2, Node *n3,
 417                      Node *n4, Node *n5)
 418   : _idx(Init(6))



 419 {
 420   debug_only( verify_construction() );
 421   NOT_PRODUCT(nodes_created++);
 422   // Assert we allocated space for input array already
 423   assert( _in[5] == this, "Must pass arg count to 'new'" );
 424   assert( is_not_dead(n0), "can not use dead node");
 425   assert( is_not_dead(n1), "can not use dead node");
 426   assert( is_not_dead(n2), "can not use dead node");
 427   assert( is_not_dead(n3), "can not use dead node");
 428   assert( is_not_dead(n4), "can not use dead node");
 429   assert( is_not_dead(n5), "can not use dead node");
 430   _in[0] = n0; if (n0 != NULL) n0->add_out((Node *)this);
 431   _in[1] = n1; if (n1 != NULL) n1->add_out((Node *)this);
 432   _in[2] = n2; if (n2 != NULL) n2->add_out((Node *)this);
 433   _in[3] = n3; if (n3 != NULL) n3->add_out((Node *)this);
 434   _in[4] = n4; if (n4 != NULL) n4->add_out((Node *)this);
 435   _in[5] = n5; if (n5 != NULL) n5->add_out((Node *)this);
 436 }
 437 
 438 //------------------------------Node-------------------------------------------
 439 Node::Node(Node *n0, Node *n1, Node *n2, Node *n3,
 440                      Node *n4, Node *n5, Node *n6)
 441   : _idx(Init(7))



 442 {
 443   debug_only( verify_construction() );
 444   NOT_PRODUCT(nodes_created++);
 445   // Assert we allocated space for input array already
 446   assert( _in[6] == this, "Must pass arg count to 'new'" );
 447   assert( is_not_dead(n0), "can not use dead node");
 448   assert( is_not_dead(n1), "can not use dead node");
 449   assert( is_not_dead(n2), "can not use dead node");
 450   assert( is_not_dead(n3), "can not use dead node");
 451   assert( is_not_dead(n4), "can not use dead node");
 452   assert( is_not_dead(n5), "can not use dead node");
 453   assert( is_not_dead(n6), "can not use dead node");
 454   _in[0] = n0; if (n0 != NULL) n0->add_out((Node *)this);
 455   _in[1] = n1; if (n1 != NULL) n1->add_out((Node *)this);
 456   _in[2] = n2; if (n2 != NULL) n2->add_out((Node *)this);
 457   _in[3] = n3; if (n3 != NULL) n3->add_out((Node *)this);
 458   _in[4] = n4; if (n4 != NULL) n4->add_out((Node *)this);
 459   _in[5] = n5; if (n5 != NULL) n5->add_out((Node *)this);
 460   _in[6] = n6; if (n6 != NULL) n6->add_out((Node *)this);
 461 }




 299   }
 300   // If there are default notes floating around, capture them:
 301   Node_Notes* nn = C->default_node_notes();
 302   if (nn != NULL)  init_node_notes(C, idx, nn);
 303 
 304   // Note:  At this point, C is dead,
 305   // and we begin to initialize the new Node.
 306 
 307   _cnt = _max = req;
 308   _outcnt = _outmax = 0;
 309   _class_id = Class_Node;
 310   _flags = 0;
 311   _out = NO_OUT_ARRAY;
 312   return idx;
 313 }
 314 
 315 //------------------------------Node-------------------------------------------
 316 // Create a Node, with a given number of required edges.
 317 Node::Node(uint req)
 318   : _idx(Init(req))
 319 #ifdef ASSERT
 320   , _parse_idx(_idx)
 321 #endif
 322 {
 323   assert( req < Compile::current()->max_node_limit() - NodeLimitFudgeFactor, "Input limit exceeded" );
 324   debug_only( verify_construction() );
 325   NOT_PRODUCT(nodes_created++);
 326   if (req == 0) {
 327     assert( _in == (Node**)this, "Must not pass arg count to 'new'" );
 328     _in = NULL;
 329   } else {
 330     assert( _in[req-1] == this, "Must pass arg count to 'new'" );
 331     Node** to = _in;
 332     for(uint i = 0; i < req; i++) {
 333       to[i] = NULL;
 334     }
 335   }
 336 }
 337 
 338 //------------------------------Node-------------------------------------------
 339 Node::Node(Node *n0)
 340   : _idx(Init(1))
 341 #ifdef ASSERT
 342   , _parse_idx(_idx)
 343 #endif
 344 {
 345   debug_only( verify_construction() );
 346   NOT_PRODUCT(nodes_created++);
 347   // Assert we allocated space for input array already
 348   assert( _in[0] == this, "Must pass arg count to 'new'" );
 349   assert( is_not_dead(n0), "can not use dead node");
 350   _in[0] = n0; if (n0 != NULL) n0->add_out((Node *)this);
 351 }
 352 
 353 //------------------------------Node-------------------------------------------
 354 Node::Node(Node *n0, Node *n1)
 355   : _idx(Init(2))
 356 #ifdef ASSERT
 357   , _parse_idx(_idx)
 358 #endif
 359 {
 360   debug_only( verify_construction() );
 361   NOT_PRODUCT(nodes_created++);
 362   // Assert we allocated space for input array already
 363   assert( _in[1] == this, "Must pass arg count to 'new'" );
 364   assert( is_not_dead(n0), "can not use dead node");
 365   assert( is_not_dead(n1), "can not use dead node");
 366   _in[0] = n0; if (n0 != NULL) n0->add_out((Node *)this);
 367   _in[1] = n1; if (n1 != NULL) n1->add_out((Node *)this);
 368 }
 369 
 370 //------------------------------Node-------------------------------------------
 371 Node::Node(Node *n0, Node *n1, Node *n2)
 372   : _idx(Init(3))
 373 #ifdef ASSERT
 374   , _parse_idx(_idx)
 375 #endif
 376 {
 377   debug_only( verify_construction() );
 378   NOT_PRODUCT(nodes_created++);
 379   // Assert we allocated space for input array already
 380   assert( _in[2] == this, "Must pass arg count to 'new'" );
 381   assert( is_not_dead(n0), "can not use dead node");
 382   assert( is_not_dead(n1), "can not use dead node");
 383   assert( is_not_dead(n2), "can not use dead node");
 384   _in[0] = n0; if (n0 != NULL) n0->add_out((Node *)this);
 385   _in[1] = n1; if (n1 != NULL) n1->add_out((Node *)this);
 386   _in[2] = n2; if (n2 != NULL) n2->add_out((Node *)this);
 387 }
 388 
 389 //------------------------------Node-------------------------------------------
 390 Node::Node(Node *n0, Node *n1, Node *n2, Node *n3)
 391   : _idx(Init(4))
 392 #ifdef ASSERT
 393   , _parse_idx(_idx)
 394 #endif
 395 {
 396   debug_only( verify_construction() );
 397   NOT_PRODUCT(nodes_created++);
 398   // Assert we allocated space for input array already
 399   assert( _in[3] == this, "Must pass arg count to 'new'" );
 400   assert( is_not_dead(n0), "can not use dead node");
 401   assert( is_not_dead(n1), "can not use dead node");
 402   assert( is_not_dead(n2), "can not use dead node");
 403   assert( is_not_dead(n3), "can not use dead node");
 404   _in[0] = n0; if (n0 != NULL) n0->add_out((Node *)this);
 405   _in[1] = n1; if (n1 != NULL) n1->add_out((Node *)this);
 406   _in[2] = n2; if (n2 != NULL) n2->add_out((Node *)this);
 407   _in[3] = n3; if (n3 != NULL) n3->add_out((Node *)this);
 408 }
 409 
 410 //------------------------------Node-------------------------------------------
 411 Node::Node(Node *n0, Node *n1, Node *n2, Node *n3, Node *n4)
 412   : _idx(Init(5))
 413 #ifdef ASSERT
 414   , _parse_idx(_idx)
 415 #endif
 416 {
 417   debug_only( verify_construction() );
 418   NOT_PRODUCT(nodes_created++);
 419   // Assert we allocated space for input array already
 420   assert( _in[4] == this, "Must pass arg count to 'new'" );
 421   assert( is_not_dead(n0), "can not use dead node");
 422   assert( is_not_dead(n1), "can not use dead node");
 423   assert( is_not_dead(n2), "can not use dead node");
 424   assert( is_not_dead(n3), "can not use dead node");
 425   assert( is_not_dead(n4), "can not use dead node");
 426   _in[0] = n0; if (n0 != NULL) n0->add_out((Node *)this);
 427   _in[1] = n1; if (n1 != NULL) n1->add_out((Node *)this);
 428   _in[2] = n2; if (n2 != NULL) n2->add_out((Node *)this);
 429   _in[3] = n3; if (n3 != NULL) n3->add_out((Node *)this);
 430   _in[4] = n4; if (n4 != NULL) n4->add_out((Node *)this);
 431 }
 432 
 433 //------------------------------Node-------------------------------------------
 434 Node::Node(Node *n0, Node *n1, Node *n2, Node *n3,
 435                      Node *n4, Node *n5)
 436   : _idx(Init(6))
 437 #ifdef ASSERT
 438   , _parse_idx(_idx)
 439 #endif
 440 {
 441   debug_only( verify_construction() );
 442   NOT_PRODUCT(nodes_created++);
 443   // Assert we allocated space for input array already
 444   assert( _in[5] == this, "Must pass arg count to 'new'" );
 445   assert( is_not_dead(n0), "can not use dead node");
 446   assert( is_not_dead(n1), "can not use dead node");
 447   assert( is_not_dead(n2), "can not use dead node");
 448   assert( is_not_dead(n3), "can not use dead node");
 449   assert( is_not_dead(n4), "can not use dead node");
 450   assert( is_not_dead(n5), "can not use dead node");
 451   _in[0] = n0; if (n0 != NULL) n0->add_out((Node *)this);
 452   _in[1] = n1; if (n1 != NULL) n1->add_out((Node *)this);
 453   _in[2] = n2; if (n2 != NULL) n2->add_out((Node *)this);
 454   _in[3] = n3; if (n3 != NULL) n3->add_out((Node *)this);
 455   _in[4] = n4; if (n4 != NULL) n4->add_out((Node *)this);
 456   _in[5] = n5; if (n5 != NULL) n5->add_out((Node *)this);
 457 }
 458 
 459 //------------------------------Node-------------------------------------------
 460 Node::Node(Node *n0, Node *n1, Node *n2, Node *n3,
 461                      Node *n4, Node *n5, Node *n6)
 462   : _idx(Init(7))
 463 #ifdef ASSERT
 464   , _parse_idx(_idx)
 465 #endif
 466 {
 467   debug_only( verify_construction() );
 468   NOT_PRODUCT(nodes_created++);
 469   // Assert we allocated space for input array already
 470   assert( _in[6] == this, "Must pass arg count to 'new'" );
 471   assert( is_not_dead(n0), "can not use dead node");
 472   assert( is_not_dead(n1), "can not use dead node");
 473   assert( is_not_dead(n2), "can not use dead node");
 474   assert( is_not_dead(n3), "can not use dead node");
 475   assert( is_not_dead(n4), "can not use dead node");
 476   assert( is_not_dead(n5), "can not use dead node");
 477   assert( is_not_dead(n6), "can not use dead node");
 478   _in[0] = n0; if (n0 != NULL) n0->add_out((Node *)this);
 479   _in[1] = n1; if (n1 != NULL) n1->add_out((Node *)this);
 480   _in[2] = n2; if (n2 != NULL) n2->add_out((Node *)this);
 481   _in[3] = n3; if (n3 != NULL) n3->add_out((Node *)this);
 482   _in[4] = n4; if (n4 != NULL) n4->add_out((Node *)this);
 483   _in[5] = n5; if (n5 != NULL) n5->add_out((Node *)this);
 484   _in[6] = n6; if (n6 != NULL) n6->add_out((Node *)this);
 485 }


src/share/vm/opto/node.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File