Skip to content

Conversation

@aheejin
Copy link
Member

@aheejin aheejin commented May 6, 2024

This allows writing of binaries with DWARF info when multivalue is enabled. Currently we just crash when both are enabled together. This just assumes, unless we have run DWARF-invalidating passes, all locals added for tuples or scratch locals would have been added at the end of the local list, so just printing all locals in order would preserve the DWARF info. Tuple locals are expanded in place and scratch locals are added at the end.

This allows writing of binaries with DWARF info when multivalue is
enabled. Currently we just crash when both are enabled together. This
just assumes, unless we have run DWARF-invalidating passes, all locals
added for tuples or scratch locals would have been added at the end of
the local list, so just printing all locals in order would preserve the
DWARF info. Tuple locals are expanded in place and scratch locals are
added at the end.
@aheejin aheejin requested review from kripken and tlively May 6, 2024 17:55
for (Index j = 0; j < func->getLocalType(i).size(); j++) {
mappedLocals[std::make_pair(i, j)] = mappedIndex + j;
}
mappedIndex += func->getLocalType(i).size();
Copy link
Member

Choose a reason for hiding this comment

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

Maybe save func->getLocalType(i).size() which is used twice to a local size?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@aheejin aheejin merged commit 4b7c610 into WebAssembly:main May 6, 2024
@aheejin aheejin deleted the local_dwarf branch May 6, 2024 23:37
@gkdn gkdn mentioned this pull request Aug 31, 2024
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