David T. Lewis uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-dtl.2754.mcz==================== Summary ====================
Name: VMMaker.oscog-dtl.2754
Author: dtl
Time: 9 May 2020, 7:15:30.719882 pm
UUID: 31df59c3-3574-4246-8793-9ffd8ac05d12
Ancestors: VMMaker.oscog-nice.2753
primitiveUtcWithOffset should call ioUTCMicrosecondsNow rather than ioUTCMicroseconds because it is used for DateAndTime now. Discussion and performance measurements at
http://lists.squeakfoundation.org/pipermail/squeak-dev/2020-May/209209.html=============== Diff against VMMaker.oscog-nice.2753 ===============
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.
This is a named (not numbered) primitive in the null module (ie the VM)"
| epochDelta resultArray |
<export: true>
<var: #epochDelta declareC: 'static usqLong epochDelta = 2177452800000000ULL'>
self cCode: '' inSmalltalk: [epochDelta := 2177452800000000].
argumentCount > 0
ifTrue:
[argumentCount > 1 ifTrue: [^self primitiveFailFor: PrimErrBadNumArgs].
resultArray := self stackTop.
((objectMemory isPointers: resultArray)
and: [(objectMemory lengthOf: resultArray) >= 2]) ifFalse:
[^self primitiveFailFor: PrimErrBadArgument]]
ifFalse: [resultArray := objectMemory instantiateClass: objectMemory classArray indexableSize: 2].
"N.B. No pushRemappableOop:/popRemappableOop in Cog because positive64BitIntegerFor: et al use
eeInstantiate... allocators which are guaranteed not to do a GC."
objectMemory
storePointerUnchecked: 1 ofObject: resultArray withValue: (objectMemory integerObjectOf: self ioLocalSecondsOffset);
+ storePointer: 0 ofObject: resultArray withValue: (self positive64BitIntegerFor: self ioUTCMicrosecondsNow - epochDelta).
- storePointer: 0 ofObject: resultArray withValue: (self positive64BitIntegerFor: self ioUTCMicroseconds - epochDelta).
self pop: argumentCount + 1 thenPush: resultArray!