[Vm-dev] VM Maker: Cog-eem.163.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Jun 29 00:17:30 UTC 2014


Eliot Miranda uploaded a new version of Cog to project VM Maker:
http://source.squeak.org/VMMaker/Cog-eem.163.mcz

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

Name: Cog-eem.163
Author: eem
Time: 28 June 2014, 5:17:11.575 pm
UUID: 45688939-4dbe-4f42-883b-916a2d3b7e0b
Ancestors: Cog-tpr.162

Make byteSizeOfInstanceOfSize: cope with overflow in the
primitive.  Make both byteSizeOfInstance[OfSize:] answer a
primitive error code.

=============== Diff against Cog-tpr.162 ===============

Item was changed:
  ----- Method: SpurBootstrap class>>BehaviorPROTOTYPEbyteSizeOfInstance (in category 'method prototypes') -----
  BehaviorPROTOTYPEbyteSizeOfInstance
  	"Answer the total memory size of an instance of the receiver."
  
+ 	<primitive: 181 error: ec>
- 	<primitive: 181>
  	self isVariable ifTrue:
  		[^self byteSizeOfInstanceOfSize: 0].
  	self primitiveFailed!

Item was changed:
  ----- Method: SpurBootstrap class>>BehaviorPROTOTYPEbyteSizeOfInstanceOfSize: (in category 'method prototypes') -----
  BehaviorPROTOTYPEbyteSizeOfInstanceOfSize: basicSize
  	"Answer the total memory size of an instance of the receiver
  	 with the given number of indexable instance variables."
  
+ 	<primitive: 181 error: ec>
+ 	self isVariable
+ 		ifTrue: "If the primitive overflowed answer a close approximation"
+ 			[(basicSize isInteger
+ 			  and: [basicSize >= 16r1000000]) ifTrue:
+ 				[^2 * (self byteSizeOfInstanceOfSize: basicSize + 1 // 2)
+ 				   - (self byteSizeOfInstanceOfSize: 0)]]
+ 		ifFalse:
+ 			[basicSize = 0 ifTrue:
+ 				[^self byteSizeOfInstance]].
- 	<primitive: 181>
- 	self isVariable ifFalse:
- 		[basicSize = 0 ifTrue:
- 			[^self byteSizeOfInstance]].
  	self primitiveFailed!



More information about the Vm-dev mailing list