src/share/vm/ci/ciStreams.cpp

changeset 9756
2be326848943
parent 6876
710a3c8b516e
parent 9745
0e3d6188f198
     1.1 --- a/src/share/vm/ci/ciStreams.cpp	Sat Nov 09 20:15:27 2019 +0800
     1.2 +++ b/src/share/vm/ci/ciStreams.cpp	Sat Nov 09 20:29:45 2019 +0800
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 1999, 2016, 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 @@ -361,14 +361,14 @@
    1.11  ciMethod* ciBytecodeStream::get_method(bool& will_link, ciSignature* *declared_signature_result) {
    1.12    VM_ENTRY_MARK;
    1.13    ciEnv* env = CURRENT_ENV;
    1.14 -  constantPoolHandle cpool(_method->get_Method()->constants());
    1.15 +  constantPoolHandle cpool(THREAD, _method->get_Method()->constants());
    1.16    ciMethod* m = env->get_method_by_index(cpool, get_method_index(), cur_bc(), _holder);
    1.17    will_link = m->is_loaded();
    1.18  
    1.19    // Use the MethodType stored in the CP cache to create a signature
    1.20    // with correct types (in respect to class loaders).
    1.21    if (has_method_type()) {
    1.22 -    ciSymbol*     sig_sym     = env->get_symbol(cpool->symbol_at(get_method_signature_index()));
    1.23 +    ciSymbol*     sig_sym     = env->get_symbol(cpool->symbol_at(get_method_signature_index(cpool)));
    1.24      ciKlass*      pool_holder = env->get_klass(cpool->pool_holder());
    1.25      ciMethodType* method_type = get_method_type();
    1.26      ciSignature* declared_signature = new (env->arena()) ciSignature(pool_holder, sig_sym, method_type);
    1.27 @@ -465,9 +465,8 @@
    1.28  // Get the constant pool index of the signature of the method
    1.29  // referenced by the current bytecode.  Used for generating
    1.30  // deoptimization information.
    1.31 -int ciBytecodeStream::get_method_signature_index() {
    1.32 +int ciBytecodeStream::get_method_signature_index(const constantPoolHandle& cpool) {
    1.33    GUARDED_VM_ENTRY(
    1.34 -    ConstantPool* cpool = _holder->get_instanceKlass()->constants();
    1.35      const int method_index = get_method_index();
    1.36      const int name_and_type_index = cpool->name_and_type_ref_index_at(method_index);
    1.37      return cpool->signature_ref_index_at(name_and_type_index);

mercurial