[squeak-dev] The Trunk: Compiler-eem.289.mcz
commits at source.squeak.org
commits at source.squeak.org
Mon Oct 6 20:05:12 UTC 2014
Eliot Miranda uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-eem.289.mcz
==================== Summary ====================
Name: Compiler-eem.289
Author: eem
Time: 6 October 2014, 11:58:50.62 am
UUID: 7d67c48c-4a2f-4445-83e8-1f8f931801e3
Ancestors: Compiler-eem.288
Fix doits in the codePane of a debugger opened from
another debugger. e.g. before this fix
1. debug 3+4.
2. in code pane of debugger #1 debug 4+5
3. in code pane of debugger #2 debug 5+6, boom.
The bug was that when the encoder creates temp names for temp vars in the debugged context, which
it does by creating messages to DoItIn:'s argument
'ThisContext', if this is a level 3 debug, then the
original expression would have a temp var called
'ThisContext' already and that would overwrite the
'ThisContext' argument for this level with a
message send, and boom.
The fix is merely to filter-out these temps and
hence never overwrite DoItIn:'s 'ThisContext'
argument in the scope table.
=============== Diff against Compiler-eem.288 ===============
Item was changed:
----- Method: Encoder>>init:notifying: (in category 'initialize-release') -----
init: aCue notifying: anObject
"The use of the variable requestor is a bit confusing here. This is
*not* the original requestor, which is available through the cue.
It's the Parser instance that is using the encoder."
self setCue: aCue.
requestor := anObject.
nTemps := 0.
supered := false.
self initScopeAndLiteralTables.
cue getClass variablesAndOffsetsDo:
[:variable "<String|CFieldDefinition>" :offset "<Integer|nil>" |
offset isNil
ifTrue: [scopeTable at: variable name put: (FieldNode new fieldDefinition: variable)]
ifFalse: [scopeTable
at: variable
put: (offset >= 0
ifTrue: [InstanceVariableNode new
name: variable index: offset]
ifFalse: [MaybeContextInstanceVariableNode new
name: variable index: offset negated])]].
cue context ~~ nil ifTrue:
[| homeNode |
homeNode := self bindTemp: self doItInContextName.
"0th temp = aContext passed as arg"
cue context tempNames withIndexDo:
[:variable :index|
+ variable ~= self doItInContextName ifTrue:
+ [scopeTable
+ at: variable
+ put: (MessageAsTempNode new
+ receiver: homeNode
+ selector: #namedTempAt:
+ arguments: (Array with: (self encodeLiteral: index))
+ precedence: 3
+ from: self)]]].
- scopeTable
- at: variable
- put: (MessageAsTempNode new
- receiver: homeNode
- selector: #namedTempAt:
- arguments: (Array with: (self encodeLiteral: index))
- precedence: 3
- from: self)]].
sourceRanges := Dictionary new: 32.
globalSourceRanges := OrderedCollection new: 32
!
More information about the Squeak-dev
mailing list
|