| Summary: | Support export namespace `export * as ns` | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Huáng Jùnliàng <jlhwung> | ||||||||||
| Component: | JavaScriptCore | Assignee: | Yusuke Suzuki <ysuzuki> | ||||||||||
| Status: | RESOLVED FIXED | ||||||||||||
| Severity: | Normal | CC: | ews-watchlist, fpizlo, keith_miller, mark.lam, msaboff, ross.kirsling, saam, tzagallo, webkit-bug-importer, ysuzuki | ||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||
| Version: | Safari Technology Preview | ||||||||||||
| Hardware: | Unspecified | ||||||||||||
| OS: | Unspecified | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Huáng Jùnliàng
2020-07-15 14:33:42 PDT
Created attachment 408905 [details]
Patch
WIP
Created attachment 408990 [details]
Patch
Comment on attachment 408990 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=408990&action=review r=me. Thanks for the extra explanation over Slack. > Source/JavaScriptCore/parser/NodesAnalyzeModule.cpp:89 > + // export { * as v } from "mod" This form can't use braces though, right? > Source/JavaScriptCore/runtime/AbstractModuleRecord.cpp:779 > + // Materialize *namespace* slot with module namespace object. > + // If module environment is not yet materialized, we will materialize it when materializing module environment. The "it" here is a bit confusing upon first read. Maybe something like "...unless the module environment is not yet materialized, in which case we'll do it in setModuleEnvironment"? > Source/JavaScriptCore/runtime/AbstractModuleRecord.cpp:782 > + bool putResult = false; > + symbolTablePutTouchWatchpointSet(m_moduleEnvironment.get(), globalObject, vm.propertyNames->starNamespacePrivateName, moduleNamespaceObject, /* shouldThrowReadOnlyError */ false, /* ignoreReadOnlyErrors */ true, putResult); nit: I know this is copied code, but it seems silly that one boolean is described using an identifier and the other two are described with block comments. Created attachment 409007 [details]
Patch
Created attachment 409008 [details]
Patch
Comment on attachment 408990 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=408990&action=review >> Source/JavaScriptCore/parser/NodesAnalyzeModule.cpp:89 >> + // export { * as v } from "mod" > > This form can't use braces though, right? Right, fixed. >> Source/JavaScriptCore/runtime/AbstractModuleRecord.cpp:779 >> + // If module environment is not yet materialized, we will materialize it when materializing module environment. > > The "it" here is a bit confusing upon first read. Maybe something like "...unless the module environment is not yet materialized, in which case we'll do it in setModuleEnvironment"? Sounds good! >> Source/JavaScriptCore/runtime/AbstractModuleRecord.cpp:782 >> + symbolTablePutTouchWatchpointSet(m_moduleEnvironment.get(), globalObject, vm.propertyNames->starNamespacePrivateName, moduleNamespaceObject, /* shouldThrowReadOnlyError */ false, /* ignoreReadOnlyErrors */ true, putResult); > > nit: I know this is copied code, but it seems silly that one boolean is described using an identifier and the other two are described with block comments. Fixed. iOS-wk2 failures are unrelated. https://ews-build.webkit.org/#/builders/24/builds/25994 Committed r267186: <https://trac.webkit.org/changeset/267186> |