Skip to content

Commit 9a69c34

Browse files
committed
format
1 parent dfaca1e commit 9a69c34

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

src/wasm/wasm-binary.cpp

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2536,8 +2536,8 @@ void WasmBinaryReader::readMemories() {
25362536
}
25372537
}
25382538
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);
25412541
auto memory = Builder::makeMemory(name);
25422542
memory->hasExplicitName = isExplicit;
25432543
getResizableLimits(memory->initial,
@@ -3003,14 +3003,12 @@ void WasmBinaryReader::setLocalNames(Function& func, Index i) {
30033003
void WasmBinaryReader::readFunctionSignatures() {
30043004
size_t num = getU32LEB();
30053005
auto numImports = wasm.functions.size();
3006-
std::cout << "adding existing\n";
30073006
for (auto& [index, name] : functionNames) {
30083007
if (index >= num + numImports) {
30093008
std::cerr << "warning: function index out of bounds in name section: "
30103009
<< name << " at index " << index << '\n';
30113010
}
30123011
usedFunctionNames.insert(name);
3013-
std::cout << " adding: " << name << "\n";
30143012
}
30153013
// Also check that the function indices in the local names subsection are
30163014
// in-bounds, even though we don't use them here.
@@ -3022,8 +3020,8 @@ std::cout << " adding: " << name << "\n";
30223020
}
30233021
}
30243022
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);
30273025
auto index = getU32LEB();
30283026
HeapType type = getTypeByIndex(index);
30293027
functionTypes.push_back(type);
@@ -4862,8 +4860,8 @@ void WasmBinaryReader::readTableDeclarations() {
48624860
}
48634861
}
48644862
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);
48674865
auto elemType = getType();
48684866
if (!elemType.isRef()) {
48694867
throwError("Table type must be a reference type");
@@ -4978,8 +4976,8 @@ void WasmBinaryReader::readTags() {
49784976
}
49794977
for (size_t i = 0; i < num; i++) {
49804978
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);
49834981
auto typeIndex = getU32LEB();
49844982
auto tag = Builder::makeTag(name, getSignatureByTypeIndex(typeIndex));
49854983
tag->hasExplicitName = isExplicit;

0 commit comments

Comments
 (0)