Mercurial > hg > truffle
changeset 1480:2fe369533fed
Additional debug output.
author | Thomas Wuerthinger <wuerthinger@ssw.jku.at> |
---|---|
date | Sat, 27 Nov 2010 16:43:53 +0100 |
parents | 71cd4b9610eb |
children | fe69dec9a1ed |
files | c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotTypeUnresolved.java c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java src/share/vm/c1/c1_Runtime1.cpp |
diffstat | 3 files changed, 30 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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; }
--- 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);
--- 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);