[squeak-dev] The Trunk: Kernel-nice.939.mcz
commits at source.squeak.org
commits at source.squeak.org
Sat Apr 23 21:34:20 UTC 2016
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'!
More information about the Squeak-dev
mailing list
|