[Pkg] The Trunk: Kernel-eem.713.mcz
commits at source.squeak.org
commits at source.squeak.org
Wed Oct 24 23:05:16 UTC 2012
Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.713.mcz
==================== Summary ====================
Name: Kernel-eem.713
Author: eem
Time: 24 October 2012, 4:04:09.929 pm
UUID: e8650d8a-3b37-4fb3-9e2f-8bc074c2d3d6
Ancestors: Kernel-eem.712
Make ClosureExtractor produce properly nested closures.
If the closures ever get passed on to DebuggerMethodMap
instances they can confuse the debugger if not properly
nested.
=============== Diff against Kernel-eem.712 ===============
Item was changed:
InstructionClient subclass: #ClosureExtractor
+ instanceVariableNames: 'action scanner currentContext'
- instanceVariableNames: 'action scanner'
classVariableNames: ''
poolDictionaries: ''
category: 'Kernel-Methods'!
!ClosureExtractor commentStamp: 'mha 9/21/2010 11:16' prior: 0!
A ClosureExtractor is a utility class that is used to extract all BlockClosures from a CompiledMethod. It inherits from InstructionClient and understands only one single message, namely that corresponding to the push closure bytecode instruction. Being sent this message, a ClosureExtractor will create a BlockClosure instance and evaluate the block it holds as an instance variable with that closure as parameter.!
Item was added:
+ ----- Method: ClosureExtractor>>blockReturnTop (in category 'instruction decoding') -----
+ blockReturnTop
+ currentContext := currentContext sender!
Item was changed:
----- Method: ClosureExtractor>>pushClosureCopyNumCopiedValues:numArgs:blockSize: (in category 'instruction decoding') -----
pushClosureCopyNumCopiedValues: numCopied numArgs: numArgs blockSize: blockSize
-
"Create a BlockClosure corresponding to the closure bytecode
+ and execute the action block with it. The created BlockClosure is only a pseudo value,
+ it is not populated with meaningful context and argument information."
+ | block |
+ block := BlockClosure
+ outerContext: currentContext
+ startpc: scanner pc
+ numArgs: numArgs
+ copiedValues: (Array new: numCopied)..
+ currentContext := block asContextWithSender: currentContext.
+ action value: block!
- and execute the action block with it. The created BlockClosure is only a pseudo value,
- it is not populated with meaningful context and argument information."
-
- action value:
- (BlockClosure
- outerContext: (MethodContext
- sender: thisContext
- receiver: self
- method: scanner method
- arguments: (Array new: scanner method numArgs))
- startpc: scanner pc
- numArgs: numArgs
- copiedValues: (Array new: numCopied))!
Item was changed:
----- Method: ClosureExtractor>>scanner: (in category 'accessing') -----
scanner: anInstructionStream
+ scanner := anInstructionStream.
+ currentContext := MethodContext
+ sender: nil
+ receiver: self
+ method: scanner method
+ arguments: (Array new: scanner method numArgs)!
- scanner := anInstructionStream!
More information about the Packages
mailing list