src/share/vm/interpreter/interpreterRuntime.cpp

changeset 2934
7db2b9499c36
parent 2742
ed69575596ac
child 2978
d83ac25d0304
     1.1 --- a/src/share/vm/interpreter/interpreterRuntime.cpp	Tue May 24 20:24:11 2011 -0700
     1.2 +++ b/src/share/vm/interpreter/interpreterRuntime.cpp	Wed May 25 16:04:09 2011 -0700
     1.3 @@ -139,9 +139,15 @@
     1.4    ResourceMark rm(thread);
     1.5    methodHandle m (thread, method(thread));
     1.6    Bytecode_loadconstant ldc(m, bci(thread));
     1.7 -  oop result = ldc.resolve_constant(THREAD);
     1.8 -  DEBUG_ONLY(ConstantPoolCacheEntry* cpce = m->constants()->cache()->entry_at(ldc.cache_index()));
     1.9 -  assert(result == cpce->f1(), "expected result for assembly code");
    1.10 +  oop result = ldc.resolve_constant(CHECK);
    1.11 +#ifdef ASSERT
    1.12 +  {
    1.13 +    // The bytecode wrappers aren't GC-safe so construct a new one
    1.14 +    Bytecode_loadconstant ldc2(m, bci(thread));
    1.15 +    ConstantPoolCacheEntry* cpce = m->constants()->cache()->entry_at(ldc2.cache_index());
    1.16 +    assert(result == cpce->f1(), "expected result for assembly code");
    1.17 +  }
    1.18 +#endif
    1.19  }
    1.20  IRT_END
    1.21  

mercurial