hotspot/src/share/vm/interpreter/rewriter.cpp
changeset 4567 7fc02fbe5c7a
parent 4429 d7eb4e2099aa
child 5688 9052dc91ea67
child 5547 f4b087cbb361
equal deleted inserted replaced
4566:b363f6ef4068 4567:7fc02fbe5c7a
   245 }
   245 }
   246 
   246 
   247 
   247 
   248 void Rewriter::rewrite(instanceKlassHandle klass, TRAPS) {
   248 void Rewriter::rewrite(instanceKlassHandle klass, TRAPS) {
   249   ResourceMark rm(THREAD);
   249   ResourceMark rm(THREAD);
   250   Rewriter     rw(klass, CHECK);
   250   Rewriter     rw(klass, klass->constants(), klass->methods(), CHECK);
   251   // (That's all, folks.)
   251   // (That's all, folks.)
   252 }
   252 }
   253 
   253 
   254 Rewriter::Rewriter(instanceKlassHandle klass, TRAPS)
   254 
       
   255 void Rewriter::rewrite(instanceKlassHandle klass, constantPoolHandle cpool, objArrayHandle methods, TRAPS) {
       
   256   ResourceMark rm(THREAD);
       
   257   Rewriter     rw(klass, cpool, methods, CHECK);
       
   258   // (That's all, folks.)
       
   259 }
       
   260 
       
   261 
       
   262 Rewriter::Rewriter(instanceKlassHandle klass, constantPoolHandle cpool, objArrayHandle methods, TRAPS)
   255   : _klass(klass),
   263   : _klass(klass),
   256     // gather starting points
   264     _pool(cpool),
   257     _pool(   THREAD, klass->constants()),
   265     _methods(methods)
   258     _methods(THREAD, klass->methods())
       
   259 {
   266 {
   260   assert(_pool->cache() == NULL, "constant pool cache must not be set yet");
   267   assert(_pool->cache() == NULL, "constant pool cache must not be set yet");
   261 
   268 
   262   // determine index maps for methodOop rewriting
   269   // determine index maps for methodOop rewriting
   263   compute_index_maps();
   270   compute_index_maps();