David T. Lewis uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-nice.453.mcz
==================== Summary ====================
Name: Kernel-nice.453
Author: nice
Time: 28 May 2010, 9:37:49.978 pm
UUID: 5961f8b3-0010-b643-b1d1-56bd1e657937
Ancestors: Kernel-ar.452
After recent vwnc post, don't let LargeInteger ln overflow.
Same for Fraction with LargeInteger.
Also avoid loss of precision due to gradual underflow.
=============== Diff against Kernel-ar.452 ===============
Item was added:
+ ----- Method: Integer>>ln (in category 'mathematical functions') -----
+ ln
+ "This function is defined because super ln might overflow."
+ | res h |
+ self <= 0 ifTrue: [self error: 'ln is only defined for x > 0'].
+ res := super ln.
+ res isFinite ifTrue: [^res].
+ h := self highBit.
+ ^2 ln * h + (self / (1 << h)) asFloat ln!
Item was added:
+ ----- Method: Fraction>>ln (in category 'mathematical functions') -----
+ ln
+ "This function is defined because super ln might overflow.
+ Note that < 1 is tested before converting to float in order to avoid precision loss due to gradual underflow."
+ | res int |
+ self < 1 ifTrue: [^self reciprocal ln negated].
+ self <= 0 ifTrue: [self error: 'ln is only defined for x > 0'].
+ res := super ln.
+ res isFinite ifTrue: [^res].
+ int := self integerPart.
+ ^int ln + (self / int) ln!
Hi matthew,
1) this looks very much like pointsTo:
2) instVarsInclude: is a bit misleading name
I presume this is kind of cobalt compatibility.
I would rather deprecate this message as soon as in. What do you think ?
Nicolas
2010/6/3 <commits(a)source.squeak.org>:
> Matthew Fulmer uploaded a new version of Kernel to project The Trunk:
> http://source.squeak.org/trunk/Kernel-mtf.454.mcz
>
> ==================== Summary ====================
>
> Name: Kernel-mtf.454
> Author: mtf
> Time: 3 June 2010, 8:51:28.452 am
> UUID: 744ec5f0-a005-4e29-b3c0-d76f96573393
> Ancestors: Kernel-ar.452, Kernel-mtf.421
>
> added ProtoObject >> instVarsInclude:, which is used by the pointer tracer fixes:
> http://bugs.squeak.org/view.php?id=7158
>
> =============== Diff against Kernel-ar.452 ===============
>
> Item was added:
> + ----- Method: ProtoObject>>instVarsInclude: (in category 'system primitives') -----
> + instVarsInclude: anObject
> + "Answers true if anObject is among my named or indexed instance variables, and false otherwise"
> +
> + <primitive: 132>
> + 1 to: self class instSize do:
> + [:i | (self instVarAt: i) == anObject ifTrue: [^ true]].
> + 1 to: self basicSize do:
> + [:i | (self basicAt: i) == anObject ifTrue: [^ true]].
> + ^ false!
>
>
>
Hi Folks,
I've updated the Morphic 3 stuff at www.jvuletich.org. I have been
working a lot recently, uploaded several very cool samples for you to see.
I also want to thank publicly to Stef Ducasse and ESUG, as they are
sponsoring Morphic 3 via the "support your project" program, described
in http://www.esug.org/Promotion/Project . Thanks ESUG!
Comments welcome.
Cheers,
Juan Vuletich
Matthew Fulmer uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-mtf.456.mcz
==================== Summary ====================
Name: Kernel-mtf.456
Author: mtf
Time: 3 June 2010, 11:05:37.324 am
UUID: b1e05e80-6bc8-47fd-adda-82388483e604
Ancestors: Kernel-mtf.455
Added a utility method to Behavior for testing whether a method is compiled correctly without overwriting the incorrectly compiled method if not
=============== Diff against Kernel-mtf.455 ===============
Item was added:
+ ----- Method: Behavior>>sourceMatchesBytecodeAt: (in category 'testing') -----
+ sourceMatchesBytecodeAt: selector
+ "Answers true if the source code at the selector compiles to the bytecode at the selector, and false otherwise. Implemented to detect an error where Monticello did not recompile sources when the class shape changed"
+ "This code was copied from #recompile:from:, with few changes. Several methods would benefit from a method which turned a selector and class into a CompiledMethod, without installing it into the methodDictionary"
+
+ | method trailer methodNode |
+ method := self compiledMethodAt: selector.
+ trailer := method trailer.
+ methodNode := self compilerClass new
+ compile: (self sourceCodeAt: selector)
+ in: self
+ notifying: nil
+ ifFail: [^ false]. "Assume OK after proceed from SyntaxError"
+ selector == methodNode selector ifFalse: [self error: 'selector changed!!'].
+ ^ (methodNode generate: trailer) = method!
Matthew Fulmer uploaded a new version of Exceptions to project The Trunk:
http://source.squeak.org/trunk/Exceptions-mtf.28.mcz
==================== Summary ====================
Name: Exceptions-mtf.28
Author: mtf
Time: 3 June 2010, 9:46:39.119 am
UUID: e317b25a-109f-492d-95e1-90d163e9d7bf
Ancestors: Exceptions-nice.27
Added the option to make error handlers be re-entrant, and made a test case for it. Depends on Kernel-mtf.455. The default behavior is completely unchanged.
This is needed for preserving Tweak island semantics in the presence of syncSends and error resignalling.
=============== Diff against Exceptions-nice.27 ===============
Item was added:
+ TestCase subclass: #ExceptionsTest
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Exceptions-Extensions'!
Item was added:
+ ----- Method: ExceptionsTest>>testHandlerReentrancy (in category 'as yet unclassified') -----
+ testHandlerReentrancy
+
+ | callingOrder |
+ "Handlers are not re-entrant by default, so inner is not activated twice"
+ callingOrder := String streamContents: [:stream |
+ [[stream nextPut: $s. Notification signal]
+
+ "Inner handler"
+ on: Notification do: [:ex |
+ stream nextPut: $i.
+ ex pass]]
+
+ "outer handler"
+ on: Notification do: [:ex |
+ stream nextPut: $o.
+ Notification signal]].
+
+ self assert: callingOrder = 'sio'.
+
+ "Now make inner re-entrant"
+ callingOrder := String streamContents: [:stream |
+ [[stream nextPut: $s. Notification signal]
+
+ "Inner handler"
+ on: Notification do: [:ex |
+ stream nextPut: $i.
+ ex rearmHandlerDuring: [ex pass]]]
+
+ "outer handler"
+ on: Notification do: [:ex |
+ stream nextPut: $o.
+ Notification signal]].
+
+ self assert: callingOrder = 'sioi'.!
Item was added:
+ ----- Method: Exception>>rearmHandlerDuring: (in category 'handling') -----
+ rearmHandlerDuring: aBlock
+ "Make the current error handler re-entrant while it is running aBlock. Only works in a closure-enabled image"
+
+ ^ handlerContext rearmHandlerDuring: aBlock!
Matthew Fulmer uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-mtf.455.mcz
==================== Summary ====================
Name: Kernel-mtf.455
Author: mtf
Time: 3 June 2010, 9:41:09.471 am
UUID: 515e8964-f471-4ac6-bcec-47e74b833f86
Ancestors: Kernel-mtf.454
Added a support method for making error handlers re-entrant. Needed for preserving Tweak island semantics in the presence of syncSends and error resignalling
=============== Diff against Kernel-mtf.454 ===============
Item was added:
+ ----- Method: ContextPart>>rearmHandlerDuring: (in category 'private-exceptions') -----
+ rearmHandlerDuring: aBlock
+ "Sent to handler (on:do:) contexts only. Makes me re-entrant for the duration of aBlock. Only works in a closure-enabled image"
+
+ ^ [self tempAt: 3 put: true. aBlock value]
+ ensure: [self tempAt: 3 put: false]!
Matthew Fulmer uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-mtf.421.mcz
==================== Summary ====================
Name: Kernel-mtf.421
Author: mtf
Time: 10 March 2010, 7:24:06.105 pm
UUID: 0d47896c-fa27-4804-b345-ea3c8a17c1d1
Ancestors: Kernel-ar.420
Preload a critical method just in case of load order issues. Part 1 of 4 of the fix for
http://bugs.squeak.org/view.php?id=7158
=============== Diff against Kernel-ar.420 ===============
Item was added:
+ ----- Method: ProtoObject>>instVarsInclude: (in category 'system primitives') -----
+ instVarsInclude: anObject
+ "Answers true if anObject is among my named or indexed instance variables, and false otherwise"
+
+ <primitive: 132>
+ 1 to: self class instSize do:
+ [:i | (self instVarAt: i) == anObject ifTrue: [^ true]].
+ 1 to: self basicSize do:
+ [:i | (self basicAt: i) == anObject ifTrue: [^ true]].
+ ^ false!
Matthew Fulmer uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-mtf.454.mcz
==================== Summary ====================
Name: Kernel-mtf.454
Author: mtf
Time: 3 June 2010, 8:51:28.452 am
UUID: 744ec5f0-a005-4e29-b3c0-d76f96573393
Ancestors: Kernel-ar.452, Kernel-mtf.421
added ProtoObject >> instVarsInclude:, which is used by the pointer tracer fixes:
http://bugs.squeak.org/view.php?id=7158
=============== Diff against Kernel-ar.452 ===============
Item was added:
+ ----- Method: ProtoObject>>instVarsInclude: (in category 'system primitives') -----
+ instVarsInclude: anObject
+ "Answers true if anObject is among my named or indexed instance variables, and false otherwise"
+
+ <primitive: 132>
+ 1 to: self class instSize do:
+ [:i | (self instVarAt: i) == anObject ifTrue: [^ true]].
+ 1 to: self basicSize do:
+ [:i | (self basicAt: i) == anObject ifTrue: [^ true]].
+ ^ false!