ObjectMemory class >> snapshot: should return an indicator

Tagged:
Project:GNU Smalltalk
Component:Base classes
Category:feature
Priority:normal
Assigned:Unassigned
Status:fixed
Description

ObjectMemory class >> snapshot: does not provide any way to determine whether, at the return from #snapshot:, we are running in

1. the parent, just after the save, or
2. the saved image, just after the load

A good solution to this would be to return some indicator of which image-instance we're running in from #snapshot:.

Given such an indicator, we could build a #snapshot:andQuit: message, a la Squeak, which would provide a convenient way of saving a snapshot and quitting, without having to jump through hoops on resume to determine which actions to take next.

Updates

#1 submitted by Tony Garnock-Jones on Tue, 01/08/2008 - 17:51
Attachment:issue-157.patch (978 bytes)

Patch to make the #snapshot: primitive return false to the saving instance, and true when we're resuming from a saved image.

#2 submitted by Paolo Bonzini on Fri, 01/18/2008 - 08:03
Status:active» fixed

committed to master with some coding standards fixes.

User login