Skip to content

Commit 03f26e0

Browse files
committed
BSMAE will never be null, so make it into a reference
1 parent 4810c50 commit 03f26e0

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/hotspot/share/interpreter/bootstrapInfo.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ void BootstrapInfo::resolve_args(TRAPS) {
137137
assert(_bsm.not_null(), "resolve_bsm first");
138138

139139
// if there are no static arguments, return leaving _arg_values as null
140-
BSMAttributeEntry* attr = bsm_attr();
141-
int argc = attr->argument_count();
140+
BSMAttributeEntry& attr = bsm_attr();
141+
int argc = attr.argument_count();
142142
if (argc == 0 && UseBootstrapCallInfo < 2) return;
143143

144144
bool use_BSCI;
@@ -166,7 +166,7 @@ void BootstrapInfo::resolve_args(TRAPS) {
166166
if (!use_BSCI && _pool->tag_at(_bss_index).is_dynamic_constant()) {
167167
bool found_unresolved_condy = false;
168168
for (int i = 0; i < argc; i++) {
169-
int arg_index = attr->argument_index(i);
169+
int arg_index = attr.argument_index(i);
170170
if (_pool->tag_at(arg_index).is_dynamic_constant()) {
171171
// potential recursion point condy -> condy
172172
bool found_it = false;
@@ -190,7 +190,7 @@ void BootstrapInfo::resolve_args(TRAPS) {
190190
bool all_resolved = true;
191191
for (int i = 0; i < argc; i++) {
192192
bool found_it = false;
193-
int arg_index = attr->argument_index(i);
193+
int arg_index = attr.argument_index(i);
194194
_pool->find_cached_constant_at(arg_index, found_it, CHECK);
195195
if (!found_it) {
196196
all_resolved = false;

src/hotspot/share/interpreter/bootstrapInfo.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ class BootstrapInfo : public StackObj {
7676
// derived accessors
7777
InstanceKlass* caller() const { return _pool->pool_holder(); }
7878
oop caller_mirror() const { return caller()->java_mirror(); }
79-
BSMAttributeEntry* bsm_attr() const { return _pool->bsm_attribute_entry(_bsm_attr_index); }
80-
int bsm_index() const { return bsm_attr()->bootstrap_method_index(); }
81-
int arg_count() const { return bsm_attr()->argument_count(); }
82-
int arg_index(int j) const { return bsm_attr()->argument_index(j); }
79+
BSMAttributeEntry& bsm_attr() const { return *_pool->bsm_attribute_entry(_bsm_attr_index); }
80+
int bsm_index() const { return bsm_attr().bootstrap_method_index(); }
81+
int arg_count() const { return bsm_attr().argument_count(); }
82+
int arg_index(int j) const { return bsm_attr().argument_index(j); }
8383
ResolvedIndyEntry* indy_entry() const;
8484

8585
// If there is evidence this call site was already linked, set the

0 commit comments

Comments
 (0)