Mercurial > hg > graal-jvmci-8
comparison src/share/vm/opto/node.hpp @ 6804:e626685e9f6c
7193318: C2: remove number of inputs requirement from Node's new operator
Summary: Deleted placement new operator of Node - node(size_t, Compile *, int).
Reviewed-by: kvn, twisti
Contributed-by: bharadwaj.yadavalli@oracle.com
author | kvn |
---|---|
date | Thu, 27 Sep 2012 09:38:42 -0700 |
parents | 6c5b7a6becc8 |
children | 8e47bac5643a |
comparison
equal
deleted
inserted
replaced
6803:06f52c4d0e18 | 6804:e626685e9f6c |
---|---|
215 #endif | 215 #endif |
216 n->_out = (Node**)C; | 216 n->_out = (Node**)C; |
217 return (void*)n; | 217 return (void*)n; |
218 } | 218 } |
219 | 219 |
220 // New Operator that takes a Compile pointer, this will eventually | |
221 // be the "new" New operator. | |
222 inline void* operator new( size_t x, Compile* C, int y) { | |
223 Node* n = (Node*)C->node_arena()->Amalloc_D(x + y*sizeof(void*)); | |
224 n->_in = (Node**)(((char*)n) + x); | |
225 #ifdef ASSERT | |
226 n->_in[y-1] = n; // magic cookie for assertion check | |
227 #endif | |
228 n->_out = (Node**)C; | |
229 return (void*)n; | |
230 } | |
231 | |
232 // Delete is a NOP | 220 // Delete is a NOP |
233 void operator delete( void *ptr ) {} | 221 void operator delete( void *ptr ) {} |
234 // Fancy destructor; eagerly attempt to reclaim Node numberings and storage | 222 // Fancy destructor; eagerly attempt to reclaim Node numberings and storage |
235 void destruct(); | 223 void destruct(); |
236 | 224 |