[Vm-dev] VM Maker: VMMaker-dtl.378.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Mar 17 01:06:15 UTC 2016


David T. Lewis uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker-dtl.378.mcz

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

Name: VMMaker-dtl.378
Author: dtl
Time: 16 March 2016, 9:05:15.932 pm
UUID: 70b69aa5-d66e-4e00-82ea-408cf6458529
Ancestors: VMMaker-dtl.377

VMMaker 4.15.4
Allow the optional parameter to primitiveUtcWithOffset to be either an Array or other object with two or more slots to store UTC posix microseconds and time zone offset in seconds. This allows possible future implementations of DateAndTime or similar to accept Posix UTC in the first instance variable, time zone offset in the second instance variable, with possible additional instance variables added as required.

=============== Diff against VMMaker-dtl.377 ===============

Item was changed:
  ----- Method: InterpreterPrimitives>>primitiveUtcWithOffset (in category 'system control primitives') -----
  primitiveUtcWithOffset
+ 	"Answer an array with UTC microseconds since the Posix epoch and the
+ 	current seconds offset from GMT in the local time zone. An empty two
+ 	element array (or any object with two or more slots) may be supplied
+ 	as a parameter.
- 	"Answer an array with UTC microseconds since the Posix epoch and
- 	the current seconds offset from GMT in the local time zone. An empty
- 	two element array may be supplied as a parameter.
  	This is a named (not numbered) primitive in the null module (ie the VM)"
  	| clock offset resultArray |
  
  	<export: true>
  	<var: #clock type: 'sqLong'>
  	<var: #offset type: 'int'>
  	argumentCount > 1 ifTrue: [^self primitiveFailFor: PrimErrBadNumArgs].
  	(self cCode: 'ioUtcWithOffset(&clock, &offset)' inSmalltalk: [-1]) = -1
  		ifTrue: [^ self primitiveFail].
  	objectMemory pushRemappableOop: (self positive64BitIntegerFor: clock).
  	argumentCount > 0
  		ifTrue: [resultArray := self popStack.
  			((objectMemory isPointers: resultArray)
+ 				and: [(objectMemory lengthOf: resultArray) >= 2])
- 				and: [(objectMemory lengthOf: resultArray) = 2])
  					ifFalse: [^self primitiveFailFor: PrimErrBadArgument]]
  		ifFalse: [resultArray := objectMemory instantiateClass: objectMemory classArray indexableSize: 2].
  	objectMemory storePointer: 0 ofObject: resultArray withValue: objectMemory popRemappableOop.
  	objectMemory storePointerUnchecked: 1 ofObject: resultArray withValue: (objectMemory integerObjectOf: offset).
  	self pop: 1 thenPush: resultArray
  !

Item was changed:
  ----- Method: VMMaker class>>versionString (in category 'version testing') -----
  versionString
  
  	"VMMaker versionString"
  
+ 	^'4.15.4'!
- 	^'4.15.3'!



More information about the Vm-dev mailing list