author | coleenp |
Wed, 13 Nov 2019 08:23:23 -0500 | |
changeset 59056 | 15936b142f86 |
parent 53746 | bdccafc038a2 |
permissions | -rw-r--r-- |
1 | 1 |
/* |
53546 | 2 |
* Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved. |
1 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. |
|
8 |
* |
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
* accompanied this code). |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License version |
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 |
* |
|
5547
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
4567
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
4567
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
4567
diff
changeset
|
21 |
* questions. |
1 | 22 |
* |
23 |
*/ |
|
24 |
||
7397 | 25 |
#include "precompiled.hpp" |
26 |
#include "ci/ciCallSite.hpp" |
|
27 |
#include "ci/ciConstant.hpp" |
|
28 |
#include "ci/ciField.hpp" |
|
29 |
#include "ci/ciStreams.hpp" |
|
49449
ef5d5d343e2a
8199263: Split interfaceSupport.hpp to not require including .inline.hpp files
coleenp
parents:
48826
diff
changeset
|
30 |
#include "ci/ciUtilities.inline.hpp" |
ef5d5d343e2a
8199263: Split interfaceSupport.hpp to not require including .inline.hpp files
coleenp
parents:
48826
diff
changeset
|
31 |
#include "runtime/handles.inline.hpp" |
1 | 32 |
|
33 |
// ciExceptionHandlerStream |
|
34 |
// |
|
35 |
// Walk over some selected set of a methods exception handlers. |
|
36 |
||
37 |
// ------------------------------------------------------------------ |
|
38 |
// ciExceptionHandlerStream::count |
|
39 |
// |
|
40 |
// How many exception handlers are there in this stream? |
|
41 |
// |
|
42 |
// Implementation note: Compiler2 needs this functionality, so I had |
|
43 |
int ciExceptionHandlerStream::count() { |
|
44 |
int save_pos = _pos; |
|
45 |
int save_end = _end; |
|
46 |
||
47 |
int count = 0; |
|
48 |
||
49 |
_pos = -1; |
|
50 |
_end = _method->_handler_count; |
|
51 |
||
52 |
||
53 |
next(); |
|
54 |
while (!is_done()) { |
|
55 |
count++; |
|
56 |
next(); |
|
57 |
} |
|
58 |
||
59 |
_pos = save_pos; |
|
60 |
_end = save_end; |
|
61 |
||
62 |
return count; |
|
63 |
} |
|
64 |
||
65 |
int ciExceptionHandlerStream::count_remaining() { |
|
66 |
int save_pos = _pos; |
|
67 |
int save_end = _end; |
|
68 |
||
69 |
int count = 0; |
|
70 |
||
71 |
while (!is_done()) { |
|
72 |
count++; |
|
73 |
next(); |
|
74 |
} |
|
75 |
||
76 |
_pos = save_pos; |
|
77 |
_end = save_end; |
|
78 |
||
79 |
return count; |
|
80 |
} |
|
81 |
||
82 |
// ciBytecodeStream |
|
83 |
// |
|
84 |
// The class is used to iterate over the bytecodes of a method. |
|
85 |
// It hides the details of constant pool structure/access by |
|
86 |
// providing accessors for constant pool items. |
|
87 |
||
88 |
// ------------------------------------------------------------------ |
|
5688 | 89 |
// ciBytecodeStream::next_wide_or_table |
1 | 90 |
// |
91 |
// Special handling for switch ops |
|
5688 | 92 |
Bytecodes::Code ciBytecodeStream::next_wide_or_table(Bytecodes::Code bc) { |
93 |
switch (bc) { // Check for special bytecode handling |
|
94 |
case Bytecodes::_wide: |
|
95 |
// Special handling for the wide bytcode |
|
96 |
// Get following bytecode; do not return wide |
|
97 |
assert(Bytecodes::Code(_pc[0]) == Bytecodes::_wide, ""); |
|
98 |
bc = Bytecodes::java_code(_raw_bc = (Bytecodes::Code)_pc[1]); |
|
99 |
assert(Bytecodes::wide_length_for(bc) > 2, "must make progress"); |
|
100 |
_pc += Bytecodes::wide_length_for(bc); |
|
101 |
_was_wide = _pc; // Flag last wide bytecode found |
|
102 |
assert(is_wide(), "accessor works right"); |
|
103 |
break; |
|
1 | 104 |
|
105 |
case Bytecodes::_lookupswitch: |
|
106 |
_pc++; // Skip wide bytecode |
|
107 |
_pc += (_start-_pc)&3; // Word align |
|
108 |
_table_base = (jint*)_pc; // Capture for later usage |
|
109 |
// table_base[0] is default far_dest |
|
110 |
// Table has 2 lead elements (default, length), then pairs of u4 values. |
|
111 |
// So load table length, and compute address at end of table |
|
112 |
_pc = (address)&_table_base[2+ 2*Bytes::get_Java_u4((address)&_table_base[1])]; |
|
113 |
break; |
|
114 |
||
115 |
case Bytecodes::_tableswitch: { |
|
116 |
_pc++; // Skip wide bytecode |
|
117 |
_pc += (_start-_pc)&3; // Word align |
|
118 |
_table_base = (jint*)_pc; // Capture for later usage |
|
119 |
// table_base[0] is default far_dest |
|
120 |
int lo = Bytes::get_Java_u4((address)&_table_base[1]);// Low bound |
|
121 |
int hi = Bytes::get_Java_u4((address)&_table_base[2]);// High bound |
|
122 |
int len = hi - lo + 1; // Dense table size |
|
123 |
_pc = (address)&_table_base[3+len]; // Skip past table |
|
124 |
break; |
|
125 |
} |
|
126 |
||
127 |
default: |
|
128 |
fatal("unhandled bytecode"); |
|
129 |
} |
|
130 |
return bc; |
|
131 |
} |
|
132 |
||
133 |
// ------------------------------------------------------------------ |
|
134 |
// ciBytecodeStream::reset_to_bci |
|
135 |
void ciBytecodeStream::reset_to_bci( int bci ) { |
|
136 |
_bc_start=_was_wide=0; |
|
137 |
_pc = _start+bci; |
|
138 |
} |
|
139 |
||
140 |
// ------------------------------------------------------------------ |
|
141 |
// ciBytecodeStream::force_bci |
|
142 |
void ciBytecodeStream::force_bci(int bci) { |
|
143 |
if (bci < 0) { |
|
144 |
reset_to_bci(0); |
|
145 |
_bc_start = _start + bci; |
|
146 |
_bc = EOBC(); |
|
147 |
} else { |
|
148 |
reset_to_bci(bci); |
|
149 |
next(); |
|
150 |
} |
|
151 |
} |
|
152 |
||
153 |
||
154 |
// ------------------------------------------------------------------ |
|
155 |
// Constant pool access |
|
156 |
// ------------------------------------------------------------------ |
|
157 |
||
158 |
// ------------------------------------------------------------------ |
|
159 |
// ciBytecodeStream::get_klass_index |
|
160 |
// |
|
161 |
// If this bytecodes references a klass, return the index of the |
|
162 |
// referenced klass. |
|
163 |
int ciBytecodeStream::get_klass_index() const { |
|
164 |
switch(cur_bc()) { |
|
165 |
case Bytecodes::_ldc: |
|
5688 | 166 |
return get_index_u1(); |
1 | 167 |
case Bytecodes::_ldc_w: |
168 |
case Bytecodes::_ldc2_w: |
|
169 |
case Bytecodes::_checkcast: |
|
170 |
case Bytecodes::_instanceof: |
|
171 |
case Bytecodes::_anewarray: |
|
172 |
case Bytecodes::_multianewarray: |
|
173 |
case Bytecodes::_new: |
|
174 |
case Bytecodes::_newarray: |
|
5688 | 175 |
return get_index_u2(); |
1 | 176 |
default: |
177 |
ShouldNotReachHere(); |
|
178 |
return 0; |
|
179 |
} |
|
180 |
} |
|
181 |
||
182 |
// ------------------------------------------------------------------ |
|
183 |
// ciBytecodeStream::get_klass |
|
184 |
// |
|
185 |
// If this bytecode is a new, newarray, multianewarray, instanceof, |
|
186 |
// or checkcast, get the referenced klass. |
|
187 |
ciKlass* ciBytecodeStream::get_klass(bool& will_link) { |
|
4567
7fc02fbe5c7a
6893268: additional dynamic language related optimizations in C2
twisti
parents:
4566
diff
changeset
|
188 |
VM_ENTRY_MARK; |
59056
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
53746
diff
changeset
|
189 |
constantPoolHandle cpool(THREAD, _method->get_Method()->constants()); |
4567
7fc02fbe5c7a
6893268: additional dynamic language related optimizations in C2
twisti
parents:
4566
diff
changeset
|
190 |
return CURRENT_ENV->get_klass_by_index(cpool, get_klass_index(), will_link, _holder); |
1 | 191 |
} |
192 |
||
193 |
// ------------------------------------------------------------------ |
|
5882 | 194 |
// ciBytecodeStream::get_constant_raw_index |
1 | 195 |
// |
196 |
// If this bytecode is one of the ldc variants, get the index of the |
|
197 |
// referenced constant. |
|
5882 | 198 |
int ciBytecodeStream::get_constant_raw_index() const { |
199 |
// work-alike for Bytecode_loadconstant::raw_index() |
|
200 |
switch (cur_bc()) { |
|
1 | 201 |
case Bytecodes::_ldc: |
5688 | 202 |
return get_index_u1(); |
1 | 203 |
case Bytecodes::_ldc_w: |
204 |
case Bytecodes::_ldc2_w: |
|
5688 | 205 |
return get_index_u2(); |
1 | 206 |
default: |
207 |
ShouldNotReachHere(); |
|
208 |
return 0; |
|
209 |
} |
|
210 |
} |
|
5882 | 211 |
|
212 |
// ------------------------------------------------------------------ |
|
213 |
// ciBytecodeStream::get_constant_pool_index |
|
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
13522
diff
changeset
|
214 |
// Decode any reference index into a regular pool index. |
5882 | 215 |
int ciBytecodeStream::get_constant_pool_index() const { |
216 |
// work-alike for Bytecode_loadconstant::pool_index() |
|
217 |
int index = get_constant_raw_index(); |
|
218 |
if (has_cache_index()) { |
|
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
13522
diff
changeset
|
219 |
VM_ENTRY_MARK; |
59056
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
53746
diff
changeset
|
220 |
constantPoolHandle cpool(THREAD, _method->get_Method()->constants()); |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
13522
diff
changeset
|
221 |
return cpool->object_to_cp_index(index); |
5882 | 222 |
} |
223 |
return index; |
|
224 |
} |
|
225 |
||
226 |
// ------------------------------------------------------------------ |
|
1 | 227 |
// ciBytecodeStream::get_constant |
228 |
// |
|
229 |
// If this bytecode is one of the ldc variants, get the referenced |
|
230 |
// constant. |
|
231 |
ciConstant ciBytecodeStream::get_constant() { |
|
5882 | 232 |
int pool_index = get_constant_raw_index(); |
233 |
int cache_index = -1; |
|
234 |
if (has_cache_index()) { |
|
235 |
cache_index = pool_index; |
|
236 |
pool_index = -1; |
|
237 |
} |
|
4567
7fc02fbe5c7a
6893268: additional dynamic language related optimizations in C2
twisti
parents:
4566
diff
changeset
|
238 |
VM_ENTRY_MARK; |
59056
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
53746
diff
changeset
|
239 |
constantPoolHandle cpool(THREAD, _method->get_Method()->constants()); |
5882 | 240 |
return CURRENT_ENV->get_constant_by_index(cpool, pool_index, cache_index, _holder); |
1 | 241 |
} |
242 |
||
243 |
// ------------------------------------------------------------------ |
|
5882 | 244 |
// ciBytecodeStream::get_constant_pool_tag |
245 |
// |
|
246 |
// If this bytecode is one of the ldc variants, get the referenced |
|
247 |
// constant. |
|
248 |
constantTag ciBytecodeStream::get_constant_pool_tag(int index) const { |
|
249 |
VM_ENTRY_MARK; |
|
50971
34872a21af82
8202769: jck test fails with C2: vm/jvmti/FollowReferences/fref001/fref00113/fref00113.html
psandoz
parents:
49449
diff
changeset
|
250 |
return _method->get_Method()->constants()->constant_tag_at(index); |
1 | 251 |
} |
252 |
||
253 |
// ------------------------------------------------------------------ |
|
254 |
// ciBytecodeStream::get_field_index |
|
255 |
// |
|
256 |
// If this is a field access bytecode, get the constant pool |
|
257 |
// index of the referenced field. |
|
258 |
int ciBytecodeStream::get_field_index() { |
|
259 |
assert(cur_bc() == Bytecodes::_getfield || |
|
260 |
cur_bc() == Bytecodes::_putfield || |
|
261 |
cur_bc() == Bytecodes::_getstatic || |
|
262 |
cur_bc() == Bytecodes::_putstatic, "wrong bc"); |
|
5688 | 263 |
return get_index_u2_cpcache(); |
1 | 264 |
} |
265 |
||
266 |
||
267 |
// ------------------------------------------------------------------ |
|
268 |
// ciBytecodeStream::get_field |
|
269 |
// |
|
270 |
// If this bytecode is one of get_field, get_static, put_field, |
|
271 |
// or put_static, get the referenced field. |
|
272 |
ciField* ciBytecodeStream::get_field(bool& will_link) { |
|
273 |
ciField* f = CURRENT_ENV->get_field_by_index(_holder, get_field_index()); |
|
39421
a9652c919db8
8157181: Compilers accept modification of final fields outside initializer methods
zmajo
parents:
38309
diff
changeset
|
274 |
will_link = f->will_link(_method, _bc); |
1 | 275 |
return f; |
276 |
} |
|
277 |
||
278 |
||
279 |
// ------------------------------------------------------------------ |
|
280 |
// ciBytecodeStream::get_declared_field_holder |
|
281 |
// |
|
282 |
// Get the declared holder of the currently referenced field. |
|
283 |
// |
|
284 |
// Usage note: the holder() of a ciField class returns the canonical |
|
285 |
// holder of the field, rather than the holder declared in the |
|
286 |
// bytecodes. |
|
287 |
// |
|
288 |
// There is no "will_link" result passed back. The user is responsible |
|
289 |
// for checking linkability when retrieving the associated field. |
|
290 |
ciInstanceKlass* ciBytecodeStream::get_declared_field_holder() { |
|
4567
7fc02fbe5c7a
6893268: additional dynamic language related optimizations in C2
twisti
parents:
4566
diff
changeset
|
291 |
VM_ENTRY_MARK; |
59056
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
53746
diff
changeset
|
292 |
constantPoolHandle cpool(THREAD, _method->get_Method()->constants()); |
1 | 293 |
int holder_index = get_field_holder_index(); |
294 |
bool ignore; |
|
4567
7fc02fbe5c7a
6893268: additional dynamic language related optimizations in C2
twisti
parents:
4566
diff
changeset
|
295 |
return CURRENT_ENV->get_klass_by_index(cpool, holder_index, ignore, _holder) |
1 | 296 |
->as_instance_klass(); |
297 |
} |
|
298 |
||
299 |
// ------------------------------------------------------------------ |
|
300 |
// ciBytecodeStream::get_field_holder_index |
|
301 |
// |
|
302 |
// Get the constant pool index of the declared holder of the field |
|
303 |
// referenced by the current bytecode. Used for generating |
|
304 |
// deoptimization information. |
|
305 |
int ciBytecodeStream::get_field_holder_index() { |
|
4567
7fc02fbe5c7a
6893268: additional dynamic language related optimizations in C2
twisti
parents:
4566
diff
changeset
|
306 |
GUARDED_VM_ENTRY( |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
13522
diff
changeset
|
307 |
ConstantPool* cpool = _holder->get_instanceKlass()->constants(); |
4567
7fc02fbe5c7a
6893268: additional dynamic language related optimizations in C2
twisti
parents:
4566
diff
changeset
|
308 |
return cpool->klass_ref_index_at(get_field_index()); |
7fc02fbe5c7a
6893268: additional dynamic language related optimizations in C2
twisti
parents:
4566
diff
changeset
|
309 |
) |
1 | 310 |
} |
311 |
||
312 |
// ------------------------------------------------------------------ |
|
313 |
// ciBytecodeStream::get_method_index |
|
314 |
// |
|
315 |
// If this is a method invocation bytecode, get the constant pool |
|
316 |
// index of the invoked method. |
|
317 |
int ciBytecodeStream::get_method_index() { |
|
53595 | 318 |
assert(Bytecodes::is_invoke(cur_bc()), "invalid bytecode: %s", Bytecodes::name(cur_bc())); |
5688 | 319 |
if (has_index_u4()) |
320 |
return get_index_u4(); // invokedynamic |
|
321 |
return get_index_u2_cpcache(); |
|
1 | 322 |
} |
323 |
||
324 |
// ------------------------------------------------------------------ |
|
325 |
// ciBytecodeStream::get_method |
|
326 |
// |
|
327 |
// If this is a method invocation bytecode, get the invoked method. |
|
13522
5ad4627e792a
7192406: JSR 292: C2 needs exact return type information for invokedynamic and invokehandle call sites
twisti
parents:
13391
diff
changeset
|
328 |
// Additionally return the declared signature to get more concrete |
5ad4627e792a
7192406: JSR 292: C2 needs exact return type information for invokedynamic and invokehandle call sites
twisti
parents:
13391
diff
changeset
|
329 |
// type information if required (Cf. invokedynamic and invokehandle). |
5ad4627e792a
7192406: JSR 292: C2 needs exact return type information for invokedynamic and invokehandle call sites
twisti
parents:
13391
diff
changeset
|
330 |
ciMethod* ciBytecodeStream::get_method(bool& will_link, ciSignature* *declared_signature_result) { |
4567
7fc02fbe5c7a
6893268: additional dynamic language related optimizations in C2
twisti
parents:
4566
diff
changeset
|
331 |
VM_ENTRY_MARK; |
13522
5ad4627e792a
7192406: JSR 292: C2 needs exact return type information for invokedynamic and invokehandle call sites
twisti
parents:
13391
diff
changeset
|
332 |
ciEnv* env = CURRENT_ENV; |
38309
9b8e9c373740
8155951: VM crash in nsk/jvmti/RedefineClasses/StressRedefine: assert failed: Corrupted constant pool
coleenp
parents:
31046
diff
changeset
|
333 |
constantPoolHandle cpool(THREAD, _method->get_Method()->constants()); |
13522
5ad4627e792a
7192406: JSR 292: C2 needs exact return type information for invokedynamic and invokehandle call sites
twisti
parents:
13391
diff
changeset
|
334 |
ciMethod* m = env->get_method_by_index(cpool, get_method_index(), cur_bc(), _holder); |
1 | 335 |
will_link = m->is_loaded(); |
13929
8da0dc50a6e4
7200949: JSR 292: rubybench/bench/time/bench_base64.rb fails with jruby.jar not on boot class path
twisti
parents:
13728
diff
changeset
|
336 |
|
53746
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
337 |
// Use the signature stored in the CP cache to create a signature |
13929
8da0dc50a6e4
7200949: JSR 292: rubybench/bench/time/bench_base64.rb fails with jruby.jar not on boot class path
twisti
parents:
13728
diff
changeset
|
338 |
// with correct types (in respect to class loaders). |
53746
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
339 |
// |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
340 |
// In classic Java (before Java 7) there is never the slightest |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
341 |
// difference between the signature at the call site and that of the |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
342 |
// method. Such a difference would have been a type error in the |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
343 |
// JVM. |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
344 |
// |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
345 |
// Now there are a few circumstances where the signature of a call |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
346 |
// site (which controls the outgoing stacked arguments) can differ |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
347 |
// from the signature of the method (which controls the receipt of |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
348 |
// those arguments at the method entry point). |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
349 |
// |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
350 |
// A. The signatures can differ if the callee is a static method and |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
351 |
// the caller thinks it is calling a non-static method (VH.get). |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
352 |
// This requires the method signature to have an explicit leading |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
353 |
// argument for the implicit 'this', not present at the call site. |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
354 |
// |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
355 |
// B. The call site can have less specific parameter types than the |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
356 |
// method, allowing loosely-typed code to handle strongly-typed |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
357 |
// methods. This happens with linkToStatic and related linker |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
358 |
// commands. Obviously the loosely-typed code has to ensure that |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
359 |
// the strongly typed method's invariants are respected, and this is |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
360 |
// done by issuing dynamic casts. |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
361 |
// |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
362 |
// C. The call site can have more specific parameter types than the |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
363 |
// method, allowing loosely-typed methods to handle strongly-typed |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
364 |
// requests. |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
365 |
// |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
366 |
// D. There are corresponding effects with return values, such as |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
367 |
// boolean method returning an int to an int-receiving call site, |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
368 |
// even though the method thought it returned just a boolean. |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
369 |
// |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
370 |
// E. The calling sequence at a particular call site may add an |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
371 |
// "appendix" argument not mentioned in the call site signature. It |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
372 |
// is expected by the method signature, though, and this adds to the |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
373 |
// method's arity, even after 'this' parameter effects (A) are |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
374 |
// discounted. Appendixes are used by invokehandle and |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
375 |
// invokedynamic instructions. |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
376 |
// |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
377 |
// F. A linker method (linkToStatic, etc.) can also take an extra |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
378 |
// argument, a MemberName which routes the call to a concrete |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
379 |
// strongly-typed method. In this case the linker method may also |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
380 |
// differ in any of the ways A-D. The eventual method will ignore |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
381 |
// the presence of the extra argument. |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
382 |
// |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
383 |
// None of these changes to calling sequences requires an argument |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
384 |
// to be moved or reformatted in any way. This works because all |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
385 |
// references look alike to the JVM, as do all primitives (except |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
386 |
// float/long/double). Another required property of the JVM is |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
387 |
// that, if a trailing argument is added or dropped, the placement |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
388 |
// of other arguments does not change. This allows cases E and F to |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
389 |
// work smoothly, against without any moving or reformatting, |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
390 |
// despite the arity change. |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
391 |
// |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
392 |
if (has_local_signature()) { |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
393 |
Symbol* local_signature = cpool->symbol_at(get_method_signature_index(cpool)); |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
394 |
ciSymbol* sig_sym = env->get_symbol(local_signature); |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
395 |
ciKlass* pool_holder = env->get_klass(cpool->pool_holder()); |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
396 |
ciSignature* call_site_sig = new (env->arena()) ciSignature(pool_holder, cpool, sig_sym); |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
397 |
// Examples of how the call site signature can differ from the method's own signature: |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
398 |
// |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
399 |
// meth = static jboolean java.lang.invoke.VarHandleGuards.guard_LII_Z(jobject, jobject, jint, jint, jobject) |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
400 |
// msig = (Ljava/lang/invoke/VarHandle;Ljava/lang/Object;IILjava/lang/invoke/VarHandle$AccessDescriptor;)Z |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
401 |
// call = (Ljava/util/concurrent/locks/AbstractQueuedSynchronizer;II)Z |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
402 |
// |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
403 |
// meth = static jobject java.lang.invoke.LambdaForm$MH/0x0000000800066840.linkToTargetMethod(jobject, jobject) |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
404 |
// msig = (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
405 |
// call = (Ljava/lang/String;)Ljava/util/function/Predicate; |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
406 |
// |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
407 |
(*declared_signature_result) = call_site_sig; |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
408 |
|
13522
5ad4627e792a
7192406: JSR 292: C2 needs exact return type information for invokedynamic and invokehandle call sites
twisti
parents:
13391
diff
changeset
|
409 |
} else { |
53746
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
410 |
// We can just use the method's own signature. It may differ from the call site, but not by much. |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
411 |
// |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
412 |
// Examples of how the call site signature can differ from the method's signature: |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
413 |
// |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
414 |
// meth = static final native jint java.lang.invoke.MethodHandle.linkToStatic(jobject, jobject, jint, jint, jobject) |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
415 |
// msig = (Ljava/lang/Object;Ljava/lang/Object;IILjava/lang/invoke/MemberName;)I |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
416 |
// call = (Ljava/lang/invoke/VarHandle;Ljava/lang/Object;IILjava/lang/invoke/MemberName;)Z |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
417 |
// |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
418 |
// meth = final native jint java.lang.invoke.MethodHandle.invokeBasic(jobject, jobject, jint, jint) |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
419 |
// msig = (Ljava/lang/Object;Ljava/lang/Object;II)I |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
420 |
// call = (Ljava/lang/invoke/VarHandle;Ljava/lang/Object;II)Z |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
421 |
// |
13522
5ad4627e792a
7192406: JSR 292: C2 needs exact return type information for invokedynamic and invokehandle call sites
twisti
parents:
13391
diff
changeset
|
422 |
(*declared_signature_result) = m->signature(); |
5ad4627e792a
7192406: JSR 292: C2 needs exact return type information for invokedynamic and invokehandle call sites
twisti
parents:
13391
diff
changeset
|
423 |
} |
1 | 424 |
return m; |
425 |
} |
|
426 |
||
427 |
// ------------------------------------------------------------------ |
|
13391
30245956af37
7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents:
8676
diff
changeset
|
428 |
// ciBytecodeStream::has_appendix |
30245956af37
7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents:
8676
diff
changeset
|
429 |
// |
30245956af37
7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents:
8676
diff
changeset
|
430 |
// Returns true if there is an appendix argument stored in the |
30245956af37
7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents:
8676
diff
changeset
|
431 |
// constant pool cache at the current bci. |
30245956af37
7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents:
8676
diff
changeset
|
432 |
bool ciBytecodeStream::has_appendix() { |
30245956af37
7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents:
8676
diff
changeset
|
433 |
VM_ENTRY_MARK; |
59056
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
53746
diff
changeset
|
434 |
constantPoolHandle cpool(THREAD, _method->get_Method()->constants()); |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
13522
diff
changeset
|
435 |
return ConstantPool::has_appendix_at_if_loaded(cpool, get_method_index()); |
13391
30245956af37
7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents:
8676
diff
changeset
|
436 |
} |
30245956af37
7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents:
8676
diff
changeset
|
437 |
|
30245956af37
7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents:
8676
diff
changeset
|
438 |
// ------------------------------------------------------------------ |
30245956af37
7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents:
8676
diff
changeset
|
439 |
// ciBytecodeStream::get_appendix |
30245956af37
7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents:
8676
diff
changeset
|
440 |
// |
30245956af37
7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents:
8676
diff
changeset
|
441 |
// Return the appendix argument stored in the constant pool cache at |
30245956af37
7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents:
8676
diff
changeset
|
442 |
// the current bci. |
30245956af37
7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents:
8676
diff
changeset
|
443 |
ciObject* ciBytecodeStream::get_appendix() { |
30245956af37
7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents:
8676
diff
changeset
|
444 |
VM_ENTRY_MARK; |
59056
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
53746
diff
changeset
|
445 |
constantPoolHandle cpool(THREAD, _method->get_Method()->constants()); |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
13522
diff
changeset
|
446 |
oop appendix_oop = ConstantPool::appendix_at_if_loaded(cpool, get_method_index()); |
13391
30245956af37
7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents:
8676
diff
changeset
|
447 |
return CURRENT_ENV->get_object(appendix_oop); |
30245956af37
7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents:
8676
diff
changeset
|
448 |
} |
30245956af37
7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents:
8676
diff
changeset
|
449 |
|
30245956af37
7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents:
8676
diff
changeset
|
450 |
// ------------------------------------------------------------------ |
53746
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
451 |
// ciBytecodeStream::has_local_signature |
13929
8da0dc50a6e4
7200949: JSR 292: rubybench/bench/time/bench_base64.rb fails with jruby.jar not on boot class path
twisti
parents:
13728
diff
changeset
|
452 |
// |
53746
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
453 |
// Returns true if the method stored in the constant |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
454 |
// pool cache at the current bci has a local signature. |
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
455 |
bool ciBytecodeStream::has_local_signature() { |
13929
8da0dc50a6e4
7200949: JSR 292: rubybench/bench/time/bench_base64.rb fails with jruby.jar not on boot class path
twisti
parents:
13728
diff
changeset
|
456 |
GUARDED_VM_ENTRY( |
59056
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
53746
diff
changeset
|
457 |
constantPoolHandle cpool(Thread::current(), _method->get_Method()->constants()); |
53746
bdccafc038a2
8217998: Remove method_type field associated with the appendix field of an indy or method handle call
lfoltan
parents:
53595
diff
changeset
|
458 |
return ConstantPool::has_local_signature_at_if_loaded(cpool, get_method_index()); |
13929
8da0dc50a6e4
7200949: JSR 292: rubybench/bench/time/bench_base64.rb fails with jruby.jar not on boot class path
twisti
parents:
13728
diff
changeset
|
459 |
) |
8da0dc50a6e4
7200949: JSR 292: rubybench/bench/time/bench_base64.rb fails with jruby.jar not on boot class path
twisti
parents:
13728
diff
changeset
|
460 |
} |
8da0dc50a6e4
7200949: JSR 292: rubybench/bench/time/bench_base64.rb fails with jruby.jar not on boot class path
twisti
parents:
13728
diff
changeset
|
461 |
|
8da0dc50a6e4
7200949: JSR 292: rubybench/bench/time/bench_base64.rb fails with jruby.jar not on boot class path
twisti
parents:
13728
diff
changeset
|
462 |
// ------------------------------------------------------------------ |
1 | 463 |
// ciBytecodeStream::get_declared_method_holder |
464 |
// |
|
465 |
// Get the declared holder of the currently referenced method. |
|
466 |
// |
|
467 |
// Usage note: the holder() of a ciMethod class returns the canonical |
|
468 |
// holder of the method, rather than the holder declared in the |
|
469 |
// bytecodes. |
|
470 |
// |
|
471 |
// There is no "will_link" result passed back. The user is responsible |
|
472 |
// for checking linkability when retrieving the associated method. |
|
473 |
ciKlass* ciBytecodeStream::get_declared_method_holder() { |
|
4567
7fc02fbe5c7a
6893268: additional dynamic language related optimizations in C2
twisti
parents:
4566
diff
changeset
|
474 |
VM_ENTRY_MARK; |
59056
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
53746
diff
changeset
|
475 |
constantPoolHandle cpool(THREAD, _method->get_Method()->constants()); |
1 | 476 |
bool ignore; |
13391
30245956af37
7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents:
8676
diff
changeset
|
477 |
// report as MethodHandle for invokedynamic, which is syntactically classless |
2570
ecc7862946d4
6655646: dynamic languages need dynamically linked call sites
jrose
parents:
1
diff
changeset
|
478 |
if (cur_bc() == Bytecodes::_invokedynamic) |
13391
30245956af37
7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents:
8676
diff
changeset
|
479 |
return CURRENT_ENV->get_klass_by_name(_holder, ciSymbol::java_lang_invoke_MethodHandle(), false); |
4567
7fc02fbe5c7a
6893268: additional dynamic language related optimizations in C2
twisti
parents:
4566
diff
changeset
|
480 |
return CURRENT_ENV->get_klass_by_index(cpool, get_method_holder_index(), ignore, _holder); |
1 | 481 |
} |
482 |
||
483 |
// ------------------------------------------------------------------ |
|
484 |
// ciBytecodeStream::get_method_holder_index |
|
485 |
// |
|
486 |
// Get the constant pool index of the declared holder of the method |
|
487 |
// referenced by the current bytecode. Used for generating |
|
488 |
// deoptimization information. |
|
489 |
int ciBytecodeStream::get_method_holder_index() { |
|
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
13522
diff
changeset
|
490 |
ConstantPool* cpool = _method->get_Method()->constants(); |
1 | 491 |
return cpool->klass_ref_index_at(get_method_index()); |
492 |
} |
|
493 |
||
494 |
// ------------------------------------------------------------------ |
|
495 |
// ciBytecodeStream::get_method_signature_index |
|
496 |
// |
|
497 |
// Get the constant pool index of the signature of the method |
|
498 |
// referenced by the current bytecode. Used for generating |
|
499 |
// deoptimization information. |
|
38309
9b8e9c373740
8155951: VM crash in nsk/jvmti/RedefineClasses/StressRedefine: assert failed: Corrupted constant pool
coleenp
parents:
31046
diff
changeset
|
500 |
int ciBytecodeStream::get_method_signature_index(const constantPoolHandle& cpool) { |
13522
5ad4627e792a
7192406: JSR 292: C2 needs exact return type information for invokedynamic and invokehandle call sites
twisti
parents:
13391
diff
changeset
|
501 |
GUARDED_VM_ENTRY( |
5ad4627e792a
7192406: JSR 292: C2 needs exact return type information for invokedynamic and invokehandle call sites
twisti
parents:
13391
diff
changeset
|
502 |
const int method_index = get_method_index(); |
5ad4627e792a
7192406: JSR 292: C2 needs exact return type information for invokedynamic and invokehandle call sites
twisti
parents:
13391
diff
changeset
|
503 |
const int name_and_type_index = cpool->name_and_type_ref_index_at(method_index); |
5ad4627e792a
7192406: JSR 292: C2 needs exact return type information for invokedynamic and invokehandle call sites
twisti
parents:
13391
diff
changeset
|
504 |
return cpool->signature_ref_index_at(name_and_type_index); |
5ad4627e792a
7192406: JSR 292: C2 needs exact return type information for invokedynamic and invokehandle call sites
twisti
parents:
13391
diff
changeset
|
505 |
) |
1 | 506 |
} |
4566
b363f6ef4068
6829187: compiler optimizations required for JSR 292
twisti
parents:
4564
diff
changeset
|
507 |