Skip to content

Commit

Permalink
Fix image reading
Browse files Browse the repository at this point in the history
- Ensure all objects are filled in
- Empty pointer slots should be nil, not null
  • Loading branch information
fniephaus committed Dec 27, 2017
1 parent a7e438f commit ac530ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public Object asObject() {
}
}
if (object == SqueakImageReader.NIL_OBJECT_PLACEHOLDER) {
return null;
return image.nil;
} else {
return object;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
import java.util.Vector;

import de.hpi.swa.trufflesqueak.SqueakImageContext;
import de.hpi.swa.trufflesqueak.model.BaseSqueakObject;
import de.hpi.swa.trufflesqueak.model.ClassObject;
import de.hpi.swa.trufflesqueak.model.NativeObject;
import de.hpi.swa.trufflesqueak.model.SqueakObject;

@SuppressWarnings("unused")
public class SqueakImageReader {
Expand Down Expand Up @@ -288,8 +288,8 @@ private void initObjects(SqueakImageContext image) {
output.println("Filling in objects...");
for (SqueakImageChunk chunk : chunklist) {
Object chunkObject = chunk.asObject();
if (chunkObject instanceof SqueakObject) {
((SqueakObject) chunkObject).fillin(chunk);
if (chunkObject instanceof BaseSqueakObject) {
((BaseSqueakObject) chunkObject).fillin(chunk);
}
}
}
Expand Down

0 comments on commit ac530ac

Please sign in to comment.