Mercurial > hg > graal-jvmci-8
diff src/share/vm/c1x/c1x_Compiler.cpp @ 1433:efba53f86c4f
various fixes and enhancements
* correct refmap->oopmap conversion (register numbering, stack slot numbering)
* fixes for inlining (correct scoping in exception handler lookup, NPE in scope conversion)
* support for "jump to runtime stub" (patching code needs to be aware of jmp instruction)
* provide more information about methods (to allow inlining: has_balanced_monitors, etc.)
* fixes to signature type lookup
* isSubTypeOf: correct handling of array classes
* RiType: componentType/arrayOf
* prologue: inline cache check, icmiss stub
* klass state check (resolved but not initialized) in newinstance
* card table write barriers
* c1x classes are optional (to allow running c1 without them)
* correct for stored frame pointer in calling conventions (methods with arguments on stack)
* getType(Class<?>) for some basic types, used for optimizations and folding
* RiMethod/RiType: throw exception instead of silent failure on unsupported operations
* RiType: resolved/unresolved array type support
* refactoring: new on-demand template generation mechanism
* optimizations: template specialization for no_null_check, given length, etc.
author | Lukas Stadler <lukas.stadler@oracle.com> |
---|---|
date | Thu, 16 Sep 2010 19:42:20 -0700 |
parents | b61a43cd1255 |
children | 72cfb36c6bb2 |
line wrap: on
line diff
--- a/src/share/vm/c1x/c1x_Compiler.cpp Wed Sep 01 17:13:38 2010 -0700 +++ b/src/share/vm/c1x/c1x_Compiler.cpp Thu Sep 16 19:42:20 2010 -0700 @@ -85,11 +85,11 @@ } } -oop C1XCompiler::get_RiField(ciField *field, TRAPS) { - oop field_holder = get_RiType(field->holder(), NULL, CHECK_0); - oop field_type = get_RiType(field->type(), NULL, CHECK_0); +oop C1XCompiler::get_RiField(ciField *field, klassOop accessor, TRAPS) { + oop field_holder = get_RiType(field->holder(), accessor, CHECK_0); + oop field_type = get_RiType(field->type(), accessor, CHECK_0); Handle field_name = VmIds::toString<Handle>(field->name()->get_symbolOop(), CHECK_0); - int offset = field->offset(); + int offset = field->holder()->is_loaded() ? field->offset() : -1; // TODO: implement caching return VMExits::createRiField(field_holder, field_name, field_type, offset, THREAD); @@ -108,8 +108,10 @@ if (klass->oop_is_javaArray()) { HotSpotTypeResolved::set_isArrayClass(obj, true); + HotSpotTypeResolved::set_componentType(obj, NULL); } else { HotSpotTypeResolved::set_isArrayClass(obj, false); + HotSpotTypeResolved::set_componentType(obj, NULL); HotSpotTypeResolved::set_isInitialized(obj, instanceKlass::cast(klass())->is_initialized()); HotSpotTypeResolved::set_instanceSize(obj, instanceKlass::cast(klass())->size_helper() * HeapWordSize); HotSpotTypeResolved::set_hasFinalizer(obj, klass->has_finalizer());