Skip to content

Commit

Permalink
recordStartupStamp during startup and minor edits
Browse files Browse the repository at this point in the history
  • Loading branch information
fniephaus committed Jul 20, 2021
1 parent bcd23da commit a1bb0ad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -196,14 +196,18 @@ public void ensureLoaded() {
printToStdOut("Skipping startup routine...");
return;
}
/*
* TODO: Move setup instructions into a single .st file and evaluate that (similar to
* how its done in SqueakSUnitTest.
*/
printToStdOut("Preparing image for headless execution...");
// Remove active context.
GetActiveProcessNode.getSlow(this).instVarAtPut0Slow(PROCESS.SUSPENDED_CONTEXT, NilObject.SINGLETON);
// Modify StartUpList for headless execution.
evaluate("{EventSensor. Project} do: [:ea | Smalltalk removeFromStartUpList: ea]");
try {
/** See SmalltalkImage>>#snapshot:andQuit:withExitCode:embedded:. */
evaluate("[Smalltalk clearExternalObjects. Smalltalk processStartUpList: true. Smalltalk setPlatformPreferences] value");
evaluate("[Smalltalk clearExternalObjects. Smalltalk processStartUpList: true. Smalltalk setPlatformPreferences; recordStartupStamp] value");
} catch (final Exception e) {
printToStdErr("startUpList failed:");
printToStdErr(e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ public void trace(final SqueakImageWriter writer) {
@Override
public void write(final SqueakImageWriter writer) {
if (!writeHeader(writer)) {
throw SqueakException.create("BlockClosureObject must have slots:", this);
throw SqueakException.create("ClassObject must have slots:", this);
}
writer.writeObject(getSuperclass());
writer.writeObject(getMethodDict());
Expand Down

0 comments on commit a1bb0ad

Please sign in to comment.