Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editorial: Don't read the [[Status]] of non-cyclic modules #1486

Merged
merged 2 commits into from
Apr 10, 2019

Conversation

littledan
Copy link
Member

[[Status]] is a field of Cyclic Module Records; Abstract Module Records
don't keep track of it.

This patch avoids checking the [[Status]] of modules that don't have one,
instead first checking whether the module is cyclic. All of the use
cases seemed to be when modules were in dependency chains and not leaves.

Given the proposed Synthetic Module Records
tc39/proposal-built-in-modules#44
and their possible usage in JSON modules, CSS modules, and WebIDL
modules, it makes sense to avoid these code paths for those cases.

Fixes #1455

@ljharb ljharb requested review from zenparsing, ljharb, caridy, linclark and a team March 20, 2019 02:51
@zenparsing zenparsing mentioned this pull request Mar 20, 2019
@ljharb ljharb self-assigned this Mar 20, 2019
Copy link
Contributor

@GeorgNeis GeorgNeis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking care of this!

I think a similar change to GetModuleNamespace is still missing.

@littledan
Copy link
Member Author

@GeorgNeis Thanks for the review; fixed.

@littledan

This comment has been minimized.

@ljharb

This comment has been minimized.

@littledan

This comment has been minimized.

@ljharb

This comment has been minimized.

@littledan

This comment has been minimized.

@ljharb

This comment has been minimized.

ljharb pushed a commit to littledan/ecma262 that referenced this pull request Apr 10, 2019
[[Status]] is a field of Cyclic Module Records; Abstract Module Records
don't keep track of it.

This patch avoids checking the [[Status]] of modules that don't have one,
instead first checking whether the module is cyclic. All of the use
cases seemed to be when modules were in dependency chains and not leaves.

Given the proposed Synthetic Module Records
tc39/proposal-built-in-modules#44
and their possible usage in JSON modules, CSS modules, and WebIDL
modules, it makes sense to avoid these code paths for those cases.
@ljharb ljharb merged commit 6b9c201 into tc39:master Apr 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants