diff --git a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/image/SqueakImageContext.java b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/image/SqueakImageContext.java index 93b067110..9fc620e53 100644 --- a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/image/SqueakImageContext.java +++ b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/image/SqueakImageContext.java @@ -391,13 +391,18 @@ public boolean toggleCurrentMarkingFlag() { } public void setHiddenRoots(final ArrayObject theHiddenRoots) { - assert hiddenRoots == null && theHiddenRoots.isObjectType(); + assert hiddenRoots == null && (theHiddenRoots.isObjectType() || isTesting()); hiddenRoots = theHiddenRoots; assert validClassTableRootPages(); } /* SpurMemoryManager>>#validClassTableRootPages */ public boolean validClassTableRootPages() { + if (!hiddenRoots.isObjectType()) { + assert isTesting(); // Ignore dummy images for testing + return true; + } + final Object[] hiddenRootsObjects = hiddenRoots.getObjectStorage(); if (hiddenRootsObjects.length != SqueakImageConstants.CLASS_TABLE_ROOT_SLOTS + SqueakImageConstants.HIDDEN_ROOT_SLOTS) { return false; diff --git a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/image/SqueakImageReader.java b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/image/SqueakImageReader.java index a98c1f47f..2bbff14cd 100644 --- a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/image/SqueakImageReader.java +++ b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/image/SqueakImageReader.java @@ -439,7 +439,7 @@ private void fillInObjects() { if (obj.needsSqueakClass()) { obj.setSqueakClass(chunk.getSqueakClass()); } - if (!(obj instanceof ClassObject) && obj.needsSqueakHash()) { + if (obj.getSqueakHash() != chunk.getHash()) { obj.setSqueakHash(chunk.getHash()); } obj.fillin(chunk);