afonso360 opened issue #4766:
:wave: Hey,
Feature
This is a follow up to https://github.com/bytecodealliance/wasmtime/pull/4667#issuecomment-1218328143, where we discussed removing TestName as an option for Function names.
Benefit
The biggest benefit is cleaning up our naming interface. TestNames arguably shouldn't belong to the core cranelift infrastructure. Instead the test suite should have an external table as any other embedder would do.
The other benefit was allowing larger names in test functions, but @jameysharp has fixed that in https://github.com/bytecodealliance/wasmtime/pull/4764 (Thanks!)
@jameysharp tested this and while it does have some performance benefits, they are minimal.
This also removes some edges such as
cranelift-jit
not supporting test names which makes for a better experience using it.Implementation
I started working on this a few days ago, but I'm putting it on hold to fix some other more prioritary issues. (in progress branch) If anyone wants to pick this up in the mean time feel free!
The branch above starts by changing the parser to produce a side table of test names while assigning UserExernalNames to each function.
Following from that we need to switch the testsuite to use this new side table.
And after that we should be able to remove the TestName from cranelift.
This sounds simple, but I think it will end up being quite a big change.
Alternatives
Do nothing. This has been the state of cranelift for a long time. I think this would also break the interface for pretty much every downstream user since we would probably remove UserFuncName and replace it with UserExernalName directly.
Last updated: Nov 22 2024 at 16:03 UTC