[Vm-dev] VM Maker: VMMaker.oscog-eem.295.mcz
commits at source.squeak.org
commits at source.squeak.org
Wed Jun 5 20:06:17 UTC 2013
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.295.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.295
Author: eem
Time: 5 June 2013, 1:04:16.829 pm
UUID: cb649291-541e-4d32-8b85-bf22a4449a51
Ancestors: VMMaker.oscog-eem.294
Cast primitiveUtcWithOffset in terms of a new ioLocalSecondsOffset
=============== Diff against VMMaker.oscog-eem.294 ===============
Item was added:
+ ----- Method: CogVMSimulator>>ioLocalSecondsOffset (in category 'I/O primitives support') -----
+ ioLocalSecondsOffset
+ ^DateAndTime localOffset asSeconds!
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.
This is a named (not numbered) primitive in the null module (ie the VM)"
+ | resultArray |
- | epochDelta offset resultArray utcMicroseconds |
-
<export: true>
+ "2177452800000000 = '1/1/1970' asDate asSeconds - '1/1/1901' asDate asSeconds * 1,000,000"
+ objectMemory pushRemappableOop: (self positive64BitIntegerFor: self ioUTCMicroseconds - 2177452800000000).
- <var: #epochDelta declareC: 'static usqLong epochDelta= 2177452800000000ULL'>
- <var: #utcMicroseconds type: #usqLong>
- <var: #offset type: #sqLong>
- utcMicroseconds := self ioUTCMicroseconds.
- offset := self ioLocalMicroseconds - utcMicroseconds.
- offset := offset / 1000000.
- objectMemory pushRemappableOop: (objectMemory integerObjectOf: offset).
- objectMemory pushRemappableOop: (self positive64BitIntegerFor: utcMicroseconds - epochDelta).
resultArray := objectMemory instantiateClass: objectMemory classArray indexableSize: 2.
+ self storePointer: 0 ofObject: resultArray withValue: objectMemory popRemappableOop.
+ self storePointerUnchecked: 1 ofObject: resultArray withValue: (objectMemory integerObjectOf: self ioLocalSecondsOffset).
- self stObject: resultArray at: 1 put: objectMemory popRemappableOop.
- self stObject: resultArray at: 2 put: objectMemory popRemappableOop.
self pop: 1 thenPush: resultArray
!
Item was added:
+ ----- Method: StackInterpreterSimulator>>ioLocalSecondsOffset (in category 'I/O primitives support') -----
+ ioLocalSecondsOffset
+ ^DateAndTime localOffset asSeconds!
More information about the Vm-dev
mailing list