array bracket are not valid in Wasm identifiers.

This commit is contained in:
Volker Berlin 2020-08-09 15:22:26 +02:00
parent 3e9a8b1460
commit 54ad287ed6

View File

@ -282,7 +282,8 @@ public class TextModuleWriter extends ModuleWriter {
}
/**
* Normalize the function name for the text format
* Normalize the function name for the text format of IDs.
* https://webassembly.github.io/spec/core/text/values.html#text-id
*
* @param name
* the name
@ -290,7 +291,7 @@ public class TextModuleWriter extends ModuleWriter {
*/
@Nonnull
private String normalizeName( String name ) {
return name;
return name.replace( '[', '/' );
}
/**