VM Maker: VMMaker-dtl.408.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

VM Maker: VMMaker-dtl.408.mcz

commits-2
 
David T. Lewis uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker-dtl.408.mcz

==================== Summary ====================

Name: VMMaker-dtl.408
Author: dtl
Time: 1 December 2019, 1:20:10.692 pm
UUID: ed17eaa5-2fba-4257-8a41-d7912ec2d41c
Ancestors: VMMaker-dtl.407

Fix method comment

=============== Diff against VMMaker-dtl.407 ===============

Item was changed:
  ----- Method: ContextInterpreter>>snapshotResume:heapSize:swapBytes:oldBaseAddr:specialObjectsOop:lastHash:savedWindowSize:fullScreenFlag:extraVMMemory: (in category 'snapshot utility primitives') -----
  snapshotResume: byteArrayOrBitmap heapSize: desiredHeapSize swapBytes: swapBytes oldBaseAddr: oldBaseAddr specialObjectsOop: specialObjects lastHash: hashValue savedWindowSize: windowSize fullScreenFlag: fullScreen extraVMMemory: extraMemory
  "Arrange for the interpreter to resume execution from a snapshot of saved
+ memory and interpreter state. The current object memory and interpreter
+ state is discarded, and the interpreter resumes execution at the point of
+ the supplied image snapshot.."
- memory and interpreter state. The current object memory and interpreter state
- will be discarded, and the interpreter will resume execution at the point of the
- supplied image snapshot. Answer the address of the previous object memory
- or nil if this is the first evaluation."
 
  | dataSize sourceBytes mem |
  <returnTypeC: 'usqInt'>
  <var: #desiredHeapSize type: 'usqInt'>
  <var: #dataSize type: 'size_t '>
  <var: #sourceBytes type: 'char *'>
  <var: #mem type: 'char *'>
 
  "Notes - The parameters windowSize, fullScreen and extraMemory are currently
  not used when resuming the VM in a new image. The display size and fullscreen
  mode are probably best set from the image by calling primitiveSetDisplayMode
  prior to primitiveResumeFromSnapshot. The extraMemory parameter is ignored
  here because we are simply copying the new object memory over a previously
  allocated heap space."
 
  dataSize := objectMemory byteSizeOf: byteArrayOrBitmap.
  sourceBytes := objectMemory firstIndexableField: byteArrayOrBitmap.
  objectMemory setSpecialObjectsOop: specialObjects.
  objectMemory setLastHash: hashValue.
 
  "Copy object memory into allocated space"
  objectMemory setMemoryLimits: dataSize heapSize: desiredHeapSize.
  mem := objectMemory pointerForOop: objectMemory getMemory.
  self mem: mem
  cp: sourceBytes
  y: dataSize.
 
  self swapBytesAndPrepareToInterpret: swapBytes oldBaseAddr: oldBaseAddr.
    self interpret. "Resume interpreter execution in the snapshot."
  !