VM Maker: VMMaker.oscog-eem.609.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.oscog-eem.609.mcz

commits-2
 
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.609.mcz

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

Name: VMMaker.oscog-eem.609
Author: eem
Time: 5 February 2014, 1:02:29.791 pm
UUID: 2a0cbd3c-d667-47c5-8ec1-b8bcbe4680a1
Ancestors: VMMaker.oscog-eem.608

Fix the generic primitiveClone for immediates.

=============== Diff against VMMaker.oscog-eem.608 ===============

Item was changed:
  ----- Method: InterpreterPrimitives>>primitiveClone (in category 'object access primitives') -----
  primitiveClone
  "Return a shallow copy of the receiver."
 
+ | rcvr newCopy |
+ rcvr := self stackTop.
+ (objectMemory isImmediate: rcvr)
+ ifTrue:
+ [newCopy := rcvr]
+ ifFalse:
+ [newCopy := objectMemory clone: rcvr.
+ newCopy = 0 ifTrue: "not enough memory most likely"
+ [^self primitiveFail]].
+ self pop: 1 thenPush: newCopy!
- | newCopy |
- newCopy := objectMemory clone: (self stackTop).
- newCopy = 0
- ifTrue:["not enough memory most likely" ^self primitiveFail].
- self pop: 1 thenPush: newCopy.!