src/share/vm/ci/ciStreams.cpp

Tue, 18 Jun 2013 12:31:07 -0700

author
johnc
date
Tue, 18 Jun 2013 12:31:07 -0700
changeset 5277
01522ca68fc7
parent 4133
f6b0eb4e44cf
child 6876
710a3c8b516e
child 9745
0e3d6188f198
permissions
-rw-r--r--

8015237: Parallelize string table scanning during strong root processing
Summary: Parallelize the scanning of the intern string table by having each GC worker claim a given number of buckets. Changes were also reviewed by Per Liden <per.liden@oracle.com>.
Reviewed-by: tschatzl, stefank, twisti

duke@435 1 /*
coleenp@4037 2 * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
duke@435 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@435 4 *
duke@435 5 * This code is free software; you can redistribute it and/or modify it
duke@435 6 * under the terms of the GNU General Public License version 2 only, as
duke@435 7 * published by the Free Software Foundation.
duke@435 8 *
duke@435 9 * This code is distributed in the hope that it will be useful, but WITHOUT
duke@435 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@435 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@435 12 * version 2 for more details (a copy is included in the LICENSE file that
duke@435 13 * accompanied this code).
duke@435 14 *
duke@435 15 * You should have received a copy of the GNU General Public License version
duke@435 16 * 2 along with this work; if not, write to the Free Software Foundation,
duke@435 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@435 18 *
trims@1907 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
trims@1907 20 * or visit www.oracle.com if you need additional information or have any
trims@1907 21 * questions.
duke@435 22 *
duke@435 23 */
duke@435 24
stefank@2314 25 #include "precompiled.hpp"
stefank@2314 26 #include "ci/ciCallSite.hpp"
stefank@2314 27 #include "ci/ciConstant.hpp"
stefank@2314 28 #include "ci/ciField.hpp"
stefank@2314 29 #include "ci/ciStreams.hpp"
stefank@2314 30 #include "ci/ciUtilities.hpp"
duke@435 31
duke@435 32 // ciExceptionHandlerStream
duke@435 33 //
duke@435 34 // Walk over some selected set of a methods exception handlers.
duke@435 35
duke@435 36 // ------------------------------------------------------------------
duke@435 37 // ciExceptionHandlerStream::count
duke@435 38 //
duke@435 39 // How many exception handlers are there in this stream?
duke@435 40 //
duke@435 41 // Implementation note: Compiler2 needs this functionality, so I had
duke@435 42 int ciExceptionHandlerStream::count() {
duke@435 43 int save_pos = _pos;
duke@435 44 int save_end = _end;
duke@435 45
duke@435 46 int count = 0;
duke@435 47
duke@435 48 _pos = -1;
duke@435 49 _end = _method->_handler_count;
duke@435 50
duke@435 51
duke@435 52 next();
duke@435 53 while (!is_done()) {
duke@435 54 count++;
duke@435 55 next();
duke@435 56 }
duke@435 57
duke@435 58 _pos = save_pos;
duke@435 59 _end = save_end;
duke@435 60
duke@435 61 return count;
duke@435 62 }
duke@435 63
duke@435 64 int ciExceptionHandlerStream::count_remaining() {
duke@435 65 int save_pos = _pos;
duke@435 66 int save_end = _end;
duke@435 67
duke@435 68 int count = 0;
duke@435 69
duke@435 70 while (!is_done()) {
duke@435 71 count++;
duke@435 72 next();
duke@435 73 }
duke@435 74
duke@435 75 _pos = save_pos;
duke@435 76 _end = save_end;
duke@435 77
duke@435 78 return count;
duke@435 79 }
duke@435 80
duke@435 81 // ciBytecodeStream
duke@435 82 //
duke@435 83 // The class is used to iterate over the bytecodes of a method.
duke@435 84 // It hides the details of constant pool structure/access by
duke@435 85 // providing accessors for constant pool items.
duke@435 86
duke@435 87 // ------------------------------------------------------------------
jrose@1920 88 // ciBytecodeStream::next_wide_or_table
duke@435 89 //
duke@435 90 // Special handling for switch ops
jrose@1920 91 Bytecodes::Code ciBytecodeStream::next_wide_or_table(Bytecodes::Code bc) {
jrose@1920 92 switch (bc) { // Check for special bytecode handling
jrose@1920 93 case Bytecodes::_wide:
jrose@1920 94 // Special handling for the wide bytcode
jrose@1920 95 // Get following bytecode; do not return wide
jrose@1920 96 assert(Bytecodes::Code(_pc[0]) == Bytecodes::_wide, "");
jrose@1920 97 bc = Bytecodes::java_code(_raw_bc = (Bytecodes::Code)_pc[1]);
jrose@1920 98 assert(Bytecodes::wide_length_for(bc) > 2, "must make progress");
jrose@1920 99 _pc += Bytecodes::wide_length_for(bc);
jrose@1920 100 _was_wide = _pc; // Flag last wide bytecode found
jrose@1920 101 assert(is_wide(), "accessor works right");
jrose@1920 102 break;
duke@435 103
duke@435 104 case Bytecodes::_lookupswitch:
duke@435 105 _pc++; // Skip wide bytecode
duke@435 106 _pc += (_start-_pc)&3; // Word align
duke@435 107 _table_base = (jint*)_pc; // Capture for later usage
duke@435 108 // table_base[0] is default far_dest
duke@435 109 // Table has 2 lead elements (default, length), then pairs of u4 values.
duke@435 110 // So load table length, and compute address at end of table
duke@435 111 _pc = (address)&_table_base[2+ 2*Bytes::get_Java_u4((address)&_table_base[1])];
duke@435 112 break;
duke@435 113
duke@435 114 case Bytecodes::_tableswitch: {
duke@435 115 _pc++; // Skip wide bytecode
duke@435 116 _pc += (_start-_pc)&3; // Word align
duke@435 117 _table_base = (jint*)_pc; // Capture for later usage
duke@435 118 // table_base[0] is default far_dest
duke@435 119 int lo = Bytes::get_Java_u4((address)&_table_base[1]);// Low bound
duke@435 120 int hi = Bytes::get_Java_u4((address)&_table_base[2]);// High bound
duke@435 121 int len = hi - lo + 1; // Dense table size
duke@435 122 _pc = (address)&_table_base[3+len]; // Skip past table
duke@435 123 break;
duke@435 124 }
duke@435 125
duke@435 126 default:
duke@435 127 fatal("unhandled bytecode");
duke@435 128 }
duke@435 129 return bc;
duke@435 130 }
duke@435 131
duke@435 132 // ------------------------------------------------------------------
duke@435 133 // ciBytecodeStream::reset_to_bci
duke@435 134 void ciBytecodeStream::reset_to_bci( int bci ) {
duke@435 135 _bc_start=_was_wide=0;
duke@435 136 _pc = _start+bci;
duke@435 137 }
duke@435 138
duke@435 139 // ------------------------------------------------------------------
duke@435 140 // ciBytecodeStream::force_bci
duke@435 141 void ciBytecodeStream::force_bci(int bci) {
duke@435 142 if (bci < 0) {
duke@435 143 reset_to_bci(0);
duke@435 144 _bc_start = _start + bci;
duke@435 145 _bc = EOBC();
duke@435 146 } else {
duke@435 147 reset_to_bci(bci);
duke@435 148 next();
duke@435 149 }
duke@435 150 }
duke@435 151
duke@435 152
duke@435 153 // ------------------------------------------------------------------
duke@435 154 // Constant pool access
duke@435 155 // ------------------------------------------------------------------
duke@435 156
duke@435 157 // ------------------------------------------------------------------
duke@435 158 // ciBytecodeStream::get_klass_index
duke@435 159 //
duke@435 160 // If this bytecodes references a klass, return the index of the
duke@435 161 // referenced klass.
duke@435 162 int ciBytecodeStream::get_klass_index() const {
duke@435 163 switch(cur_bc()) {
duke@435 164 case Bytecodes::_ldc:
jrose@1920 165 return get_index_u1();
duke@435 166 case Bytecodes::_ldc_w:
duke@435 167 case Bytecodes::_ldc2_w:
duke@435 168 case Bytecodes::_checkcast:
duke@435 169 case Bytecodes::_instanceof:
duke@435 170 case Bytecodes::_anewarray:
duke@435 171 case Bytecodes::_multianewarray:
duke@435 172 case Bytecodes::_new:
duke@435 173 case Bytecodes::_newarray:
jrose@1920 174 return get_index_u2();
duke@435 175 default:
duke@435 176 ShouldNotReachHere();
duke@435 177 return 0;
duke@435 178 }
duke@435 179 }
duke@435 180
duke@435 181 // ------------------------------------------------------------------
duke@435 182 // ciBytecodeStream::get_klass
duke@435 183 //
duke@435 184 // If this bytecode is a new, newarray, multianewarray, instanceof,
duke@435 185 // or checkcast, get the referenced klass.
duke@435 186 ciKlass* ciBytecodeStream::get_klass(bool& will_link) {
twisti@1573 187 VM_ENTRY_MARK;
coleenp@4037 188 constantPoolHandle cpool(_method->get_Method()->constants());
twisti@1573 189 return CURRENT_ENV->get_klass_by_index(cpool, get_klass_index(), will_link, _holder);
duke@435 190 }
duke@435 191
duke@435 192 // ------------------------------------------------------------------
jrose@1957 193 // ciBytecodeStream::get_constant_raw_index
duke@435 194 //
duke@435 195 // If this bytecode is one of the ldc variants, get the index of the
duke@435 196 // referenced constant.
jrose@1957 197 int ciBytecodeStream::get_constant_raw_index() const {
jrose@1957 198 // work-alike for Bytecode_loadconstant::raw_index()
jrose@1957 199 switch (cur_bc()) {
duke@435 200 case Bytecodes::_ldc:
jrose@1920 201 return get_index_u1();
duke@435 202 case Bytecodes::_ldc_w:
duke@435 203 case Bytecodes::_ldc2_w:
jrose@1920 204 return get_index_u2();
duke@435 205 default:
duke@435 206 ShouldNotReachHere();
duke@435 207 return 0;
duke@435 208 }
duke@435 209 }
jrose@1957 210
jrose@1957 211 // ------------------------------------------------------------------
jrose@1957 212 // ciBytecodeStream::get_constant_pool_index
coleenp@4037 213 // Decode any reference index into a regular pool index.
jrose@1957 214 int ciBytecodeStream::get_constant_pool_index() const {
jrose@1957 215 // work-alike for Bytecode_loadconstant::pool_index()
jrose@1957 216 int index = get_constant_raw_index();
jrose@1957 217 if (has_cache_index()) {
coleenp@4037 218 VM_ENTRY_MARK;
coleenp@4037 219 constantPoolHandle cpool(_method->get_Method()->constants());
coleenp@4037 220 return cpool->object_to_cp_index(index);
jrose@1957 221 }
jrose@1957 222 return index;
jrose@1957 223 }
jrose@1957 224
jrose@1957 225 // ------------------------------------------------------------------
jrose@1957 226 // ciBytecodeStream::get_constant_cache_index
jrose@1957 227 // Return the CP cache index, or -1 if there isn't any.
jrose@1957 228 int ciBytecodeStream::get_constant_cache_index() const {
jrose@1957 229 // work-alike for Bytecode_loadconstant::cache_index()
jrose@1957 230 return has_cache_index() ? get_constant_raw_index() : -1;
jrose@1957 231 }
jrose@1957 232
duke@435 233 // ------------------------------------------------------------------
duke@435 234 // ciBytecodeStream::get_constant
duke@435 235 //
duke@435 236 // If this bytecode is one of the ldc variants, get the referenced
duke@435 237 // constant.
duke@435 238 ciConstant ciBytecodeStream::get_constant() {
jrose@1957 239 int pool_index = get_constant_raw_index();
jrose@1957 240 int cache_index = -1;
jrose@1957 241 if (has_cache_index()) {
jrose@1957 242 cache_index = pool_index;
jrose@1957 243 pool_index = -1;
jrose@1957 244 }
twisti@1573 245 VM_ENTRY_MARK;
coleenp@4037 246 constantPoolHandle cpool(_method->get_Method()->constants());
jrose@1957 247 return CURRENT_ENV->get_constant_by_index(cpool, pool_index, cache_index, _holder);
duke@435 248 }
duke@435 249
duke@435 250 // ------------------------------------------------------------------
jrose@1957 251 // ciBytecodeStream::get_constant_pool_tag
jrose@1957 252 //
jrose@1957 253 // If this bytecode is one of the ldc variants, get the referenced
jrose@1957 254 // constant.
jrose@1957 255 constantTag ciBytecodeStream::get_constant_pool_tag(int index) const {
jrose@1957 256 VM_ENTRY_MARK;
coleenp@4037 257 return _method->get_Method()->constants()->tag_at(index);
duke@435 258 }
duke@435 259
duke@435 260 // ------------------------------------------------------------------
duke@435 261 // ciBytecodeStream::get_field_index
duke@435 262 //
duke@435 263 // If this is a field access bytecode, get the constant pool
duke@435 264 // index of the referenced field.
duke@435 265 int ciBytecodeStream::get_field_index() {
duke@435 266 assert(cur_bc() == Bytecodes::_getfield ||
duke@435 267 cur_bc() == Bytecodes::_putfield ||
duke@435 268 cur_bc() == Bytecodes::_getstatic ||
duke@435 269 cur_bc() == Bytecodes::_putstatic, "wrong bc");
jrose@1920 270 return get_index_u2_cpcache();
duke@435 271 }
duke@435 272
duke@435 273
duke@435 274 // ------------------------------------------------------------------
duke@435 275 // ciBytecodeStream::get_field
duke@435 276 //
duke@435 277 // If this bytecode is one of get_field, get_static, put_field,
duke@435 278 // or put_static, get the referenced field.
duke@435 279 ciField* ciBytecodeStream::get_field(bool& will_link) {
duke@435 280 ciField* f = CURRENT_ENV->get_field_by_index(_holder, get_field_index());
duke@435 281 will_link = f->will_link(_holder, _bc);
duke@435 282 return f;
duke@435 283 }
duke@435 284
duke@435 285
duke@435 286 // ------------------------------------------------------------------
duke@435 287 // ciBytecodeStream::get_declared_field_holder
duke@435 288 //
duke@435 289 // Get the declared holder of the currently referenced field.
duke@435 290 //
duke@435 291 // Usage note: the holder() of a ciField class returns the canonical
duke@435 292 // holder of the field, rather than the holder declared in the
duke@435 293 // bytecodes.
duke@435 294 //
duke@435 295 // There is no "will_link" result passed back. The user is responsible
duke@435 296 // for checking linkability when retrieving the associated field.
duke@435 297 ciInstanceKlass* ciBytecodeStream::get_declared_field_holder() {
twisti@1573 298 VM_ENTRY_MARK;
coleenp@4037 299 constantPoolHandle cpool(_method->get_Method()->constants());
duke@435 300 int holder_index = get_field_holder_index();
duke@435 301 bool ignore;
twisti@1573 302 return CURRENT_ENV->get_klass_by_index(cpool, holder_index, ignore, _holder)
duke@435 303 ->as_instance_klass();
duke@435 304 }
duke@435 305
duke@435 306 // ------------------------------------------------------------------
duke@435 307 // ciBytecodeStream::get_field_holder_index
duke@435 308 //
duke@435 309 // Get the constant pool index of the declared holder of the field
duke@435 310 // referenced by the current bytecode. Used for generating
duke@435 311 // deoptimization information.
duke@435 312 int ciBytecodeStream::get_field_holder_index() {
twisti@1573 313 GUARDED_VM_ENTRY(
coleenp@4037 314 ConstantPool* cpool = _holder->get_instanceKlass()->constants();
twisti@1573 315 return cpool->klass_ref_index_at(get_field_index());
twisti@1573 316 )
duke@435 317 }
duke@435 318
duke@435 319 // ------------------------------------------------------------------
duke@435 320 // ciBytecodeStream::get_field_signature_index
duke@435 321 //
duke@435 322 // Get the constant pool index of the signature of the field
duke@435 323 // referenced by the current bytecode. Used for generating
duke@435 324 // deoptimization information.
duke@435 325 int ciBytecodeStream::get_field_signature_index() {
duke@435 326 VM_ENTRY_MARK;
coleenp@4037 327 ConstantPool* cpool = _holder->get_instanceKlass()->constants();
duke@435 328 int nt_index = cpool->name_and_type_ref_index_at(get_field_index());
duke@435 329 return cpool->signature_ref_index_at(nt_index);
duke@435 330 }
duke@435 331
duke@435 332 // ------------------------------------------------------------------
duke@435 333 // ciBytecodeStream::get_method_index
duke@435 334 //
duke@435 335 // If this is a method invocation bytecode, get the constant pool
duke@435 336 // index of the invoked method.
duke@435 337 int ciBytecodeStream::get_method_index() {
jrose@1161 338 #ifdef ASSERT
duke@435 339 switch (cur_bc()) {
duke@435 340 case Bytecodes::_invokeinterface:
duke@435 341 case Bytecodes::_invokevirtual:
duke@435 342 case Bytecodes::_invokespecial:
duke@435 343 case Bytecodes::_invokestatic:
jrose@1161 344 case Bytecodes::_invokedynamic:
jrose@1161 345 break;
duke@435 346 default:
duke@435 347 ShouldNotReachHere();
duke@435 348 }
jrose@1161 349 #endif
jrose@1920 350 if (has_index_u4())
jrose@1920 351 return get_index_u4(); // invokedynamic
jrose@1920 352 return get_index_u2_cpcache();
duke@435 353 }
duke@435 354
duke@435 355 // ------------------------------------------------------------------
duke@435 356 // ciBytecodeStream::get_method
duke@435 357 //
duke@435 358 // If this is a method invocation bytecode, get the invoked method.
twisti@4021 359 // Additionally return the declared signature to get more concrete
twisti@4021 360 // type information if required (Cf. invokedynamic and invokehandle).
twisti@4021 361 ciMethod* ciBytecodeStream::get_method(bool& will_link, ciSignature* *declared_signature_result) {
twisti@1573 362 VM_ENTRY_MARK;
twisti@4021 363 ciEnv* env = CURRENT_ENV;
coleenp@4037 364 constantPoolHandle cpool(_method->get_Method()->constants());
twisti@4021 365 ciMethod* m = env->get_method_by_index(cpool, get_method_index(), cur_bc(), _holder);
duke@435 366 will_link = m->is_loaded();
twisti@4133 367
twisti@4133 368 // Use the MethodType stored in the CP cache to create a signature
twisti@4133 369 // with correct types (in respect to class loaders).
twisti@4133 370 if (has_method_type()) {
twisti@4133 371 ciSymbol* sig_sym = env->get_symbol(cpool->symbol_at(get_method_signature_index()));
twisti@4133 372 ciKlass* pool_holder = env->get_klass(cpool->pool_holder());
twisti@4133 373 ciMethodType* method_type = get_method_type();
twisti@4133 374 ciSignature* declared_signature = new (env->arena()) ciSignature(pool_holder, sig_sym, method_type);
twisti@4133 375 (*declared_signature_result) = declared_signature;
twisti@4021 376 } else {
twisti@4021 377 (*declared_signature_result) = m->signature();
twisti@4021 378 }
duke@435 379 return m;
duke@435 380 }
duke@435 381
duke@435 382 // ------------------------------------------------------------------
twisti@3969 383 // ciBytecodeStream::has_appendix
twisti@3969 384 //
twisti@3969 385 // Returns true if there is an appendix argument stored in the
twisti@3969 386 // constant pool cache at the current bci.
twisti@3969 387 bool ciBytecodeStream::has_appendix() {
twisti@3969 388 VM_ENTRY_MARK;
coleenp@4037 389 constantPoolHandle cpool(_method->get_Method()->constants());
coleenp@4037 390 return ConstantPool::has_appendix_at_if_loaded(cpool, get_method_index());
twisti@3969 391 }
twisti@3969 392
twisti@3969 393 // ------------------------------------------------------------------
twisti@3969 394 // ciBytecodeStream::get_appendix
twisti@3969 395 //
twisti@3969 396 // Return the appendix argument stored in the constant pool cache at
twisti@3969 397 // the current bci.
twisti@3969 398 ciObject* ciBytecodeStream::get_appendix() {
twisti@3969 399 VM_ENTRY_MARK;
coleenp@4037 400 constantPoolHandle cpool(_method->get_Method()->constants());
coleenp@4037 401 oop appendix_oop = ConstantPool::appendix_at_if_loaded(cpool, get_method_index());
twisti@3969 402 return CURRENT_ENV->get_object(appendix_oop);
twisti@3969 403 }
twisti@3969 404
twisti@3969 405 // ------------------------------------------------------------------
twisti@4133 406 // ciBytecodeStream::has_method_type
twisti@4133 407 //
twisti@4133 408 // Returns true if there is a MethodType argument stored in the
twisti@4133 409 // constant pool cache at the current bci.
twisti@4133 410 bool ciBytecodeStream::has_method_type() {
twisti@4133 411 GUARDED_VM_ENTRY(
twisti@4133 412 constantPoolHandle cpool(_method->get_Method()->constants());
twisti@4133 413 return ConstantPool::has_method_type_at_if_loaded(cpool, get_method_index());
twisti@4133 414 )
twisti@4133 415 }
twisti@4133 416
twisti@4133 417 // ------------------------------------------------------------------
twisti@4133 418 // ciBytecodeStream::get_method_type
twisti@4133 419 //
twisti@4133 420 // Return the MethodType stored in the constant pool cache at
twisti@4133 421 // the current bci.
twisti@4133 422 ciMethodType* ciBytecodeStream::get_method_type() {
twisti@4133 423 GUARDED_VM_ENTRY(
twisti@4133 424 constantPoolHandle cpool(_method->get_Method()->constants());
twisti@4133 425 oop method_type_oop = ConstantPool::method_type_at_if_loaded(cpool, get_method_index());
twisti@4133 426 return CURRENT_ENV->get_object(method_type_oop)->as_method_type();
twisti@4133 427 )
twisti@4133 428 }
twisti@4133 429
twisti@4133 430 // ------------------------------------------------------------------
duke@435 431 // ciBytecodeStream::get_declared_method_holder
duke@435 432 //
duke@435 433 // Get the declared holder of the currently referenced method.
duke@435 434 //
duke@435 435 // Usage note: the holder() of a ciMethod class returns the canonical
duke@435 436 // holder of the method, rather than the holder declared in the
duke@435 437 // bytecodes.
duke@435 438 //
duke@435 439 // There is no "will_link" result passed back. The user is responsible
duke@435 440 // for checking linkability when retrieving the associated method.
duke@435 441 ciKlass* ciBytecodeStream::get_declared_method_holder() {
twisti@1573 442 VM_ENTRY_MARK;
coleenp@4037 443 constantPoolHandle cpool(_method->get_Method()->constants());
duke@435 444 bool ignore;
twisti@3969 445 // report as MethodHandle for invokedynamic, which is syntactically classless
jrose@1161 446 if (cur_bc() == Bytecodes::_invokedynamic)
twisti@3969 447 return CURRENT_ENV->get_klass_by_name(_holder, ciSymbol::java_lang_invoke_MethodHandle(), false);
twisti@1573 448 return CURRENT_ENV->get_klass_by_index(cpool, get_method_holder_index(), ignore, _holder);
duke@435 449 }
duke@435 450
duke@435 451 // ------------------------------------------------------------------
duke@435 452 // ciBytecodeStream::get_method_holder_index
duke@435 453 //
duke@435 454 // Get the constant pool index of the declared holder of the method
duke@435 455 // referenced by the current bytecode. Used for generating
duke@435 456 // deoptimization information.
duke@435 457 int ciBytecodeStream::get_method_holder_index() {
coleenp@4037 458 ConstantPool* cpool = _method->get_Method()->constants();
duke@435 459 return cpool->klass_ref_index_at(get_method_index());
duke@435 460 }
duke@435 461
duke@435 462 // ------------------------------------------------------------------
duke@435 463 // ciBytecodeStream::get_method_signature_index
duke@435 464 //
duke@435 465 // Get the constant pool index of the signature of the method
duke@435 466 // referenced by the current bytecode. Used for generating
duke@435 467 // deoptimization information.
duke@435 468 int ciBytecodeStream::get_method_signature_index() {
twisti@4021 469 GUARDED_VM_ENTRY(
coleenp@4037 470 ConstantPool* cpool = _holder->get_instanceKlass()->constants();
twisti@4021 471 const int method_index = get_method_index();
twisti@4021 472 const int name_and_type_index = cpool->name_and_type_ref_index_at(method_index);
twisti@4021 473 return cpool->signature_ref_index_at(name_and_type_index);
twisti@4021 474 )
duke@435 475 }
twisti@1572 476
twisti@1572 477 // ------------------------------------------------------------------
coleenp@4037 478 // ciBytecodeStream::get_resolved_references
coleenp@4037 479 ciObjArray* ciBytecodeStream::get_resolved_references() {
jrose@1957 480 VM_ENTRY_MARK;
jrose@1957 481 // Get the constant pool.
coleenp@4037 482 ConstantPool* cpool = _holder->get_instanceKlass()->constants();
twisti@1572 483
coleenp@4037 484 // Create a resolved references array and return it.
coleenp@4037 485 return CURRENT_ENV->get_object(cpool->resolved_references())->as_obj_array();
jrose@1957 486 }

mercurial