Skip to content

Conversation

@vtjnash
Copy link
Member

@vtjnash vtjnash commented Dec 19, 2022

The owner field now points directly at the target binding (which may be itself), rather than indirecting through a module+name re-lookup. This makes module X; import .x as y; end behavior more precise.

The globalref field is currently now mandatory, since otherwise incremental compilation will be impossible right now. Maybe world-age splitting will help improve that later?

Fix up a lot of locations that previously used the name field badly. There are some valid uses of this, but mostly it was wrong, since it would may fail to reflect what content actually appeared in the user's code. Directly forwarding the actual lookup result is cleaner and clearer for the user in most cases.

Also remove resolve for GlobalRef:
This has been wrong since import as was added, and appears unused and untested.

@Keno you probably should review this, since you were the most interested in seeing Binding become more first-class

@vtjnash vtjnash requested a review from Keno December 19, 2022 19:14
@vtjnash vtjnash force-pushed the jn/globalref-binding branch from c13ca30 to 3dbd413 Compare January 6, 2023 04:00
The `owner` field now points directly at the target binding (which may
be itself), rather than indirecting through a module+name re-lookup.
This makes `module X; import .x as y; end` behavior more precise.

The `globalref` field is currently now mandatory, since otherwise
incremental compilation will be impossible right now. Maybe world-age
splitting will help improve that later?

Fix up a lot of locations that previously used the `name` field badly.
There are some valid uses of this, but mostly it was wrong, since it
would may fail to reflect what content actually appeared in the user's
code. Directly forwarding the actual lookup result is cleaner and
clearer for the user in most cases.

Also remove `resolve` for GlobalRef:
This has been wrong since `import as` was added, and appears unused and untested.
@vtjnash vtjnash force-pushed the jn/globalref-binding branch from 3dbd413 to ac109e6 Compare January 10, 2023 00:22
The owner field is now handled with cmpswap, so we can avoid needing a
module lock for it. This now means we only need the module lock for
handling the bindings and usings fields.
@vtjnash vtjnash force-pushed the jn/globalref-binding branch from ac109e6 to fae53d0 Compare January 10, 2023 01:58
@vtjnash vtjnash merged commit 00b0a7b into master Jan 10, 2023
@vtjnash vtjnash deleted the jn/globalref-binding branch January 10, 2023 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants