hotspot/src/share/vm/opto/node.hpp
changeset 24923 9631f7d691dc
parent 24425 53764d2358f9
child 25913 81dbc151e91c
equal deleted inserted replaced
24922:9139bd899e16 24923:9631f7d691dc
   206   // Because Nodes come and go, I define an Arena of Node structures to pull
   206   // Because Nodes come and go, I define an Arena of Node structures to pull
   207   // from.  This should allow fast access to node creation & deletion.  This
   207   // from.  This should allow fast access to node creation & deletion.  This
   208   // field is a local cache of a value defined in some "program fragment" for
   208   // field is a local cache of a value defined in some "program fragment" for
   209   // which these Nodes are just a part of.
   209   // which these Nodes are just a part of.
   210 
   210 
   211   // New Operator that takes a Compile pointer, this will eventually
   211   inline void* operator new(size_t x) throw() {
   212   // be the "new" New operator.
   212     Compile* C = Compile::current();
   213   inline void* operator new( size_t x, Compile* C) throw() {
       
   214     Node* n = (Node*)C->node_arena()->Amalloc_D(x);
   213     Node* n = (Node*)C->node_arena()->Amalloc_D(x);
   215 #ifdef ASSERT
   214 #ifdef ASSERT
   216     n->_in = (Node**)n; // magic cookie for assertion check
   215     n->_in = (Node**)n; // magic cookie for assertion check
   217 #endif
   216 #endif
   218     n->_out = (Node**)C;
       
   219     return (void*)n;
   217     return (void*)n;
   220   }
   218   }
   221 
   219 
   222   // Delete is a NOP
   220   // Delete is a NOP
   223   void operator delete( void *ptr ) {}
   221   void operator delete( void *ptr ) {}
   257   // Shared setup for the above constructors.
   255   // Shared setup for the above constructors.
   258   // Handles all interactions with Compile::current.
   256   // Handles all interactions with Compile::current.
   259   // Puts initial values in all Node fields except _idx.
   257   // Puts initial values in all Node fields except _idx.
   260   // Returns the initial value for _idx, which cannot
   258   // Returns the initial value for _idx, which cannot
   261   // be initialized by assignment.
   259   // be initialized by assignment.
   262   inline int Init(int req, Compile* C);
   260   inline int Init(int req);
   263 
   261 
   264 //----------------- input edge handling
   262 //----------------- input edge handling
   265 protected:
   263 protected:
   266   friend class PhaseCFG;        // Access to address of _in array elements
   264   friend class PhaseCFG;        // Access to address of _in array elements
   267   Node **_in;                   // Array of use-def references to Nodes
   265   Node **_in;                   // Array of use-def references to Nodes