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.
Refactor image writer/reader for polymorphic use
- Loading branch information
Showing
11 changed files
with
154 additions
and
96 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Class { | ||
#name : #AbstractSTONImageAccess, | ||
#superclass : #AbstractImageAccess, | ||
#category : #'VMMaker-ImageFormat' | ||
} | ||
|
||
{ #category : #'file operations' } | ||
AbstractSTONImageAccess >> headerFileName: imageFileName [ | ||
|
||
self flag: #TODO. | ||
^ imageFileName", '/header.ston'" | ||
] |
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
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,27 @@ | ||
Trait { | ||
#name : #TVMSimulator, | ||
#category : #VMMaker | ||
} | ||
|
||
{ #category : #initialization } | ||
TVMSimulator >> openOn: fileName extraMemory: extraBytes [ | ||
|
||
"CogVMSimulator new openOn: 'clone.im' extraMemory: 100000" | ||
|
||
"We set the memory manager if it is not already set" | ||
self memoryManager ifNil: [ | ||
self memoryManager: MachineSimulatorMemoryManager new. | ||
self objectMemory memoryManager: self memoryManager. | ||
self memoryManager wordSize: self objectMemory wordSize. | ||
]. | ||
|
||
"Set the image name and the first argument; there are | ||
no arguments during simulation unless set explicitly." | ||
self systemAttributes | ||
at: 1 put: fileName; | ||
at: 2 put: nil. | ||
|
||
self simulationOnly: [ self setImageName: fileName ]. | ||
^ self imageReader readImageNamed: fileName | ||
|
||
] |
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