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

vm: add Synthetic modules #29864

Closed
wants to merge 1 commit into from
Closed

Conversation

devsnek
Copy link
Member

@devsnek devsnek commented Oct 6, 2019

  • Refactor vm.SourceTextModule (again)
  • Add vm.Module abstract superclass
  • Add vm.SyntheticModule

Refs: https://heycam.github.io/webidl/#synthetic-module-records

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@devsnek devsnek added vm Issues and PRs related to the vm subsystem. experimental Issues and PRs related to experimental features. esm Issues and PRs related to the ECMAScript Modules implementation. labels Oct 6, 2019
@nodejs-github-bot nodejs-github-bot added the lib / src Issues and PRs related to general changes in the lib or src directory. label Oct 6, 2019
@devsnek
Copy link
Member Author

devsnek commented Oct 6, 2019

cc @vsemozhetbyt

@devsnek devsnek removed the lib / src Issues and PRs related to general changes in the lib or src directory. label Oct 6, 2019
@devsnek devsnek force-pushed the more-vm-shenanigans branch 3 times, most recently from c396c6e to 20ee326 Compare October 7, 2019 19:07
tools/doc/type-parser.js Show resolved Hide resolved
doc/api/vm.md Outdated Show resolved Hide resolved
doc/api/vm.md Outdated Show resolved Hide resolved
Copy link
Contributor

@guybedford guybedford left a comment

Choose a reason for hiding this comment

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

Nice work.

test/parallel/test-vm-module-synthetic.js Outdated Show resolved Hide resolved
src/module_wrap.cc Show resolved Hide resolved
src/module_wrap.cc Outdated Show resolved Hide resolved
src/node_util.cc Outdated Show resolved Hide resolved
doc/api/vm.md Outdated Show resolved Hide resolved
added: REPLACEME
-->

* `name` {string} Name of the export to set.
Copy link
Member

Choose a reason for hiding this comment

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

What happens if name was not listed in exportNames?

Copy link
Member Author

Choose a reason for hiding this comment

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

the spec says a ReferenceError is thrown but V8 currently aborts. I posted about it on the bug tracker yesterday so hopefully it will be fixed soon.

@devsnek devsnek force-pushed the more-vm-shenanigans branch 3 times, most recently from 3b8872d to 380891b Compare October 12, 2019 07:11
- Refactor vm.SourceTextModule (again)
- Add vm.Module abstract superclass
- Add vm.SyntheticModule

Refs: https://heycam.github.io/webidl/#synthetic-module-records
@nodejs-github-bot
Copy link
Collaborator

@Trott
Copy link
Member

Trott commented Oct 13, 2019

@nodejs/vm

@Trott Trott added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Oct 13, 2019
Trott pushed a commit that referenced this pull request Oct 14, 2019
- Refactor vm.SourceTextModule (again)
- Add vm.Module abstract superclass
- Add vm.SyntheticModule

Refs: https://heycam.github.io/webidl/#synthetic-module-records

PR-URL: #29864
Reviewed-By: Guy Bedford <guybedford@gmail.com>
@Trott
Copy link
Member

Trott commented Oct 14, 2019

Landed in f9caee9

@Trott Trott closed this Oct 14, 2019
@devsnek devsnek deleted the more-vm-shenanigans branch October 14, 2019 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. esm Issues and PRs related to the ECMAScript Modules implementation. experimental Issues and PRs related to experimental features. semver-minor PRs that contain new features and should be released in the next minor version. vm Issues and PRs related to the vm subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants