8202769: jck test fails with C2: vm/jvmti/FollowReferences/fref001/fref00113/fref00113.html
Reviewed-by: kvn, coleenp
This commit is contained in:
parent
297b2fda0f
commit
a0e9bf4280
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -255,8 +255,7 @@ ciConstant ciBytecodeStream::get_constant() {
|
||||
// constant.
|
||||
constantTag ciBytecodeStream::get_constant_pool_tag(int index) const {
|
||||
VM_ENTRY_MARK;
|
||||
BasicType bt = _method->get_Method()->constants()->basic_type_for_constant_at(index);
|
||||
return constantTag::ofBasicType(bt);
|
||||
return _method->get_Method()->constants()->constant_tag_at(index);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
@ -807,6 +807,17 @@ void ConstantPool::save_and_throw_exception(const constantPoolHandle& this_cp, i
|
||||
}
|
||||
}
|
||||
|
||||
constantTag ConstantPool::constant_tag_at(int which) {
|
||||
constantTag tag = tag_at(which);
|
||||
if (tag.is_dynamic_constant() ||
|
||||
tag.is_dynamic_constant_in_error()) {
|
||||
// have to look at the signature for this one
|
||||
Symbol* constant_type = uncached_signature_ref_at(which);
|
||||
return constantTag::ofBasicType(FieldType::basic_type(constant_type));
|
||||
}
|
||||
return tag;
|
||||
}
|
||||
|
||||
BasicType ConstantPool::basic_type_for_constant_at(int which) {
|
||||
constantTag tag = tag_at(which);
|
||||
if (tag.is_dynamic_constant() ||
|
||||
|
@ -719,6 +719,9 @@ class ConstantPool : public Metadata {
|
||||
enum { _no_index_sentinel = -1, _possible_index_sentinel = -2 };
|
||||
public:
|
||||
|
||||
// Get the tag for a constant, which may involve a constant dynamic
|
||||
constantTag constant_tag_at(int which);
|
||||
// Get the basic type for a constant, which may involve a constant dynamic
|
||||
BasicType basic_type_for_constant_at(int which);
|
||||
|
||||
// Resolve late bound constants.
|
||||
|
Loading…
x
Reference in New Issue
Block a user