[squeak-dev] The Trunk: Kernel-eem.682.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Apr 25 17:59:34 UTC 2012

Eliot Miranda uploaded a new version of Kernel to project The Trunk:

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

Name: Kernel-eem.682
Author: eem
Time: 25 April 2012, 10:58:44.627 am
UUID: 700ce759-d9db-45ed-9929-20018642651d
Ancestors: Kernel-bf.681

Faster non-local return through unwind-protects by not
ignoring the firstUnwindContext supplied by the VM.

=============== Diff against Kernel-bf.681 ===============

Item was added:
+ ----- Method: ContextPart>>resume:through: (in category 'controlling') -----
+ resume: value through: firstUnwindCtxt
+ 	"Unwind thisContext to self and resume with value as result of last send.
+ 	 Execute any unwind blocks while unwinding.
+ 	 ASSUMES self is a sender of thisContext."
+ 	| ctxt unwindBlock |
+ 	self isDead ifTrue: [self cannotReturn: value to: self].
+ 	ctxt := firstUnwindCtxt.
+ 	[ctxt isNil] whileFalse:
+ 		[(ctxt tempAt: 2) ifNil:
+ 			[ctxt tempAt: 2 put: true.
+ 			 unwindBlock := ctxt tempAt: 1.
+ 			 thisContext terminateTo: ctxt.
+ 			 unwindBlock value].
+ 		 ctxt := ctxt findNextUnwindContextUpTo: self].
+ 	thisContext terminateTo: self.
+ 	^value
+ !

Item was added:
+ ----- Method: ContextPart>>return:through: (in category 'controlling') -----
+ return: value through: firstUnwindContext
+ 	"Unwind thisContext to self and return value to self's sender.
+ 	 Execute any unwind blocks while unwinding.
+ 	 ASSUMES self is a sender of thisContext."
+ 	sender ifNil: [self cannotReturn: value to: sender].
+ 	sender resume: value through: firstUnwindContext!

Item was changed:
  ----- Method: MethodContext>>aboutToReturn:through: (in category 'private') -----
  aboutToReturn: result through: firstUnwindContext 
  	"Called from VM when an unwindBlock is found between self and its home.
  	 Return to home's sender, executing unwind blocks on the way."
+ 	self methodReturnContext return: result through: firstUnwindContext!
- 	self methodReturnContext return: result!

More information about the Squeak-dev mailing list