equal
deleted
inserted
replaced
314 |
314 |
315 //------------------------------Node------------------------------------------- |
315 //------------------------------Node------------------------------------------- |
316 // Create a Node, with a given number of required edges. |
316 // Create a Node, with a given number of required edges. |
317 Node::Node(uint req) |
317 Node::Node(uint req) |
318 : _idx(Init(req)) |
318 : _idx(Init(req)) |
|
319 #ifdef ASSERT |
|
320 , _parse_idx(_idx) |
|
321 #endif |
319 { |
322 { |
320 assert( req < Compile::current()->max_node_limit() - NodeLimitFudgeFactor, "Input limit exceeded" ); |
323 assert( req < Compile::current()->max_node_limit() - NodeLimitFudgeFactor, "Input limit exceeded" ); |
321 debug_only( verify_construction() ); |
324 debug_only( verify_construction() ); |
322 NOT_PRODUCT(nodes_created++); |
325 NOT_PRODUCT(nodes_created++); |
323 if (req == 0) { |
326 if (req == 0) { |
333 } |
336 } |
334 |
337 |
335 //------------------------------Node------------------------------------------- |
338 //------------------------------Node------------------------------------------- |
336 Node::Node(Node *n0) |
339 Node::Node(Node *n0) |
337 : _idx(Init(1)) |
340 : _idx(Init(1)) |
|
341 #ifdef ASSERT |
|
342 , _parse_idx(_idx) |
|
343 #endif |
338 { |
344 { |
339 debug_only( verify_construction() ); |
345 debug_only( verify_construction() ); |
340 NOT_PRODUCT(nodes_created++); |
346 NOT_PRODUCT(nodes_created++); |
341 // Assert we allocated space for input array already |
347 // Assert we allocated space for input array already |
342 assert( _in[0] == this, "Must pass arg count to 'new'" ); |
348 assert( _in[0] == this, "Must pass arg count to 'new'" ); |
345 } |
351 } |
346 |
352 |
347 //------------------------------Node------------------------------------------- |
353 //------------------------------Node------------------------------------------- |
348 Node::Node(Node *n0, Node *n1) |
354 Node::Node(Node *n0, Node *n1) |
349 : _idx(Init(2)) |
355 : _idx(Init(2)) |
|
356 #ifdef ASSERT |
|
357 , _parse_idx(_idx) |
|
358 #endif |
350 { |
359 { |
351 debug_only( verify_construction() ); |
360 debug_only( verify_construction() ); |
352 NOT_PRODUCT(nodes_created++); |
361 NOT_PRODUCT(nodes_created++); |
353 // Assert we allocated space for input array already |
362 // Assert we allocated space for input array already |
354 assert( _in[1] == this, "Must pass arg count to 'new'" ); |
363 assert( _in[1] == this, "Must pass arg count to 'new'" ); |
359 } |
368 } |
360 |
369 |
361 //------------------------------Node------------------------------------------- |
370 //------------------------------Node------------------------------------------- |
362 Node::Node(Node *n0, Node *n1, Node *n2) |
371 Node::Node(Node *n0, Node *n1, Node *n2) |
363 : _idx(Init(3)) |
372 : _idx(Init(3)) |
|
373 #ifdef ASSERT |
|
374 , _parse_idx(_idx) |
|
375 #endif |
364 { |
376 { |
365 debug_only( verify_construction() ); |
377 debug_only( verify_construction() ); |
366 NOT_PRODUCT(nodes_created++); |
378 NOT_PRODUCT(nodes_created++); |
367 // Assert we allocated space for input array already |
379 // Assert we allocated space for input array already |
368 assert( _in[2] == this, "Must pass arg count to 'new'" ); |
380 assert( _in[2] == this, "Must pass arg count to 'new'" ); |
375 } |
387 } |
376 |
388 |
377 //------------------------------Node------------------------------------------- |
389 //------------------------------Node------------------------------------------- |
378 Node::Node(Node *n0, Node *n1, Node *n2, Node *n3) |
390 Node::Node(Node *n0, Node *n1, Node *n2, Node *n3) |
379 : _idx(Init(4)) |
391 : _idx(Init(4)) |
|
392 #ifdef ASSERT |
|
393 , _parse_idx(_idx) |
|
394 #endif |
380 { |
395 { |
381 debug_only( verify_construction() ); |
396 debug_only( verify_construction() ); |
382 NOT_PRODUCT(nodes_created++); |
397 NOT_PRODUCT(nodes_created++); |
383 // Assert we allocated space for input array already |
398 // Assert we allocated space for input array already |
384 assert( _in[3] == this, "Must pass arg count to 'new'" ); |
399 assert( _in[3] == this, "Must pass arg count to 'new'" ); |
393 } |
408 } |
394 |
409 |
395 //------------------------------Node------------------------------------------- |
410 //------------------------------Node------------------------------------------- |
396 Node::Node(Node *n0, Node *n1, Node *n2, Node *n3, Node *n4) |
411 Node::Node(Node *n0, Node *n1, Node *n2, Node *n3, Node *n4) |
397 : _idx(Init(5)) |
412 : _idx(Init(5)) |
|
413 #ifdef ASSERT |
|
414 , _parse_idx(_idx) |
|
415 #endif |
398 { |
416 { |
399 debug_only( verify_construction() ); |
417 debug_only( verify_construction() ); |
400 NOT_PRODUCT(nodes_created++); |
418 NOT_PRODUCT(nodes_created++); |
401 // Assert we allocated space for input array already |
419 // Assert we allocated space for input array already |
402 assert( _in[4] == this, "Must pass arg count to 'new'" ); |
420 assert( _in[4] == this, "Must pass arg count to 'new'" ); |
414 |
432 |
415 //------------------------------Node------------------------------------------- |
433 //------------------------------Node------------------------------------------- |
416 Node::Node(Node *n0, Node *n1, Node *n2, Node *n3, |
434 Node::Node(Node *n0, Node *n1, Node *n2, Node *n3, |
417 Node *n4, Node *n5) |
435 Node *n4, Node *n5) |
418 : _idx(Init(6)) |
436 : _idx(Init(6)) |
|
437 #ifdef ASSERT |
|
438 , _parse_idx(_idx) |
|
439 #endif |
419 { |
440 { |
420 debug_only( verify_construction() ); |
441 debug_only( verify_construction() ); |
421 NOT_PRODUCT(nodes_created++); |
442 NOT_PRODUCT(nodes_created++); |
422 // Assert we allocated space for input array already |
443 // Assert we allocated space for input array already |
423 assert( _in[5] == this, "Must pass arg count to 'new'" ); |
444 assert( _in[5] == this, "Must pass arg count to 'new'" ); |
437 |
458 |
438 //------------------------------Node------------------------------------------- |
459 //------------------------------Node------------------------------------------- |
439 Node::Node(Node *n0, Node *n1, Node *n2, Node *n3, |
460 Node::Node(Node *n0, Node *n1, Node *n2, Node *n3, |
440 Node *n4, Node *n5, Node *n6) |
461 Node *n4, Node *n5, Node *n6) |
441 : _idx(Init(7)) |
462 : _idx(Init(7)) |
|
463 #ifdef ASSERT |
|
464 , _parse_idx(_idx) |
|
465 #endif |
442 { |
466 { |
443 debug_only( verify_construction() ); |
467 debug_only( verify_construction() ); |
444 NOT_PRODUCT(nodes_created++); |
468 NOT_PRODUCT(nodes_created++); |
445 // Assert we allocated space for input array already |
469 // Assert we allocated space for input array already |
446 assert( _in[6] == this, "Must pass arg count to 'new'" ); |
470 assert( _in[6] == this, "Must pass arg count to 'new'" ); |