tc39 / proposal-source-phase-imports

Proposal to enable importing modules at the source phase
https://tc39.es/proposal-source-phase-imports/
MIT License
129 stars 9 forks source link

refactor: direct [[ModuleSourceClassName]] slot #50

Closed guybedford closed 1 year ago

guybedford commented 1 year ago

I've been investigating the WebAssembly ESM Integration spec changes necessary to define AbstractModuleSource inheritance, and it would be significantly simpler to have a direct [[ModuleSourceClassName]] slot on the instance instead of having to jump through an intermediate ModuleSource slot record, which doesn't otherwise provide any benefit in the spec.

guybedford commented 1 year ago

The corresponding ESM integration PR is in https://github.com/WebAssembly/esm-integration/pull/73/files.

nicolo-ribaudo commented 1 year ago

I like this change a lot. At some point in the future we will need ModuleSource Records, but let's push it to a later proposal that will actually rely on them :)