diff --git a/libraries/wasm-jit/Source/WASM/WASMSerialization.cpp b/libraries/wasm-jit/Source/WASM/WASMSerialization.cpp index 604c0bb006c02b2191f07ebc53695d88f10a181b..8e2b5199bbfc82d43e4945ad049806b1c33b753f 100644 --- a/libraries/wasm-jit/Source/WASM/WASMSerialization.cpp +++ b/libraries/wasm-jit/Source/WASM/WASMSerialization.cpp @@ -188,8 +188,8 @@ public: void addCall(Module& module, Serialization::OutputStream& inByteStream) { - // make sure the import is added - addImport(module); + // make sure the import is added + addImport(module); OpcodeAndImm* encodedOperator = (OpcodeAndImm*)inByteStream.advance(sizeof(OpcodeAndImm)); encodedOperator->opcode = Opcode::call; // checktime will be the last defined import @@ -219,14 +219,14 @@ public: void addImport(Module& module) { - if (module.functions.imports.size() == 0 || module.functions.imports.back().exportName.compare(u8"checktime") != 0) { - if (typeSlot < 0) { - addTypeSlot(module); - } + if (module.functions.imports.size() == 0 || module.functions.imports.back().exportName.compare(u8"checktime") != 0) { + if (typeSlot < 0) { + addTypeSlot(module); + } - const U32 functionTypeIndex = typeSlot; - module.functions.imports.push_back({{functionTypeIndex}, std::move(u8"env"), std::move(u8"checktime")}); - } + const U32 functionTypeIndex = typeSlot; + module.functions.imports.push_back({{functionTypeIndex}, std::move(u8"env"), std::move(u8"checktime")}); + } } void conditionallyAddCall(Opcode opcode, const ControlStructureImm& imm, Module& module, Serialization::OutputStream& inByteStream)