comparison src/share/vm/graal/graalCompilerToVM.cpp @ 4316:b4b16e4e043f

Fix eager resolving for class constants
author Peter Hofer <peter.hofer@jku.at>
date Mon, 23 Jan 2012 14:35:29 +0100
parents 874fcc2ddd9d
children 539fca6a3b98
comparison
equal deleted inserted replaced
4315:4c223446c28e 4316:b4b16e4e043f
504 TRACE_graal_3("CompilerToVM::RiConstantPool_loadReferencedType"); 504 TRACE_graal_3("CompilerToVM::RiConstantPool_loadReferencedType");
505 VM_ENTRY_MARK; 505 VM_ENTRY_MARK;
506 506
507 constantPoolOop cp = instanceKlass::cast(java_lang_Class::as_klassOop(HotSpotTypeResolved::javaMirror(type)))->constants(); 507 constantPoolOop cp = instanceKlass::cast(java_lang_Class::as_klassOop(HotSpotTypeResolved::javaMirror(type)))->constants();
508 int byteCode = (op & 0xFF); 508 int byteCode = (op & 0xFF);
509 if (byteCode != Bytecodes::_checkcast && byteCode != Bytecodes::_instanceof && byteCode != Bytecodes::_new && byteCode != Bytecodes::_anewarray && byteCode != Bytecodes::_multianewarray) { 509 if (byteCode != Bytecodes::_checkcast && byteCode != Bytecodes::_instanceof && byteCode != Bytecodes::_new && byteCode != Bytecodes::_anewarray
510 && byteCode != Bytecodes::_multianewarray && byteCode != Bytecodes::_ldc && byteCode != Bytecodes::_ldc_w && byteCode != Bytecodes::_ldc2_w)
511 {
510 index = cp->remap_instruction_operand_from_cache(GraalCompiler::to_cp_index_u2(index)); 512 index = cp->remap_instruction_operand_from_cache(GraalCompiler::to_cp_index_u2(index));
511 } 513 }
512 constantTag tag = cp->tag_at(index); 514 constantTag tag = cp->tag_at(index);
513 if (tag.is_field_or_method()) { 515 if (tag.is_field_or_method()) {
514 index = cp->uncached_klass_ref_index_at(index); 516 index = cp->uncached_klass_ref_index_at(index);