- 24 May, 2022 1 commit
-
-
Clemens Backes authored
The Wasm C API currently disabled dynamic tiering, in order to have deterministic behaviour for serialization of Wasm modules. As dynamic tiering is now shipped, also the C API should follow. Serialization of a Wasm module now just serializes the current state, so embedders are responsible for warming up a module before serializing it. If requested, we can add an internal API to enforce full tier-up of all functions, but we will leave that for later. R=ahaas@chromium.org, jkummerow@chromium.org Bug: v8:12899 Change-Id: I55df63f0b6c1f285e4983f9f7d5fb66aa41637bd Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3660261Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/main@{#80727}
-
- 18 May, 2022 1 commit
-
-
Andy Wingo authored
Bug: v8:12868 Change-Id: I42ef3e15b2a7fd2ef157aa0e657ddf98973e8d79 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644956Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Andy Wingo <wingo@igalia.com> Cr-Commit-Position: refs/heads/main@{#80605}
-
- 13 May, 2022 1 commit
-
-
Samuel Groß authored
This is more consistent with similar features, for example V8_ENABLE_WEBASSEMBLY or V8_ENABLE_MAGLEV. Drive-by: remove V8_SANDBOX_IS_AVAILABLE as it's no longer needed. Bug: v8:10391 Change-Id: I8658c5b0c331a4c73892737083b2c2f9b8f84056 Cq-Include-Trybots: luci.v8.try:v8_linux64_heap_sandbox_dbg_ng,v8_linux_arm64_sim_heap_sandbox_dbg_ng Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3647355 Commit-Queue: Toon Verwaest <verwaest@chromium.org> Auto-Submit: Samuel Groß <saelo@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Cr-Commit-Position: refs/heads/main@{#80530}
-
- 04 Mar, 2022 1 commit
-
-
Camillo Bruni authored
Prepare gcmole.cc for the next update: - Print possible GC locations when discovering stale/dead variables - Make error messages less confusing for the modern V8 engineer - Prepare gcmole to read suspects.allowlist instead of .whitelist - Use more readable variable names - Only log non-found types with --verbose - Change the currently unusued gccauses format in gcmole.py and support loading it back in gcmole.cc - Implemented first basic gc call-chain printing (disabled by default) GCmole packaging: - Add debug mode to bootstrap.sh build script - Update gcmole.py run instructions in bootstrap.sh and package.sh Bug: v8:10009 Change-Id: I369d48baa2980455d2e8f57e7a803d0384fe83f1 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3480095Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Maya Lekova <mslekova@chromium.org> Commit-Queue: Camillo Bruni <cbruni@chromium.org> Cr-Commit-Position: refs/heads/main@{#79357}
-
- 01 Mar, 2022 1 commit
-
-
Manos Koukoutos authored
According to the latest changes in wasm-gc, externref will be renamed to anyref, and will be assigned as the top of the reference type hierarchy. Since in the current wasm type system funcref is not a subtype of anyref, subtyping is now dependent on whether wasm-gc is enabled. Bug: v8:7748 Change-Id: I0c0ae3dd5523e624d4490ca33d1fba4c2ae59393 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3468345Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Cr-Commit-Position: refs/heads/main@{#79322}
-
- 31 Jan, 2022 1 commit
-
-
Manos Koukoutos authored
Since inheritance depth of every type is known in the isorecursive hybrid type system, rtts with depth are removed. This enables simplification of type checks in Liftoff and Turbofan, as well as decoding of object allocation instructions. Bug: v8:7748 Change-Id: I6b52579b584191d92644de1c6e805d9f054641d3 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3422626Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Cr-Commit-Position: refs/heads/main@{#78860}
-
- 16 Dec, 2021 1 commit
-
-
Igor Sheludko authored
This CL * removes Builtins::codet() and Builtins::codet_handle() returning builtins as CodeT objects in favor of code() and code_handle(), * removes BUILTIN_CODET macro in favor of BUILTIN_CODE, * removes CodeDataContainer table. Bug: v8:11880 Change-Id: Ic868549030744b0ff3ea5d5edbfcacf77c6de96d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3344650Reviewed-by: Toon Verwaest <verwaest@chromium.org> Commit-Queue: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/main@{#78399}
-
- 15 Dec, 2021 1 commit
-
-
Samuel Groß authored
This CL renames a number of things related to the V8 sandbox. Mainly, what used to be under V8_HEAP_SANDBOX is now under V8_SANDBOXED_EXTERNAL_POINTERS, while the previous V8 VirtualMemoryCage is now simply the V8 Sandbox: V8_VIRTUAL_MEMORY_CAGE => V8_SANDBOX V8_HEAP_SANDBOX => V8_SANDBOXED_EXTERNAL_POINTERS V8_CAGED_POINTERS => V8_SANDBOXED_POINTERS V8VirtualMemoryCage => Sandbox CagedPointer => SandboxedPointer fake cage => partially reserved sandbox src/security => src/sandbox This naming scheme should simplify things: the sandbox is now the large region of virtual address space inside which V8 mainly operates and which should be considered untrusted. Mechanisms like sandboxed pointers are then used to attempt to prevent escapes from the sandbox (i.e. corruption of memory outside of it). Furthermore, the new naming scheme avoids the confusion with the various other "cages" in V8, in particular, the VirtualMemoryCage class, by dropping that name entirely. Future sandbox features are developed under their own V8_SANDBOX_X flag, and will, once final, be merged into V8_SANDBOX. Current future features are sandboxed external pointers (using the external pointer table), and sandboxed pointers (pointers guaranteed to point into the sandbox, e.g. because they are encoded as offsets). This CL then also introduces a new build flag, v8_enable_sandbox_future, which enables all future features. Bug: v8:10391 Change-Id: I5174ea8f5ab40fb96a04af10853da735ad775c96 Cq-Include-Trybots: luci.v8.try:v8_linux64_heap_sandbox_dbg_ng,v8_linux_arm64_sim_heap_sandbox_dbg_ng Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3322981Reviewed-by: Hannes Payer <hpayer@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Reviewed-by: Michael Achenbach <machenbach@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Commit-Queue: Samuel Groß <saelo@chromium.org> Cr-Commit-Position: refs/heads/main@{#78384}
-
- 14 Dec, 2021 4 commits
-
-
Igor Sheludko authored
This CL migrates the following objects' APIs to CodeT: * WasmFunctionData, * WasmInternalFunction. Bug: v8:11880 Change-Id: Ib3f0eb41894cbd3c6b30430c4e5616eb45fbbaec Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3338701Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/main@{#78377}
-
Andreas Haas authored
With dynamic tiering, the "serialize" function provided by the c-api does not work anymore, and it is unclear how it should work. R=jkummerow@chromium.org Bug: v8:12281 Change-Id: Ib70bf118ba42b0752eb5dab5f43893da0404931e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3338657Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/main@{#78369}
-
Benedikt Meurer authored
This is a non-functional refactoring to make naming of stack traces more consistent, and thus easier to reason about whether the "simple stack trace" (stack trace API) or the "detailed stack trace" (inspector API) is meant. Granted, these names aren't great by themselves, but at least we should be consistent. This also adds a new `Isolate::GetSimpleStackTrace()` and uses that directly to implement the Wasm C-API, avoiding the roundtrip via the `JSMessageObject`, which actually carries a detailed stack trace (which by chance worked out so far). Doc: https://bit.ly/v8-stack-frame Bug: chromium:1258599, chromium:1278647, chromium:1278650 Change-Id: I29e1a956ed156d6eeceb50150a28afaa2f11b9c7 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3334780 Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Thibaud Michaud <thibaudm@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Maya Lekova <mslekova@chromium.org> Cr-Commit-Position: refs/heads/main@{#78366}
-
Benedikt Meurer authored
This is the second step in the refactoring to make v8::StackFrame more lightweight and usable for (long time storage) by the V8 inspector (see https://bit.ly/v8-stack-frame for an overview). This is a purely mechanical change without any functional aspects. The intention is to make the use case for the CallSiteInfo objects clear, namely to serve as the backing store for the CallSite objects exposed via the Error.prepareStackTrace() API and used under the hood to implement the error.stack accessor. Doc: https://bit.ly/v8-stack-frame Bug: chromium:1258599, chromium:1278647, chromium:1278650 Change-Id: I39dffd1f1a8e5158ddc56f2a0a2b1b28321f487a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3300138Reviewed-by: Thibaud Michaud <thibaudm@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Maya Lekova <mslekova@chromium.org> Reviewed-by: Simon Zünd <szuend@chromium.org> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/main@{#78361}
-
- 13 Dec, 2021 1 commit
-
-
Manos Koukoutos authored
Since the reftypes proposal has shipped, we remove the respective flag and the code that handled its absence. We maintain a WasmFeature for reftypes for feature detection purposes. We remove the flag declaration from tests, and adapt some tests that make no sense without the flag. Bug: v8:7581 Change-Id: Icf2f8d0feae8f30ec68d5560f1e7ee5959481483 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3329781Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Cr-Commit-Position: refs/heads/main@{#78351}
-
- 30 Nov, 2021 1 commit
-
-
Camillo Bruni authored
- V8::Deprecate ShutdownPlatform in favor of V8::DisposePlatform - Rename i::V8::TearDown to i::V8::Dispose - Clean up i::V8::Initialize - Remove needless V8::Initialize() calls in cctests - Remove CcTest::DisableAutomaticDispose() - Add checks to Isolate::Allocate and Isolate::Dispose that there is and active platform Change-Id: Iac84f9ade9d1781e9e8b8c88ea8fe74013f51c4a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3306482 Commit-Queue: Camillo Bruni <cbruni@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Manos Koukoutos <manoskouk@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#78162}
-
- 26 Nov, 2021 1 commit
-
-
Manos Koukoutos authored
See crrev.com/c/3277878 for context. We should only transform extenral to internal function references when passing a function value to a function-typed global or table. For their externref counterparts, we should preserve the reference unchanged. Bug: v8:11510, chromium:1273705 Change-Id: Ic1719c4d31e175f3a37ced6e4e4dfcd61a19ae57 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3302790 Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/main@{#78108}
-
- 24 Nov, 2021 1 commit
-
-
Manos Koukoutos authored
Design doc: bit.ly/3jEVgzz We separate the internal representation of function references in Wasm from their JSFunction-based (external) representation. This improves performance of call_ref by requiring less indirections to load the context and call target from a function reference. In the boundary between wasm and JS/the C API, we add transformations between the two representations. Detailed changes: - Introduce WasmInternalFunction, containing fields required by call_ref, as well as a reference to the corresponding WasmExternalFunction. Add a reference to the WasmInternalFunction in WasmFunctionData. The {WasmInternalFunction::FromExternal} helper extracts the internal out of an external function. - Change {WasmInstanceObject::external_functions()} to internal functions. - Change wasm function tables to contain internal functions. - Change the following code to use internal functions: - call_ref in liftoff and Turbofan - function type checks in liftoff and Turbofan - CallRefIC and GenericJSToWasmWrapper builtins - {InitExprInterface::RefFunc} - module-compiler.cc in {ProcessTypeFeedback} - In module-instantiate.cc, in function-rtt creation. - Add transformations between internal and external functions in: - WasmWrapperGraphBuilder::{ToJS, BuildUnpackObjectWrapper, FromJS, BuildJSToJSWrapper}. - debug-wasm-objects.cc in {FunctionProxy::Get}, {WasmValueObject::New} and {AddWasmTableObjectInternalProperties}. - runtime-wasm.cc in ReplaceWrapper - the C and JS APIs - module-instantiate.cc, in import and export processing, as well as {InitializeIndirectFunctionTables} - WasmTableObject::{IsValidElement, SetFunctionTableEntry} - {WasmGlobalObject::SetFuncRef} - Simplify body descriptors of WasmExternalFunction variants. - Adjust tests. Bug: v8:11510 Change-Id: I8377f46f55c3771391ae1c5c8201a83854ee7878 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3277878Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Cr-Commit-Position: refs/heads/main@{#78068}
-
- 02 Nov, 2021 1 commit
-
-
Manos Koukoutos authored
Design doc: https://bit.ly/3jEVgzz Summary: We change the context for WasmJSFunction and WasmCapiFunction from a tuple containing the instance to a triple WasmAPIFunctionRef = {isolate root, context, callable}. This way we do not have to maintain the correct instance at runtime. Also, a few places in the code get simplified. Changes: - In WasmGraphBuilder, support having a WasmAPIFunctionRef at parameter 0. - Remove unpacking of (instance, callable) tuple from code generators. - Remove the part in WasmGraphBuilder and LiftoffCompiler that used to set the instance field of the function reference. - Modify code that handles the 'ref' field in wasm-objects.*, factory.* and c-api.cc. - Fix the recorded safepoint address for arm when calling a C function from wasm. - (Drive-by) Remove WasmAllocatePair. Bug: v8:11510 Change-Id: I2a4ef3abaf9da36c4a2d85b434965a40a289b9ec Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3236719 Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Maya Lekova <mslekova@chromium.org> Cr-Commit-Position: refs/heads/main@{#77639}
-
- 20 Sep, 2021 1 commit
-
-
Igor Sheludko authored
... and move methods that use XXX::cast() there. This will untangle the include cycle that'll happen in a follow-up CLs. Bug: v8:11880 Change-Id: Iba46bc9b0e0df9530197f57d0469456eb9006e66 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3164456Reviewed-by: Camillo Bruni <cbruni@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/main@{#76932}
-
- 17 Sep, 2021 1 commit
-
-
Andreas Haas authored
The default value for table entries in WebAssembly tables is null when the table gets allocated from WebAssembly, but when the table gets allocated from JavaScript, the default value is undefined when the table type is externref. With this CL V8 handles the JavaScript case spec-compliant. R=manoskouk@chromium.org Bug: v8:12227 Change-Id: Ic8a1361629d8e5dfb59e2ee22a5e0ae0f6de936d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3162045 Commit-Queue: Andreas Haas <ahaas@chromium.org> Reviewed-by: Manos Koukoutos <manoskouk@chromium.org> Cr-Commit-Position: refs/heads/main@{#76892}
-
- 25 Aug, 2021 1 commit
-
-
Samuel Groß authored
In a follow-up CL, the backing stores will, when the sandbox is enabled, be referenced from V8 objects through offsets rather than raw pointers. For that to work, all backing stores must be located inside the virtual memory cage. This CL prepares for that. Bug: chromium:1218005 Change-Id: Ibb989626ed7094bd4f02ca15464539f4e2bda90f Cq-Include-Trybots: luci.v8.try:v8_linux64_heap_sandbox_dbg_ng Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3114136 Commit-Queue: Samuel Groß <saelo@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Camillo Bruni <cbruni@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/main@{#76486}
-
- 24 Aug, 2021 1 commit
-
-
Dan Elphick authored
This is a reland of d1b27019 Fixes include: Adding missing file to bazel build Forward-declaring classing before friend-classing them to fix win/gcc Add missing v8-isolate.h include for vtune builds Original change's description: > [include] Split out v8.h > > This moves every single class/function out of include/v8.h into a > separate header in include/, which v8.h then includes so that > externally nothing appears to have changed. > > Every include of v8.h from inside v8 has been changed to a more > fine-grained include. > > Previously inline functions defined at the bottom of v8.h would call > private non-inline functions in the V8 class. Since that class is now > in v8-initialization.h and is rarely included (as that would create > dependency cycles), this is not possible and so those methods have been > moved out of the V8 class into the namespace v8::api_internal. > > None of the previous files in include/ now #include v8.h, which means > if embedders were relying on this transitive dependency then it will > give compile failures. > > v8-inspector.h does depend on v8-scripts.h for the time being to ensure > that Chrome continue to compile but that change will be reverted once > those transitive #includes in chrome are changed to include it directly. > > Full design: > https://docs.google.com/document/d/1rTD--I8hCAr-Rho1WTumZzFKaDpEp0IJ8ejZtk4nJdA/edit?usp=sharing > > Bug: v8:11965 > Change-Id: I53b84b29581632710edc80eb11f819c2097a2877 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097448 > Reviewed-by: Yang Guo <yangguo@chromium.org> > Reviewed-by: Camillo Bruni <cbruni@chromium.org> > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> > Reviewed-by: Leszek Swirski <leszeks@chromium.org> > Reviewed-by: Michael Lippautz <mlippautz@chromium.org> > Commit-Queue: Dan Elphick <delphick@chromium.org> > Cr-Commit-Position: refs/heads/main@{#76424} Cq-Include-Trybots: luci.v8.try:v8_linux_vtunejit Bug: v8:11965 Change-Id: I99f5d3a73bf8fe25b650adfaf9567dc4e44a09e6 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3113629Reviewed-by: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Camillo Bruni <cbruni@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Simon Zünd <szuend@chromium.org> Commit-Queue: Dan Elphick <delphick@chromium.org> Cr-Commit-Position: refs/heads/main@{#76460}
-
- 23 Aug, 2021 2 commits
-
-
Dan Elphick authored
This reverts commit d1b27019. Reason for revert: Broke vtune build, tsan build and possibly others Original change's description: > [include] Split out v8.h > > This moves every single class/function out of include/v8.h into a > separate header in include/, which v8.h then includes so that > externally nothing appears to have changed. > > Every include of v8.h from inside v8 has been changed to a more > fine-grained include. > > Previously inline functions defined at the bottom of v8.h would call > private non-inline functions in the V8 class. Since that class is now > in v8-initialization.h and is rarely included (as that would create > dependency cycles), this is not possible and so those methods have been > moved out of the V8 class into the namespace v8::api_internal. > > None of the previous files in include/ now #include v8.h, which means > if embedders were relying on this transitive dependency then it will > give compile failures. > > v8-inspector.h does depend on v8-scripts.h for the time being to ensure > that Chrome continue to compile but that change will be reverted once > those transitive #includes in chrome are changed to include it directly. > > Full design: > https://docs.google.com/document/d/1rTD--I8hCAr-Rho1WTumZzFKaDpEp0IJ8ejZtk4nJdA/edit?usp=sharing > > Bug: v8:11965 > Change-Id: I53b84b29581632710edc80eb11f819c2097a2877 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097448 > Reviewed-by: Yang Guo <yangguo@chromium.org> > Reviewed-by: Camillo Bruni <cbruni@chromium.org> > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> > Reviewed-by: Leszek Swirski <leszeks@chromium.org> > Reviewed-by: Michael Lippautz <mlippautz@chromium.org> > Commit-Queue: Dan Elphick <delphick@chromium.org> > Cr-Commit-Position: refs/heads/main@{#76424} Bug: v8:11965 Change-Id: Id57313ae992e720c8b19abc975cd69729e1344aa No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3113627 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Owners-Override: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/main@{#76428}
-
Dan Elphick authored
This moves every single class/function out of include/v8.h into a separate header in include/, which v8.h then includes so that externally nothing appears to have changed. Every include of v8.h from inside v8 has been changed to a more fine-grained include. Previously inline functions defined at the bottom of v8.h would call private non-inline functions in the V8 class. Since that class is now in v8-initialization.h and is rarely included (as that would create dependency cycles), this is not possible and so those methods have been moved out of the V8 class into the namespace v8::api_internal. None of the previous files in include/ now #include v8.h, which means if embedders were relying on this transitive dependency then it will give compile failures. v8-inspector.h does depend on v8-scripts.h for the time being to ensure that Chrome continue to compile but that change will be reverted once those transitive #includes in chrome are changed to include it directly. Full design: https://docs.google.com/document/d/1rTD--I8hCAr-Rho1WTumZzFKaDpEp0IJ8ejZtk4nJdA/edit?usp=sharing Bug: v8:11965 Change-Id: I53b84b29581632710edc80eb11f819c2097a2877 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097448Reviewed-by: Yang Guo <yangguo@chromium.org> Reviewed-by: Camillo Bruni <cbruni@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Dan Elphick <delphick@chromium.org> Cr-Commit-Position: refs/heads/main@{#76424}
-
- 29 Jul, 2021 1 commit
-
-
Thibaud Michaud authored
The JS API constructor was renamed to "WebAssembly.Tag" to match the spec: https://github.com/WebAssembly/exception-handling/issues/159 Rename "exception" to "tag" throughout the codebase for consistency with the JS API, and to match the spec terminology (e.g. "tag section"). R=clemensb@chromium.org,nicohartmann@chromium.org Bug: v8:11992 Change-Id: I63f9f3101abfeefd49117461bd59c594ca5dab70 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3053583Reviewed-by: Clemens Backes <clemensb@chromium.org> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#75994}
-
- 01 Jul, 2021 1 commit
-
-
Peter Kasting authored
There are still a few cases remaining that seem more controversial; I'll upload those separately. Bug: chromium:1066980 Change-Id: Iabbaf23f9bbe97781857c0c589f2b3db685dfdc2 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2994804 Commit-Queue: Peter Kasting <pkasting@chromium.org> Auto-Submit: Peter Kasting <pkasting@chromium.org> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Cr-Commit-Position: refs/heads/master@{#75494}
-
- 21 Jun, 2021 1 commit
-
-
Clemens Backes authored
The WasmEngine is shared across the whole process, so there is no need to store it in every Isolate. Instead, we can just get it from everywhere on any thread using {wasm::GetWasmEngine()}, which is a simple read of a global. R=jkummerow@chromium.org Bug: v8:11879 Change-Id: I13afb8ca3d116aa14bfaec5a4bbd6d71faa9aa17 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2969825Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Maya Lekova <mslekova@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#75265}
-
- 18 Jun, 2021 2 commits
-
-
Igor Sheludko authored
In order to avoid unnecessary conversions to CodeT and back this CL: - makes compiler::CompileCWasmEntry() return CodeT, - makes Execution::CallWasm() accept CodeT. Bug: v8:11880 Change-Id: Ic4b7b5f476c6efcfca4bc116ecd45cdee9f0c6c3 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2971743Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/master@{#75247}
-
Dan Elphick authored
The adding of base:: was mostly prepared using git grep and sed: git grep -l <pattern> | grep -v base/vector.h | \ xargs sed -i 's/\b<pattern>\b/base::<pattern>/ with lots of manual clean-ups due to the resulting v8::internal::base::Vectors. #includes were fixed using: git grep -l "src/utils/vector.h" | \ axargs sed -i 's!src/utils/vector.h!src/base/vector.h!' Bug: v8:11879 Change-Id: I3e6d622987fee4478089c40539724c19735bd625 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2968412Reviewed-by: Clemens Backes <clemensb@chromium.org> Reviewed-by: Hannes Payer <hpayer@chromium.org> Commit-Queue: Dan Elphick <delphick@chromium.org> Cr-Commit-Position: refs/heads/master@{#75243}
-
- 10 Jun, 2021 2 commits
-
-
Jakob Kummerow authored
With the upcoming "exception handling" proposal, we have to ensure that traps are not catchable. This patch adds missing "uncatchable" annotations to traps in the C-API and table-related instructions. Fixed: v8:11813 Change-Id: I7bbd5043ede58a5315bd5117eb496ed014e79e91 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2953160 Commit-Queue: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#75082}
-
John Xu authored
For Cobalt's purpose in the past, we introduced base::Memcpy to intercept memcpy calls and replace it with SbMemoryCopy on Starboard/Cobalt. Recently Cobalt removed SbMemoryCopy because we found out that memcpy implementation is universal. To reduce the cost to maintain base::Memcpy, let us remove it and revert back to raw memcpy. Bug: v8:10927 Change-Id: I060f191f8f1aed8b78ffe4558a3743f3a2da008b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2951462Reviewed-by: Camillo Bruni <cbruni@chromium.org> Reviewed-by: Marja Hölttä <marja@chromium.org> Reviewed-by: Georg Neis <neis@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Commit-Queue: John Xu <johnx@google.com> Cr-Commit-Position: refs/heads/master@{#75070}
-
- 25 May, 2021 1 commit
-
-
Jakob Kummerow authored
Implementation copied from d8. Gated behind a build-time flag. Can be useful for debugging issues. Change-Id: I444d625242b1fb8fe9139472a06cb1a90269401a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2906233Reviewed-by: Manos Koukoutos <manoskouk@chromium.org> Commit-Queue: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#74767}
-
- 19 May, 2021 2 commits
-
-
Jakob Kummerow authored
We used to recompile WasmCapiCallWrappers whenever they were needed, but never garbage-collected them, which caused a memory leak when many short-lived instances of the same module were created. This patch makes the wrappers cacheable and caches them, which avoids both repeated compilation effort and the unbounded memory growth. Drive-by cleanup: unify WasmCapiFunctionData with the other Wasm*FunctionData classes by making it inherit from WasmFunctionData. Bug: v8:11774 Change-Id: Ia0c0d76be2938dc7bebfdc845f4a1cfeafef4a70 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2905605 Commit-Queue: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#74682}
-
Jakob Kummerow authored
When adding new instances to the WeakArrayList of a script's instances, use Append() instead of AddToEnd() to allow possible compaction of the WAL. Also, check for interrupt requests every now and then, which allows incremental marking to get finalized when appropriate. Bug: v8:11774 Change-Id: I8be959a78d8ef370f65e8f9849f48e34c9691a13 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2905603 Commit-Queue: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Manos Koukoutos <manoskouk@chromium.org> Cr-Commit-Position: refs/heads/master@{#74681}
-
- 30 Apr, 2021 1 commit
-
-
Clemens Backes authored
cpplint rules change over time, and we change the exact rules we enable for v8. This CL removes NOLINT annotations which are not needed according to the currently enabled rules. R=jkummerow@chromium.org Bug: v8:11717 Change-Id: I5e6261c9a4825f6b58068d57327601723edfa481 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2859948Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#74296}
-
- 29 Apr, 2021 1 commit
-
-
Jakob Kummerow authored
By (mostly) unifying the different kinds of WasmFunctionData, and precomputing and caching what we can, we can reduce the amount of work that has to be done for each call. We still have to store the current instance for JS function calls; that may be eliminatable in the future. WasmCapiFunctions are not included in the refactoring yet. Bug: v8:7748,v8:9495 Change-Id: Ie6839153153d5854670cd01bc77a86111c1f68d2 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2856543 Commit-Queue: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Manos Koukoutos <manoskouk@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#74287}
-
- 13 Apr, 2021 1 commit
-
-
Manos Koukoutos authored
Multivalue has been shipped for a while now, so it is time to remove its experimental feature flag. Additional change: Set kV8MaxWasmFunctionReturns to the old kV8MaxWasmFunctionMultiReturns value. Change-Id: I5c4d33b036e64a7221de17f0e97119bb0a036838 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2817790Reviewed-by: Thibaud Michaud <thibaudm@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Cr-Commit-Position: refs/heads/master@{#73927}
-
- 22 Mar, 2021 1 commit
-
-
Manos Koukoutos authored
This is a more canonical type name, and is in line with {kVoidCode}. Change-Id: Iaae9524b6fb6ecaafd63ce81cf30e3d01ca3e525 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2775565 Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Reviewed-by: Simon Zünd <szuend@chromium.org> Cr-Commit-Position: refs/heads/master@{#73557}
-
- 08 Mar, 2021 1 commit
-
-
Clemens Backes authored
Remove the include from js-array-buffer-inl.h, because the wasm engine is not used in that file. Add missing includes in other files that relied on the recursive include. R=jkummerow@chromium.org Bug: v8:11238 Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel Change-Id: I8b7f11ce92858cbc0ccf26925159486ed39573fa Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2739650Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#73254}
-
- 22 Feb, 2021 1 commit
-
-
Clemens Backes authored
Backends do not care about the concrete type, they only need to know the "kind" (e.g. "ref" or "i32"). In order to prepare Liftoff to use the value kind instead of the value type for all stored data, this CL moves the kind out of the ValueType and makes it a top-level enum. R=manoskouk@chromium.org Bug: v8:11477 Change-Id: I489d6c5207e6ff1b66e2afbe78a156d66df27eb3 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2707169 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by: Manos Koukoutos <manoskouk@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#72896}
-
- 15 Feb, 2021 1 commit
-
-
Benedikt Meurer authored
Previously we had cached the source position information on JSStackFrame (C++) objects and reused that between calls to GetLineNumber() and GetColumnNumber(). The refactoring in https://crrev.com/eed0d27c2f774b3adbc85d0a5fb30a8cf0f018a8 effectively removed that cache, while still making things faster though. This CL puts back the caching on the StackFrameInfo objects by reusing the `offset` slot to store the computed source position (as indicated by a bit in the `flags`). For promise combinator async frames, the bit is always set and the `offset_or_source_position` slot thus always contains the source position (aka the `promise index` in this case). We also added a `StackFrameInfo::ComputeLocation()` method to remove the last remaining place where we'd peek into the StackFrameInfo from outside stack-frame-info.{cc,h}. Also-By: kimanh@chromium.org Bug: chromium:1077657, v8:8742, chromium:1069425 Change-Id: I59e26a91965617163776e6cc2610b88e6925452c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2695386 Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Auto-Submit: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Cr-Commit-Position: refs/heads/master@{#72752}
-