forked from pharo-project/pharo-vm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fixing the C implementation of ComposedImage format
- Adding a migration process
- Loading branch information
Showing
11 changed files
with
134 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
smalltalksrc/VMMaker/VMSpurImageToComposedImageMigrationProcess.class.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
Class { | ||
#name : #VMSpurImageToComposedImageMigrationProcess, | ||
#superclass : #Object, | ||
#instVars : [ | ||
'interpreter', | ||
'memory' | ||
], | ||
#category : #'VMMaker-PermSpace' | ||
} | ||
|
||
{ #category : #'as yet unclassified' } | ||
VMSpurImageToComposedImageMigrationProcess >> createSimulator [ | ||
|
||
| environmentBuilder memoryClass | | ||
environmentBuilder := VMSimulatedEnvironmentBuilder new. | ||
memoryClass := Spur64BitMemoryManager simulatorClass. | ||
|
||
environmentBuilder | ||
interpreterClass: StackInterpreterSimulatorLSB; | ||
objectMemoryClass: memoryClass; | ||
initializationOptions: { | ||
#BytesPerWord. 8. | ||
#ObjectMemory. memoryClass name. | ||
#ImageReader. SpurImageReader name. | ||
#ImageWriter. ComposedImageWriter name}; | ||
wordSize: 8; | ||
initialCodeSize: 4*1024; | ||
primitiveTraceLogSize: 0. | ||
|
||
environmentBuilder build. | ||
|
||
interpreter := environmentBuilder interpreter. | ||
memory := environmentBuilder objectMemory. | ||
] | ||
|
||
{ #category : #'as yet unclassified' } | ||
VMSpurImageToComposedImageMigrationProcess >> loadImage: originalImage [ | ||
|
||
interpreter openOn: originalImage extraMemory: 0. | ||
|
||
|
||
] | ||
|
||
{ #category : #'as yet unclassified' } | ||
VMSpurImageToComposedImageMigrationProcess >> migrate: originalImage to: newImage [ | ||
|
||
self createSimulator. | ||
self loadImage: originalImage. | ||
self saveImage: newImage. | ||
|
||
|
||
] | ||
|
||
{ #category : #'as yet unclassified' } | ||
VMSpurImageToComposedImageMigrationProcess >> saveImage: newImage [ | ||
|
||
interpreter imageName: newImage. | ||
interpreter writeImageFileIO. | ||
|
||
|
||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters