- 26 Jan, 2021 1 commit
-
-
Daniel Clark authored
This change completes support for import assertions for dynamic import(). A new version of the HostImportModuleDynamically callback taking import assertions is added to the public API. The name is very verbose; we could consider removing the "ImportAssertions" part when the old API is removed. Bytecode generation is updated to pass the assertions, if present, to Runtime_DynamicImportCall. Isolate::RunHostImportModuleDynamicallyCallback extracts the assertions from the options bag, filters out the assertions not present in the list specified by the host in HostGetSupportedImportAssertions, and sorts them by code point order of the keys per https://tc39.es/proposal-import-assertions/#sec-import-call-runtime-semantics-evaluation. The resulting array is passed to the host in the callback. Bug: v8:10958 Change-Id: I931df00f954a9f9c65bff5bcf461ba1c8f11e94e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2620578 Commit-Queue: Dan Clark <daniec@microsoft.com> Reviewed-by:
Camillo Bruni <cbruni@chromium.org> Reviewed-by:
Mythri Alle <mythria@chromium.org> Reviewed-by:
Marja Hölttä <marja@chromium.org> Cr-Commit-Position: refs/heads/master@{#72307}
-
- 25 Jan, 2021 1 commit
-
-
Daniel Clark authored
The change https://chromium-review.googlesource.com/c/v8/v8/+/2572173 implemented HostGetSupportedImportAssertions [1] in a fairly literal sense, where the host supplies a list of supported import assertions and V8 filters the import assertions in a ModuleRequest and exposes only supported assertions via its API surface. However, we've decided that the interop guarantees provided by doing the filtering in V8 are probably not worth the added complexity. Thus, this change removes the filtering. Going forward, hosts will be expected to ignore unknown asserions received from V8. This is mostly a revert of https://chromium-review.googlesource.com/c/v8/v8/+/2572173, with v8::Isolate::CreateParams::supported_import_assertions being kept for now (since we first have to delete the Blink code that sets it), and a new comment in v8.h instructing hosts to ignore unknown assertions. [1] https://tc39.es/proposal-import-assertions/#sec-hostgetsupportedimportassertions Bug: v8:10958 Change-Id: I7e8e2a7fbfe2d5bf891805cff6c3160d0e6825cd Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2643563Reviewed-by:
Marja Hölttä <marja@chromium.org> Reviewed-by:
Camillo Bruni <cbruni@chromium.org> Reviewed-by:
Mythri Alle <mythria@chromium.org> Commit-Queue: Dan Clark <daniec@microsoft.com> Cr-Commit-Position: refs/heads/master@{#72299}
-
- 14 Jan, 2021 1 commit
-
-
Ben Noordhuis authored
Remove the ambient dependency on the currently entered isolate, let the embedder pass it in explicitly. Bug: v8:11287 Change-Id: I03690390a308a59e2c6ea5c6ae268780d836b717 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2608209Reviewed-by:
Camillo Bruni <cbruni@chromium.org> Reviewed-by:
Benedikt Meurer <bmeurer@chromium.org> Reviewed-by:
Yang Guo <yangguo@chromium.org> Commit-Queue: Yang Guo <yangguo@chromium.org> Cr-Commit-Position: refs/heads/master@{#72105}
-
- 16 Dec, 2020 1 commit
-
-
Daniel Clark authored
Implement the HostGetSupportedImportAssertions, whose purpose is to filter the list of import assertions exposed to the embedder to only those assertion with keys that the embedder recognizes. See https://tc39.es/proposal-import-assertions/#sec-hostgetsupportedimportassertions. This change doesn't actually implement it as a callback, but instead passes the supported assertions during creation of the Isolate via CreateParams. This expresses clearly the requirement that the supported assertions must never change for the lifetime of the Isolate. Note that we still need to maintain all assertions in a map while parsing the import assertions clause, because duplicate keys for an unsupported assertion still needs to be detected as a parse error. So, the filtering is done later during SourceTextModuleDescriptor::AstModuleRequest::Serialize. The actual filtering algorithm simply iterates the assertions and the supported assertion keys in a nested loop. There's currently only one assertion in use ("type"), so there should be no reason to get too clever here unless at least several more assertions are generally supported. Bug: v8:10958 Change-Id: I9a2d965e9d452718d0ddfe9dca55b7b4ed963019 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2572173Reviewed-by:
Marja Hölttä <marja@chromium.org> Reviewed-by:
Adam Klein <adamk@chromium.org> Reviewed-by:
Camillo Bruni <cbruni@chromium.org> Commit-Queue: Dan Clark <daniec@microsoft.com> Cr-Commit-Position: refs/heads/master@{#71776}
-
- 07 Dec, 2020 1 commit
-
-
Daniel Clark authored
Although every Primitive is a Data, the Cast operations for the subclasses of Primitive do not allow casting directly from Data to the subclasses without first going through Value. Because of this, Primitives extracted from a V8::FixedArray require two casts to get to the "real" type. Thus, as a convenience to embedders, this change makes it possible to cast directly from Data to all the subtypes of Primitive. Also, this change makes the parameter names in the declarations match those in the definitions, though there does not seem to be a universally followed convention regarding these. Bug: v8:10958 Change-Id: I18dc3fbb9a9bccb2cb3b75efd829af64d46d8eb9 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2573816Reviewed-by:
Marja Hölttä <marja@chromium.org> Reviewed-by:
Camillo Bruni <cbruni@chromium.org> Commit-Queue: Dan Clark <daniec@microsoft.com> Cr-Commit-Position: refs/heads/master@{#71649}
-
- 30 Nov, 2020 1 commit
-
-
Daniel Clark authored
This change completes the necessary API changes for import assertions discussed in https://docs.google.com/document/d/1yuXgNHSbTAPubT1Mg0JXp5uTrfirkvO1g5cHHCe-LmY. The old ResolveCallback is deprecated and replaced with a ResolveModuleCallback that includes import assertions. Until ResolveCallback is removed, InstantiateModule and associated functions are modified to accept both types of callback, using the new one if it was supplied and the old one otherwise. An alternative that I chose not to go with would be to just duplicate InstantiateModule and associated functions for both callback types. SyntheticModule::PrepareInstantiate's callback parameter was unused so I removed it. Bug: v8:10958 Change-Id: I8e9fbaf9c2853b076b13da02473fbbe039b9db57 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2551919Reviewed-by:
Camillo Bruni <cbruni@chromium.org> Reviewed-by:
Marja Hölttä <marja@chromium.org> Commit-Queue: Dan Clark <daniec@microsoft.com> Cr-Commit-Position: refs/heads/master@{#71506}
-
- 28 Nov, 2020 1 commit
-
-
Camillo Bruni authored
Bug: v8:11195 Change-Id: I19211af9e440940f85351fb38920eb620c222213 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2555010Reviewed-by:
Ross McIlroy <rmcilroy@chromium.org> Reviewed-by:
Victor Gomes <victorgomes@chromium.org> Commit-Queue: Camillo Bruni <cbruni@chromium.org> Cr-Commit-Position: refs/heads/master@{#71465}
-
- 24 Nov, 2020 2 commits
-
-
Daniel Clark authored
This change refactors the v8.h API as discussed in https://docs.google.com/document/d/1yuXgNHSbTAPubT1Mg0JXp5uTrfirkvO1g5cHHCe-LmY/edit#heading=h.q0c9h4p928mn such that a v8::Module exposes module requests as a FixedArray of ModuleRequest objects, which can then be used to obtain their module specifier and source code offset. This replaces the old functions that passed back individual specifier Strings and Locations via repeated calls to getters that take an index. These are marked as deprecated. The new ModuleRequest interface includes a getter for an ImportAssertions FixedArray, which will contain the import assertions for the request if --harmony-import-assertions is set, and will be empty otherwise. One notable change here is that the APIs now return source code offsets rather than v8::Locations. The host must then call the new Module::SourceOffsetToLocation to convert these offsets into line/column numbers. This requires a bit more back-and-forth, but allows the host to defer the cost of converting from source offset to line/column numbers until an error needs to be reported, potentially skipping the work altogether. Bug: v8:10958 Change-Id: I181639737c701e467324e6c781aa4d7bdd87ae8c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2545577 Commit-Queue: Dan Clark <daniec@microsoft.com> Reviewed-by:
Camillo Bruni <cbruni@chromium.org> Reviewed-by:
Marja Hölttä <marja@chromium.org> Cr-Commit-Position: refs/heads/master@{#71387}
-
Camillo Bruni authored
- Use C++ primitives (int, bool) for the ScriptOrigin constructor. - Deprecate the old accessors and constructor Bug: v8:11195 Change-Id: I739edd6b4c58e19a8a16ddce863eea14ec933697 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2555005Reviewed-by:
Ross McIlroy <rmcilroy@chromium.org> Reviewed-by:
Leszek Swirski <leszeks@chromium.org> Commit-Queue: Camillo Bruni <cbruni@chromium.org> Cr-Commit-Position: refs/heads/master@{#71384}
-
- 03 Nov, 2020 1 commit
-
-
Shu-yu Guo authored
It's shipped since M63. Bug: v8:5785 Change-Id: Iaa591890edc560bc58b7a6b18ad5787d747f1ba4 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2509942Reviewed-by:
Marja Hölttä <marja@chromium.org> Commit-Queue: Shu-yu Guo <syg@chromium.org> Cr-Commit-Position: refs/heads/master@{#70953}
-
- 07 Oct, 2020 1 commit
-
-
Shu-yu Guo authored
This is a predicate checking if any module in a module graph is [[Async]], i.e. contains a top-level await. It is needed for ServiceWorker integration, as ServiceWorkers disallows top-level await in its modules to prevent stalling during registration. https://github.com/w3c/ServiceWorker/pull/1444 Bug: v8:9344 Change-Id: Id84489bc73717b4c9950059c8ff6def9297499d0 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2451212 Commit-Queue: Shu-yu Guo <syg@chromium.org> Reviewed-by:
Camillo Bruni <cbruni@chromium.org> Reviewed-by:
Georg Neis <neis@chromium.org> Reviewed-by:
Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#70390}
-
- 16 Mar, 2020 1 commit
-
-
Camillo Bruni authored
Enable more tests to use top level await modules. Bug: v8:9344 Change-Id: I61c0c0205235969a43af602af327654b7e8a3dad Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2074402Reviewed-by:
Sathya Gunasekaran <gsathya@chromium.org> Commit-Queue: Camillo Bruni <cbruni@chromium.org> Cr-Commit-Position: refs/heads/master@{#66726}
-
- 25 Feb, 2020 1 commit
-
-
Camillo Bruni authored
Bug: v8:9344 Change-Id: Iee66fc27b9f1c45ac3ac09dd82d88926414cc8f0 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2061558Reviewed-by:
Toon Verwaest <verwaest@chromium.org> Reviewed-by:
Mathias Bynens <mathias@chromium.org> Commit-Queue: Camillo Bruni <cbruni@chromium.org> Cr-Commit-Position: refs/heads/master@{#66418}
-
- 19 Feb, 2020 1 commit
-
-
Shu-yu Guo authored
In the spec, WeakRefs that are dereferenced are kept alive until there's no JS on the stack, and then the host is expected to call ClearKeptObjects to clear those strong references [1]. HTML calls ClearKeptObjects at the end of a PerformMicrotaskCheckpoint [2]. In V8, leaving this up to the embedder is error prone in the same way the deprecated FinalizationGroup callback APIs were error prone: it depends on the embedder doing the right thing. This CL moves the call to ClearKeptObjects to be after running of microtasks within V8. However, the Isolate::ClearKeptObjects API should not be removed or deprecated in case an embedder uses an entirely custom MicrotaskQueue implementation and invokes MicrotaskQueue::PerformCheckpoint manually. [1] https://tc39.es/proposal-weakrefs/#sec-clear-kept-objects [2] https://github.com/whatwg/html/pull/4571 Bug: v8:8179 Change-Id: Ie243804157b56241ca69ed8fad300e839a0c9f75 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2055967 Commit-Queue: Shu-yu Guo <syg@chromium.org> Reviewed-by:
Ulan Degenbaev <ulan@chromium.org> Reviewed-by:
Ross McIlroy <rmcilroy@chromium.org> Cr-Commit-Position: refs/heads/master@{#66327}
-
- 05 Dec, 2019 1 commit
-
-
Joshua Litt authored
Bug: v8:9970 Change-Id: I0e542fc63211e78800eab82257ccab9583305433 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1946534Reviewed-by:
Georg Neis <neis@chromium.org> Reviewed-by:
Igor Sheludko <ishell@chromium.org> Commit-Queue: Joshua Litt <joshualitt@chromium.org> Cr-Commit-Position: refs/heads/master@{#65351}
-
- 25 Nov, 2019 1 commit
-
-
Gus Caplan authored
Properly handle termination exceptions in TLA modules. Bug: v8:9978 Change-Id: Ica70a55d1f54ec89d175d7c846e9a405eaffe0a0 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1920750 Commit-Queue: Georg Neis <neis@chromium.org> Reviewed-by:
Georg Neis <neis@chromium.org> Reviewed-by:
Yang Guo <yangguo@chromium.org> Reviewed-by:
Joshua Litt <joshualitt@chromium.org> Cr-Commit-Position: refs/heads/master@{#65135}
-
- 24 Sep, 2019 1 commit
-
-
Joshua Litt authored
Adds support for parsing top level await to V8, as well as many tests. This is the final cl in the series to add support for top level await to v8. Spec is here: https://tc39.es/proposal-top-level-await/#sec-execute-async-module Bug: v8:9344 Change-Id: Ie8f17ad8c7c60d1f6996d134ae154416cc1f31e3 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1703878Reviewed-by:
Georg Neis <neis@chromium.org> Reviewed-by:
Adam Klein <adamk@chromium.org> Commit-Queue: Joshua Litt <joshualitt@chromium.org> Cr-Commit-Position: refs/heads/master@{#63946}
-
- 17 Sep, 2019 1 commit
-
-
Georg Neis authored
Bug: v8:9713 Change-Id: I80b8f72ce4617b314f6c4991297a6464f67cbbec Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1807364Reviewed-by:
Toon Verwaest <verwaest@chromium.org> Commit-Queue: Georg Neis <neis@chromium.org> Cr-Commit-Position: refs/heads/master@{#63844}
-
- 16 Sep, 2019 1 commit
-
-
Joshua Litt authored
The first land did not correctly handle exceptions for already evaluated modules. Original description: Implements AsyncModules in SourceTextModule. However, there is no support in the parser or D8 for actually creating / resolving AsyncModules. Also adds a flag '--top-level-await,' but the only external facing change with the flag enabled is that Module::Evaluate returns a promise. Bug: v8:9344 Change-Id: I24725816ee4a6c3616c3c8b08a75a60ca9f27727 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1797658 Commit-Queue: Joshua Litt <joshualitt@chromium.org> Reviewed-by:
Ulan Degenbaev <ulan@chromium.org> Reviewed-by:
Georg Neis <neis@chromium.org> Cr-Commit-Position: refs/heads/master@{#63803}
-
- 11 Sep, 2019 2 commits
-
-
Joshua Litt authored
This reverts commit 591d1c9d. Reason for revert: breaks blink Original change's description: > [top-level-await] Implement top-level-await in V8 > > Implements AsyncModules in SourceTextModule. However, there is no > support in the parser or D8 for actually creating / resolving > AsyncModules. Also adds a flag '--top-level-await,' but the only > external facing change with the flag enabled is that Module::Evaluate > returns a promise. > > Bug: v8:9344 > Change-Id: Idc722efc1e2aa780d04bdb985bb7920ab969d34e > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1728037 > Reviewed-by: Ulan Degenbaev <ulan@chromium.org> > Reviewed-by: Georg Neis <neis@chromium.org> > Commit-Queue: Joshua Litt <joshualitt@chromium.org> > Cr-Commit-Position: refs/heads/master@{#63686} TBR=ulan@chromium.org,adamk@chromium.org,neis@chromium.org,joshualitt@chromium.org Change-Id: I6ceeb3a293a948af04bf200ab784ceb03386a3fd No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: v8:9344 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1797656Reviewed-by:
Zhi An Ng <zhin@chromium.org> Commit-Queue: Zhi An Ng <zhin@chromium.org> Cr-Commit-Position: refs/heads/master@{#63692}
-
Joshua Litt authored
Implements AsyncModules in SourceTextModule. However, there is no support in the parser or D8 for actually creating / resolving AsyncModules. Also adds a flag '--top-level-await,' but the only external facing change with the flag enabled is that Module::Evaluate returns a promise. Bug: v8:9344 Change-Id: Idc722efc1e2aa780d04bdb985bb7920ab969d34e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1728037Reviewed-by:
Ulan Degenbaev <ulan@chromium.org> Reviewed-by:
Georg Neis <neis@chromium.org> Commit-Queue: Joshua Litt <joshualitt@chromium.org> Cr-Commit-Position: refs/heads/master@{#63686}
-
- 24 May, 2019 1 commit
-
-
Yang Guo authored
TBR=mvstanton@chromium.org,neis@chromium.org,ahaas@chromium.org Bug: v8:9247 Change-Id: I5433c863a54f3412d73df0d38aba3fdbcfac7ebe Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1627973 Commit-Queue: Yang Guo <yangguo@chromium.org> Auto-Submit: Yang Guo <yangguo@chromium.org> Reviewed-by:
Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#61830}
-
- 08 Jan, 2018 1 commit
-
-
Georg Neis authored
Bug: v8:7217 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng Change-Id: I97b067254355eb91e12b92eba92631cbc3ce8000 Reviewed-on: https://chromium-review.googlesource.com/839280 Commit-Queue: Georg Neis <neis@chromium.org> Reviewed-by:
Adam Klein <adamk@chromium.org> Cr-Commit-Position: refs/heads/master@{#50395}
-
- 22 Dec, 2017 1 commit
-
-
Georg Neis authored
- Instantiation errors are no longer recorded. If instantiation fails, the module(s) are reset to "uninstantiated". When instantiation is re-attempted, the thrown exception will be fresh. - Instantiation can succeed even where there are modules in the graph that previously failed evaluation. Bug: v8:1569 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng Change-Id: I429f616918afe5f8ab1a956024f0a22f464b8c44 Reviewed-on: https://chromium-review.googlesource.com/763369 Commit-Queue: Georg Neis <neis@chromium.org> Reviewed-by:
Adam Klein <adamk@chromium.org> Cr-Commit-Position: refs/heads/master@{#50301}
-
- 28 Jun, 2017 1 commit
-
-
Georg Neis authored
V8 now takes care of recording a module's status, as proposed in https://github.com/tc39/ecma262/pull/916. R=adamk@chromium.org Bug: v8:1569, chromium:594639 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng Change-Id: Id884f1c817e1dc3eea79a5d5a7f5cd996db1dbb0 Reviewed-on: https://chromium-review.googlesource.com/548500 Commit-Queue: Georg Neis <neis@chromium.org> Reviewed-by:
Adam Klein <adamk@chromium.org> Cr-Commit-Position: refs/heads/master@{#46293}
-
- 21 Jun, 2017 1 commit
-
-
Alexey Kozyatinskiy authored
This method returns position of importing stmt in module source. R=neis@chromium.org Bug: chromium:721589 Change-Id: I8639796a001fdfec7cf5aa1bf1a27493f7a757a9 Reviewed-on: https://chromium-review.googlesource.com/541322Reviewed-by:
Georg Neis <neis@chromium.org> Reviewed-by:
Adam Klein <adamk@chromium.org> Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org> Cr-Commit-Position: refs/heads/master@{#46105}
-
- 29 May, 2017 1 commit
-
-
Jochen Eisinger authored
All APIs that can throw exceptions should return Maybe<> values BUG=none R=neis@chromium.org,gsathya@chromium.org Change-Id: I6a6e5888cd71257bb02bdcfcc587c909d0c1d8f4 Reviewed-on: https://chromium-review.googlesource.com/517785 Commit-Queue: Jochen Eisinger <jochen@chromium.org> Reviewed-by:
Georg Neis <neis@chromium.org> Reviewed-by:
Sathya Gunasekaran <gsathya@chromium.org> Cr-Commit-Position: refs/heads/master@{#45557}
-
- 19 Apr, 2017 1 commit
-
-
neis authored
When asked for a module that previously failed to compile or instantiate, the embedder necessarily has to signal failure. In this case, we expect an exception to be scheduled, which we will rethrow. BUG=v8:1569 Review-Url: https://codereview.chromium.org/2827733002 Cr-Commit-Position: refs/heads/master@{#44729}
-
- 28 Feb, 2017 2 commits
-
-
Georg Neis authored
BUG=v8:6022 Change-Id: I54205cb3ecc2dd31ed62e55726f0ec5fcd202c30 Reviewed-on: https://chromium-review.googlesource.com/446349 Commit-Queue: Georg Neis <neis@chromium.org> Reviewed-by:
Adam Klein <adamk@chromium.org> Cr-Commit-Position: refs/heads/master@{#43500}
-
Georg Neis authored
This is more useful than always returning undefined. BUG=v8:1569,v8:5978 Change-Id: Id10cf87f7865db1a85de412460eaead4e4bf3b62 Reviewed-on: https://chromium-review.googlesource.com/446846Reviewed-by:
Adam Klein <adamk@chromium.org> Commit-Queue: Georg Neis <neis@chromium.org> Cr-Commit-Position: refs/heads/master@{#43498}
-
- 19 Jan, 2017 1 commit
-
-
neis authored
Since the script origin is part of the key used in the compilation cache, this ensures that the cache never confuses a module with a non-module script. BUG=v8:1569,v8:5685 Review-Url: https://codereview.chromium.org/2611643002 Cr-Commit-Position: refs/heads/master@{#42490}
-
- 11 Oct, 2016 2 commits
-
-
adamk authored
This is a re-land of https://codereview.chromium.org/2393303002/ with an additional call to DisposeModuleEmbedderData() added to fix lsan failures. Unifies the approaches used for storing the specifier -> module mapping and the module -> directory mapping, using std::unordered_maps for both and storing them per-Context. This requires adding a method to the v8::Module API to get a hash code for a Module, but allows slimming down the API in return: gone are SetEmbedderData/GetEmbedderData, along with the fourth argument to ResolveModuleCallback. Besides a simpler API, this allows d8 to get closer to the HTML loader, which requires each Realm to have a persistent module map (though this capability is not yet exercised by any tests). BUG=v8:1569 TBR=neis@chromium.org,jochen@chromium.org Review-Url: https://codereview.chromium.org/2405313002 Cr-Commit-Position: refs/heads/master@{#40186}
-
adamk authored
Revert of [modules] Store Module metadata in per-Context EmbedderData (patchset #7 id:120001 of https://codereview.chromium.org/2393303002/ ) Reason for revert: Fails under LeakSanitizer on auto-roll fyi bot: https://build.chromium.org/p/client.v8.fyi/builders/Auto-roll%20-%20release%20process/builds/49447 Original issue's description: > [modules] Store Module metadata in per-Context EmbedderData > > Unifies the approaches used for storing the specifier -> module mapping > and the module -> directory mapping, using std::unordered_maps for both > and storing them per-Context. > > This requires adding a method to the v8::Module API to get a hash code > for a Module, but allows slimming down the API in return: gone are > SetEmbedderData/GetEmbedderData, along with the fourth argument > to ResolveModuleCallback. > > Besides a simpler API, this allows d8 to get closer to the HTML loader, > which requires each Realm to have a persistent module map (though this > capability is not yet exercised by any tests). > > BUG=v8:1569 > > Committed: https://crrev.com/9cf8fce74cf6e7afd6aea3f3545f6bb61572f277 > Cr-Commit-Position: refs/heads/master@{#40133} TBR=jochen@chromium.org,neis@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=v8:1569 Review-Url: https://codereview.chromium.org/2406973003 Cr-Commit-Position: refs/heads/master@{#40145}
-
- 10 Oct, 2016 1 commit
-
-
adamk authored
Unifies the approaches used for storing the specifier -> module mapping and the module -> directory mapping, using std::unordered_maps for both and storing them per-Context. This requires adding a method to the v8::Module API to get a hash code for a Module, but allows slimming down the API in return: gone are SetEmbedderData/GetEmbedderData, along with the fourth argument to ResolveModuleCallback. Besides a simpler API, this allows d8 to get closer to the HTML loader, which requires each Realm to have a persistent module map (though this capability is not yet exercised by any tests). BUG=v8:1569 Review-Url: https://codereview.chromium.org/2393303002 Cr-Commit-Position: refs/heads/master@{#40133}
-
- 22 Sep, 2016 1 commit
-
-
adamk authored
BUG=v8:1569 Review-Url: https://codereview.chromium.org/2361593002 Cr-Commit-Position: refs/heads/master@{#39646}
-
- 20 Sep, 2016 1 commit
-
-
adamk authored
This patch gives the ability for the embedder to ask for the module requests of a module, and to pass a ResolveCallback into Module::Instantiate(). In d8, I've implemented a simple module_map that's used along with this API to allow loading, compiling, instantiating, and evaluating a whole tree of modules. No path resolution is yet implemented, meaning that all import paths are relative to whatever directory d8 runs in. And no imports are linked to the exports of the requested module. BUG=v8:1569 Review-Url: https://codereview.chromium.org/2351113004 Cr-Commit-Position: refs/heads/master@{#39569}
-
- 10 Feb, 2015 1 commit
-
-
adamk authored
Adding the line "// MODULE" to an mjsunit file will now cause run-tests.py to prefix the test case with "--module" in the d8 commandline. d8 has itself been updated to treat files preceded with "--module" as modules (that is, it compiles them with ScriptCompiler::CompileModule, and turns on --harmony-modules). Review URL: https://codereview.chromium.org/902263002 Cr-Commit-Position: refs/heads/master@{#26555}
-
- 06 Feb, 2015 1 commit
-
-
adamk authored
This adds an "experimental" API hook (v8::ScriptCompiler::CompileModule) allowing compilation of modules. The code gen is incredibly basic: the module body is represented by a Block in the AST. But this at least gets more of the pipeline working, and opens the door to writing mjsunit tests (once d8 is modified to support module compilation). BUG=v8:1569 LOG=n Review URL: https://codereview.chromium.org/902093002 Cr-Commit-Position: refs/heads/master@{#26496}
-