[Vm-dev] VM Maker: VMMaker.oscog-eem.219.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Nov 21 20:25:54 UTC 2012


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

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

Name: VMMaker.oscog-eem.219
Author: eem
Time: 21 November 2012, 12:22:55.295 pm
UUID: 2f9005ca-b06d-4bfc-ae65-c6be901a999a
Ancestors: VMMaker.oscog-eem.218

Use "var := expr. expr ifTrue:" in rewritten instantiation prims to
regain inlining of sufficientSpaceToInstantiate:indexableSize:.

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

Item was changed:
  ----- Method: InterpreterPrimitives>>primitiveNew (in category 'object access primitives') -----
  primitiveNew
  	"Allocate a new fixed-size instance. Fail if the allocation would leave less than lowSpaceThreshold bytes free. May cause a GC."
+ 	| spaceOkay |
- 
  	"The following may cause GC!!"
+ 	spaceOkay := objectMemory sufficientSpaceToInstantiate: self stackTop indexableSize: 0.
+ 	spaceOkay	ifTrue: [self
- 	(objectMemory sufficientSpaceToInstantiate: self stackTop indexableSize: 0)
- 		ifTrue: [self
  					pop: argumentCount + 1
  					thenPush: (objectMemory instantiateClass: self stackTop indexableSize: 0)]
  		ifFalse: [self primitiveFailFor: PrimErrNoMemory]!

Item was changed:
  ----- Method: InterpreterPrimitives>>primitiveNewWithArg (in category 'object access primitives') -----
  primitiveNewWithArg
  	"Allocate a new indexable instance. Fail if the allocation would leave less than lowSpaceThreshold bytes free. May cause a GC."
+ 	| size spaceOkay |
- 	| size |
  	size := self positive32BitValueOf: self stackTop.
  	(self successful and: [size >= 0])
  		ifTrue:
+ 			[spaceOkay := objectMemory sufficientSpaceToInstantiate: (self stackValue: 1) indexableSize: size.
+ 			 spaceOkay ifTrue:
- 			[(objectMemory sufficientSpaceToInstantiate: (self stackValue: 1) indexableSize: size)
- 				ifTrue:
  					[self
  						pop: argumentCount + 1
  						thenPush: (objectMemory instantiateClass: (self stackValue: 1) indexableSize: size)]
  				ifFalse:
  					[self primitiveFailFor: PrimErrNoMemory]]
  		ifFalse:
  			[self primitiveFailFor: PrimErrBadArgument]!



More information about the Vm-dev mailing list