@@ -2536,8 +2536,8 @@ void WasmBinaryReader::readMemories() {
2536
2536
}
2537
2537
}
2538
2538
for (size_t i = 0 ; i < num; i++) {
2539
- auto [name, isExplicit] =
2540
- getOrMakeName ( memoryNames, numImports + i, makeName (" " , i), usedMemoryNames);
2539
+ auto [name, isExplicit] = getOrMakeName (
2540
+ memoryNames, numImports + i, makeName (" " , i), usedMemoryNames);
2541
2541
auto memory = Builder::makeMemory (name);
2542
2542
memory->hasExplicitName = isExplicit;
2543
2543
getResizableLimits (memory->initial ,
@@ -3003,14 +3003,12 @@ void WasmBinaryReader::setLocalNames(Function& func, Index i) {
3003
3003
void WasmBinaryReader::readFunctionSignatures () {
3004
3004
size_t num = getU32LEB ();
3005
3005
auto numImports = wasm.functions .size ();
3006
- std::cout << " adding existing\n " ;
3007
3006
for (auto & [index, name] : functionNames) {
3008
3007
if (index >= num + numImports) {
3009
3008
std::cerr << " warning: function index out of bounds in name section: "
3010
3009
<< name << " at index " << index << ' \n ' ;
3011
3010
}
3012
3011
usedFunctionNames.insert (name);
3013
- std::cout << " adding: " << name << " \n " ;
3014
3012
}
3015
3013
// Also check that the function indices in the local names subsection are
3016
3014
// in-bounds, even though we don't use them here.
@@ -3022,8 +3020,8 @@ std::cout << " adding: " << name << "\n";
3022
3020
}
3023
3021
}
3024
3022
for (size_t i = 0 ; i < num; i++) {
3025
- auto [name, isExplicit] =
3026
- getOrMakeName ( functionNames, numImports + i, makeName (" " , i), usedFunctionNames);
3023
+ auto [name, isExplicit] = getOrMakeName (
3024
+ functionNames, numImports + i, makeName (" " , i), usedFunctionNames);
3027
3025
auto index = getU32LEB ();
3028
3026
HeapType type = getTypeByIndex (index);
3029
3027
functionTypes.push_back (type);
@@ -4862,8 +4860,8 @@ void WasmBinaryReader::readTableDeclarations() {
4862
4860
}
4863
4861
}
4864
4862
for (size_t i = 0 ; i < num; i++) {
4865
- auto [name, isExplicit] =
4866
- getOrMakeName ( tableNames, numImports + i, makeName (" " , i), usedTableNames);
4863
+ auto [name, isExplicit] = getOrMakeName (
4864
+ tableNames, numImports + i, makeName (" " , i), usedTableNames);
4867
4865
auto elemType = getType ();
4868
4866
if (!elemType.isRef ()) {
4869
4867
throwError (" Table type must be a reference type" );
@@ -4978,8 +4976,8 @@ void WasmBinaryReader::readTags() {
4978
4976
}
4979
4977
for (size_t i = 0 ; i < num; i++) {
4980
4978
getInt8 (); // Reserved 'attribute' field
4981
- auto [name, isExplicit] =
4982
- getOrMakeName ( tagNames, numImports + i, makeName (" tag$" , i), usedTagNames);
4979
+ auto [name, isExplicit] = getOrMakeName (
4980
+ tagNames, numImports + i, makeName (" tag$" , i), usedTagNames);
4983
4981
auto typeIndex = getU32LEB ();
4984
4982
auto tag = Builder::makeTag (name, getSignatureByTypeIndex (typeIndex));
4985
4983
tag->hasExplicitName = isExplicit;
0 commit comments