[squeak-dev] The Inbox: Kernel-jar.1445.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri Jan 21 16:55:40 UTC 2022
A new version of Kernel was added to project The Inbox:
http://source.squeak.org/inbox/Kernel-jar.1445.mcz
==================== Summary ====================
Name: Kernel-jar.1445
Author: jar
Time: 21 January 2022, 5:55:35.796552 pm
UUID: 7b6b74f1-9bcf-6c43-b4f2-f6fd072f93cf
Ancestors: Kernel-mt.1441
A liitle cleanup: Context >> restart can be simplified using resumeEvaluating: introduced by Nicolas in April 2021. The new restart reads:
restart
^self resumeEvaluating: [self privRefresh]
=============== Diff against Kernel-mt.1441 ===============
Item was changed:
----- Method: Context>>restart (in category 'controlling') -----
restart
"Unwind thisContext to self and resume from beginning. Execute unwind blocks when unwinding. ASSUMES self is a sender of thisContext"
+ ^self resumeEvaluating: [self privRefresh]!
- | ctxt unwindBlock |
- self isDead ifTrue: [self cannotReturn: nil to: self].
- self privRefresh.
- ctxt := thisContext.
- [ ctxt := ctxt findNextUnwindContextUpTo: self.
- ctxt isNil
- ] whileFalse: [
- (ctxt tempAt: 2) ifNil:[
- ctxt tempAt: 2 put: true.
- unwindBlock := ctxt tempAt: 1.
- thisContext terminateTo: ctxt.
- unwindBlock value].
- ].
- thisContext terminateTo: self.
- self jump.
- !
More information about the Squeak-dev
mailing list
|