[Vm-dev] VM Maker: Cog-eem.147.mcz
commits at source.squeak.org
commits at source.squeak.org
Thu Mar 27 01:01:55 UTC 2014
Eliot Miranda uploaded a new version of Cog to project VM Maker:
http://source.squeak.org/VMMaker/Cog-eem.147.mcz
==================== Summary ====================
Name: Cog-eem.147
Author: eem
Time: 26 March 2014, 6:01:38.253 pm
UUID: c7f8be4c-73e8-4040-ba8f-d1571f4256f4
Ancestors: Cog-eem.146
Fix SpurBootstrap for spaceForInstancesOf:
=============== Diff against Cog-eem.146 ===============
Item was added:
+ ----- Method: SpurBootstrap>>cloneArrayLiteral: (in category 'bootstrap methods') -----
+ cloneArrayLiteral: anArray
+ "Currently serves only to clone the #(0 0) literal in SpaceTallyPROTOTYPEspaceForInstancesOf:"
+ | array |
+ array := oldHeap instantiateClass: (oldHeap splObj: ClassArray) indexableSize: anArray size.
+ 1 to: anArray size do:
+ [:i| | lit |
+ lit := anArray at: i.
+ lit class caseOf: {
+ [SmallInteger] -> [oldHeap
+ storePointerUnchecked: i - 1
+ ofObject: array
+ withValue: (oldHeap integerObjectOf: lit)] }].
+ ^array
+ !
Item was changed:
----- Method: SpurBootstrap>>findLiteral: (in category 'bootstrap methods') -----
findLiteral: aLiteral
| symbolOop smalltalk array |
aLiteral isString ifTrue:
[^self stringFor: aLiteral].
aLiteral isFloat ifTrue:
[^oldInterpreter floatObjectOf: aLiteral].
+ aLiteral isArray ifTrue:
+ [^self cloneArrayLiteral: aLiteral].
self assert: aLiteral isVariableBinding.
symbolOop := self findSymbol: aLiteral key.
smalltalk := oldHeap splObj: 8.
array := oldHeap fetchPointer: 1 ofObject: smalltalk.
self assert: (oldHeap isArray: array).
0 to: (oldHeap fetchWordLengthOf: array) - 1 do:
[:i| | bindingOrNil |
bindingOrNil := oldHeap fetchPointer: i ofObject: array.
(bindingOrNil ~= oldHeap nilObject
and: [symbolOop = (oldHeap fetchPointer: KeyIndex ofObject: bindingOrNil)
and: [aLiteral key == #Smalltalk
ifTrue:
[(oldHeap fetchPointer: ValueIndex ofObject: bindingOrNil) = smalltalk]
ifFalse:
[oldInterpreter
classNameOf: (oldHeap fetchPointer: ValueIndex ofObject: bindingOrNil)
Is: aLiteral key]]]) ifTrue:
[^bindingOrNil]].
self error: 'couldn''t find literal ', aLiteral printString!
More information about the Vm-dev
mailing list