< prev index next >
src/share/vm/opto/node.cpp
Print this page
*** 293,305 ****
// Allocate memory for the necessary number of edges.
if (req > 0) {
// Allocate space for _in array to have double alignment.
_in = (Node **) ((char *) (C->node_arena()->Amalloc_D(req * sizeof(void*))));
- #ifdef ASSERT
- _in[req-1] = this; // magic cookie for assertion check
- #endif
}
// If there are default notes floating around, capture them:
Node_Notes* nn = C->default_node_notes();
if (nn != NULL) init_node_notes(C, idx, nn);
--- 293,302 ----
*** 324,337 ****
{
assert( req < Compile::current()->max_node_limit() - NodeLimitFudgeFactor, "Input limit exceeded" );
debug_only( verify_construction() );
NOT_PRODUCT(nodes_created++);
if (req == 0) {
- assert( _in == (Node**)this, "Must not pass arg count to 'new'" );
_in = NULL;
} else {
- assert( _in[req-1] == this, "Must pass arg count to 'new'" );
Node** to = _in;
for(uint i = 0; i < req; i++) {
to[i] = NULL;
}
}
--- 321,332 ----
*** 344,355 ****
, _parse_idx(_idx)
#endif
{
debug_only( verify_construction() );
NOT_PRODUCT(nodes_created++);
- // Assert we allocated space for input array already
- assert( _in[0] == this, "Must pass arg count to 'new'" );
assert( is_not_dead(n0), "can not use dead node");
_in[0] = n0; if (n0 != NULL) n0->add_out((Node *)this);
}
//------------------------------Node-------------------------------------------
--- 339,348 ----
*** 359,370 ****
, _parse_idx(_idx)
#endif
{
debug_only( verify_construction() );
NOT_PRODUCT(nodes_created++);
- // Assert we allocated space for input array already
- assert( _in[1] == this, "Must pass arg count to 'new'" );
assert( is_not_dead(n0), "can not use dead node");
assert( is_not_dead(n1), "can not use dead node");
_in[0] = n0; if (n0 != NULL) n0->add_out((Node *)this);
_in[1] = n1; if (n1 != NULL) n1->add_out((Node *)this);
}
--- 352,361 ----
*** 376,387 ****
, _parse_idx(_idx)
#endif
{
debug_only( verify_construction() );
NOT_PRODUCT(nodes_created++);
- // Assert we allocated space for input array already
- assert( _in[2] == this, "Must pass arg count to 'new'" );
assert( is_not_dead(n0), "can not use dead node");
assert( is_not_dead(n1), "can not use dead node");
assert( is_not_dead(n2), "can not use dead node");
_in[0] = n0; if (n0 != NULL) n0->add_out((Node *)this);
_in[1] = n1; if (n1 != NULL) n1->add_out((Node *)this);
--- 367,376 ----
*** 395,406 ****
, _parse_idx(_idx)
#endif
{
debug_only( verify_construction() );
NOT_PRODUCT(nodes_created++);
- // Assert we allocated space for input array already
- assert( _in[3] == this, "Must pass arg count to 'new'" );
assert( is_not_dead(n0), "can not use dead node");
assert( is_not_dead(n1), "can not use dead node");
assert( is_not_dead(n2), "can not use dead node");
assert( is_not_dead(n3), "can not use dead node");
_in[0] = n0; if (n0 != NULL) n0->add_out((Node *)this);
--- 384,393 ----
*** 416,427 ****
, _parse_idx(_idx)
#endif
{
debug_only( verify_construction() );
NOT_PRODUCT(nodes_created++);
- // Assert we allocated space for input array already
- assert( _in[4] == this, "Must pass arg count to 'new'" );
assert( is_not_dead(n0), "can not use dead node");
assert( is_not_dead(n1), "can not use dead node");
assert( is_not_dead(n2), "can not use dead node");
assert( is_not_dead(n3), "can not use dead node");
assert( is_not_dead(n4), "can not use dead node");
--- 403,412 ----
*** 440,451 ****
, _parse_idx(_idx)
#endif
{
debug_only( verify_construction() );
NOT_PRODUCT(nodes_created++);
- // Assert we allocated space for input array already
- assert( _in[5] == this, "Must pass arg count to 'new'" );
assert( is_not_dead(n0), "can not use dead node");
assert( is_not_dead(n1), "can not use dead node");
assert( is_not_dead(n2), "can not use dead node");
assert( is_not_dead(n3), "can not use dead node");
assert( is_not_dead(n4), "can not use dead node");
--- 425,434 ----
*** 466,477 ****
, _parse_idx(_idx)
#endif
{
debug_only( verify_construction() );
NOT_PRODUCT(nodes_created++);
- // Assert we allocated space for input array already
- assert( _in[6] == this, "Must pass arg count to 'new'" );
assert( is_not_dead(n0), "can not use dead node");
assert( is_not_dead(n1), "can not use dead node");
assert( is_not_dead(n2), "can not use dead node");
assert( is_not_dead(n3), "can not use dead node");
assert( is_not_dead(n4), "can not use dead node");
--- 449,458 ----
< prev index next >