1.1 --- a/src/share/vm/opto/node.cpp Tue Sep 25 15:48:17 2012 -0700 1.2 +++ b/src/share/vm/opto/node.cpp Thu Sep 27 09:38:42 2012 -0700 1.3 @@ -296,6 +296,14 @@ 1.4 assert(Compile::current() == C, "must use operator new(Compile*)"); 1.5 int idx = C->next_unique(); 1.6 1.7 + // Allocate memory for the necessary number of edges. 1.8 + if (req > 0) { 1.9 + // Allocate space for _in array to have double alignment. 1.10 + _in = (Node **) ((char *) (C->node_arena()->Amalloc_D(req * sizeof(void*)))); 1.11 +#ifdef ASSERT 1.12 + _in[req-1] = this; // magic cookie for assertion check 1.13 +#endif 1.14 + } 1.15 // If there are default notes floating around, capture them: 1.16 Node_Notes* nn = C->default_node_notes(); 1.17 if (nn != NULL) init_node_notes(C, idx, nn); 1.18 @@ -1004,15 +1012,15 @@ 1.19 // set_req(2, phase->intcon(7)); 1.20 // return this; 1.21 // Example: reshape "X*4" into "X<<2" 1.22 -// return new (C,3) LShiftINode(in(1), phase->intcon(2)); 1.23 +// return new (C) LShiftINode(in(1), phase->intcon(2)); 1.24 // 1.25 // You must call 'phase->transform(X)' on any new Nodes X you make, except 1.26 // for the returned root node. Example: reshape "X*31" with "(X<<5)-X". 1.27 -// Node *shift=phase->transform(new(C,3)LShiftINode(in(1),phase->intcon(5))); 1.28 -// return new (C,3) AddINode(shift, in(1)); 1.29 +// Node *shift=phase->transform(new(C)LShiftINode(in(1),phase->intcon(5))); 1.30 +// return new (C) AddINode(shift, in(1)); 1.31 // 1.32 // When making a Node for a constant use 'phase->makecon' or 'phase->intcon'. 1.33 -// These forms are faster than 'phase->transform(new (C,1) ConNode())' and Do 1.34 +// These forms are faster than 'phase->transform(new (C) ConNode())' and Do 1.35 // The Right Thing with def-use info. 1.36 // 1.37 // You cannot bury the 'this' Node inside of a graph reshape. If the reshaped