Skip to content

Conversation

@yhdengh
Copy link
Contributor

@yhdengh yhdengh commented Jan 20, 2022

This PR adds support for the multi-memory proposal in apply-names.cc. This change should have been part of #1751, but I didn't realize that this change is necessary.

This PR also adds name application to all exports. The current main branch only applies names if the export is of type func, but I think it should also apply names for global, table, memory, and tag. Is there any specific reason for only applying names to funcs?

Copy link
Member

@sbc100 sbc100 left a comment

Choose a reason for hiding this comment

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

Nice!

lgtm % testing comment


Result NameApplier::OnMemoryCopyExpr(MemoryCopyExpr* expr) {
CHECK_RESULT(UseNameForMemoryVar(&expr->srcmemidx));
CHECK_RESULT(UseNameForMemoryVar(&expr->destmemidx));
Copy link
Member

Choose a reason for hiding this comment

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

Could we write a test (or add to an existing test) to show that this working?

@@ -0,0 +1,25 @@
;;; TOOL: run-roundtrip
Copy link
Member

Choose a reason for hiding this comment

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

How about calling this apply-memory-names.txt to match the existing apply-global-names.txt

@sbc100 sbc100 merged commit a8f401d into WebAssembly:main Feb 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants