Issue 10701 in v8: Generic JavaScript-to-WebAssembly Wrapper

26 views
Skip to first unread message

e… via monorail

unread,
Jul 13, 2020, 9:40:43 AM7/13/20
to v8-re...@googlegroups.com
Status: Assigned
Owner: ev...@google.com
CC: ah...@chromium.org, thib...@chromium.org
Components: WebAssembly
Priority: 1
Type: FeatureRequest

New issue 10701 by ev...@google.com: Generic JavaScript-to-WebAssembly Wrapper
https://bugs.chromium.org/p/v8/issues/detail?id=10701

The goal is to design and implement a generic wrapper for WebAssembly functions so that this wrapper can be used to call arbitrary WebAssembly functions from JavaScript.

--
You received this message because:
1. The project was configured to send all issue notifications to this address

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

bugdroid via monorail

unread,
Jul 28, 2020, 6:21:13 AM7/28/20
to v8-re...@googlegroups.com

Comment #1 on issue 10701 by bugdroid: Generic JavaScript-to-WebAssembly Wrapper
https://bugs.chromium.org/p/v8/issues/detail?id=10701#c1

The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8.git/+/1250fd59aa5770584d2686250e2cb953bccc064d

commit 1250fd59aa5770584d2686250e2cb953bccc064d
Author: evih <ev...@google.com>
Date: Tue Jul 28 10:20:31 2020

[wasm] Add a generic js-to-wasm wrapper

This generic wrapper builtin is currently used only when the wasm
function has no parameters and no return value.

Added a new V8 flag to use this generic wrapper.

Also added a JS test function for this generic wrapper.

Bug: v8:10701
Change-Id: Id8cd1771f26922927363b715d8a6ffd384a143ce
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2307240
Reviewed-by: Andreas Haas <ah...@chromium.org>
Reviewed-by: Thibaud Michaud <thib...@chromium.org>
Reviewed-by: Clemens Backes <clem...@chromium.org>
Commit-Queue: Eva Herencsárová <ev...@google.com>
Cr-Commit-Position: refs/heads/master@{#69097}

[modify] https://crrev.com/1250fd59aa5770584d2686250e2cb953bccc064d/src/builtins/arm/builtins-arm.cc
[modify] https://crrev.com/1250fd59aa5770584d2686250e2cb953bccc064d/src/builtins/arm64/builtins-arm64.cc
[modify] https://crrev.com/1250fd59aa5770584d2686250e2cb953bccc064d/src/builtins/builtins-definitions.h
[modify] https://crrev.com/1250fd59aa5770584d2686250e2cb953bccc064d/src/builtins/ia32/builtins-ia32.cc
[modify] https://crrev.com/1250fd59aa5770584d2686250e2cb953bccc064d/src/builtins/x64/builtins-x64.cc
[modify] https://crrev.com/1250fd59aa5770584d2686250e2cb953bccc064d/src/diagnostics/objects-debug.cc
[modify] https://crrev.com/1250fd59aa5770584d2686250e2cb953bccc064d/src/flags/flag-definitions.h
[modify] https://crrev.com/1250fd59aa5770584d2686250e2cb953bccc064d/src/runtime/runtime-wasm.cc
[modify] https://crrev.com/1250fd59aa5770584d2686250e2cb953bccc064d/src/wasm/function-compiler.cc
[modify] https://crrev.com/1250fd59aa5770584d2686250e2cb953bccc064d/src/wasm/function-compiler.h
[modify] https://crrev.com/1250fd59aa5770584d2686250e2cb953bccc064d/src/wasm/wasm-objects.cc
[add] https://crrev.com/1250fd59aa5770584d2686250e2cb953bccc064d/test/mjsunit/wasm/generic-wrapper.js

bugdroid via monorail

unread,
Aug 4, 2020, 4:46:45 AM8/4/20
to v8-re...@googlegroups.com

Comment #2 on issue 10701 by bugdroid: Generic JavaScript-to-WebAssembly Wrapper
https://bugs.chromium.org/p/v8/issues/detail?id=10701#c2


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8.git/+/bb5d535202cdb719b99d85da5e237e837b9945b9

commit bb5d535202cdb719b99d85da5e237e837b9945b9
Author: evih <ev...@google.com>
Date: Tue Aug 04 08:45:32 2020

[wasm] Use generic wrapper only for not imported functions

Bug: v8:10701
Change-Id: I6e6d0c67889f29647ea225163cf051d3432da338
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2335058

Reviewed-by: Andreas Haas <ah...@chromium.org>
Reviewed-by: Thibaud Michaud <thib...@chromium.org>
Commit-Queue: Eva Herencsárová <ev...@google.com>
Cr-Commit-Position: refs/heads/master@{#69214}

[modify] https://crrev.com/bb5d535202cdb719b99d85da5e237e837b9945b9/src/wasm/function-compiler.cc

bugdroid via monorail

unread,
Aug 10, 2020, 5:46:18 AM8/10/20
to v8-re...@googlegroups.com

Comment #3 on issue 10701 by bugdroid: Generic JavaScript-to-WebAssembly Wrapper
https://bugs.chromium.org/p/v8/issues/detail?id=10701#c3


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8.git/+/389272acb0d0e5270d0f0fc389b938022d6d8208

commit 389272acb0d0e5270d0f0fc389b938022d6d8208
Author: evih <ev...@google.com>
Date: Mon Aug 10 09:44:05 2020

[wasm] Use generic js-to-wasm wrapper for 0 and 1 param cases

A new field for signature type was added to WasmExportedFunctionData.
It is set to 0 or 1 depending on the parameter count.
(It's set and being used only in 0 and 1 parameter cases.)

Added new JS tests for 1 parameter wasm functions.

Bug: v8:10701
Change-Id: I349d881a2860f1a50b91e08d0126ca71c5f6483b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2339622
Commit-Queue: Andreas Haas <ah...@chromium.org>

Reviewed-by: Andreas Haas <ah...@chromium.org>
Reviewed-by: Thibaud Michaud <thib...@chromium.org>

bugdroid via monorail

unread,
Aug 11, 2020, 8:57:34 AM8/11/20
to v8-re...@googlegroups.com

Comment #4 on issue 10701 by bugdroid: Generic JavaScript-to-WebAssembly Wrapper
https://bugs.chromium.org/p/v8/issues/detail?id=10701#c4


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8.git/+/e8e8b0ee78e17453d08ed84b3f3503a1436a4080

commit e8e8b0ee78e17453d08ed84b3f3503a1436a4080
Author: evih <ev...@google.com>
Date: Tue Aug 11 12:56:54 2020

[wasm] Delete unnecessary load and simplify the code

Simplify by using assembler function.

Bug: v8:10701
Change-Id: I7d07a271369fcf8ad34652b6e94463b0468ee1c5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2346282
Commit-Queue: Eva Herencsárová <ev...@google.com>
Reviewed-by: Thibaud Michaud <thib...@chromium.org>
Reviewed-by: Andreas Haas <ah...@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69328}

[modify] https://crrev.com/e8e8b0ee78e17453d08ed84b3f3503a1436a4080/src/builtins/x64/builtins-x64.cc

bugdroid via monorail

unread,
Aug 17, 2020, 7:38:46 AM8/17/20
to v8-re...@googlegroups.com

Comment #5 on issue 10701 by bugdroid: Generic JavaScript-to-WebAssembly Wrapper
https://bugs.chromium.org/p/v8/issues/detail?id=10701#c5


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8.git/+/8984a2584b05857482d3d4046bb136604b369f45

commit 8984a2584b05857482d3d4046bb136604b369f45
Author: evih <ev...@google.com>
Date: Mon Aug 17 11:37:53 2020

[wasm] Map JS_TO_WASM frame marker to proper frame type

Bug: v8:10701
Change-Id: Ic924352195076c9cdc6a2b5f20cd75a1dcc489df
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2355950
Commit-Queue: Eva Herencsárová <ev...@google.com>
Reviewed-by: Andreas Haas <ah...@chromium.org>
Reviewed-by: Thibaud Michaud <thib...@chromium.org>
Reviewed-by: Jakob Kummerow <jkum...@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69421}

[modify] https://crrev.com/8984a2584b05857482d3d4046bb136604b369f45/src/execution/frames.cc

bugdroid via monorail

unread,
Aug 17, 2020, 8:06:39 AM8/17/20
to v8-re...@googlegroups.com

Comment #6 on issue 10701 by bugdroid: Generic JavaScript-to-WebAssembly Wrapper
https://bugs.chromium.org/p/v8/issues/detail?id=10701#c6


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8.git/+/5f298b96dab8cf4182c3037e1b01618443e8ac0b

commit 5f298b96dab8cf4182c3037e1b01618443e8ac0b
Author: Maya Lekova <msle...@chromium.org>
Date: Mon Aug 17 12:05:06 2020

Revert "[wasm] Map JS_TO_WASM frame marker to proper frame type"

This reverts commit 8984a2584b05857482d3d4046bb136604b369f45.

Reason for revert: Breaks GC stress custom snapshot bot - https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20GC%20Stress%20-%20custom%20snapshot/32681

Original change's description:

> [wasm] Map JS_TO_WASM frame marker to proper frame type
>
> Bug: v8:10701
> Change-Id: Ic924352195076c9cdc6a2b5f20cd75a1dcc489df
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2355950
> Commit-Queue: Eva Herencsárová <ev...@google.com>
> Reviewed-by: Andreas Haas <ah...@chromium.org>
> Reviewed-by: Thibaud Michaud <thib...@chromium.org>
> Reviewed-by: Jakob Kummerow <jkum...@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#69421}

TBR=jkum...@chromium.org,ah...@chromium.org,thib...@chromium.org,ev...@google.com

Change-Id: Iabc9de9fa1f1478369bf6a7dde77e661d8467542
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:10701
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2358677
Reviewed-by: Maya Lekova <msle...@chromium.org>
Commit-Queue: Maya Lekova <msle...@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69423}

[modify] https://crrev.com/5f298b96dab8cf4182c3037e1b01618443e8ac0b/src/execution/frames.cc

bugdroid via monorail

unread,
Aug 18, 2020, 5:29:56 AM8/18/20
to v8-re...@googlegroups.com

Comment #7 on issue 10701 by bugdroid: Generic JavaScript-to-WebAssembly Wrapper
https://bugs.chromium.org/p/v8/issues/detail?id=10701#c7


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8.git/+/ddc3672d91d0820c22361d437ad2e62f8027f35e

commit ddc3672d91d0820c22361d437ad2e62f8027f35e
Author: evih <ev...@google.com>
Date: Tue Aug 18 09:28:34 2020

[wasm] Add GC support to generic js-to-wasm wrapper

GC support works for the current 0 and 1 param version
of the wrapper.

Bug: v8:10701
Change-Id: I9e3822b1481223c44050d23ddee7293936f1e6d4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2351673
Reviewed-by: Andreas Haas <ah...@chromium.org>
Reviewed-by: Jakob Kummerow <jkum...@chromium.org>
Reviewed-by: Ulan Degenbaev <ul...@chromium.org>

Reviewed-by: Thibaud Michaud <thib...@chromium.org>
Commit-Queue: Eva Herencsárová <ev...@google.com>

bugdroid via monorail

unread,
Aug 18, 2020, 9:32:28 AM8/18/20
to v8-re...@googlegroups.com

Comment #8 on issue 10701 by bugdroid: Generic JavaScript-to-WebAssembly Wrapper
https://bugs.chromium.org/p/v8/issues/detail?id=10701#c8


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8.git/+/796cea5acf281cf02b36abc4b93ed36c3b72916f

commit 796cea5acf281cf02b36abc4b93ed36c3b72916f
Author: evih <ev...@google.com>
Date: Tue Aug 18 13:28:23 2020

[wasm] Code cleanup in generic js-to-wasm wrapper

The wasm instance is not needed after calling the wasm function.

Bug: v8:10701
Change-Id: I9b53ecba74873746ee9c163011bca0167969c6c7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2362691
Reviewed-by: Andreas Haas <ah...@chromium.org>

Reviewed-by: Thibaud Michaud <thib...@chromium.org>
Commit-Queue: Eva Herencsárová <ev...@google.com>

bugdroid via monorail

unread,
Aug 27, 2020, 2:42:26 AM8/27/20
to v8-re...@googlegroups.com

Comment #9 on issue 10701 by bugdroid: Generic JavaScript-to-WebAssembly Wrapper
https://bugs.chromium.org/p/v8/issues/detail?id=10701#c9


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8.git/+/9e062696baf57d2ccc795a1fd079572d1bb41db3

commit 9e062696baf57d2ccc795a1fd079572d1bb41db3
Author: evih <ev...@google.com>
Date: Thu Aug 27 06:41:20 2020

[wasm] Change the signature interpretation for generic wrapper

Use a Foreign pointer for the signature in the generic JS-to-Wasm wrapper.

Bug: v8:10701
Change-Id: I30d5894e8b8a48c258b7a6e003813c8403c1075e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2369178
Reviewed-by: Thibaud Michaud <thib...@chromium.org>
Reviewed-by: Jakob Gruber <jgr...@chromium.org>
Reviewed-by: Andreas Haas <ah...@chromium.org>
Commit-Queue: Eva Herencsárová <ev...@google.com>
Cr-Commit-Position: refs/heads/master@{#69580}

[modify] https://crrev.com/9e062696baf57d2ccc795a1fd079572d1bb41db3/src/builtins/x64/builtins-x64.cc
[modify] https://crrev.com/9e062696baf57d2ccc795a1fd079572d1bb41db3/src/codegen/bailout-reason.h
[modify] https://crrev.com/9e062696baf57d2ccc795a1fd079572d1bb41db3/src/codegen/signature.h
[modify] https://crrev.com/9e062696baf57d2ccc795a1fd079572d1bb41db3/src/wasm/wasm-objects-inl.h
[modify] https://crrev.com/9e062696baf57d2ccc795a1fd079572d1bb41db3/src/wasm/wasm-objects.cc
[modify] https://crrev.com/9e062696baf57d2ccc795a1fd079572d1bb41db3/src/wasm/wasm-objects.h
[modify] https://crrev.com/9e062696baf57d2ccc795a1fd079572d1bb41db3/src/wasm/wasm-objects.tq

e… via monorail

unread,
Sep 2, 2020, 7:40:23 AM9/2/20
to v8-re...@googlegroups.com
Updates:
Labels: HW-x64

Comment #10 on issue 10701 by ev...@google.com: Generic JavaScript-to-WebAssembly Wrapper
https://bugs.chromium.org/p/v8/issues/detail?id=10701#c10

commit: https://chromium-review.googlesource.com/q/I511fd04d2a4a2bdc4a6f72d72e2867a03b256f6f
Author: evih <ev...@google.com>
Date: Tue Sep 01 14:31 2020

[wasm] Use generic js-to-wasm wrapper for n int32 param case

The generic wrapper can be used for Wasm functions with int32 parameters
and no return values.

Changed the GC scanning for the generic wrapper.

Added tests for cases when all the parameters of the Wasm function fit
into registers and when some of the parameters are on the top of the
stack.

Change-Id: I511fd04d2a4a2bdc4a6f72d72e2867a03b256f6f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2381459
Reviewed-by: Thibaud Michaud <thib...@chromium.org>

Reviewed-by: Andreas Haas <ah...@chromium.org>
Reviewed-by: Jakob Kummerow <jkum...@chromium.org>
Commit-Queue: Eva Herencsárová <ev...@google.com>
Cr-Commit-Position: refs/heads/master@{#69645}

bugdroid via monorail

unread,
Sep 3, 2020, 10:47:47 AM9/3/20
to v8-re...@googlegroups.com

Comment #11 on issue 10701 by bugdroid: Generic JavaScript-to-WebAssembly Wrapper
https://bugs.chromium.org/p/v8/issues/detail?id=10701#c11


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8.git/+/17cda1e6f1d0d147127db9c116c4320561730e91

commit 17cda1e6f1d0d147127db9c116c4320561730e91
Author: evih <ev...@google.com>
Date: Thu Sep 03 14:47:00 2020

[wasm] Use generic js-to-wasm wrapper for 0 or 1 int32 return case


The generic wrapper can be used for Wasm functions with int32 parameters
and 0 or 1 int32 return values.

Added tests for cases when the return value can & cannot be converted to
a Smi.

Bug: v8:10701
Change-Id: I470954ed0aced0e4ec6e65a9f38caac19c576549
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2390141
Commit-Queue: Eva Herencsárová <ev...@google.com>
Reviewed-by: Andreas Haas <ah...@chromium.org>
Reviewed-by: Thibaud Michaud <thib...@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69700}

[modify] https://crrev.com/17cda1e6f1d0d147127db9c116c4320561730e91/src/builtins/x64/builtins-x64.cc
[modify] https://crrev.com/17cda1e6f1d0d147127db9c116c4320561730e91/src/wasm/function-compiler.cc
[modify] https://crrev.com/17cda1e6f1d0d147127db9c116c4320561730e91/test/mjsunit/wasm/generic-wrapper.js

bugdroid via monorail

unread,
Sep 8, 2020, 9:37:16 AM9/8/20
to v8-re...@googlegroups.com

Comment #12 on issue 10701 by bugdroid: Generic JavaScript-to-WebAssembly Wrapper
https://bugs.chromium.org/p/v8/issues/detail?id=10701#c12


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8.git/+/64b592649737032e598e2e07a5cd013746b43026

commit 64b592649737032e598e2e07a5cd013746b43026
Author: evih <ev...@google.com>
Date: Tue Sep 08 13:36:15 2020

[wasm] Reverse the evaluation of params in js-to-wasm generic wrapper

The parameters should be processed and evaluated in an increasing order
(starting with the 1st param).
Before we started with the last (n-th) parameter which was not correct.

Bug: v8:10701, chromium:1124940
Change-Id: I8e0d8b1f0c53832c8f2d09551879c1a4413e1598
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2396085

Reviewed-by: Thibaud Michaud <thib...@chromium.org>
Reviewed-by: Andreas Haas <ah...@chromium.org>

bugdroid via monorail

unread,
Sep 11, 2020, 12:15:32 PM9/11/20
to v8-re...@googlegroups.com

Comment #13 on issue 10701 by bugdroid: Generic JavaScript-to-WebAssembly Wrapper
https://bugs.chromium.org/p/v8/issues/detail?id=10701#c13


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8.git/+/e9d3d232b7668988d761236832286ab81cb6d431

commit e9d3d232b7668988d761236832286ab81cb6d431
Author: evih <ev...@google.com>
Date: Fri Sep 11 16:12:53 2020

[wasm] Use js-to-wasm generic wrapper for i32 and i64 params.

Currently, the generic wrapper is used for i32 and i64 params and 0 or 1
i32 return value.

Bug: v8:10701
Change-Id: I8c47e78fa9beeda01bdb647e1fcf9ebe6baf1ee4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2403243
Commit-Queue: Eva Herencsárová <ev...@google.com>

Reviewed-by: Thibaud Michaud <thib...@chromium.org>
Reviewed-by: Andreas Haas <ah...@chromium.org>

bugdroid via monorail

unread,
Sep 15, 2020, 10:02:39 AM9/15/20
to v8-re...@googlegroups.com

Comment #14 on issue 10701 by bugdroid: Generic JavaScript-to-WebAssembly Wrapper
https://bugs.chromium.org/p/v8/issues/detail?id=10701#c14


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8.git/+/a922ee7f99ca85ae7c44dccd0af296b065b0616c

commit a922ee7f99ca85ae7c44dccd0af296b065b0616c
Author: evih <ev...@google.com>
Date: Tue Sep 15 14:00:32 2020

[wasm] Js-to-wasm generic wrapper is js-to-wasm code

Bug: v8:10701
Change-Id: Ibb4879accb0e991ddb4434d878bd8ef779b70034
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2412171

Reviewed-by: Andreas Haas <ah...@chromium.org>
Reviewed-by: Thibaud Michaud <thib...@chromium.org>
Commit-Queue: Eva Herencsárová <ev...@google.com>
Cr-Commit-Position: refs/heads/master@{#69913}

[modify] https://crrev.com/a922ee7f99ca85ae7c44dccd0af296b065b0616c/src/runtime/runtime-test.cc

bugdroid via monorail

unread,
Sep 15, 2020, 10:02:42 AM9/15/20
to v8-re...@googlegroups.com

Comment #15 on issue 10701 by bugdroid: Generic JavaScript-to-WebAssembly Wrapper
https://bugs.chromium.org/p/v8/issues/detail?id=10701#c15


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8.git/+/64610bda593a339f21bf463dd562bcb23521d5de

commit 64610bda593a339f21bf463dd562bcb23521d5de
Author: evih <ev...@google.com>
Date: Tue Sep 15 14:01:37 2020

[wasm] Zero extend register containing i32 parameter in generic wrapper

We have to make sure that 32 bit negative values are zero extended.
Related testcase: https://logs.chromium.org/logs/v8/buildbucket/cr-buildbucket.appspot.com/8869450761469925696/+/steps/Check_-_extra/0/logs/memory_trap/0

Bug: v8:10701
Change-Id: I69ae4189d37e5d31a81254ec72dd6e02fb442b4e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2412168

Reviewed-by: Andreas Haas <ah...@chromium.org>
Reviewed-by: Thibaud Michaud <thib...@chromium.org>
Commit-Queue: Eva Herencsárová <ev...@google.com>

bugdroid via monorail

unread,
Sep 15, 2020, 1:09:30 PM9/15/20
to v8-re...@googlegroups.com

Comment #16 on issue 10701 by bugdroid: Generic JavaScript-to-WebAssembly Wrapper
https://bugs.chromium.org/p/v8/issues/detail?id=10701#c16


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8.git/+/e950f0407e597a2c2a99049d73ce523b0ed80b15

commit e950f0407e597a2c2a99049d73ce523b0ed80b15
Author: evih <ev...@google.com>
Date: Tue Sep 15 16:59:32 2020

[wasm] Use js-to-wasm generic wrapper for i64 return


Currently, the generic wrapper is used for i32 and i64 params and 0 or 1
i32 and i64 return value.

Bug: v8:10701
Change-Id: I4b592d7e0e4ebcb3455520c094c92bf4177c5a5a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2412179

Reviewed-by: Thibaud Michaud <thib...@chromium.org>
Reviewed-by: Andreas Haas <ah...@chromium.org>

bugdroid via monorail

unread,
Sep 15, 2020, 1:39:53 PM9/15/20
to v8-re...@googlegroups.com

Comment #17 on issue 10701 by bugdroid: Generic JavaScript-to-WebAssembly Wrapper
https://bugs.chromium.org/p/v8/issues/detail?id=10701#c17

bugdroid via monorail

unread,
Sep 23, 2020, 8:49:28 AM9/23/20
to v8-re...@googlegroups.com

Comment #18 on issue 10701 by bugdroid: Generic JavaScript-to-WebAssembly Wrapper
https://bugs.chromium.org/p/v8/issues/detail?id=10701#c18


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8.git/+/607414e91c97567d776a83c8be9ec985eb28f98e

commit 607414e91c97567d776a83c8be9ec985eb28f98e
Author: evih <ev...@google.com>
Date: Wed Sep 23 12:38:01 2020

[wasm] Use js-to-wasm generic wrapper for f32 and f64 return


Currently, the generic wrapper is used for i32 and i64 params and 0 or 1
i32, i64, f32, f64 return value.

Bug: v8:10701
Change-Id: I610172995457354879afd3c9c2c6c2d55c2b700f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2414219

Reviewed-by: Thibaud Michaud <thib...@chromium.org>
Reviewed-by: Andreas Haas <ah...@chromium.org>
Commit-Queue: Eva Herencsárová <ev...@google.com>

bugdroid via monorail

unread,
Sep 23, 2020, 11:23:11 AM9/23/20
to v8-re...@googlegroups.com

Comment #19 on issue 10701 by bugdroid: Generic JavaScript-to-WebAssembly Wrapper
https://bugs.chromium.org/p/v8/issues/detail?id=10701#c19


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8.git/+/f20230afd1763083ff30f8e721d9e430d451bcf9

commit f20230afd1763083ff30f8e721d9e430d451bcf9
Author: Clemens Backes <clem...@chromium.org>
Date: Wed Sep 23 15:21:34 2020

[profiler] Include the generic js-to-wasm builtin in profiles

This CL fixes two things:
1) It properly creates code entries for the generic js-to-wasm builtin
(others are left out because we don't want to include all builtins in
profiles).
2) It includes js-to-wasm frames in profiles. The generic js-to-wasm
builtin will map to that frame type in the future (see referenced
bug). js-to-wasm frames are currently included because they are wrongly
mapped to OPTIMIZED frames by the SafeStackTraceIterator.

R=peterm...@chromium.org
CC=ah...@chromium.org, ev...@google.com

Bug: v8:10701
Change-Id: I26e3fa6901890e041feab7c001069e67a616c986
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2416495
Reviewed-by: Peter Marshall <peterm...@chromium.org>
Commit-Queue: Clemens Backes <clem...@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70095}

[modify] https://crrev.com/f20230afd1763083ff30f8e721d9e430d451bcf9/src/execution/frames-inl.h
[modify] https://crrev.com/f20230afd1763083ff30f8e721d9e430d451bcf9/src/execution/frames.cc
[modify] https://crrev.com/f20230afd1763083ff30f8e721d9e430d451bcf9/src/execution/frames.h
[modify] https://crrev.com/f20230afd1763083ff30f8e721d9e430d451bcf9/src/profiler/cpu-profiler-inl.h
[modify] https://crrev.com/f20230afd1763083ff30f8e721d9e430d451bcf9/src/profiler/cpu-profiler.cc
[modify] https://crrev.com/f20230afd1763083ff30f8e721d9e430d451bcf9/src/profiler/cpu-profiler.h

bugdroid via monorail

unread,
Sep 24, 2020, 2:46:44 PM9/24/20
to v8-re...@googlegroups.com

Comment #20 on issue 10701 by bugdroid: Generic JavaScript-to-WebAssembly Wrapper
https://bugs.chromium.org/p/v8/issues/detail?id=10701#c20


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8.git/+/b728ad817e5b5359686dfa277342506ed1a930f1

commit b728ad817e5b5359686dfa277342506ed1a930f1
Author: evih <ev...@google.com>
Date: Thu Sep 24 18:46:08 2020

[wasm] Use proper load in the generic js-to-wasm wrapper

When loading from the exported function data without pointer
compression, wrong load was used before.

Bug: v8:10701, chromium:1130385
Change-Id: If66913bcd5284eeb6fb7b795357f1512682a062f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2426383
Commit-Queue: Eva Herencsárová <ev...@google.com>

Reviewed-by: Andreas Haas <ah...@chromium.org>
Reviewed-by: Thibaud Michaud <thib...@chromium.org>

bugdroid via monorail

unread,
Sep 28, 2020, 7:13:59 AM9/28/20
to v8-re...@googlegroups.com

Comment #21 on issue 10701 by bugdroid: Generic JavaScript-to-WebAssembly Wrapper
https://bugs.chromium.org/p/v8/issues/detail?id=10701#c21


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8.git/+/4924d01f8b323d8a271f5b0e0812cada77f3e8aa

commit 4924d01f8b323d8a271f5b0e0812cada77f3e8aa
Author: evih <ev...@google.com>
Date: Mon Sep 28 11:13:36 2020

Use js-to-wasm generic wrapper for f32 and f64 params

Currently, the generic wrapper is used for i32, i64, f32 and f64 params

and 0 or 1 i32, i64, f32, f64 return value.

Bug: v8:10701
Change-Id: I3776de617aa4a384fdff5154ddad8ff405001a33
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2429266

Commit-Queue: Eva Herencsárová <ev...@google.com>
Reviewed-by: Andreas Haas <ah...@chromium.org>
Reviewed-by: Thibaud Michaud <thib...@chromium.org>

bugdroid via monorail

unread,
Sep 30, 2020, 6:46:38 AM9/30/20
to v8-re...@googlegroups.com

Comment #22 on issue 10701 by bugdroid: Generic JavaScript-to-WebAssembly Wrapper
https://bugs.chromium.org/p/v8/issues/detail?id=10701#c22


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8.git/+/e60d8600b56086164a66ad2a3cf0bd41033c221b

commit e60d8600b56086164a66ad2a3cf0bd41033c221b
Author: Thibaud Michaud <thib...@chromium.org>
Date: Wed Sep 30 10:45:47 2020

[wasm] Add GenericJSToWasmWrapper to the list of executable builtins

Ensure that a valid off-heap trampoline is created for the
GenericJSToWasmWrapper builtin by adding it to the list of executable
builtins.

R=ah...@chromium.org
CC=​ev...@chromium.org

Bug: v8:10701
Change-Id: I49b8144237aca20f5f663c7b32810a16f715ad5f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2438415
Commit-Queue: Thibaud Michaud <thib...@chromium.org>
Reviewed-by: Andreas Haas <ah...@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70218}

[modify] https://crrev.com/e60d8600b56086164a66ad2a3cf0bd41033c221b/src/builtins/builtins.cc
[modify] https://crrev.com/e60d8600b56086164a66ad2a3cf0bd41033c221b/test/mjsunit/wasm/generic-wrapper.js

bugdroid via monorail

unread,
Oct 13, 2020, 5:28:45 AM10/13/20
to v8-re...@googlegroups.com

Comment #23 on issue 10701 by bugdroid: Generic JavaScript-to-WebAssembly Wrapper
https://bugs.chromium.org/p/v8/issues/detail?id=10701#c23


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8.git/+/b206bdd0e0441ce2edb9a70fc6e0ddb91a4de105

commit b206bdd0e0441ce2edb9a70fc6e0ddb91a4de105
Author: Andreas Haas <ah...@chromium.org>
Date: Tue Oct 13 09:27:45 2020

[testrunner] enable --wasm-generic-wrapper for nooptimization variant

The generic wrapper will be the baseline variant of the JavaScript-to-
WebAssembly wrapper. Enabling it in the nooptimization variant gives it
test coverage.

R=clem...@chromium.org

Bug: v8:10701
Change-Id: I37d1f767c61ff70e103d1742ef84f874c3804d7d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2461240
Auto-Submit: Andreas Haas <ah...@chromium.org>
Reviewed-by: Clemens Backes <clem...@chromium.org>
Commit-Queue: Andreas Haas <ah...@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70472}

[modify] https://crrev.com/b206bdd0e0441ce2edb9a70fc6e0ddb91a4de105/test/inspector/cpu-profiler/console-profile-wasm.js
[modify] https://crrev.com/b206bdd0e0441ce2edb9a70fc6e0ddb91a4de105/tools/testrunner/local/variants.py

ah… via monorail

unread,
Oct 13, 2020, 6:52:06 AM10/13/20
to v8-re...@googlegroups.com
Updates:
Status: Archived

Comment #24 on issue 10701 by ah...@chromium.org: Generic JavaScript-to-WebAssembly Wrapper
https://bugs.chromium.org/p/v8/issues/detail?id=10701#c24

At the end of the internship the wrapper was able to deal with an arbitrary number of parameters of primitive types (i32, i64, f32, f64), and with up to 1 return value of primitive type.

Git Watcher via monorail

unread,
Sep 1, 2022, 9:36:27 AM9/1/22
to v8-re...@googlegroups.com

Git Watcher via monorail

unread,
Sep 1, 2022, 10:24:08 AM9/1/22
to v8-re...@googlegroups.com

Comment #26 on issue 10701 by Git Watcher: Generic JavaScript-to-WebAssembly Wrapper
https://bugs.chromium.org/p/v8/issues/detail?id=10701#c26


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/c4959e25b7b91c3cddcaafa7fc614619425e2878

commit c4959e25b7b91c3cddcaafa7fc614619425e2878
Author: Clemens Backes <clem...@chromium.org>
Date: Thu Sep 01 14:22:36 2022

Revert "Port Generic JS-Wasm Wrapper for arm64"

This reverts commit 5a318a2313dff744da30b54a4bf945920432c196.

Reason for revert: Fails on Mac arm64: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Mac%20-%20arm64%20-%20debug/8211/overview

Original change's description:

> Port Generic JS-Wasm Wrapper for arm64
>
> Bug: v8:10701
> Change-Id: I2014f8994c74379663998e2560d1d51b98a4a9a6
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3811834
> Reviewed-by: Jakob Linke <jgr...@chromium.org>
> Commit-Queue: Ilya Rezvov <ire...@chromium.org>
> Reviewed-by: Thibaud Michaud <thib...@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82915}

Bug: v8:10701
Change-Id: I9d5f19fedb82e2be64bd313f8cf5821fb0d8c795

No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3869145
Commit-Queue: Rubber Stamper <rubber-...@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-...@appspot.gserviceaccount.com>
Auto-Submit: Clemens Backes <clem...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82917}

[modify] https://crrev.com/c4959e25b7b91c3cddcaafa7fc614619425e2878/src/builtins/arm64/builtins-arm64.cc
[modify] https://crrev.com/c4959e25b7b91c3cddcaafa7fc614619425e2878/src/flags/flag-definitions.h
[modify] https://crrev.com/c4959e25b7b91c3cddcaafa7fc614619425e2878/test/mjsunit/wasm/generic-wrapper.js
[modify] https://crrev.com/c4959e25b7b91c3cddcaafa7fc614619425e2878/src/wasm/function-compiler.cc
[modify] https://crrev.com/c4959e25b7b91c3cddcaafa7fc614619425e2878/src/codegen/arm64/macro-assembler-arm64.cc
[modify] https://crrev.com/c4959e25b7b91c3cddcaafa7fc614619425e2878/test/cctest/wasm/test-run-wasm-wrappers.cc

Git Watcher via monorail

unread,
Sep 2, 2022, 12:54:08 PM9/2/22
to v8-re...@googlegroups.com

Comment #27 on issue 10701 by Git Watcher: Generic JavaScript-to-WebAssembly Wrapper
https://bugs.chromium.org/p/v8/issues/detail?id=10701#c27


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/d7c306a2d94b8af391fd7717ad3e3c0a59ad8c69

commit d7c306a2d94b8af391fd7717ad3e3c0a59ad8c69
Author: Ilya Rezvov <ire...@chromium.org>
Date: Thu Sep 01 20:28:41 2022

Reland "Port Generic JS-Wasm Wrapper for arm64"

This is a reland of commit 5a318a2313dff744da30b54a4bf945920432c196


Original change's description:
> Port Generic JS-Wasm Wrapper for arm64
>
> Bug: v8:10701
> Change-Id: I2014f8994c74379663998e2560d1d51b98a4a9a6
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3811834
> Reviewed-by: Jakob Linke <jgr...@chromium.org>
> Commit-Queue: Ilya Rezvov <ire...@chromium.org>
> Reviewed-by: Thibaud Michaud <thib...@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82915}

Bug: v8:10701
Change-Id: Ic0ac1478759150a5cc7e75d1a8e4e465e0d48233
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3869197
Reviewed-by: Thibaud Michaud <thib...@chromium.org>
Commit-Queue: Ilya Rezvov <ire...@chromium.org>
Reviewed-by: Deepti Gandluri <gde...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82954}

[modify] https://crrev.com/d7c306a2d94b8af391fd7717ad3e3c0a59ad8c69/src/builtins/arm64/builtins-arm64.cc
[modify] https://crrev.com/d7c306a2d94b8af391fd7717ad3e3c0a59ad8c69/test/mjsunit/wasm/generic-wrapper.js
[modify] https://crrev.com/d7c306a2d94b8af391fd7717ad3e3c0a59ad8c69/src/flags/flag-definitions.h
[modify] https://crrev.com/d7c306a2d94b8af391fd7717ad3e3c0a59ad8c69/src/wasm/function-compiler.cc
[modify] https://crrev.com/d7c306a2d94b8af391fd7717ad3e3c0a59ad8c69/src/codegen/arm64/macro-assembler-arm64.cc
[modify] https://crrev.com/d7c306a2d94b8af391fd7717ad3e3c0a59ad8c69/test/cctest/wasm/test-run-wasm-wrappers.cc

thiba… via monorail

unread,
Oct 20, 2022, 10:54:43 AM10/20/22
to v8-re...@googlegroups.com
Updates:
Cc: -thib...@chromium.org
Owner: thib...@chromium.org
Status: Started

Comment #28 on issue 10701 by thib...@chromium.org: Generic JavaScript-to-WebAssembly Wrapper
https://bugs.chromium.org/p/v8/issues/detail?id=10701#c28

Re-opening to track the progress on porting this to other achitectures.

Git Watcher via monorail

unread,
Nov 9, 2022, 9:46:30 AM11/9/22
to v8-re...@googlegroups.com

Comment #29 on issue 10701 by Git Watcher: Generic JavaScript-to-WebAssembly Wrapper
https://bugs.chromium.org/p/v8/issues/detail?id=10701#c29


The following revision refers to this bug:
https://chromium.googlesource.com/v8/v8/+/bd30c37872901199d064892362fa36fae13ee384

commit bd30c37872901199d064892362fa36fae13ee384
Author: Thibaud Michaud <thib...@chromium.org>
Date: Wed Nov 09 10:55:47 2022

[wasm] Enable arm64 generic wrapper

R=ah...@chromium.org
CC=​ire...@chromium.org

Bug: v8:10701

Change-Id: I0d4ee821e0a8af41d9ce2d0a1248979738184151
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4016382
Reviewed-by: Andreas Haas <ah...@chromium.org>
Commit-Queue: Thibaud Michaud <thib...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84146}

[modify] https://crrev.com/bd30c37872901199d064892362fa36fae13ee384/src/flags/flag-definitions.h
Reply all
Reply to author
Forward
0 new messages