Tim Felgentreff uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-tfel.327.mcz==================== Summary ====================
Name: Compiler-tfel.327
Author: tfel
Time: 11 August 2016, 11:09:24.072482 am
UUID: 66cfc18a-cb83-3e43-b05a-69c1b7a13f9a
Ancestors: Compiler-tfel.326
- allow using the Encoder without a requestor (useful when feeding it directly without parser/compiler and for testing)
- be more robust in MethodNode printing, when the selector node ivar is subclass of SelectorNode (e.g. a SpecialSelectorNode), the code would try to print the special selector as key of an ordinary SelectorNode.
=============== Diff against Compiler-tfel.326 ===============
Item was changed:
----- Method: Encoder>>undeclared: (in category 'encoding') -----
undeclared: name
| sym |
+ (requestor notNil and: [requestor interactive]) ifTrue:
- requestor interactive ifTrue:
[ requestor requestor == #error: ifTrue: [ requestor error: 'Undeclared' ].
^ self notify: 'Undeclared' ].
"Allow knowlegeable clients to squash the undeclared warning if they want (e.g.
Diffing pretty printers that are simply formatting text). As this breaks
compilation it should only be used by clients that want to discard the result
of the compilation. To squash the warning use e.g.
[Compiler format: code in: class notifying: nil decorated: false]
on: UndeclaredVariableWarning
do: [:ex| ex resume: false]"
sym := name asSymbol.
^ (UndeclaredVariableWarning new
name: name
selector: selector
class: cue getClass) signal
ifTrue:
[ | undeclared |
undeclared := cue environment undeclared.
[ undeclared
at: sym
put: nil ]
on: AttemptToWriteReadOnlyGlobal
do: [ : noti | noti resume: true ].
self
global: (undeclared associationAt: sym)
name: sym ]
ifFalse:
[ self
global: (Association key: sym)
name: sym ]!
Item was changed:
----- Method: MethodNode>>selectorNode (in category 'code generation') -----
selectorNode
"Answer a SelectorNode for the message selector of the method represented by the receiver."
+ ^(selectorOrFalse isKindOf: SelectorNode)
- ^(selectorOrFalse isMemberOf: SelectorNode)
ifTrue: [selectorOrFalse]
ifFalse: [SelectorNode new key: selectorOrFalse]!