src/share/vm/interpreter/bytecode.cpp

changeset 4037
da91efe96a93
parent 3969
1d7922586cf6
child 6876
710a3c8b516e
     1.1 --- a/src/share/vm/interpreter/bytecode.cpp	Fri Aug 31 16:39:35 2012 -0700
     1.2 +++ b/src/share/vm/interpreter/bytecode.cpp	Sat Sep 01 13:25:18 2012 -0400
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -25,7 +25,7 @@
    1.11  #include "precompiled.hpp"
    1.12  #include "interpreter/bytecode.hpp"
    1.13  #include "interpreter/linkResolver.hpp"
    1.14 -#include "oops/constantPoolOop.hpp"
    1.15 +#include "oops/constantPool.hpp"
    1.16  #include "oops/oop.inline.hpp"
    1.17  #include "runtime/fieldType.hpp"
    1.18  #include "runtime/handles.inline.hpp"
    1.19 @@ -159,7 +159,7 @@
    1.20  Handle Bytecode_invoke::appendix(TRAPS) {
    1.21    ConstantPoolCacheEntry* cpce = cpcache_entry();
    1.22    if (cpce->has_appendix())
    1.23 -    return Handle(THREAD, cpce->f1_appendix());
    1.24 +    return Handle(THREAD, cpce->appendix_if_resolved(constants()));
    1.25    return Handle();  // usual case
    1.26  }
    1.27  
    1.28 @@ -179,11 +179,7 @@
    1.29  
    1.30  ConstantPoolCacheEntry* Bytecode_member_ref::cpcache_entry() const {
    1.31    int index = this->index();
    1.32 -  DEBUG_ONLY({
    1.33 -      if (!has_index_u4(code()))
    1.34 -        index = constantPoolOopDesc::get_cpcache_index(index);
    1.35 -    });
    1.36 -  return cpcache()->entry_at(index);
    1.37 +  return cpcache()->entry_at(ConstantPool::decode_cpcache_index(index, true));
    1.38  }
    1.39  
    1.40  // Implementation of Bytecode_field
    1.41 @@ -207,7 +203,7 @@
    1.42  int Bytecode_loadconstant::pool_index() const {
    1.43    int index = raw_index();
    1.44    if (has_cache_index()) {
    1.45 -    return _method->constants()->cache()->entry_at(index)->constant_pool_index();
    1.46 +    return _method->constants()->object_to_cp_index(index);
    1.47    }
    1.48    return index;
    1.49  }
    1.50 @@ -221,7 +217,7 @@
    1.51  oop Bytecode_loadconstant::resolve_constant(TRAPS) const {
    1.52    assert(_method.not_null(), "must supply method to resolve constant");
    1.53    int index = raw_index();
    1.54 -  constantPoolOop constants = _method->constants();
    1.55 +  ConstantPool* constants = _method->constants();
    1.56    if (has_cache_index()) {
    1.57      return constants->resolve_cached_constant_at(index, THREAD);
    1.58    } else {

mercurial