The Trunk: Kernel-nice.939.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Kernel-nice.939.mcz

commits-2
Nicolas Cellier uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-nice.939.mcz

==================== Summary ====================

Name: Kernel-nice.939
Author: nice
Time: 23 April 2016, 11:32:52.246 pm
UUID: 4bdcd7ec-9c52-4b77-94e1-cf87a2ee35d5
Ancestors: Kernel-mt.938

Accelerate bitAnd: in case of negative small integer receiver and LargePositiveInteger operand.

The timings before and after are:

[(-1234 bitAnd: 5678)] bench.
        161,000,000 per second. 6.22 nanoseconds per run.
        161,000,000 per second. 6.2 nanoseconds per run.
[(-1234 bitAnd: 5678125641253)] bench.
        1,120,000 per second. 892 nanoseconds per run.
        5,020,000 per second. 199 nanoseconds per run.
[(-1234 bitAnd: -5678125641253)] bench.
        1,830,000 per second. 547 nanoseconds per run.
        1,790,000 per second. 557 nanoseconds per run.
[(-1234 bitAnd: 567812564128976768553)] bench.
        984,000 per second. 1.02 microseconds per run.
        2,320,000 per second. 431 nanoseconds per run.
[(-1234 bitAnd: -567812564128976768553)] bench.
        1,790,000 per second. 559 nanoseconds per run.
        1,690,000 per second. 593 nanoseconds per run.

=============== Diff against Kernel-cmm.937 ===============

Item was changed:
  ----- Method: Process>>stepToHome: (in category 'changing suspended state') -----
  stepToHome: aContext
  "Resume self until the home of top context is aContext.  Top context may be a block context.
  Catch any UnhandledErrors that are created while stepping, answering the relevant signalerContext
  if so. Note that this will cause weird effects if using through to step through UnhandledError
  code, but as the doctor ordered, don't do that; use over or into instead."
 
  ^Processor activeProcess
  evaluate:
  [| home anError |
  home := aContext home.
  [suspendedContext := suspendedContext step.
  home == suspendedContext home or: [home isDead]] whileFalse:
  [(suspendedContext selector == #signalForException:
+ and: [(suspendedContext receiver isBehavior and: [
+ suspendedContext receiver includesBehavior: UnhandledError])
- and: [suspendedContext receiver == UnhandledError
  and: [anError := suspendedContext tempAt: 1.
    ((suspendedContext objectClass: anError) includesBehavior: Exception)
  and: [anError canSearchForSignalerContext]]]) ifTrue:
  [anError signalerContext ifNotNil:
  [:unhandledErrorSignalerContext|
  [unhandledErrorSignalerContext == suspendedContext] whileFalse:
  [self completeStep: suspendedContext].
  "Give a debugger a chance to update its title to reflect the new exception"
  Notification new
  tag: {unhandledErrorSignalerContext. anError};
  signal.
  ^unhandledErrorSignalerContext]]].
  suspendedContext]
  onBehalfOf: self!

Item was changed:
  ----- Method: SmallInteger>>bitAnd: (in category 'bit manipulation') -----
  bitAnd: arg
  "Primitive. Answer an Integer whose bits are the logical OR of the
  receiver's bits and those of the argument, arg.
  Numbers are interpreted as having 2's-complement representation.
  Essential.  See Object documentation whatIsAPrimitive."
 
  <primitive: 14>
  self >= 0 ifTrue: [^ arg bitAnd: self].
+ ^ arg < 0
+ ifTrue: [(arg bitInvert bitOr: self bitInvert) bitInvert]
+ ifFalse: [arg bitClear: self bitInvert]!
- ^ (self bitInvert bitOr: arg bitInvert) bitInvert!

Item was changed:
  Exception subclass: #UnhandledError
  instanceVariableNames: 'exception'
  classVariableNames: ''
  poolDictionaries: ''
  category: 'Kernel-Exceptions'!
+
+ !UnhandledError commentStamp: 'mt 8/25/2015 14:42' prior: 0!
+ This is a wrapper for an unhandled error. Having this, process stepping is able to correctly fire other unhandled errors. See Process >> #stepToHome: for further explanations.!

Item was changed:
  ----- Method: UnhandledError class>>signalForException: (in category 'as yet unclassified') -----
  signalForException: anError
+ "Very important entry point for analysis stack when stepping in a debugging session. See Process >> #stepToHome: for further explanations."
+
-
  ^ self new
  exception: anError;
  signal!

Item was changed:
+ ----- Method: UnhandledError>>exception (in category 'accessing') -----
- ----- Method: UnhandledError>>exception (in category 'as yet unclassified') -----
  exception
 
  ^ exception!

Item was changed:
+ ----- Method: UnhandledError>>exception: (in category 'accessing') -----
- ----- Method: UnhandledError>>exception: (in category 'as yet unclassified') -----
  exception: anError
 
  exception := anError!

Item was added:
+ UnhandledError subclass: #UnhandledWarning
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Kernel-Exceptions'!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Kernel-nice.939.mcz

Nicolas Cellier
Oops !
It seems that I updated from 5.0 repository rather than trunk.
I've been away too long, let me redo it...

2016-04-23 23:34 GMT+02:00 <[hidden email]>:
Nicolas Cellier uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-nice.939.mcz

==================== Summary ====================

Name: Kernel-nice.939
Author: nice
Time: 23 April 2016, 11:32:52.246 pm
UUID: 4bdcd7ec-9c52-4b77-94e1-cf87a2ee35d5
Ancestors: Kernel-mt.938

Accelerate bitAnd: in case of negative small integer receiver and LargePositiveInteger operand.

The timings before and after are:

[(-1234 bitAnd: 5678)] bench.
        161,000,000 per second. 6.22 nanoseconds per run.
        161,000,000 per second. 6.2 nanoseconds per run.
[(-1234 bitAnd: 5678125641253)] bench.
        1,120,000 per second. 892 nanoseconds per run.
        5,020,000 per second. 199 nanoseconds per run.
[(-1234 bitAnd: -5678125641253)] bench.
        1,830,000 per second. 547 nanoseconds per run.
        1,790,000 per second. 557 nanoseconds per run.
[(-1234 bitAnd: 567812564128976768553)] bench.
        984,000 per second. 1.02 microseconds per run.
        2,320,000 per second. 431 nanoseconds per run.
[(-1234 bitAnd: -567812564128976768553)] bench.
        1,790,000 per second. 559 nanoseconds per run.
        1,690,000 per second. 593 nanoseconds per run.

=============== Diff against Kernel-cmm.937 ===============

Item was changed:
  ----- Method: Process>>stepToHome: (in category 'changing suspended state') -----
  stepToHome: aContext
        "Resume self until the home of top context is aContext.  Top context may be a block context.
         Catch any UnhandledErrors that are created while stepping, answering the relevant signalerContext
         if so. Note that this will cause weird effects if using through to step through UnhandledError
         code, but as the doctor ordered, don't do that; use over or into instead."

        ^Processor activeProcess
                evaluate:
                        [| home anError |
                        home := aContext home.
                        [suspendedContext := suspendedContext step.
                         home == suspendedContext home or: [home isDead]] whileFalse:
                                [(suspendedContext selector == #signalForException:
+                                and: [(suspendedContext receiver isBehavior and: [
+                                               suspendedContext receiver includesBehavior: UnhandledError])
-                                and: [suspendedContext receiver == UnhandledError
                                 and: [anError := suspendedContext tempAt: 1.
                                           ((suspendedContext objectClass: anError) includesBehavior: Exception)
                                 and: [anError canSearchForSignalerContext]]]) ifTrue:
                                        [anError signalerContext ifNotNil:
                                                [:unhandledErrorSignalerContext|
                                                [unhandledErrorSignalerContext == suspendedContext] whileFalse:
                                                        [self completeStep: suspendedContext].
                                                "Give a debugger a chance to update its title to reflect the new exception"
                                                 Notification new
                                                        tag: {unhandledErrorSignalerContext. anError};
                                                        signal.
                                                ^unhandledErrorSignalerContext]]].
                        suspendedContext]
                onBehalfOf: self!

Item was changed:
  ----- Method: SmallInteger>>bitAnd: (in category 'bit manipulation') -----
  bitAnd: arg
        "Primitive. Answer an Integer whose bits are the logical OR of the
        receiver's bits and those of the argument, arg.
        Numbers are interpreted as having 2's-complement representation.
        Essential.  See Object documentation whatIsAPrimitive."

        <primitive: 14>
        self >= 0 ifTrue: [^ arg bitAnd: self].
+       ^ arg < 0
+               ifTrue: [(arg bitInvert bitOr: self bitInvert) bitInvert]
+               ifFalse: [arg bitClear: self bitInvert]!
-       ^ (self bitInvert bitOr: arg bitInvert) bitInvert!

Item was changed:
  Exception subclass: #UnhandledError
        instanceVariableNames: 'exception'
        classVariableNames: ''
        poolDictionaries: ''
        category: 'Kernel-Exceptions'!
+
+ !UnhandledError commentStamp: 'mt 8/25/2015 14:42' prior: 0!
+ This is a wrapper for an unhandled error. Having this, process stepping is able to correctly fire other unhandled errors. See Process >> #stepToHome: for further explanations.!

Item was changed:
  ----- Method: UnhandledError class>>signalForException: (in category 'as yet unclassified') -----
  signalForException: anError
+       "Very important entry point for analysis stack when stepping in a debugging session. See Process >> #stepToHome: for further explanations."
+
-
        ^ self new
                exception: anError;
                signal!

Item was changed:
+ ----- Method: UnhandledError>>exception (in category 'accessing') -----
- ----- Method: UnhandledError>>exception (in category 'as yet unclassified') -----
  exception

        ^ exception!

Item was changed:
+ ----- Method: UnhandledError>>exception: (in category 'accessing') -----
- ----- Method: UnhandledError>>exception: (in category 'as yet unclassified') -----
  exception: anError

        exception := anError!

Item was added:
+ UnhandledError subclass: #UnhandledWarning
+       instanceVariableNames: ''
+       classVariableNames: ''
+       poolDictionaries: ''
+       category: 'Kernel-Exceptions'!





Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Kernel-nice.939.mcz

Nicolas Cellier
Done.
Could an admin remove this version, it does not really make sense to merge it.
Thanks

2016-04-23 23:39 GMT+02:00 Nicolas Cellier <[hidden email]>:
Oops !
It seems that I updated from 5.0 repository rather than trunk.
I've been away too long, let me redo it...

2016-04-23 23:34 GMT+02:00 <[hidden email]>:
Nicolas Cellier uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-nice.939.mcz

==================== Summary ====================

Name: Kernel-nice.939
Author: nice
Time: 23 April 2016, 11:32:52.246 pm
UUID: 4bdcd7ec-9c52-4b77-94e1-cf87a2ee35d5
Ancestors: Kernel-mt.938

Accelerate bitAnd: in case of negative small integer receiver and LargePositiveInteger operand.

The timings before and after are:

[(-1234 bitAnd: 5678)] bench.
        161,000,000 per second. 6.22 nanoseconds per run.
        161,000,000 per second. 6.2 nanoseconds per run.
[(-1234 bitAnd: 5678125641253)] bench.
        1,120,000 per second. 892 nanoseconds per run.
        5,020,000 per second. 199 nanoseconds per run.
[(-1234 bitAnd: -5678125641253)] bench.
        1,830,000 per second. 547 nanoseconds per run.
        1,790,000 per second. 557 nanoseconds per run.
[(-1234 bitAnd: 567812564128976768553)] bench.
        984,000 per second. 1.02 microseconds per run.
        2,320,000 per second. 431 nanoseconds per run.
[(-1234 bitAnd: -567812564128976768553)] bench.
        1,790,000 per second. 559 nanoseconds per run.
        1,690,000 per second. 593 nanoseconds per run.

=============== Diff against Kernel-cmm.937 ===============



Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Kernel-nice.939.mcz

David T. Lewis
On Sun, Apr 24, 2016 at 12:14:26AM +0200, Nicolas Cellier wrote:
> Done.
> Could an admin remove this version, it does not really make sense to merge it.
> Thanks

I deleted Kernel-nice.939.mcz

Dave
 

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Kernel-nice.939.mcz

Levente Uzonyi
In reply to this post by Nicolas Cellier
On Sun, 24 Apr 2016, Nicolas Cellier wrote:

> Done.
> Could an admin remove this version, it does not really make sense to merge it.

While only admins can delete packages from the Trunk, you can still move
them to the Treated Inbox.

Levente


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Kernel-nice.939.mcz

Nicolas Cellier


2016-04-24 2:50 GMT+02:00 Levente Uzonyi <[hidden email]>:
On Sun, 24 Apr 2016, Nicolas Cellier wrote:

Done.
Could an admin remove this version, it does not really make sense to merge it.

While only admins can delete packages from the Trunk, you can still move them to the Treated Inbox.

Levente


Hi Levente,
yes i can when they are in the inbox, but apparently not when already in trunk (or I missed something).
That sounds reasonnable IMO.

Nicolas



Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Kernel-nice.939.mcz

Levente Uzonyi
On Sun, 24 Apr 2016, Nicolas Cellier wrote:

> Hi Levente,
> yes i can when they are in the inbox, but apparently not when already in trunk (or I missed something).
> That sounds reasonnable IMO.

It seems to be an Admin-only feature as well.

Levente

>
> Nicolas
>
>
>