comparison src/share/vm/c1x/c1x_Compiler.cpp @ 2492:4e5515d09314

Fixed merge issues. - Accessing static fields from the java.lang.Class object instead of the klassOop (1-line-change) - Fixed issue with RiField object caching (the caching was only taking the offset as a field ID, but need to take offset+is_static)
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Fri, 22 Apr 2011 19:00:07 +0200
parents 34354e2e40a3
children ad9b14650e15
comparison
equal deleted inserted replaced
2491:0654ee04b214 2492:4e5515d09314
135 bool will_link = field->will_link_from_vm(accessor_klass, byteCode); 135 bool will_link = field->will_link_from_vm(accessor_klass, byteCode);
136 int offset = (field->holder()->is_loaded() && will_link) ? field->offset() : -1; 136 int offset = (field->holder()->is_loaded() && will_link) ? field->offset() : -1;
137 Handle field_name = VmIds::toString<Handle>(field->name()->get_symbol(), CHECK_0); 137 Handle field_name = VmIds::toString<Handle>(field->name()->get_symbol(), CHECK_0);
138 Handle field_holder = get_RiType(field->holder(), accessor, CHECK_0); 138 Handle field_holder = get_RiType(field->holder(), accessor, CHECK_0);
139 Handle field_type = get_RiType(field->type(), accessor, CHECK_0); 139 Handle field_type = get_RiType(field->type(), accessor, CHECK_0);
140 140 int flags = field->flags().as_int();
141 // TODO: implement caching 141 return VMExits::createRiField(field_holder, field_name, field_type, offset, flags, THREAD);
142 return VMExits::createRiField(field_holder, field_name, field_type, offset, THREAD);
143 } 142 }
144 143
145 oop C1XCompiler::createHotSpotTypeResolved(KlassHandle klass, Handle name, TRAPS) { 144 oop C1XCompiler::createHotSpotTypeResolved(KlassHandle klass, Handle name, TRAPS) {
146 if (klass->c1x_mirror() != NULL) { 145 if (klass->c1x_mirror() != NULL) {
147 return klass->c1x_mirror(); 146 return klass->c1x_mirror();