[squeak-dev] Duffing broken for Inbox [was: The Inbox: Compiler-ct.480.mcz]
christoph.thiede at student.hpi.uni-potsdam.de
christoph.thiede at student.hpi.uni-potsdam.de
Tue Sep 13 15:08:26 UTC 2022
I have no idea what went wrong here. The ancestry looks correct to me. Here is the correct diff generated with Squeak Inbox Talk:
==================== Summary ====================
Name: Compiler-ct.480
Author: ct
Time: 9 September 2022, 2:48:27.444614 pm
UUID: 03d9ed0c-8807-be4a-89bf-891d9f639f09
Ancestors: Compiler-eem.479
Attempts to fix a GC issue while creating an Undeclared variable. Hold a strong reference on the newly created association until it has been stored as a global.
Note: This change makes the assumption that undeclared is not a SystemDictionary, which overrides #at:put:. However, I cannot explain why AttemptToWriteReadOnlyGlobal is handled in this place, no idea how this code could touch any ClassBindings ...
Please review.
=============== Diff against Compiler-eem.479 ===============
Encoder>>undeclared: {encoding} · ct 9/9/2022 14:35 (changed)
undeclared: name
| sym |
(requestor notNil and: [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: UndeclaredVariableNotification
do: [:ex| ex resume: false]"
sym := name asSymbol.
^ (UndeclaredVariableNotification new
name: name
selector: selector
class: cue getClass) signal
ifTrue:
- [ | undeclared |
+ [ | undeclared assoc |
undeclared := cue environment undeclared.
- [ undeclared
- at: sym
- put: nil ]
+ assoc := [ undeclared add: (undeclared associationClass key: sym value: nil) ]
on: AttemptToWriteReadOnlyGlobal
do: [ : noti | noti resume: true ].
self
- global: (undeclared associationAt: sym)
+ global: assoc
name: sym ]
ifFalse:
[ self
global: (Association key: sym)
name: sym ]
Best,
Christoph
---
Sent from Squeak Inbox Talk
On 2022-09-13T07:34:25-07:00, eliot.miranda at gmail.com wrote:
> The below shows that code diffing is broken for Inbox. Instead of showing the difference in the commit the below appears to list the entire Compiler package starting with AssignmentNode.
>
> _,,,^..^,,,_ (phone)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220913/1d6fb4a5/attachment.html>
More information about the Squeak-dev
mailing list
|