Pharo-dev
By thread
pharo-dev@lists.pharo.org
By month
Messages by month
- ----- 2026 -----
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
October 2015
- 891 messages
Confusing Date parsing
by Torsten Bergmann
Also
Date readFrom: '9.7.2015' readStream pattern: 'ddmmyyyy'.
works, but
Date readFrom: '23.7.2015' readStream pattern: 'ddmmyyyy'.
throws an error. I'm confused...
Oct. 18, 2015
Re: [Pharo-dev] [Vm-dev] Re: Random forest in Pharo
by Ben Coman
On Sat, Oct 17, 2015 at 2:25 AM, Robert Withers
<robert.w.withers(a)gmail.com> wrote:
> Yes, exactly. I do realize I was consciously changing that effort
> synchronization order.
I see 64-bit being higher priority than multi-threaded for the wider
community. Dealing with larger in-Image data opens the door to more
corporate project/funding opportunities. Also simplifying the install
on modern Linux platforms without requiring additional 386 libraries
will help acceptance there.
> It is my humble opinion, without really knowing, that 64-bit would have to be redone after the MTVM completes.
I would assume it was the other way around. Presuming that Eliot has
sponsors influencing his priorities, it seems given that 64-bits will
happen first. I would guess any MTVM development on the old vm would
then need to be reworked.
> I was doing so with the idea in mind that I and others
> might dig into working on the VM, for threading support, while Eliot
> maintains focus on 64-bits...a tall order, I know.
The usual downside of splitting resources applies. There are not that
many "others" and maybe they would be drawn away from helping with the
64-bit vm. If the 64-bit vm goes slower for lack of resources then
your footing for MTVM will shifting for a longer time. You may
ultimately get where you want to go faster by helping with the 64-bit
vm. The rapport built with other vm devs from working on 64-bit might
could then be applied to MTVM. (Of course, its your free time, so you
should pursue what interests you.)
> I was barely familiar with the VM, slang, interpreter, it years ago...
> I'm totally unfamiliar with cog.
The experience you gain from working beside Esteban and Eliot on
64-bit Cog/Spur could then be applied to a MTVM.
btw, you may find these threads interesting...
* http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/2015-April/10864…
* http://forum.world.st/Copy-on-write-for-a-multithreaded-VM-td4837905.html
cheers -ben
>I believe another item on that list ought to be modernizing slang. So
> many big items!
>
> Robert
>
>
>
> On 10/16/2015 12:48 PM, Stephan Eggermont wrote:
>>
>>
>> On 16-10-15 14:05, Robert Withers wrote:
>>>
>>> Because of that assumption I've made and without the responsibilities
>>> you have, Esteban, but recognizing modernizing NB to FFI, my desired
>>> list is:
>>
>>
>> I would expect the least total effort to be needed by keeping the work
>> of Esteban and Eliot as much as possible aligned. That is what Esteban's
>> list achieves.
>>
>> Stephan
>>
>>
>
Oct. 18, 2015
Confusing Date parsing
by Torsten Bergmann
'9.7.2015' asDate returns the 7th of September, I would have expected 9th of July
because in Date readFrom: comment it is stated:
readFrom: aStream
"Read a Date from the stream in any of the forms:
<day> <month> <year> (15 April 1982; 15-APR-82; 15.4.82; 15APR82)
<month> <day> <year> (April 15, 1982; 4/15/82)
<year>-<month>-<day> (1982-04-15) (ISO8601)"
According to this the order day, month, year with a $. as separator should be valid.
When I try '15.4.82' asDate als does not work, it gives an error that the month is exceeded with 15...
Looks like this is not correctly implemented/backed up by tests. Or the comment is just wrong.
Should I open an issue?
Thanks
T.
Oct. 18, 2015
Re: [Pharo-dev] interesting recursive out-of-memory error
by Eliot Miranda
Hi Nicolai,
> On Oct 18, 2015, at 3:16 AM, Nicolai Hess <nicolaihess(a)gmail.com> wrote:
>
> Thanks eliot.
> Did you run anything that consumed much memory?
> Platform linux?
I filed in a small package that is entirely Smalltalk code, ran a very simple example in the context of a GT playground, played around with a colleague exploring the playground, diving into and out of the structure, and then left it alone for perhaps a half hour until I returned, at which point it appeared to lock up as soon as I started interacting with it to shut it down.
_,,,^..^,,,_ (phone)
>
>
> 2015-10-18 2:24 GMT+02:00 Eliot Miranda <eliot.miranda(a)gmail.com>:
>> Hi All,
>>
>> this in a bleeding edge Pharo 5 image which had been left standing with a Playground open which, when I clicked on it after leaving it for over an hour, got into an infinite recursion failing to allocate an object as part of opening a file to write an error report to. Here's the infinite recursion beginning. Full crash.mp attached.
>>
>> 0x3ebf4bf8 s OutOfMemory class(Exception class)>signal
>> 0x3ebf4c54 s OutOfMemory class(Behavior)>basicNew
>> 0x3ebf4cb0 s OutOfMemory class(Behavior)>new
>> 0x3ebf4d0c s OutOfMemory class(Exception class)>signal
>> 0x3ebe52ec s OutOfMemory class(Behavior)>basicNew
>> 0x3ebf4d68 s OutOfMemory class(Behavior)>new
>> 0x3ebf4dc4 s OutOfMemory class(Exception class)>signal
>> 0x3ebf4e20 s OutOfMemory class(Behavior)>basicNew
>> 0x3ebf4e7c s OutOfMemory class(Behavior)>new
>> 0x3ebf4ed8 s OutOfMemory class(Exception class)>signal
>> 0x3ebf4f34 s OutOfMemory class(Behavior)>basicNew
>> 0x3ebf4f90 s OutOfMemory class(Behavior)>new
>> 0x3ebf4fec s OutOfMemory class(Exception class)>signal
>> 0x3ebe5290 s WeakFinalizerItem class(Behavior)>basicNew:
>> 0x3ebf5048 s WeakFinalizerItem class>new
>> 0x3ebf50a4 s [] in WeakRegistry>add:executor:
>> 0x3ebe5234 s WeakIdentityKeyDictionary(Dictionary)>at:ifAbsent:
>> 0x3ebe51c4 s [] in WeakRegistry>add:executor:
>> 0x3ebf4860 s BlockClosure>on:do:
>> 0x3ebe5154 s BlockClosure>ifError:
>> 0x3ebe50e4 s [] in Semaphore>critical:ifError:
>> 0x3ebf48bc s [] in Semaphore>critical:
>> 0x3ebf4918 s BlockClosure>ensure:
>> 0x3ebe505c s Semaphore>critical:
>> 0x3ebe4fdc s Semaphore>critical:ifError:
>> 0x3ebe4f5c s WeakRegistry>protected:
>> 0x3ebe4ee8 s WeakRegistry>add:executor:
>> 0x3ebf4974 s WeakRegistry>add:
>> 0x3ebf49d0 s MultiByteFileStream class(StandardFileStream class)>register:
>> 0x3ebf4a2c s MultiByteFileStream(StandardFileStream)>register
>> 0x3ebe4de0 s MultiByteFileStream(StandardFileStream)>open:forWrite:
>> 0x3ebe4e58 s MultiByteFileStream>open:forWrite:
>> 0x3ebf4524 s MultiByteFileStream class(StandardFileStream class)>readOnlyFileNamed:
>> 0x3ebf4580 s MultiByteFileStream(StandardFileStream)>readOnlyCopy
>> 0x3ebf45dc s [] in SourceFileArray>readStreamAtFileIndex:atPosition:ifPresent:ifAbsent:
>> 0x3ebf4638 s BlockClosure>on:do:
>> 0x3ebe4cc8 s SourceFileArray>readStreamAtFileIndex:atPosition:ifPresent:ifAbsent:
>> 0x3ebf4694 s SourceFileArray>readStreamAt:ifPresent:ifAbsent:
>> 0x3ebe4be8 s SourceFileArray>sourceCodeAt:
>> 0x3ebe4c64 s [] in CompiledMethod>getSourceFromFile
>> 0x3ebf418c s BlockClosure>on:do:
>> 0x3ebe4b6c s CompiledMethod>getSourceFromFile
>> 0x3ebf41e8 s CompiledMethod>sourceCode
>> 0x3ebf4244 s CompiledMethod>parseTree
>> 0x3ebf42a0 s [] in ASTCache>at:
>> 0x3ebf42fc s [] in ASTCache(Dictionary)>at:ifAbsentPut:
>> 0x3ebf4358 s ASTCache(Dictionary)>at:ifAbsent:
>> 0x3ebe4adc s ASTCache(Dictionary)>at:ifAbsentPut:
>> 0x3ebe4a6c s ASTCache>at:
>> 0x3ebe4a10 s ASTCache class>at:
>> 0x3ebe49b4 s CompiledMethod>ast
>> 0x3ebf3ce0 s CompiledMethod>sourceNode
>> 0x3ebf3d3c s CompiledMethod>sourceNodeForPC:
>> 0x3ebf3d98 s BlockClosure>sourceNode
>> 0x3ebf3df4 s BlockClosure>printOn:
>> 0x3ebf3e50 s [] in BlockClosure(Object)>printStringLimitedTo:
>> 0x3ebe4944 s String class(SequenceableCollection class)>streamContents:limitedTo:
>> 0x3ebe4850 s BlockClosure(Object)>printStringLimitedTo:
>> 0x3ebf3eac s BlockClosure(Object)>printString
>> 0x3ebf3f08 s Context>printOn:
>> 0x3ebf3f64 s Context>printDebugOn:
>> 0x3ebf3fc0 s [] in Context>debugStack:on:
>> 0x3ebe44c8 s OrderedCollection>do:
>> 0x3ebe4458 s Context>debugStack:on:
>> 0x3ebf3a00 s Context>shortDebugStackOn:
>> 0x3ebf3a5c s [] in ControlButtonMorph(Morph)>drawErrorOn:
>> 0x3ebf3ab8 s String class(SequenceableCollection class)>new:streamContents:
>> 0x3ebf3b14 s String class(SequenceableCollection class)>streamContents:
>> 0x3ebe4318 s [] in ControlButtonMorph(Morph)>drawErrorOn:
>> 0x3ebe42b4 s ControlButtonMorph(Morph)>valueOfProperty:ifPresentDo:
>> 0x3ebe41e0 s ControlButtonMorph(Morph)>drawErrorOn:
>> 0x3ebe4244 s [] in ControlButtonMorph(Morph)>fullDrawOn:
>> 0x3ebf377c s BlockClosure>cull:
>> 0x3ebf37d8 s Context>evaluateSignal:
>> 0x3ebf3834 s Context>handleSignal:
>> 0x3ebe1608 s OutOfMemory(Exception)>signal
>> 0x3ebe1664 s OutOfMemory class(Exception class)>signal
>> 0x3ebe158c s BalloonBuffer class(Behavior)>basicNew:
>> 0x3ebe1830 s BalloonBuffer class(Behavior)>new:
>> 0x3ebe1478 s BalloonEngine class>allocateOrRecycleBuffer:
>> 0x3ebe1944 s BalloonEngine>reset
>> 0x3ebe1530 s BalloonEngine>resetIfNeeded
>> 0x3ebe14d4 s BalloonEngine>drawRectangle:fill:borderWidth:borderColor:transform:
>> 0x3ebe1ab4 s BalloonCanvas>drawRectangle:color:borderWidth:borderColor:
>> 0x3ebe1b6c s BalloonCanvas>fillRectangle:basicFillStyle:
>> 0x3ebe1c24 s FormCanvas>balloonFillRectangle:fillStyle:
>> 0x3ebe1cdc s FormCanvas>fillRectangle:basicFillStyle:
>> 0x3ebe1d94 s GradientFillStyle(FillStyle)>fillRectangle:on:
>> 0x3ebe1e4c s FormCanvas(Canvas)>fillRectangle:fillStyle:
>> 0x3ebe1f04 s FormCanvas(Canvas)>fillRectangle:fillStyle:borderStyle:
>> 0x3ebe1fbc s ControlButtonMorph(Morph)>drawOn:
>> 0x3ebdf0fc s FormCanvas(Canvas)>draw:
>> 0x3ebdf0a0 s FormCanvas(Canvas)>drawMorph:
>> 0x3ebe212c s [] in ControlButtonMorph(Morph)>fullDrawOn:
>> 0x3ebe21e4 s FormCanvas>roundCornersOf:in:during:
>> 0x3ebe229c s FormCanvas(Canvas)>roundCornersOf:during:
>> 0x3ebdf030 s [] in ControlButtonMorph(Morph)>fullDrawOn:
>> 0x3ebe16c0 s BlockClosure>on:do:
>> 0x3ebdefac s ControlButtonMorph(Morph)>fullDrawOn:
>> 0x3ebe2468 s FormCanvas(Canvas)>fullDraw:
>> 0x3ebe2520 s FormCanvas(Canvas)>fullDrawMorph:
>> 0x3ebe25d8 s [] in SearchMorph(Morph)>drawSubmorphsOn:
>> 0x3ebe2690 s Array(SequenceableCollection)>reverseDo:
>> 0x3ebdef3c s [] in SearchMorph(Morph)>drawSubmorphsOn:
>> 0x3ebe27a4 s FormCanvas>clipBy:during:
>> 0x3ebded5c s SearchMorph(Morph)>drawSubmorphsOn:
>> 0x3ebdedc8 s SearchMorph(DropListMorph)>drawSubmorphsOn:
>> 0x3ebe2914 s [] in SearchMorph(Morph)>fullDrawOn:
>> 0x3ebe29cc s FormCanvas>roundCornersOf:in:during:
>> 0x3ebe2a84 s FormCanvas(Canvas)>roundCornersOf:during:
>> 0x3ebdecc8 s [] in SearchMorph(Morph)>fullDrawOn:
>> 0x3ebe2b98 s BlockClosure>on:do:
>> 0x3ebdec44 s SearchMorph(Morph)>fullDrawOn:
>> 0x3ebe2cac s FormCanvas(Canvas)>fullDraw:
>> 0x3ebe2d64 s FormCanvas(Canvas)>fullDrawMorph:
>> 0x3ebe2e1c s [] in SystemWindow(Morph)>drawSubmorphsOn:
>> 0x3ebd976c s Array(SequenceableCollection)>reverseDo:
>> 0x3ebd96fc s [] in SystemWindow(Morph)>drawSubmorphsOn:
>> 0x3ebe2f8c s FormCanvas>clipBy:during:
>> 0x3ebd9584 s SystemWindow(Morph)>drawSubmorphsOn:
>> 0x3ebe30a0 s [] in SystemWindow(Morph)>fullDrawOn:
>> 0x3ebe3158 s FormCanvas>roundCornersOf:in:during:
>> 0x3ebe3210 s FormCanvas(Canvas)>roundCornersOf:during:
>> 0x3ebd94f0 s [] in SystemWindow(Morph)>fullDrawOn:
>> 0x3ebe3324 s BlockClosure>on:do:
>> 0x3ebd946c s SystemWindow(Morph)>fullDrawOn:
>> 0x3ebd9410 s FormCanvas(Canvas)>fullDraw:
>> 0x3ebd93b4 s FormCanvas(Canvas)>fullDrawMorph:
>> 0x3ebd9004 s [] in WorldState>drawWorld:submorphs:invalidAreasOn:
>> 0x3ebe35ec s Rectangle>allAreasOutsideList:startingAt:do:
>> 0x3ebe36a4 s Rectangle>allAreasOutsideList:do:
>> 0x3ebd8e94 s [] in WorldState>drawWorld:submorphs:invalidAreasOn:
>> 0x3ebe3858 s Array(SequenceableCollection)>do:
>> 0x3ebd8b98 s WorldState>drawWorld:submorphs:invalidAreasOn:
>> 0x3ebd8c94 s [] in WorldState>displayWorld:submorphs:
>> 0x3ebe3a68 s FormCanvas>roundCornersOf:in:during:
>> 0x3ebe3b20 s FormCanvas(Canvas)>roundCornersOf:during:
>> 0x3ebd8aa8 s WorldState>displayWorld:submorphs:
>> 0x3ebe3c34 s WorldMorph>displayWorld
>> 0x3ebe3cec s [] in WorldState>displayWorldSafely:
>> 0x3ebe3da4 s BlockClosure>on:do:
>> 0x3ebd8a2c s BlockClosure>ifError:
>> 0x3ebd89ac s WorldState>displayWorldSafely:
>> 0x3ebd3df4 s WorldState>doOneCycleNowFor:
>> 0x3ebe3f70 s WorldState>doOneCycleFor:
>> 0x3ebe4028 s WorldMorph>doOneCycle
>> 0x2162ad58 s [] in MorphicUIManager>spawnNewProcess
>> 0x21629f30 s [] in BlockClosure>newProcess
>>
>>
>>
>> _,,,^..^,,,_
>> best, Eliot
>
Oct. 18, 2015
Re: [Pharo-dev] interesting recursive out-of-memory error
by Nicolai Hess
Thanks eliot.
Did you run anything that consumed much memory?
Platform linux?
2015-10-18 2:24 GMT+02:00 Eliot Miranda <eliot.miranda(a)gmail.com>:
> Hi All,
>
> this in a bleeding edge Pharo 5 image which had been left standing
> with a Playground open which, when I clicked on it after leaving it for
> over an hour, got into an infinite recursion failing to allocate an object
> as part of opening a file to write an error report to. Here's the infinite
> recursion beginning. Full crash.mp attached.
>
> 0x3ebf4bf8 s OutOfMemory class(Exception class)>signal
> 0x3ebf4c54 s OutOfMemory class(Behavior)>basicNew
> 0x3ebf4cb0 s OutOfMemory class(Behavior)>new
> 0x3ebf4d0c s OutOfMemory class(Exception class)>signal
> 0x3ebe52ec s OutOfMemory class(Behavior)>basicNew
> 0x3ebf4d68 s OutOfMemory class(Behavior)>new
> 0x3ebf4dc4 s OutOfMemory class(Exception class)>signal
> 0x3ebf4e20 s OutOfMemory class(Behavior)>basicNew
> 0x3ebf4e7c s OutOfMemory class(Behavior)>new
> 0x3ebf4ed8 s OutOfMemory class(Exception class)>signal
> 0x3ebf4f34 s OutOfMemory class(Behavior)>basicNew
> 0x3ebf4f90 s OutOfMemory class(Behavior)>new
> 0x3ebf4fec s OutOfMemory class(Exception class)>signal
> 0x3ebe5290 s WeakFinalizerItem class(Behavior)>basicNew:
> 0x3ebf5048 s WeakFinalizerItem class>new
> 0x3ebf50a4 s [] in WeakRegistry>add:executor:
> 0x3ebe5234 s WeakIdentityKeyDictionary(Dictionary)>at:ifAbsent:
> 0x3ebe51c4 s [] in WeakRegistry>add:executor:
> 0x3ebf4860 s BlockClosure>on:do:
> 0x3ebe5154 s BlockClosure>ifError:
> 0x3ebe50e4 s [] in Semaphore>critical:ifError:
> 0x3ebf48bc s [] in Semaphore>critical:
> 0x3ebf4918 s BlockClosure>ensure:
> 0x3ebe505c s Semaphore>critical:
> 0x3ebe4fdc s Semaphore>critical:ifError:
> 0x3ebe4f5c s WeakRegistry>protected:
> 0x3ebe4ee8 s WeakRegistry>add:executor:
> 0x3ebf4974 s WeakRegistry>add:
> 0x3ebf49d0 s MultiByteFileStream class(StandardFileStream class)>register:
> 0x3ebf4a2c s MultiByteFileStream(StandardFileStream)>register
> 0x3ebe4de0 s MultiByteFileStream(StandardFileStream)>open:forWrite:
> 0x3ebe4e58 s MultiByteFileStream>open:forWrite:
> 0x3ebf4524 s MultiByteFileStream class(StandardFileStream
> class)>readOnlyFileNamed:
> 0x3ebf4580 s MultiByteFileStream(StandardFileStream)>readOnlyCopy
> 0x3ebf45dc s [] in
> SourceFileArray>readStreamAtFileIndex:atPosition:ifPresent:ifAbsent:
> 0x3ebf4638 s BlockClosure>on:do:
> 0x3ebe4cc8 s
> SourceFileArray>readStreamAtFileIndex:atPosition:ifPresent:ifAbsent:
> 0x3ebf4694 s SourceFileArray>readStreamAt:ifPresent:ifAbsent:
> 0x3ebe4be8 s SourceFileArray>sourceCodeAt:
> 0x3ebe4c64 s [] in CompiledMethod>getSourceFromFile
> 0x3ebf418c s BlockClosure>on:do:
> 0x3ebe4b6c s CompiledMethod>getSourceFromFile
> 0x3ebf41e8 s CompiledMethod>sourceCode
> 0x3ebf4244 s CompiledMethod>parseTree
> 0x3ebf42a0 s [] in ASTCache>at:
> 0x3ebf42fc s [] in ASTCache(Dictionary)>at:ifAbsentPut:
> 0x3ebf4358 s ASTCache(Dictionary)>at:ifAbsent:
> 0x3ebe4adc s ASTCache(Dictionary)>at:ifAbsentPut:
> 0x3ebe4a6c s ASTCache>at:
> 0x3ebe4a10 s ASTCache class>at:
> 0x3ebe49b4 s CompiledMethod>ast
> 0x3ebf3ce0 s CompiledMethod>sourceNode
> 0x3ebf3d3c s CompiledMethod>sourceNodeForPC:
> 0x3ebf3d98 s BlockClosure>sourceNode
> 0x3ebf3df4 s BlockClosure>printOn:
> 0x3ebf3e50 s [] in BlockClosure(Object)>printStringLimitedTo:
> 0x3ebe4944 s String class(SequenceableCollection
> class)>streamContents:limitedTo:
> 0x3ebe4850 s BlockClosure(Object)>printStringLimitedTo:
> 0x3ebf3eac s BlockClosure(Object)>printString
> 0x3ebf3f08 s Context>printOn:
> 0x3ebf3f64 s Context>printDebugOn:
> 0x3ebf3fc0 s [] in Context>debugStack:on:
> 0x3ebe44c8 s OrderedCollection>do:
> 0x3ebe4458 s Context>debugStack:on:
> 0x3ebf3a00 s Context>shortDebugStackOn:
> 0x3ebf3a5c s [] in ControlButtonMorph(Morph)>drawErrorOn:
> 0x3ebf3ab8 s String class(SequenceableCollection class)>new:streamContents:
> 0x3ebf3b14 s String class(SequenceableCollection class)>streamContents:
> 0x3ebe4318 s [] in ControlButtonMorph(Morph)>drawErrorOn:
> 0x3ebe42b4 s ControlButtonMorph(Morph)>valueOfProperty:ifPresentDo:
> 0x3ebe41e0 s ControlButtonMorph(Morph)>drawErrorOn:
> 0x3ebe4244 s [] in ControlButtonMorph(Morph)>fullDrawOn:
> 0x3ebf377c s BlockClosure>cull:
> 0x3ebf37d8 s Context>evaluateSignal:
> 0x3ebf3834 s Context>handleSignal:
> 0x3ebe1608 s OutOfMemory(Exception)>signal
> 0x3ebe1664 s OutOfMemory class(Exception class)>signal
> 0x3ebe158c s BalloonBuffer class(Behavior)>basicNew:
> 0x3ebe1830 s BalloonBuffer class(Behavior)>new:
> 0x3ebe1478 s BalloonEngine class>allocateOrRecycleBuffer:
> 0x3ebe1944 s BalloonEngine>reset
> 0x3ebe1530 s BalloonEngine>resetIfNeeded
> 0x3ebe14d4 s
> BalloonEngine>drawRectangle:fill:borderWidth:borderColor:transform:
> 0x3ebe1ab4 s BalloonCanvas>drawRectangle:color:borderWidth:borderColor:
> 0x3ebe1b6c s BalloonCanvas>fillRectangle:basicFillStyle:
> 0x3ebe1c24 s FormCanvas>balloonFillRectangle:fillStyle:
> 0x3ebe1cdc s FormCanvas>fillRectangle:basicFillStyle:
> 0x3ebe1d94 s GradientFillStyle(FillStyle)>fillRectangle:on:
> 0x3ebe1e4c s FormCanvas(Canvas)>fillRectangle:fillStyle:
> 0x3ebe1f04 s FormCanvas(Canvas)>fillRectangle:fillStyle:borderStyle:
> 0x3ebe1fbc s ControlButtonMorph(Morph)>drawOn:
> 0x3ebdf0fc s FormCanvas(Canvas)>draw:
> 0x3ebdf0a0 s FormCanvas(Canvas)>drawMorph:
> 0x3ebe212c s [] in ControlButtonMorph(Morph)>fullDrawOn:
> 0x3ebe21e4 s FormCanvas>roundCornersOf:in:during:
> 0x3ebe229c s FormCanvas(Canvas)>roundCornersOf:during:
> 0x3ebdf030 s [] in ControlButtonMorph(Morph)>fullDrawOn:
> 0x3ebe16c0 s BlockClosure>on:do:
> 0x3ebdefac s ControlButtonMorph(Morph)>fullDrawOn:
> 0x3ebe2468 s FormCanvas(Canvas)>fullDraw:
> 0x3ebe2520 s FormCanvas(Canvas)>fullDrawMorph:
> 0x3ebe25d8 s [] in SearchMorph(Morph)>drawSubmorphsOn:
> 0x3ebe2690 s Array(SequenceableCollection)>reverseDo:
> 0x3ebdef3c s [] in SearchMorph(Morph)>drawSubmorphsOn:
> 0x3ebe27a4 s FormCanvas>clipBy:during:
> 0x3ebded5c s SearchMorph(Morph)>drawSubmorphsOn:
> 0x3ebdedc8 s SearchMorph(DropListMorph)>drawSubmorphsOn:
> 0x3ebe2914 s [] in SearchMorph(Morph)>fullDrawOn:
> 0x3ebe29cc s FormCanvas>roundCornersOf:in:during:
> 0x3ebe2a84 s FormCanvas(Canvas)>roundCornersOf:during:
> 0x3ebdecc8 s [] in SearchMorph(Morph)>fullDrawOn:
> 0x3ebe2b98 s BlockClosure>on:do:
> 0x3ebdec44 s SearchMorph(Morph)>fullDrawOn:
> 0x3ebe2cac s FormCanvas(Canvas)>fullDraw:
> 0x3ebe2d64 s FormCanvas(Canvas)>fullDrawMorph:
> 0x3ebe2e1c s [] in SystemWindow(Morph)>drawSubmorphsOn:
> 0x3ebd976c s Array(SequenceableCollection)>reverseDo:
> 0x3ebd96fc s [] in SystemWindow(Morph)>drawSubmorphsOn:
> 0x3ebe2f8c s FormCanvas>clipBy:during:
> 0x3ebd9584 s SystemWindow(Morph)>drawSubmorphsOn:
> 0x3ebe30a0 s [] in SystemWindow(Morph)>fullDrawOn:
> 0x3ebe3158 s FormCanvas>roundCornersOf:in:during:
> 0x3ebe3210 s FormCanvas(Canvas)>roundCornersOf:during:
> 0x3ebd94f0 s [] in SystemWindow(Morph)>fullDrawOn:
> 0x3ebe3324 s BlockClosure>on:do:
> 0x3ebd946c s SystemWindow(Morph)>fullDrawOn:
> 0x3ebd9410 s FormCanvas(Canvas)>fullDraw:
> 0x3ebd93b4 s FormCanvas(Canvas)>fullDrawMorph:
> 0x3ebd9004 s [] in WorldState>drawWorld:submorphs:invalidAreasOn:
> 0x3ebe35ec s Rectangle>allAreasOutsideList:startingAt:do:
> 0x3ebe36a4 s Rectangle>allAreasOutsideList:do:
> 0x3ebd8e94 s [] in WorldState>drawWorld:submorphs:invalidAreasOn:
> 0x3ebe3858 s Array(SequenceableCollection)>do:
> 0x3ebd8b98 s WorldState>drawWorld:submorphs:invalidAreasOn:
> 0x3ebd8c94 s [] in WorldState>displayWorld:submorphs:
> 0x3ebe3a68 s FormCanvas>roundCornersOf:in:during:
> 0x3ebe3b20 s FormCanvas(Canvas)>roundCornersOf:during:
> 0x3ebd8aa8 s WorldState>displayWorld:submorphs:
> 0x3ebe3c34 s WorldMorph>displayWorld
> 0x3ebe3cec s [] in WorldState>displayWorldSafely:
> 0x3ebe3da4 s BlockClosure>on:do:
> 0x3ebd8a2c s BlockClosure>ifError:
> 0x3ebd89ac s WorldState>displayWorldSafely:
> 0x3ebd3df4 s WorldState>doOneCycleNowFor:
> 0x3ebe3f70 s WorldState>doOneCycleFor:
> 0x3ebe4028 s WorldMorph>doOneCycle
> 0x2162ad58 s [] in MorphicUIManager>spawnNewProcess
> 0x21629f30 s [] in BlockClosure>newProcess
>
>
>
> _,,,^..^,,,_
> best, Eliot
>
Oct. 18, 2015
Re: [Pharo-dev] Storing System Settings using STON
by stepharo
Can you past the full tree so that I understand?
Oct. 18, 2015
Re: [Pharo-dev] [Cryptography port to Pharo] RandomGenerator class>>unpredictableStringsDo:
by Robert Withers
I'm sorry, I forgot the code. I list the existing method, followed by my
modified Pharo method below. I welcome any feedback.
Regards,
Robert
---
Existing:
unpredictableStringsDo: aBlock
"Enumerate sources of information from my environment that should be
generally hard to guess."
| time |
time := Time millisecondsToRun:
[ aBlock
value: World imageForm bits compressToByteArray ;
value: Sensor mousePoint x asString ;
value: Sensor mousePoint y asString ;
value: Time millisecondClockValue asByteArray ;
value: Date today asString ;
value: Time now asString ;
value: Display extent asString.
100 timesRepeat: [ aBlock value: UUID new ].
#(vmVersion platformName primVmPath imageName platformSubtype
datedVersion lastQuitLogPosition vmStatisticsReportString imageName)
collect:
[ : each |
aBlock value: (SmalltalkImage current perform: each) asByteArray ] ].
aBlock
value: time asByteArray;
"maybe the pointer has moved, hit it again."
value: Sensor mousePoint asString ;
value: Time millisecondClockValue asByteArray
---
Pharo port:
unpredictableStringsDo: aBlock
"Enumerate sources of information from my environment that should be
generally hard to guess."
| time |
time := Time millisecondsToRun:
[ aBlock
value: Time millisecondClockValue asByteArray ;
value: Date today asString ;
value: Time now asString.
100 timesRepeat: [ aBlock value: UUID new ].
#(version primImagePath imagePath datedVersion lastQuitLogPosition)
collect:
[ : each |
aBlock value: (SmalltalkImage current perform: each) asByteArray ] ].
aBlock
value: time asByteArray;
value: Time millisecondClockValue asByteArray
On 10/18/2015 04:23 AM, Robert Withers wrote:
> This is a message intended for anyone who was on the Cryptography team.
> I recently ported it to Pharo and had to make changes to RandomGenerator
> class>>unpredictableStringsDo:. This certainly removed some uncertainty
> from the results of this message. My question is what should I do about
> that? This method seems to require non-headless, as it is checking the
> mouse point and such. This being a crypto cornerstone, what the best
> answer here.
>
> Thank you,
> Robert
Oct. 18, 2015
[Cryptography port to Pharo] RandomGenerator class>>unpredictableStringsDo:
by Robert Withers
This is a message intended for anyone who was on the Cryptography team.
I recently ported it to Pharo and had to make changes to RandomGenerator
class>>unpredictableStringsDo:. This certainly removed some uncertainty
from the results of this message. My question is what should I do about
that? This method seems to require non-headless, as it is checking the
mouse point and such. This being a crypto cornerstone, what the best
answer here.
Thank you,
Robert
Oct. 18, 2015
Re: [Pharo-dev] [Vm-dev] VM Maker: VMMaker.oscog-eem.1492.mcz
by Robert Withers
I think I have a 32-bit ubuntu install so these changes may not make a
difference. Although, would I be able to run 64-bit images in the
simulator on a 32-bit machine? That would be very cool.
I would still be interested in building the latest VMMaker generated
code in Pharo. In search of training and guidance, is there a write up
on which packages to load (Cog, Cog.pharo, CogVMMakerPharoCompatibility,
VMMaker.oscog, ...)?
thank you,
Robert
On 10/18/2015 12:33 AM, commits(a)source.squeak.org wrote:
>
> Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
> http://source.squeak.org/VMMaker/VMMaker.oscog-eem.1492.mcz
>
> ==================== Summary ====================
>
> Name: VMMaker.oscog-eem.1492
> Author: eem
> Time: 17 October 2015, 5:32:12.348 pm
> UUID: a0778a36-b0e9-4e06-af1a-0e50572c9db1
> Ancestors: VMMaker.oscog-eem.1491
>
> x64 Cogit:
> Get the Cogit to a state where the 64-bit Spur image starts simulating. It's a new world ;-)
>
> Reimplement CMethodCacheAccessor, introducing CArrayOfLongsAccessor for the primitive trace log.
>
> Alter CogStackPage and surrogates so that CogStackPageSurrogate64 is properly laid out.
>
> Revise the signedIntToFrom/Foo methods, and add some tests to check their behaviour.
>
> Provide two move multi-tab browser opening conveniences.
>
> =============== Diff against VMMaker.oscog-eem.1491 ===============
>
> Item was added:
> + CObjectAccessor subclass: #CArrayOfLongsAccessor
> + instanceVariableNames: 'objectMemory address elementByteSize'
> + classVariableNames: ''
> + poolDictionaries: ''
> + category: 'VMMaker-JITSimulation'!
> +
> + !CArrayOfLongsAccessor commentStamp: 'eem 10/8/2015 12:49' prior: 0!
> + A CArrayOfLongsAccessor is a class that wraps an Array stored in the heap. It maps at:[put:] into a suitably aligned and offset longAt:[put:], for accessing Arrays stored in the heap, such as the primTraceLog.
> +
> + Instance Variables
> + address: <Integer>
> + entryByteSize: <Integer>
> + objectMemory: <NewCoObjectMemorySimulator|Spur64BitMMLECoSimulator|Spur64BitMMLECoSimulator|Spur64BitMMBECoSimulator|Spur64BitMMBECoSimulator>
> +
> + address
> + - the base address in the heap of the start of the array
> +
> + entryByteSize
> + - the size of an element, in bytes
> +
> + objectMemory
> + - the memory manager whose heap is being accessed
> + !
>
> Item was added:
> + ----- Method: CArrayOfLongsAccessor>>address (in category 'accessing') -----
> + address
> + ^address!
>
> Item was added:
> + ----- Method: CArrayOfLongsAccessor>>at: (in category 'accessing') -----
> + at: index
> + "Map at: into a suitably aligned and offset longAt:, for accessing Arrays stored in the heap, such as the primTraceLog."
> + ^objectMemory longAt: index * elementByteSize + address!
>
> Item was added:
> + ----- Method: CArrayOfLongsAccessor>>at:put: (in category 'accessing') -----
> + at: index put: aValue
> + "Map at:put: into a suitably aligned and offset longAt:put:, for accessing Arrays stored in the heap, such as the primTraceLog."
> + ^objectMemory longAt: index * elementByteSize + address put: aValue!
>
> Item was added:
> + ----- Method: CArrayOfLongsAccessor>>objectMemory:at: (in category 'initialize-release') -----
> + objectMemory: anObjectMemory at: anAddress
> + objectMemory := anObjectMemory.
> + object := anObjectMemory memory.
> + offset := anAddress / anObjectMemory wordSize.
> + elementByteSize := anObjectMemory wordSize.
> + address := anAddress!
>
> Item was changed:
> + CArrayOfLongsAccessor subclass: #CMethodCacheAccessor
> + instanceVariableNames: 'methodCacheArray entrySize functionPointerIndex'
> - CObjectAccessor subclass: #CMethodCacheAccessor
> - instanceVariableNames: 'methodCacheArray functionPointerIndex entrySize'
> classVariableNames: ''
> poolDictionaries: ''
> category: 'VMMaker-JITSimulation'!
>
> !CMethodCacheAccessor commentStamp: '<historical>' prior: 0!
> I am used to simulate accesses to the methodCache so it can live partly in memory, partly in a Smalltalk Array. This is necessary because in simulation function pointers are Smalltalk symbols (under simulation primitive dispatch is done via perform:).
> !
>
> Item was changed:
> ----- Method: CMethodCacheAccessor>>at: (in category 'accessing') -----
> at: index
> "The special handling of functionPointerIndex is necessary because in simulation function
> pointers are Smalltalk symbols (under simulation primitive dispatch is done via perform:)."
> index - 1 \\ entrySize = functionPointerIndex ifTrue:
> [^methodCacheArray at: index].
> + ^objectMemory longAt: index * elementByteSize + address!
> - ^object at: index + offset!
>
> Item was changed:
> ----- Method: CMethodCacheAccessor>>at:put: (in category 'accessing') -----
> at: index put: value
> "The special handling of functionPointerIndex is necessary because in simulation function
> pointers are Smalltalk symbols (under simulation primitive dispatch is done via perform:)."
> + (index = 16r44F and: [value = 16r1D]) ifTrue:
> + [self halt].
> index - 1 \\ entrySize = functionPointerIndex ifTrue:
> + [objectMemory longAt: index * elementByteSize + address put: (0 = value ifTrue: [value] ifFalse: [value identityHash]).
> + ^methodCacheArray at: index put: value].
> + ^objectMemory longAt: index * elementByteSize + address put: value!
> - [^methodCacheArray at: index put: value].
> - ^object at: index + offset put: value!
>
> Item was removed:
> - ----- Method: CMethodCacheAccessor>>memory:offset:array:functionPointerIndex:entrySize: (in category 'initialize-release') -----
> - memory: anObject offset: baseIndex array: cacheArray functionPointerIndex: fpIndex entrySize: esz
> - object := anObject.
> - offset := baseIndex.
> - methodCacheArray := cacheArray.
> - functionPointerIndex := fpIndex - 1.
> - entrySize := esz!
>
> Item was added:
> + ----- Method: CMethodCacheAccessor>>objectMemory:at:array:functionPointerIndex:entrySize: (in category 'initialize-release') -----
> + objectMemory: anObjectMemory at: anAddress array: cacheArray functionPointerIndex: fpIndex entrySize: wordsPerCacheEntry
> + self objectMemory: anObjectMemory
> + at: anAddress - anObjectMemory wordSize. "implicit -1 for indices in at:[put:]; the MethodCache is one-relative"
> + methodCacheArray := cacheArray.
> + functionPointerIndex := fpIndex - 1.
> + entrySize := wordsPerCacheEntry!
>
> Item was added:
> + ----- Method: CObjectAccessor class>>defaultIntegerBaseInDebugger (in category 'debugger') -----
> + defaultIntegerBaseInDebugger
> + ^VMClass defaultIntegerBaseInDebugger!
>
> Item was changed:
> ----- Method: CoInterpreter>>methodCacheAddress (in category 'cog jit support') -----
> methodCacheAddress
> <api>
> <returnTypeC: #'void *'>
> + ^self cCode: [methodCache] inSmalltalk: [methodCache address]!
> - ^self cCode: [methodCache] inSmalltalk: [methodCache offset - 1 * objectMemory wordSize]!
>
> Item was changed:
> ----- Method: CoInterpreterStackPages>>longAt:put: (in category 'memory access') -----
> + longAt: byteAddress put: a32Or64BitValue
> - longAt: byteAddress put: a32BitValue
> <doNotGenerate>
> self assert: (byteAddress >= minStackAddress and: [byteAddress < maxStackAddress]).
> + ^objectMemory longAt: byteAddress put: a32Or64BitValue!
> - ^objectMemory longAt: byteAddress put: a32BitValue!
>
> Item was changed:
> ----- Method: CoInterpreterStackPagesLSB>>byteAt: (in category 'memory access') -----
> byteAt: byteAddress
> | lowBits long |
> + lowBits := byteAddress bitAnd: objectMemory wordSize - 1.
> - lowBits := byteAddress bitAnd: 3.
> long := self longAt: byteAddress - lowBits.
> + lowBits > 0 ifTrue:
> + [long := long bitShift: lowBits * -8].
> + ^long bitAnd: 16rFF!
> - ^(lowBits caseOf: {
> - [0] -> [ long ].
> - [1] -> [ long bitShift: -8 ].
> - [2] -> [ long bitShift: -16 ].
> - [3] -> [ long bitShift: -24 ]
> - }) bitAnd: 16rFF!
>
> Item was changed:
> ----- Method: CoInterpreterStackPagesLSB>>byteAt:put: (in category 'memory access') -----
> byteAt: byteAddress put: byte
> | lowBits long longAddress |
> + self assert: (byte between: 0 and: 16rFF).
> + lowBits := byteAddress bitAnd: objectMemory wordSize - 1.
> - lowBits := byteAddress bitAnd: 3.
> longAddress := byteAddress - lowBits.
> long := self longAt: longAddress.
> + long := (long bitOr: (16rFF bitShift: lowBits * 8)) bitXor: (byte bitXor: 16rFF).
> - long := lowBits caseOf: {
> - [0] -> [ (long bitAnd: 16rFFFFFF00) bitOr: byte ].
> - [1] -> [ (long bitAnd: 16rFFFF00FF) bitOr: (byte bitShift: 8) ].
> - [2] -> [ (long bitAnd: 16rFF00FFFF) bitOr: (byte bitShift: 16) ].
> - [3] -> [ (long bitAnd: 16r00FFFFFF) bitOr: (byte bitShift: 24) ]
> - }.
> -
> self longAt: longAddress put: long.
> ^byte!
>
> Item was changed:
> VMStructType subclass: #CogStackPage
> + instanceVariableNames: 'stackLimit headSP headFP baseFP baseAddress realStackLimit lastAddress trace padToWord nextPage prevPage'
> - instanceVariableNames: 'stackLimit headSP headFP baseFP baseAddress realStackLimit lastAddress trace nextPage prevPage'
> classVariableNames: ''
> poolDictionaries: 'VMBasicConstants VMBytecodeConstants'
> category: 'VMMaker-Interpreter'!
>
> !CogStackPage commentStamp: 'eem 8/14/2015 12:06' prior: 0!
> I am a class that helps organize the StackInterpreter's collection of stack pages. I represent the control block for a single stack page in the collection of stack pages represented by an InterpreterStackPages or CoInterpreterStackPages instance.!
>
> Item was added:
> + ----- Method: CogStackPage class>>getter:bitPosition:bitWidth:type: (in category 'code generation') -----
> + getter: getter bitPosition: bitPosition bitWidth: bitWidth type: typeOrNil
> + ^String streamContents:
> + [:s| | startByte endByte accessor |
> + startByte := bitPosition // 8.
> + endByte := bitPosition + bitWidth - 1 // 8.
> + self assert: bitPosition \\ 8 = 0.
> + self assert: startByte \\ (bitWidth // 8) = 0.
> + accessor := #('byte' 'short' 'long' 'long')
> + at: endByte - startByte + 1
> + ifAbsent: ['long64'].
> + s nextPutAll: getter; crtab: 1; nextPut: $^.
> + (typeOrNil notNil and: [typeOrNil last = $*]) ifTrue:
> + [accessor := 'unsigned', (accessor copy
> + at: 1 put: accessor first asUppercase;
> + yourself)].
> + (typeOrNil notNil and: ['*StackPage*' match: typeOrNil]) ifTrue:
> + [s nextPutAll: 'stackPages surrogateAtAddress: ('].
> + s nextPutAll: 'memory ';
> + nextPutAll: accessor;
> + nextPutAll: 'At: address + '; print: startByte + 1.
> + (typeOrNil notNil and: ['*StackPage*' match: typeOrNil]) ifTrue:
> + [s nextPut: $)]]
> +
> + "| bitPosition |
> + bitPosition := 0.
> + (self fieldAccessorsForBytesPerWord: 4) collect:
> + [:spec|
> + bitPosition := bitPosition + spec second.
> + self getter: spec first
> + bitPosition: bitPosition - spec second
> + bitWidth: spec second
> + type: (spec at: 3 ifAbsent: [])]"!
>
> Item was changed:
> ----- Method: CogStackPage class>>instVarNamesAndTypesForTranslationDo: (in category 'translation') -----
> instVarNamesAndTypesForTranslationDo: aBinaryBlock
> "enumerate aBinaryBlock with the names and C type strings for the inst vars to include in a StackPage struct."
>
> self allInstVarNames do:
> [:ivn|
> + (ivn = 'padToWord' and: [BytesPerWord = 4]) ifFalse:
> - ivn ~= 'stackPagesMemory' ifTrue:
> [aBinaryBlock
> value: ivn
> + value: ((ivn = 'trace' or: [ivn = 'padToWord'])
> - value: (ivn = 'trace'
> ifTrue: [#int]
> ifFalse:
> [(ivn endsWith: 'Page')
> ifTrue: ['struct _StackPage *']
> ifFalse: [#'char *']])]]!
>
> Item was added:
> + ----- Method: CogStackPage class>>setter:bitPosition:bitWidth:type: (in category 'code generation') -----
> + setter: getter bitPosition: bitPosition bitWidth: bitWidth type: typeOrNil
> + ^String streamContents:
> + [:s| | startByte endByte accessor |
> + startByte := bitPosition // 8.
> + endByte := bitPosition + bitWidth - 1 // 8.
> + self assert: bitPosition \\ 8 = 0.
> + self assert: startByte \\ (bitWidth // 8) = 0.
> + accessor := #('byte' 'short' 'long' 'long')
> + at: endByte - startByte + 1
> + ifAbsent: ['long64'].
> + s nextPutAll: getter; nextPutAll: ': aValue'; crtab: 1;
> + nextPutAll: 'self assert: (address + '; print: startByte;
> + nextPutAll: ' >= zoneBase and: [address + '; print: endByte;
> + nextPutAll: ' < zoneLimit]).'; crtab: 1.
> + (typeOrNil notNil and: [typeOrNil last = $*]) ifTrue:
> + [accessor := 'unsigned', (accessor copy
> + at: 1 put: accessor first asUppercase;
> + yourself)].
> + (typeOrNil notNil and: ['*StackPage*' match: typeOrNil]) ifFalse:
> + [s nextPut: $^].
> + s nextPutAll: 'memory ';
> + nextPutAll: accessor; nextPutAll: 'At: address + '; print: startByte + 1;
> + nextPutAll: ' put: aValue'.
> + (typeOrNil notNil and: ['*StackPage*' match: typeOrNil]) ifTrue:
> + [s nextPutAll: ' asInteger.'; crtab: 1; nextPutAll: '^aValue']]
> +
> + "| bitPosition |
> + bitPosition := 0.
> + (self fieldAccessorsForBytesPerWord: 4) collect:
> + [:spec|
> + bitPosition := bitPosition + spec second.
> + self setter: spec first
> + bitPosition: bitPosition - spec second
> + bitWidth: spec second
> + type: (spec at: 3 ifAbsent: [])]"!
>
> Item was changed:
> + ----- Method: CogStackPageSurrogate32 class>>alignedByteSize (in category 'accessing') -----
> - ----- Method: CogStackPageSurrogate32 class>>alignedByteSize (in category 'instance creation') -----
> alignedByteSize
> ^40!
>
> Item was changed:
> ----- Method: CogStackPageSurrogate32>>nextPage: (in category 'accessing') -----
> nextPage: aValue
> self assert: (address + 32 >= zoneBase and: [address + 35 < zoneLimit]).
> + memory unsignedLongAt: address + 33 put: aValue asInteger.
> + ^aValue!
> - ^memory
> - unsignedLongAt: address + 33
> - put: aValue asInteger!
>
> Item was added:
> + ----- Method: CogStackPageSurrogate32>>padToWord (in category 'accessing') -----
> + padToWord
> + ^memory longAt: address + 33!
>
> Item was added:
> + ----- Method: CogStackPageSurrogate32>>padToWord: (in category 'accessing') -----
> + padToWord: aValue
> + self assert: (address + 32 >= zoneBase and: [address + 35 < zoneLimit]).
> + ^memory longAt: address + 33 put: aValue!
>
> Item was changed:
> ----- Method: CogStackPageSurrogate32>>prevPage: (in category 'accessing') -----
> prevPage: aValue
> self assert: (address + 36 >= zoneBase and: [address + 39 < zoneLimit]).
> + memory unsignedLongAt: address + 37 put: aValue asInteger.
> + ^aValue!
> - ^memory
> - unsignedLongAt: address + 37
> - put: aValue asInteger!
>
> Item was changed:
> ----- Method: CogStackPageSurrogate32>>stackLimit: (in category 'accessing') -----
> stackLimit: aValue
> + self assert: (address + 0 >= zoneBase and: [address + 3 < zoneLimit]).
> + ^memory unsignedLongAt: address + 1 put: aValue!
> - self assert: (address >= zoneBase and: [address + 3 < zoneLimit]).
> - ^memory unsignedLongAt: address + 1 put: aValue signedIntToLong!
>
> Item was changed:
> ----- Method: CogStackPageSurrogate64>>baseAddress (in category 'accessing') -----
> baseAddress
> + ^memory unsignedLong64At: address + 33!
> - ^memory long64At: address + 33!
>
> Item was changed:
> ----- Method: CogStackPageSurrogate64>>baseAddress: (in category 'accessing') -----
> baseAddress: aValue
> self assert: (address + 32 >= zoneBase and: [address + 39 < zoneLimit]).
> + ^memory unsignedLong64At: address + 33 put: aValue!
> - ^memory long64At: address + 33 put: aValue!
>
> Item was changed:
> ----- Method: CogStackPageSurrogate64>>baseFP (in category 'accessing') -----
> baseFP
> + ^memory unsignedLong64At: address + 25!
> - ^memory long64At: address + 25!
>
> Item was changed:
> ----- Method: CogStackPageSurrogate64>>baseFP: (in category 'accessing') -----
> baseFP: aValue
> self assert: (address + 24 >= zoneBase and: [address + 31 < zoneLimit]).
> + ^memory unsignedLong64At: address + 25 put: aValue!
> - ^memory long64At: address + 25 put: aValue!
>
> Item was changed:
> ----- Method: CogStackPageSurrogate64>>headFP (in category 'accessing') -----
> headFP
> + ^memory unsignedLong64At: address + 17!
> - ^memory long64At: address + 17!
>
> Item was changed:
> ----- Method: CogStackPageSurrogate64>>headFP: (in category 'accessing') -----
> headFP: aValue
> self assert: (address + 16 >= zoneBase and: [address + 23 < zoneLimit]).
> + ^memory unsignedLong64At: address + 17 put: aValue!
> - ^memory long64At: address + 17 put: aValue!
>
> Item was changed:
> ----- Method: CogStackPageSurrogate64>>headSP (in category 'accessing') -----
> headSP
> + ^memory unsignedLong64At: address + 9!
> - ^memory long64At: address + 9!
>
> Item was changed:
> ----- Method: CogStackPageSurrogate64>>headSP: (in category 'accessing') -----
> headSP: aValue
> self assert: (address + 8 >= zoneBase and: [address + 15 < zoneLimit]).
> + ^memory unsignedLong64At: address + 9 put: aValue!
> - ^memory long64At: address + 9 put: aValue!
>
> Item was changed:
> ----- Method: CogStackPageSurrogate64>>lastAddress (in category 'accessing') -----
> lastAddress
> + ^memory unsignedLong64At: address + 49!
> - ^memory long64At: address + 49!
>
> Item was changed:
> ----- Method: CogStackPageSurrogate64>>lastAddress: (in category 'accessing') -----
> lastAddress: aValue
> + self assert: (address + 48 >= zoneBase and: [address + 55 < zoneLimit]).
> + ^memory unsignedLong64At: address + 49 put: aValue!
> - self assert: (address + 48 >= zoneBase and: [address + 35 < zoneLimit]).
> - ^memory long64At: address + 49 put: aValue!
>
> Item was changed:
> ----- Method: CogStackPageSurrogate64>>nextPage (in category 'accessing') -----
> nextPage
> + ^stackPages surrogateAtAddress: (memory unsignedLong64At: address + 65)!
> - ^stackPages surrogateAtAddress: (memory long64At: address + 65)!
>
> Item was changed:
> ----- Method: CogStackPageSurrogate64>>nextPage: (in category 'accessing') -----
> nextPage: aValue
> self assert: (address + 64 >= zoneBase and: [address + 71 < zoneLimit]).
> + memory unsignedLong64At: address + 65 put: aValue asInteger.
> + ^aValue!
> - ^memory
> - long64At: address + 65
> - put: aValue asInteger!
>
> Item was added:
> + ----- Method: CogStackPageSurrogate64>>padToWord (in category 'accessing') -----
> + padToWord
> + ^memory long64At: address + 65!
>
> Item was added:
> + ----- Method: CogStackPageSurrogate64>>padToWord: (in category 'accessing') -----
> + padToWord: aValue
> + self assert: (address + 64 >= zoneBase and: [address + 71 < zoneLimit]).
> + ^memory long64At: address + 65 put: aValue!
>
> Item was changed:
> ----- Method: CogStackPageSurrogate64>>prevPage (in category 'accessing') -----
> prevPage
> + ^stackPages surrogateAtAddress: (memory unsignedLong64At: address + 73)!
> - ^stackPages surrogateAtAddress: (memory long64At: address + 73)!
>
> Item was changed:
> ----- Method: CogStackPageSurrogate64>>prevPage: (in category 'accessing') -----
> prevPage: aValue
> self assert: (address + 72 >= zoneBase and: [address + 79 < zoneLimit]).
> + memory unsignedLong64At: address + 73 put: aValue asInteger.
> + ^aValue!
> - ^memory
> - long64At: address + 73
> - put: aValue asInteger!
>
> Item was changed:
> ----- Method: CogStackPageSurrogate64>>realStackLimit (in category 'accessing') -----
> realStackLimit
> + ^memory unsignedLong64At: address + 41!
> - ^memory long64At: address + 41!
>
> Item was changed:
> ----- Method: CogStackPageSurrogate64>>realStackLimit: (in category 'accessing') -----
> realStackLimit: aValue
> self assert: (address + 40 >= zoneBase and: [address + 47 < zoneLimit]).
> + ^memory unsignedLong64At: address + 41 put: aValue!
> - ^memory long64At: address + 41 put: aValue!
>
> Item was changed:
> ----- Method: CogStackPageSurrogate64>>stackLimit (in category 'accessing') -----
> stackLimit
> + ^memory unsignedLong64At: address + 1!
> - ^memory long64At: address + 1!
>
> Item was changed:
> ----- Method: CogStackPageSurrogate64>>stackLimit: (in category 'accessing') -----
> stackLimit: aValue
> + self assert: (address + 0 >= zoneBase and: [address + 7 < zoneLimit]).
> + ^memory unsignedLong64At: address + 1 put: aValue!
> - self assert: (address >= zoneBase and: [address + 7 < zoneLimit]).
> - ^memory long64At: address + 1 put: aValue!
>
> Item was changed:
> ----- Method: CogStackPageSurrogate64>>trace (in category 'accessing') -----
> trace
> + ^memory long64At: address + 57!
> - ^memory longAt: address + 57!
>
> Item was changed:
> ----- Method: CogStackPageSurrogate64>>trace: (in category 'accessing') -----
> trace: aValue
> + self assert: (address + 56 >= zoneBase and: [address + 63 < zoneLimit]).
> + ^memory long64At: address + 57 put: aValue!
> - self assert: (address + 56 >= zoneBase and: [address + 59 < zoneLimit]).
> - ^memory longAt: address + 57 put: aValue!
>
> Item was changed:
> ----- Method: CogVMSimulator>>ceSendFromInLineCacheMiss: (in category 'trampolines') -----
> ceSendFromInLineCacheMiss: oPIC
> "Override to map the address into a CogMethodSurrogate"
> | surrogate |
> surrogate := oPIC isInteger
> ifTrue: [cogit cogMethodSurrogateAt: oPIC]
> ifFalse: [oPIC].
> self logSend: surrogate selector.
> + (surrogate cmNumArgs = 0
> + and: [(self stackValue: 1) = 16r8169D0
> + and: [self stackTop = 16r53EA7]]) ifTrue:
> + [self halt].
> ^super ceSendFromInLineCacheMiss: surrogate!
>
> Item was changed:
> ----- Method: CogVMSimulator>>moveMethodCacheToMemoryAt: (in category 'initialization') -----
> moveMethodCacheToMemoryAt: address
> | oldMethodCache |
> oldMethodCache := methodCache.
> - self flag: 'broken for 64-bit VM because Bitmap access unit is 32-bits'.
> "In the VM the methodCache is written as a normal array with 1-relative addressing.
> In C this works by allocating an extra element in the methodCache array (see
> class-side declareCVarsIn:). In simulation simply position the start of the methodCache
> one word lower, achieving the same effect. -1 because CArrayAccessor is 0-relative
> and adds 1 on accesses itself."
> methodCache := CMethodCacheAccessor new
> + objectMemory: objectMemory
> + at: address
> - memory: objectMemory memory
> - offset: address / objectMemory wordSize
> array: oldMethodCache
> functionPointerIndex: MethodCachePrimFunction
> entrySize: MethodCacheEntrySize.
> + self assert: address - objectMemory wordSize = self methodCacheAddress.
> 1 to: MethodCacheSize do:
> [:i|
> self assert: (methodCache at: i) = 0].
> methodCache at: 1 put: 16rC4EC4.
> + self assert: (objectMemory longAt: address) = 16rC4EC4.
> - self assert: (self longAt: address) = 16rC4EC4.
> 1 to: MethodCacheSize do:
> [:i|
> methodCache at: i put: (oldMethodCache at: i)]!
>
> Item was changed:
> ----- Method: CogVMSimulator>>movePrimTraceLogToMemoryAt: (in category 'initialization') -----
> movePrimTraceLogToMemoryAt: address
> | oldTraceLog |
> oldTraceLog := primTraceLog.
> + primTraceLog := CArrayOfLongsAccessor new
> + objectMemory: objectMemory at: address.
> + self assert: address = self primTraceLogAddress.
> - self flag: 'broken for 64-bit VM because Bitmap access unit is 32-bits'.
> - primTraceLog := CObjectAccessor new
> - memory: objectMemory memory
> - offset: address / objectMemory wordSize.
> 0 to: PrimTraceLogSize - 1 do:
> [:i|
> self assert: (primTraceLog at: i) = 0].
> primTraceLog at: 0 put: 16rC4EC4.
> + self assert: (objectMemory longAt: address) = 16rC4EC4.
> - self assert: (self longAt: address) = 16rC4EC4.
> 0 to: PrimTraceLogSize - 1 do:
> [:i|
> primTraceLog at: i put: (oldTraceLog at: i)]!
>
> Item was changed:
> ----- Method: Cogit>>cCoerceSimple:to: (in category 'translation support') -----
> cCoerceSimple: value to: cTypeString
> <doNotGenerate>
> + cTypeString last == $* ifTrue:
> + [cTypeString == #'CogMethod *' ifTrue:
> + [^(value isInteger and: [value < 0])
> + ifTrue: [value] "it's an error code; leave it be"
> + ifFalse: [self cogMethodSurrogateAt: value asUnsignedInteger]].
> + cTypeString == #'CogBlockMethod *' ifTrue:
> + [^self cogBlockMethodSurrogateAt: value asUnsignedInteger].
> + cTypeString == #'NSSendCache *' ifTrue:
> + [^self nsSendCacheSurrogateAt: value asUnsignedInteger].
> + (cTypeString == #'AbstractInstruction *'
> + and: [value isBehavior]) ifTrue:
> + [^CogCompilerClass].
> + cTypeString == #'StackPage *' ifTrue:
> + [^coInterpreter stackPages surrogateAtAddress: value]].
> - cTypeString == #'CogMethod *' ifTrue:
> - [^(value isInteger and: [value < 0])
> - ifTrue: [value] "it's an error code; leave it be"
> - ifFalse: [self cogMethodSurrogateAt: value asUnsignedInteger]].
> - cTypeString == #'CogBlockMethod *' ifTrue:
> - [^self cogBlockMethodSurrogateAt: value asUnsignedInteger].
> - cTypeString == #'NSSendCache *' ifTrue:
> - [^self nsSendCacheSurrogateAt: value asUnsignedInteger].
> - (cTypeString == #'AbstractInstruction *'
> - and: [value isBehavior]) ifTrue:
> - [^CogCompilerClass].
> ^super cCoerceSimple: value to: cTypeString!
>
> Item was added:
> + ----- Method: Integer>>signedIntFromChar (in category '*VMMaker-interpreter simulator') -----
> + signedIntFromChar
> + "Self is an unsigned 8-bit integer in twos-comp form"
> +
> + | shortBits |
> + shortBits := self bitAnd: 16rFF.
> + ^(self bitAnd: 16r80) "sign bit" = 0
> + ifTrue: [shortBits]
> + ifFalse: [shortBits - 16r100]!
>
> Item was changed:
> ----- Method: Integer>>signedIntFromLong (in category '*VMMaker-interpreter simulator') -----
> signedIntFromLong
> "Self is a signed or unsigned 32-bit integer"
>
> + | bits |
> + (self >= -1073741824 and: [self <= 1073741823]) ifTrue: "These are known to be SmallIntegers..."
> + [^self].
> + bits := self bitAnd: 16rFFFFFFFF.
> + (bits digitAt: 4) <= 16r7F ifTrue: [^bits].
> + ^bits - 16r100000000!
> - | sign |
> - self < 0 ifTrue: [^self].
> - sign := self bitAnd: 16r80000000.
> - sign = 0 ifTrue: [^ self].
> - ^ self - sign - sign!
>
> Item was changed:
> ----- Method: Integer>>signedIntFromLong64 (in category '*VMMaker-interpreter simulator') -----
> signedIntFromLong64
> "Self is a signed or unsigned 64-bit integer"
>
> + | bits |
> + "This case is handled by the SmallInteger subclass..."
> + "(self >= -1073741824 and: [self <= 1073741823]) ifTrue:
> + [^self]."
> + bits := self bitAnd: 16rFFFFFFFFFFFFFFFF.
> + (bits digitAt: 8) <= 16r7F ifTrue: [^bits].
> + ^bits - 16r10000000000000000!
> - | sign |
> - self < 0 ifTrue: [^self].
> - sign := self bitAnd: 16r8000000000000000.
> - sign = 0 ifTrue: [^self].
> - ^self - sign - sign!
>
> Item was added:
> + ----- Method: Integer>>signedIntToChar (in category '*VMMaker-interpreter simulator') -----
> + signedIntToChar
> + "Produces an 8-bit value in twos-comp form. Truncates if out-of-range as per a C cast"
> +
> + ^self bitAnd: 16rFF!
>
> Item was changed:
> ----- Method: Integer>>signedIntToLong (in category '*VMMaker-interpreter simulator') -----
> signedIntToLong
> + "Produces a 32-bit value in twos-comp form. Truncates if out-of-range as per a C cast"
> - "Produces a 32-bit value in twos-comp form. Sorry no error checking"
>
> + ^self bitAnd: 16rFFFFFFFF!
> - self >= 0
> - ifTrue: [^ self]
> - ifFalse: [^ self + 16r80000000 + 16r80000000]
> - !
>
> Item was changed:
> ----- Method: Integer>>signedIntToLong64 (in category '*VMMaker-interpreter simulator') -----
> signedIntToLong64
> + "Produces a 64-bit value in twos-comp form. Truncates if out-of-range as per a C cast"
> - "Produces a 64-bit value in twos-comp form. Sorry no error checking"
>
> + ^self bitAnd: 16rFFFFFFFFFFFFFFFF!
> - self >= 0
> - ifTrue: [^ self]
> - ifFalse: [^ self + 16r8000000000000000 + 16r8000000000000000]
> - !
>
> Item was changed:
> ----- Method: Integer>>signedIntToShort (in category '*VMMaker-interpreter simulator') -----
> signedIntToShort
> + "Produces a 16-bit value in twos-comp form. Truncates if out-of-range as per a C cast"
> - "Produces a 16-bit value (0-65k) in twos-comp form. Sorry no error checking"
>
> ^self bitAnd: 16rFFFF!
>
> Item was added:
> + ----- Method: SmallInteger>>signedIntFromLong64 (in category '*VMMaker-interpreter simulator') -----
> + signedIntFromLong64
> + "Self is a signed or unsigned 64-bit integer.
> + Currently SmallIntegers are either 31-bit (in the 32-bit implementation) or 61-bit
> + (in the 64-bit implementation) so save some time by overriding in the subclass."
> + ^self!
>
> Item was added:
> + ----- Method: VMClass class>>openCogTestsMultiWindowBrowser (in category 'utilities') -----
> + openCogTestsMultiWindowBrowser
> + "Answer a new multi-window browser on the test classes in VMMaker"
> + "self openCogTestsMultiWindowBrowser"
> + | testClasses b |
> + testClasses := (PackageInfo named: 'VMMaker') classes select: [:c| c inheritsFrom: TestCase].
> + testClasses removeAll: AbstractInstructionTests allSubclasses.
> + testClasses removeAll: (testClasses select: [:c| '*Plugin*' match: c name]).
> + b := Browser open.
> + testClasses do:
> + [:class| b selectCategoryForClass: class; selectClass: class]
> + separatedBy:
> + [b multiWindowState addNewWindow].
> + b multiWindowState selectWindowIndex: 1!
>
> Item was added:
> + ----- Method: VMClass class>>openCogitMultiWindowBrowser (in category 'utilities') -----
> + openCogitMultiWindowBrowser
> + "Answer a new multi-window browser on the ObjectMemory classes, the Cog Interpreter classes, and the main JIT classes"
> + "self openCogitMultiWindowBrowser"
> + | b |
> + b := Browser open.
> + Cogit withAllSubclasses,
> + CogObjectRepresentation withAllSubclasses,
> + {CogMethodZone. CogRTLOpcodes },
> + (CogAbstractInstruction withAllSubclasses reject: [:c| c name endsWith: 'Tests']),
> + {VMStructType. VMMaker. CCodeGenerator. TMethod}
> + do: [:class|
> + b selectCategoryForClass: class; selectClass: class]
> + separatedBy:
> + [b multiWindowState addNewWindow].
> + b multiWindowState selectWindowIndex: 1!
>
> Item was added:
> + TestCase subclass: #VMMakerIntegerTests
> + instanceVariableNames: ''
> + classVariableNames: ''
> + poolDictionaries: ''
> + category: 'VMMaker-Tests'!
>
> Item was added:
> + ----- Method: VMMakerIntegerTests>>testSignedIntFromFoo (in category 'tests') -----
> + testSignedIntFromFoo
> + self assert: 16r55 signedIntFromChar equals: 16r55.
> + self assert: 16r155 signedIntFromChar equals: 16r55.
> + self assert: 16rAA signedIntFromChar < 0.
> + self assert: (16rAA signedIntFromChar bitAnd: 16rFF) = 16rAA.
> +
> + self assert: 16r5555 signedIntFromShort equals: 16r5555.
> + self assert: 16r15555 signedIntFromShort equals: 16r5555.
> + self assert: 16rAAAA signedIntFromShort < 0.
> + self assert: (16rAAAA signedIntFromShort bitAnd: 16rFFFF) = 16rAAAA.
> +
> + self assert: 16r55555555 signedIntFromLong equals: 16r55555555.
> + self assert: 16r155555555 signedIntFromLong equals: 16r55555555.
> + self assert: 16rAAAAAAAA signedIntFromLong< 0.
> + self assert: (16rAAAAAAAA signedIntFromLong bitAnd: 16rFFFFFFFF) = 16rAAAAAAAA.
> +
> + self assert: 16r5555555555555555 signedIntFromLong64 equals: 16r5555555555555555.
> + self assert: 16r15555555555555555 signedIntFromLong64 equals: 16r5555555555555555.
> + self assert: 16rAAAAAAAAAAAAAAAA signedIntFromLong64< 0.
> + self assert: (16rAAAAAAAAAAAAAAAA signedIntFromLong64 bitAnd: 16rFFFFFFFFFFFFFFFF) = 16rAAAAAAAAAAAAAAAA!
>
> Item was added:
> + ----- Method: VMMakerIntegerTests>>testSignedIntToFoo (in category 'tests') -----
> + testSignedIntToFoo
> + #(16r55 -16r56 16r5555 -16r5556 16r55555555 -16r55555556 16r5555555555555555 -16r5555555555555556) do:
> + [:n|
> + n abs digitLength = 1 ifTrue:
> + [self assert: n signedIntToChar signedIntFromChar equals: n].
> + self assert: (n signedIntToChar signedIntFromChar bitAnd: 16rFF) equals: (n bitAnd: 16rFF).
> + n abs digitLength <= 2 ifTrue:
> + [self assert: n signedIntToShort signedIntFromShort equals: n].
> + self assert: (n signedIntToShort signedIntFromShort bitAnd: 16rFFFF) equals: (n bitAnd: 16rFFFF).
> + n abs digitLength <= 4 ifTrue:
> + [self assert: n signedIntToLong signedIntFromLong equals: n].
> + self assert: (n signedIntToLong signedIntFromLong bitAnd: 16rFFFFFFFF) equals: (n bitAnd: 16rFFFFFFFF).
> + n abs digitLength <= 8 ifTrue:
> + [self assert: n signedIntToLong64 signedIntFromLong64 equals: n].
> + self assert: (n signedIntToLong64 signedIntFromLong64 bitAnd: 16rFFFFFFFFFFFFFFFF) equals: (n bitAnd: 16rFFFFFFFFFFFFFFFF)]!
>
Oct. 18, 2015
Re: [Pharo-dev] Storing System Settings using STON
by Juraj Kubelka
Hi,
It used the setting node id and searches for corresponding SettingNode. And that node knows how to set the value.
Cheers,
Juraj
--
Juraj Kubelka
17. 10. 2015 v 15:29, stepharo <stepharo(a)free.fr>:
>
>
> Le 15/10/15 11:58, Yuriy Tymchuk a écrit :
>> It is like that:
>>
>> [
>> StoredSetting {
>> #settingNodeIdentifier : '#shoreLine#autoSubmit',
>> #realValue : true
>> },
>> StoredSetting {
>> #settingNodeIdentifier : '#reIgnore',
>> #realValue : Set [ ]
>> }
>> ]
>
> Thanks how do you know on which class it should be applied?
>
>
>>> On 15 Oct 2015, at 09:54, stepharo <stepharo(a)free.fr> wrote:
>>>
>>> Cool!
>>>
>>> Could you send an example of the file contents?
>>>
>>>
>>> Stef
>>>
>>>
>>> Le 12/10/15 21:45, Juraj Kubelka a écrit :
>>>> Hi,
>>>>
>>>> we have a slice that introduce new storage solution for System Settings. See: https://pharo.fogbugz.com/f/cases/16681/Storing-System-Settings-using-STON
>>>>
>>>> You can load it using:
>>>>
>>>> Gofer it
>>>> smalltalkhubUser: 'Pharo' project: 'Pharo50Inbox';
>>>> package: 'SLICE-Issue-16681-Storing-System-Settings-using-STON';
>>>> load.
>>>>
>>>> When you open the Setting Browser, you can see that every setting has new items in context menu:
>>>>
>>>> <Mail Attachment.png>
>>>>
>>>> Thanks for reviewing it.
>>>> Cheers,
>>>> Juraj
>
Oct. 18, 2015