# HG changeset patch # User Thomas Wuerthinger # Date 1290872633 -3600 # Node ID 2fe369533fedc2f5a3a1de0043e503233e299f46 # Parent 71cd4b9610ebc9e84307f104579087b56a259238 Additional debug output. diff -r 71cd4b9610eb -r 2fe369533fed c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotTypeUnresolved.java --- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotTypeUnresolved.java Sat Nov 27 14:30:07 2010 +0100 +++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotTypeUnresolved.java Sat Nov 27 16:43:53 2010 +0100 @@ -38,8 +38,22 @@ * Creates a new unresolved type for a specified type descriptor. */ public HotSpotTypeUnresolved(String name, long accessingClassVmId) { + assert name.length() > 0 : "name cannot be empty"; + + int dimensions = 0; + // Decode name if necessary. + if (name.charAt(name.length() - 1) == ';') { + int startIndex = 0; + while (name.charAt(startIndex) == '[') { + startIndex++; + dimensions++; + } + assert name.charAt(startIndex) == 'L'; + name = name.substring(startIndex + 1, name.length() - 1); + } + this.name = name; - this.dimensions = 0; + this.dimensions = dimensions; this.accessingClassVmId = accessingClassVmId; } @@ -127,7 +141,7 @@ @Override public RiType componentType() { - assert dimensions > 0; + assert isArrayClass() : "no array class" + name(); return new HotSpotTypeUnresolved(name, dimensions - 1, accessingClassVmId); } @@ -177,7 +191,6 @@ @Override public CiKind getRepresentationKind(RiType.Representation r) { - // TODO: Check if this is correct. return CiKind.Object; } diff -r 71cd4b9610eb -r 2fe369533fed c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java --- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java Sat Nov 27 14:30:07 2010 +0100 +++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java Sat Nov 27 16:43:53 2010 +0100 @@ -993,10 +993,9 @@ asm.bindInline(patchSite); asm.mark(MARK_DUMMY_OOP_RELOCATION); + asm.jmp(patchStub); - // TODO(tw): Need a safepoint here? - // TODO: make this more generic & safe - this is needed to create space for patching asm.nop(5); diff -r 71cd4b9610eb -r 2fe369533fed src/share/vm/c1/c1_Runtime1.cpp --- a/src/share/vm/c1/c1_Runtime1.cpp Sat Nov 27 14:30:07 2010 +0100 +++ b/src/share/vm/c1/c1_Runtime1.cpp Sat Nov 27 16:43:53 2010 +0100 @@ -637,7 +637,19 @@ EXCEPTION_MARK; oop obj = lock->obj(); - assert(obj->is_oop(), "must be NULL or an object"); + +#ifdef DEBUG + if (!obj->is_oop()) { + ResetNoHandleMark rhm; + nmethod* method = thread->last_frame().cb()->as_nmethod_or_null(); + if (method != NULL) { + tty->print_cr("ERROR in monitorexit in method %s", method->name()); + } + thread->print_stack_on(tty); + assert(false, "invalid lock object pointer dected"); + } +#endif + if (UseFastLocking) { // When using fast locking, the compiled code has already tried the fast case ObjectSynchronizer::slow_exit(obj, lock->lock(), THREAD);