Hi,
> Deliver 'objects pointing to this value' collection as an Array, to avoid the indirection of an OrderedCollection.
What's the benefit of this?
Cheers, Balázs
We will be adding more disk space to the ss3.gemstone.com site on Friday July 13 at 1pm PDT. The site is expected to be down for an hour while the new drives are being added.
Dale
Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours:
http://lists.squeakfoundation.org/pipermail/packages/2012-July/005417.html
Name: KernelTests-dtl.227
Ancestors: KernelTests-nice.226
Patch by JohnReed Maffeo for Mantis 7693: DateAndTime readFrom: does not recognize $Z as a valid timezone designator.
http://bugs.squeak.org/view.php?id=7693
Change Set: DateAndTime
Date: 9 July 2012
Method readFrom: in Class DateAndTime modified to interpret $Z as a valid time zone designator. Associated test modified to verify the new behavior.
=============================================
http://lists.squeakfoundation.org/pipermail/packages/2012-July/005418.html
Name: Kernel-dtl.705
Ancestors: Kernel-ul.704
Patch by JohnReed Maffeo for Mantis 7693: DateAndTime readFrom: does not recognize $Z as a valid timezone designator.
http://bugs.squeak.org/view.php?id=7693
Change Set: DateAndTime
Date: 9 July 2012
Method readFrom: in Class DateAndTime modified to interpret $Z as a valid time zone designator. Associated test modified to verify the new behavior.
=============================================
This is a proposal for fixing a small bug in the "Profile messages"
command on a Process Browser.
To recreate the problem:
- select a process
- invoke "Profile messages"
- give a number of seconds
- wait for the profile to complete
- again invoke "Profile messages" and supply a number of seconds
=> walkback: 'it seems a tally is already running'
Aran
--
Aran Lunzer
Viewpoints Research Institute
A new version of Kernel was added to project The Inbox:
http://source.squeak.org/inbox/Kernel-ael.700.mcz
==================== Summary ====================
Name: Kernel-ael.700
Author: ael
Time: 10 July 2012, 2:35:54.223 pm
UUID: 8fff56ba-e690-46f1-aef9-d9b5fe3c9ed8
Ancestors: Kernel-fbs.699
Deliver 'objects pointing to this value' collection as an Array, to avoid the indirection of an OrderedCollection.
=============== Diff against Kernel-fbs.699 ===============
Item was changed:
----- Method: Object>>inboundPointersExcluding: (in category 'tracing') -----
inboundPointersExcluding: objectsToExclude
"Answer a list of all objects in the system that point to me, excluding those in the collection of objectsToExclude. I do my best to avoid creating any temporary objects that point to myself, especially method and block contexts. Adapted from PointerFinder class >> #pointersTo:except:"
| anObj pointers objectsToAlwaysExclude |
Smalltalk garbageCollect.
"big collection shouldn't grow, so it's contents array is always the same"
pointers := OrderedCollection new: 1000.
"#allObjectsDo: and #pointsTo: are expanded inline to keep spurious
method and block contexts out of the results"
anObj := self someObject.
[0 == anObj] whileFalse: [ "We must use #== here, to avoid leaving the loop when anObj is another number that's equal to 0 (e.g. 0.0)."
anObj isInMemory
ifTrue: [((anObj instVarsInclude: self)
or: [anObj class == self])
ifTrue: [pointers add: anObj]].
anObj := anObj nextObject].
objectsToAlwaysExclude := {
pointers collector.
thisContext.
thisContext sender.
thisContext sender sender.
objectsToExclude.
}.
+ ^ (pointers removeAllSuchThat: [:ea |
- ^ pointers removeAllSuchThat: [:ea |
(objectsToAlwaysExclude identityIncludes: ea)
+ or: [objectsToExclude identityIncludes: ea]]) asArray!
- or: [objectsToExclude identityIncludes: ea]]!
A new version of System was added to project The Inbox:
http://source.squeak.org/inbox/System-ael.488.mcz
==================== Summary ====================
Name: System-ael.488
Author: ael
Time: 10 July 2012, 1:56:20.102 pm
UUID: 18e76459-4ed0-478c-b2b3-9d587d1f6b3d
Ancestors: System-eem.487
Tentative fix for 'tally is already running' error when profiling from ProcessBrowser.
=============== Diff against System-eem.487 ===============
Item was changed:
----- Method: MessageTally>>spyEvery:onProcess:forMilliseconds: (in category 'initialize-release') -----
spyEvery: millisecs onProcess: aProcess forMilliseconds: msecDuration
"Create a spy and spy on the given process at the specified rate."
| myDelay time0 endTime observedProcess sem |
(aProcess isKindOf: Process)
ifFalse: [self error: 'spy needs a Process here'].
self class: aProcess suspendedContext receiver class method: aProcess suspendedContext method.
"set up the probe"
observedProcess := aProcess.
myDelay := Delay forMilliseconds: millisecs.
time0 := Time millisecondClockValue.
endTime := time0 + msecDuration.
sem := Semaphore new.
gcStats := SmalltalkImage current getVMParameters.
Timer ifNotNil: [ self error: 'it seems a tally is already running' ].
Timer := [
[
| startTime |
startTime := Time millisecondClockValue.
myDelay wait.
self
tally: Processor preemptedProcess suspendedContext
in: (observedProcess == Processor preemptedProcess
ifTrue: [ observedProcess ]
ifFalse: [ nil ])
"tally can be > 1 if ran a long primitive"
by: (Time millisecondClockValue - startTime) // millisecs.
startTime < endTime
] whileTrue.
sem signal.
] newProcess.
Timer priority: Processor timingPriority-1.
"activate the probe and evaluate the block"
Timer resume.
"activate the probe and wait for it to finish"
sem wait.
+ Timer ifNotNil: [
+ Timer terminate.
+ Timer := nil ].
"Collect gc statistics"
SmalltalkImage current getVMParameters keysAndValuesDo: [ :idx :gcVal |
gcVal ifNotNil: [ gcStats at: idx put: (gcVal - (gcStats at: idx)) ] ].
time := Time millisecondClockValue - time0!
For the first time in many years I am de-lurking to submit a change to Squeak. My report and suggested fix is at http://bugs.squeak.org/view.php?id=7693. The change is a modification of the behavior of fromString: to interpret $Z as a valid time zone designator.
I am only posting this to the list for confirmation that I did the right thing using Mantis, and to ask a question about the name/behavior of the method asUTC in class DateAndTime.
The name asUTC makes me think that the parameter provided will be converted to the equivalent value at the zero time zone. Instead the method just converts the time zone offset to zero.
I am not sure what the intention revealing method name should be for the current behavior, but since asUTC and asLocal are already taken, I would like to suggest a set of methods to convert a given DateAndTime toUTC and toLocal. I think I could code them up with the appropriate tests and would welcome the challenge if there is any support for the suggestion.
Regards,
JohnReed
David T. Lewis uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-dtl.227.mcz
==================== Summary ====================
Name: KernelTests-dtl.227
Author: dtl
Time: 9 July 2012, 10:36:20.756 pm
UUID: 24287063-d5f2-4af5-ba04-c23fb2c4f5c5
Ancestors: KernelTests-nice.226
Patch by JohnReed Maffeo for Mantis 7693: DateAndTime readFrom: does not recognize $Z as a valid timezone designator.
http://bugs.squeak.org/view.php?id=7693
Change Set: DateAndTime
Date: 9 July 2012
Author: jrm
Method readFrom: in Class DateAndTime modified to interpret $Z as a valid time zone designator. Associated test modified to verify the new behavior.
=============== Diff against KernelTests-nice.226 ===============
Item was changed:
----- Method: DateAndTimeTest>>testFromString (in category 'Tests') -----
testFromString
+ | fromString fromStringNoOffset fromStringUTC |
- | fromString fromStringNoOffset |
fromString := DateAndTime fromString: '-1199-01-05T20:33:14.321-05:00'.
self assert: (fromString printString = '-1199-01-05T20:33:14.321-05:00').
"if no offset is provided, the local offset should be used"
fromStringNoOffset := DateAndTime fromString: '-1199-01-05T20:33:14.321'.
+ self assert: (fromStringNoOffset offset = DateAndTime localOffset).
+
+ "if a string contains the UTC designator Z, the local offset should not be used"
+ fromStringUTC := DateAndTime fromString: '2011-08-26T18:00:03Z'.
+ self assert: (fromStringUTC printString = '2011-08-26T18:00:03+00:00').!
- self assert: (fromStringNoOffset offset = DateAndTime localOffset).!