[wasm-custom-desc][test] Exhaustive boundary tests [v8/v8 : main]

0 views
Skip to first unread message

Jakob Kummerow (Gerrit)

unread,
8:13 AM (11 hours ago) 8:13 AM
to Jakob Kummerow, Matthias Liedtke, Thomas Lively, v8-re...@googlegroups.com
Attention needed from Matthias Liedtke and Thomas Lively

Jakob Kummerow voted and added 1 comment

Votes added by Jakob Kummerow

Commit-Queue+1

1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Jakob Kummerow . resolved

PTAL.

As the description says: this exercises all paths I could think of how a CD object might travel from Wasm to JS, both in terms of spec (functions, tables, etc) and in terms of implementation (different static types, generic/compiled wrappers). Can you think of anything I've forgotten?

The motivation is to prepare upcoming refactorings of the implementation, where we want to minimize the risk of introducing bugs.

Note: this CL was AI generated, with some manual touch-ups.

Open in Gerrit

Related details

Attention is currently required from:
  • Matthias Liedtke
  • Thomas Lively
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: Id08c1fd9d7a1757ec9bb5372d4946ff344cbafaa
Gerrit-Change-Number: 7798164
Gerrit-PatchSet: 1
Gerrit-Owner: Jakob Kummerow <jkum...@chromium.org>
Gerrit-Reviewer: Jakob Kummerow <jkum...@chromium.org>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Thomas Lively <tli...@google.com>
Gerrit-Attention: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Attention: Thomas Lively <tli...@google.com>
Gerrit-Comment-Date: Tue, 28 Apr 2026 12:13:53 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Matthias Liedtke (Gerrit)

unread,
9:43 AM (10 hours ago) 9:43 AM
to Jakob Kummerow, v8-s...@luci-project-accounts.iam.gserviceaccount.com, Thomas Lively, v8-re...@googlegroups.com
Attention needed from Jakob Kummerow and Thomas Lively

Matthias Liedtke voted and added 6 comments

Votes added by Matthias Liedtke

Code-Review+1

6 comments

Patchset-level comments
Matthias Liedtke . resolved

LGTM with comments

File test/mjsunit/wasm/custom-descriptors-boundary.js
Line 5, Patchset 1 (Latest):// Flags: --experimental-wasm-custom-descriptors --wasm-wrapper-tiering-budget=1
Matthias Liedtke . unresolved

What's the motivation for this?
The default variant should cover the generic wrappers and the stress variant should cover the compiled wrappers. Having a low tiering budget might result in the default variant only partially running with the generic wrappers?

Line 59, Patchset 1 (Latest): [kGCPrefix, kExprStructNewDefault, $desc]);
builder.addExportOfKind('g_desc', kExternalGlobal, $g_desc.index);
Matthias Liedtke . unresolved
Nit:
```suggestion
[kGCPrefix, kExprStructNewDefault, $desc]
).exportAs('g_desc');
```
(and similarly below)
Line 74, Patchset 1 (Latest): builder.addGlobal(wasmRefType($desc3).exact(), false, false, [
Matthias Liedtke . unresolved

Nit: We could add a non-exact version as well? (If I didn't miss it.)

Line 169, Patchset 1 (Latest): m: {js_func_any, js_func_extern, js_func_indexed},
Matthias Liedtke . unresolved

A descriptor can also have a descriptor, right?
So can we have a case where the `this` in JS is actually the wrapped desriptor?
If yes, that should warrant a test case where we `assertSame(identity, this)` and we should also be able to call `this.method42` if we register `method42` on the descriptor's descriptor?

Line 195, Patchset 1 (Latest): assertSame(identity, wasm.g_desc.value);
Matthias Liedtke . unresolved
```suggestion
assertSame(identity, wasm.g_desc.value);
assertSame(identity, wasm.g_desc2.value);
```
Open in Gerrit

Related details

Attention is currently required from:
  • Jakob Kummerow
  • Thomas Lively
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: Id08c1fd9d7a1757ec9bb5372d4946ff344cbafaa
Gerrit-Change-Number: 7798164
Gerrit-PatchSet: 1
Gerrit-Owner: Jakob Kummerow <jkum...@chromium.org>
Gerrit-Reviewer: Jakob Kummerow <jkum...@chromium.org>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Thomas Lively <tli...@google.com>
Gerrit-Attention: Thomas Lively <tli...@google.com>
Gerrit-Attention: Jakob Kummerow <jkum...@chromium.org>
Gerrit-Comment-Date: Tue, 28 Apr 2026 13:43:32 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Jakob Kummerow (Gerrit)

unread,
10:44 AM (9 hours ago) 10:44 AM
to Jakob Kummerow, Matthias Liedtke, v8-s...@luci-project-accounts.iam.gserviceaccount.com, Thomas Lively, v8-re...@googlegroups.com
Attention needed from Matthias Liedtke and Thomas Lively

Jakob Kummerow voted and added 6 comments

Votes added by Jakob Kummerow

Commit-Queue+1

6 comments

Patchset-level comments
File-level comment, Patchset 2 (Latest):
Jakob Kummerow . resolved

Thanks for the review (and the offline discussion). Comments addressed, need a fresh LGTM.

File test/mjsunit/wasm/custom-descriptors-boundary.js
Line 5, Patchset 1:// Flags: --experimental-wasm-custom-descriptors --wasm-wrapper-tiering-budget=1
Matthias Liedtke . resolved

What's the motivation for this?
The default variant should cover the generic wrappers and the stress variant should cover the compiled wrappers. Having a low tiering budget might result in the default variant only partially running with the generic wrappers?

Jakob Kummerow

Done

Line 59, Patchset 1: [kGCPrefix, kExprStructNewDefault, $desc]);

builder.addExportOfKind('g_desc', kExternalGlobal, $g_desc.index);
Matthias Liedtke . resolved
Nit:
```suggestion
[kGCPrefix, kExprStructNewDefault, $desc]
).exportAs('g_desc');
```
(and similarly below)
Jakob Kummerow

Done

Line 74, Patchset 1: builder.addGlobal(wasmRefType($desc3).exact(), false, false, [
Matthias Liedtke . resolved

Nit: We could add a non-exact version as well? (If I didn't miss it.)

Jakob Kummerow

Using it as an import to `struct.new_desc` (line 81) requires exactness. This global isn't exported.

Line 169, Patchset 1: m: {js_func_any, js_func_extern, js_func_indexed},
Matthias Liedtke . resolved

A descriptor can also have a descriptor, right?
So can we have a case where the `this` in JS is actually the wrapped desriptor?
If yes, that should warrant a test case where we `assertSame(identity, this)` and we should also be able to call `this.method42` if we register `method42` on the descriptor's descriptor?

Jakob Kummerow

`g_desc2` is a descriptor that has a descriptor, yes. It's not the same object as `identity` (which is `g_desc`), but we can do something similar.
Done.

Line 195, Patchset 1: assertSame(identity, wasm.g_desc.value);
Matthias Liedtke . resolved
```suggestion
assertSame(identity, wasm.g_desc.value);
assertSame(identity, wasm.g_desc2.value);
```
Jakob Kummerow

No, why? `g_desc2` is a distinct object.

Open in Gerrit

Related details

Attention is currently required from:
  • Matthias Liedtke
  • Thomas Lively
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: Id08c1fd9d7a1757ec9bb5372d4946ff344cbafaa
Gerrit-Change-Number: 7798164
Gerrit-PatchSet: 2
Gerrit-Owner: Jakob Kummerow <jkum...@chromium.org>
Gerrit-Reviewer: Jakob Kummerow <jkum...@chromium.org>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Thomas Lively <tli...@google.com>
Gerrit-Attention: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Attention: Thomas Lively <tli...@google.com>
Gerrit-Comment-Date: Tue, 28 Apr 2026 14:44:47 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Matthias Liedtke <mlie...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Matthias Liedtke (Gerrit)

unread,
10:51 AM (9 hours ago) 10:51 AM
to Jakob Kummerow, v8-s...@luci-project-accounts.iam.gserviceaccount.com, Thomas Lively, v8-re...@googlegroups.com
Attention needed from Jakob Kummerow and Thomas Lively

Matthias Liedtke voted and added 2 comments

Votes added by Matthias Liedtke

Code-Review+1

2 comments

Patchset-level comments
Matthias Liedtke . resolved

Thanks!

File test/mjsunit/wasm/custom-descriptors-boundary.js
Line 74, Patchset 1: builder.addGlobal(wasmRefType($desc3).exact(), false, false, [
Matthias Liedtke . resolved

Nit: We could add a non-exact version as well? (If I didn't miss it.)

Jakob Kummerow

Using it as an import to `struct.new_desc` (line 81) requires exactness. This global isn't exported.

Matthias Liedtke

Makes sense.

Open in Gerrit

Related details

Attention is currently required from:
  • Jakob Kummerow
  • Thomas Lively
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: Id08c1fd9d7a1757ec9bb5372d4946ff344cbafaa
Gerrit-Change-Number: 7798164
Gerrit-PatchSet: 2
Gerrit-Owner: Jakob Kummerow <jkum...@chromium.org>
Gerrit-Reviewer: Jakob Kummerow <jkum...@chromium.org>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Thomas Lively <tli...@google.com>
Gerrit-Attention: Thomas Lively <tli...@google.com>
Gerrit-Attention: Jakob Kummerow <jkum...@chromium.org>
Gerrit-Comment-Date: Tue, 28 Apr 2026 14:51:39 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Matthias Liedtke <mlie...@chromium.org>
Comment-In-Reply-To: Jakob Kummerow <jkum...@chromium.org>
satisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages