Hi David,
On Wed, Mar 16, 2016 at 6:07 PM, commits@source.squeak.org wrote:
David T. Lewis uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-dtl.1730.mcz
==================== Summary ====================
Name: VMMaker.oscog-dtl.1730 Author: dtl Time: 16 March 2016, 9:06:26.74934 pm UUID: ad4e53e1-bdbc-4cb9-b5fb-f1229ca4e19f Ancestors: VMMaker.oscog-nice.1729
Allow primitiveUtcWithOffset to accept an optional parameter with an array or object with two or more slots to store UTC posix microseconds and time zone offset in seconds. Compatibility with VMM trunk. Note, consider incorporating ioUtcWithOffset from SVN trunk to provide true atomic primitive.
Feel free to move the code over.
=============== Diff against VMMaker.oscog-nice.1729 ===============
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. This is a named (not numbered) primitive in the null module (ie
the VM)" | epochDelta offset resultArray utcMicroseconds |
<export: true> <var: #epochDelta declareC: 'static usqLong epochDelta=
2177452800000000ULL'> <var: #utcMicroseconds type: #usqLong> <var: #offset type: #sqLong>
argumentCount > 1 ifTrue: [^self primitiveFailFor:
PrimErrBadNumArgs]. self cCode: '' inSmalltalk: [epochDelta := 2177452800000000]. utcMicroseconds := self ioUTCMicroseconds. offset := self ioLocalMicroseconds - utcMicroseconds. offset := offset / 1000000. objectMemory pushRemappableOop: (self positive64BitIntegerFor: utcMicroseconds - epochDelta).
argumentCount > 0
ifTrue: [resultArray := self popStack.
((objectMemory isPointers: resultArray)
and: [(objectMemory lengthOf: resultArray)
= 2])
ifFalse: [^self primitiveFailFor:
PrimErrBadArgument]]
ifFalse: [resultArray := objectMemory instantiateClass:
objectMemory classArray indexableSize: 2].
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 !
On Fri, Mar 18, 2016 at 01:31:23PM -0700, Eliot Miranda wrote:
Hi David,
On Wed, Mar 16, 2016 at 6:07 PM, commits@source.squeak.org wrote:
David T. Lewis uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-dtl.1730.mcz
==================== Summary ====================
Name: VMMaker.oscog-dtl.1730 Author: dtl Time: 16 March 2016, 9:06:26.74934 pm UUID: ad4e53e1-bdbc-4cb9-b5fb-f1229ca4e19f Ancestors: VMMaker.oscog-nice.1729
Allow primitiveUtcWithOffset to accept an optional parameter with an array or object with two or more slots to store UTC posix microseconds and time zone offset in seconds. Compatibility with VMM trunk. Note, consider incorporating ioUtcWithOffset from SVN trunk to provide true atomic primitive.
Feel free to move the code over.
Hi Eliot,
Do you mean move ioUtcWithOffset over? If so I will be happy to do that, although maybe until a few days or weeks from now. I would let you know in advance before making any changes. I definitely don't want to touch something like that without your approval.
Dave
On Fri, Mar 18, 2016 at 2:51 PM, David T. Lewis lewis@mail.msen.com wrote:
On Fri, Mar 18, 2016 at 01:31:23PM -0700, Eliot Miranda wrote:
Hi David,
On Wed, Mar 16, 2016 at 6:07 PM, commits@source.squeak.org wrote:
David T. Lewis uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-dtl.1730.mcz
==================== Summary ====================
Name: VMMaker.oscog-dtl.1730 Author: dtl Time: 16 March 2016, 9:06:26.74934 pm UUID: ad4e53e1-bdbc-4cb9-b5fb-f1229ca4e19f Ancestors: VMMaker.oscog-nice.1729
Allow primitiveUtcWithOffset to accept an optional parameter with an
array
or object with two or more slots to store UTC posix microseconds and
time
zone offset in seconds. Compatibility with VMM trunk. Note, consider incorporating ioUtcWithOffset from SVN trunk to provide true atomic primitive.
Feel free to move the code over.
Hi Eliot,
Do you mean move ioUtcWithOffset over? If so I will be happy to do that, although maybe until a few days or weeks from now. I would let you know in advance before making any changes. I definitely don't want to touch something like that without your approval.
Yes. And no hurry. Remember that at some point I plan to implement the clock following scheme I wrote up recently, and that may introduce some renamings. But getting the concepts such as atomic access to UTC and offset in one go is still important, even if things get rewritten a little.
_,,,^..^,,,_ best, Eliot
On Fri, Mar 18, 2016 at 03:02:20PM -0700, Eliot Miranda wrote:
On Fri, Mar 18, 2016 at 2:51 PM, David T. Lewis lewis@mail.msen.com wrote:
On Fri, Mar 18, 2016 at 01:31:23PM -0700, Eliot Miranda wrote:
Hi David,
On Wed, Mar 16, 2016 at 6:07 PM, commits@source.squeak.org wrote:
David T. Lewis uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-dtl.1730.mcz
==================== Summary ====================
Name: VMMaker.oscog-dtl.1730 Author: dtl Time: 16 March 2016, 9:06:26.74934 pm UUID: ad4e53e1-bdbc-4cb9-b5fb-f1229ca4e19f Ancestors: VMMaker.oscog-nice.1729
Allow primitiveUtcWithOffset to accept an optional parameter with an
array
or object with two or more slots to store UTC posix microseconds and
time
zone offset in seconds. Compatibility with VMM trunk. Note, consider incorporating ioUtcWithOffset from SVN trunk to provide true atomic primitive.
Feel free to move the code over.
Hi Eliot,
Do you mean move ioUtcWithOffset over? If so I will be happy to do that, although maybe until a few days or weeks from now. I would let you know in advance before making any changes. I definitely don't want to touch something like that without your approval.
Yes. And no hurry. Remember that at some point I plan to implement the clock following scheme I wrote up recently, and that may introduce some renamings. But getting the concepts such as atomic access to UTC and offset in one go is still important, even if things get rewritten a little.
OK good, I'll get to it as soon as I can, and I will let you know in advance before changing anything.
Dave
vm-dev@lists.squeakfoundation.org