src/share/vm/interpreter/rewriter.cpp

changeset 1573
dd57230ba8fe
parent 1494
389049f3f393
child 1907
c18cbe5936b8
child 1920
ab102d5d923e
     1.1 --- a/src/share/vm/interpreter/rewriter.cpp	Tue Jan 05 13:05:58 2010 +0100
     1.2 +++ b/src/share/vm/interpreter/rewriter.cpp	Tue Jan 05 15:21:25 2010 +0100
     1.3 @@ -247,15 +247,22 @@
     1.4  
     1.5  void Rewriter::rewrite(instanceKlassHandle klass, TRAPS) {
     1.6    ResourceMark rm(THREAD);
     1.7 -  Rewriter     rw(klass, CHECK);
     1.8 +  Rewriter     rw(klass, klass->constants(), klass->methods(), CHECK);
     1.9    // (That's all, folks.)
    1.10  }
    1.11  
    1.12 -Rewriter::Rewriter(instanceKlassHandle klass, TRAPS)
    1.13 +
    1.14 +void Rewriter::rewrite(instanceKlassHandle klass, constantPoolHandle cpool, objArrayHandle methods, TRAPS) {
    1.15 +  ResourceMark rm(THREAD);
    1.16 +  Rewriter     rw(klass, cpool, methods, CHECK);
    1.17 +  // (That's all, folks.)
    1.18 +}
    1.19 +
    1.20 +
    1.21 +Rewriter::Rewriter(instanceKlassHandle klass, constantPoolHandle cpool, objArrayHandle methods, TRAPS)
    1.22    : _klass(klass),
    1.23 -    // gather starting points
    1.24 -    _pool(   THREAD, klass->constants()),
    1.25 -    _methods(THREAD, klass->methods())
    1.26 +    _pool(cpool),
    1.27 +    _methods(methods)
    1.28  {
    1.29    assert(_pool->cache() == NULL, "constant pool cache must not be set yet");
    1.30  

mercurial