[Vm-dev] VM Maker: VMMaker.oscog-eem.672.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri Apr 11 18:43:23 UTC 2014
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.672.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.672
Author: eem
Time: 11 April 2014, 11:40:53.798 am
UUID: 21493732-2e31-4b57-a8ae-aa6e6a9e4c3c
Ancestors: VMMaker.oscog-eem.671
Implement the new Spur interpreterProxy API for ObjectMemory
(of course pinObject: fails, and isCharacterValue: has a smaller
range).
=============== Diff against VMMaker.oscog-eem.671 ===============
Item was added:
+ ----- Method: NewObjectMemory>>characterValueOf: (in category 'primitive support') -----
+ characterValueOf: oop
+ <api>
+ (self isCharacterObject: oop) ifFalse:
+ [coInterpreter primitiveFailFor: PrimErrUnsupported.
+ ^-1].
+ ^self integerValueOf: (self fetchPointer: 0 ofObject: oop)!
Item was added:
+ ----- Method: NewObjectMemory>>pinObject: (in category 'primitive support') -----
+ pinObject: objOop
+ "For forward-compatibility with Spur. Fail; ObjectMemory does not support pinning."
+ <api>
+ coInterpreter primitiveFailFor: PrimErrUnsupported!
Item was added:
+ ----- Method: ObjectMemory>>characterObjectOf: (in category 'primitive support') -----
+ characterObjectOf: characterCode
+ <api>
+ ^(characterCode between: 0 and: 255)
+ ifTrue: [self fetchPointer: characterCode ofObject: self characterTable]
+ ifFalse: [nilObj]!
Item was added:
+ ----- Method: ObjectMemory>>isCharacterValue: (in category 'primitive support') -----
+ isCharacterValue: anInteger
+ <api>
+ ^self isInRangeCharacterCode: anInteger!
Item was changed:
----- Method: ObjectMemory>>isInRangeCharacterCode: (in category 'interpreter access') -----
isInRangeCharacterCode: characterCode
+ ^characterCode between: 0 and: 255!
- ^characterCode >= 0 and: [characterCode <= 255]!
Item was added:
+ ----- Method: ObjectMemory>>isPinned: (in category 'primitive support') -----
+ isPinned: objOop
+ "For forward-compatibility with Spur. Answer false; ObjectMemory does not support pinning."
+ <api>
+ ^false!
Item was changed:
----- Method: SpurMemoryManager class>>vmProxyMinorVersion (in category 'simulation only') -----
vmProxyMinorVersion
- "hack around the CoInterpreter/ObjectMemory split refactoring"
^StackInterpreter vmProxyMinorVersion max: 13!
Item was changed:
----- Method: SpurMemoryManager>>pinObject: (in category 'primitive support') -----
pinObject: objOop
+ "Pin objOop in memory. If objOop is in oldSpace merely set its isPinned
+ bit. If objOop is in newSpace then created a pinned copy in oldSpace
+ and forward objOop to the pinned copy. Answer the (possibly changed)
+ oop of the pinned object."
<api>
self shouldBeImplemented!
Item was changed:
----- Method: StackInterpreter class>>vmProxyMinorVersion (in category 'api version') -----
vmProxyMinorVersion
"Define the VM_PROXY_MINOR version for this VM as used to
define the api in platforms/Cross/vm/sqVirtualMachine.[ch]"
+ ^false
+ ifTrue:
+ [(initializationOptions at: #SpurObjectMemory ifAbsent: [false])
+ ifTrue: [13]
+ ifFalse: [12]]
+ ifFalse: [13] "As of 4/11/2014 ObjectMemory supports the new API"!
- ^(initializationOptions at: #SpurObjectMemory ifAbsent: [false])
- ifTrue: [13]
- ifFalse: [12]!
More information about the Vm-dev
mailing list