[squeak-dev] The Trunk: Compiler-cmm.275.mcz
Chris Muller
asqueaker at gmail.com
Thu Oct 3 21:02:59 UTC 2013
The reformatting caused almost all lines to be dif'd. The only change
is handling AttemptToWriteReadOnlyGlobal on the at:put:.
On Thu, Oct 3, 2013 at 2:35 PM, <commits at source.squeak.org> wrote:
> Chris Muller uploaded a new version of Compiler to project The Trunk:
> http://source.squeak.org/trunk/Compiler-cmm.275.mcz
>
> ==================== Summary ====================
>
> Name: Compiler-cmm.275
> Author: cmm
> Time: 3 October 2013, 2:34:56.409 pm
> UUID: 9d002330-e75e-436f-8699-b29413e98e81
> Ancestors: Compiler-nice.274
>
> When loading code, don't blow up just because of an undeclared ref.
>
> =============== Diff against Compiler-nice.274 ===============
>
> Item was changed:
> ----- Method: Encoder>>undeclared: (in category 'encoding') -----
> + undeclared: name
> - undeclared: name
> | sym |
> requestor interactive ifTrue:
> + [ requestor requestor == #error: ifTrue: [ requestor error: 'Undeclared' ].
> + ^ self notify: 'Undeclared' ].
> - [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
> - ^(UndeclaredVariableWarning new name: name selector: selector class: cue getClass) signal
> ifTrue:
> + [ | undeclared |
> - [| undeclared |
> undeclared := cue environment undeclared.
> + [ undeclared
> + at: sym
> + put: nil ]
> + on: AttemptToWriteReadOnlyGlobal
> + do: [ : noti | noti resume: true ].
> + self
> + global: (undeclared associationAt: sym)
> + name: sym ]
> - undeclared at: sym put: nil.
> - self global: (undeclared associationAt: sym) name: sym]
> ifFalse:
> + [ self
> + global: (Association key: sym)
> + name: sym ]!
> - [self global: (Association key: sym) name: sym]!
>
>
More information about the Squeak-dev
mailing list
|