Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions test/js-api/custom-descriptors/prototype.any.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ setup(() => {
.addBody([
kExprLocalGet, 0,
kGCPrefix, kExprStructNew, descIndex,
kGCPrefix, kExprStructNew, structIndex
kGCPrefix, kExprStructNewDesc, structIndex
])
.exportFunc();

Expand Down Expand Up @@ -68,7 +68,7 @@ test(() => {
const objIndex = builder.addGlobal(wasmRefType(structIndex), false, [
kExprGlobalGet, 0,
kGCPrefix, kExprStructNew, descIndex,
kGCPrefix, kExprStructNew, structIndex,
kGCPrefix, kExprStructNewDesc, structIndex,
]);
builder.addExportOfKind("obj", kExternalGlobal, objIndex.index);

Expand Down Expand Up @@ -102,7 +102,7 @@ test(() => {
.addBody([
kExprLocalGet, 0,
kGCPrefix, kExprStructNew, descIndex,
kGCPrefix, kExprStructNew, structIndex
kGCPrefix, kExprStructNewDesc, structIndex
])
.exportFunc();

Expand Down Expand Up @@ -135,7 +135,7 @@ test(() => {
kExprI32Const, 0,
kExprLocalGet, 0,
kGCPrefix, kExprStructNew, descIndex,
kGCPrefix, kExprStructNew, structIndex
kGCPrefix, kExprStructNewDesc, structIndex
])
.exportFunc();

Expand Down Expand Up @@ -166,7 +166,7 @@ test(() => {
.addBody([
kExprLocalGet, 0,
kGCPrefix, kExprStructNew, descIndex,
kGCPrefix, kExprStructNew, structIndex
kGCPrefix, kExprStructNewDesc, structIndex
])
.exportFunc();

Expand Down Expand Up @@ -203,7 +203,7 @@ test(() => {
.addBody([
kExprLocalGet, 0,
kGCPrefix, kExprStructNew, metaIndex,
kGCPrefix, kExprStructNew, descIndex,
kGCPrefix, kExprStructNewDesc, descIndex,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be descIndex or structIndex (like the similar lines)? or maybe the rest of the lines should also have descIndex instead of structIndex?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's intentional that the names are different in this test. Most of the tests have setups like this:

struct -> desc

Where the prototype is being configured on desc. But this test uses this setup instead:

struct -> desc -> meta

And the prototype is configured on meta. So the names for the base described struct and its descriptor are the same as in the other tests, but this test additionally adds meta as the descriptor of the descriptor and uses in where the previous tests would have used desc.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. thanks for the expalanation.

])
.exportFunc();

Expand Down