44// See https://llvm.org/LICENSE.txt for license information.
55// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66//
7- // Define encodings for WebAssembly instructions, types, etc from the
7+ // Define various flags used to encode instructions, types, etc. in
88// WebAssembly binary format.
99//
10- // Each encoding is defined in the WebAssembly binary specification.
10+ // These encodings are defined in the WebAssembly binary format specification.
1111//
1212// ===----------------------------------------------------------------------===//
1313#ifndef MLIR_TARGET_WASMBINARYENCODING
1414#define MLIR_TARGET_WASMBINARYENCODING
1515
1616#include < cstddef>
17+
1718namespace mlir {
1819struct WasmBinaryEncoding {
19- // / Byte encodings for WASM instructions.
20+ // / Byte encodings for Wasm instructions.
2021 struct OpCode {
2122 // Locals, globals, constants.
2223 static constexpr std::byte constI32{0x41 };
@@ -25,7 +26,7 @@ struct WasmBinaryEncoding {
2526 static constexpr std::byte constFP64{0x44 };
2627 };
2728
28- // / Byte encodings of types in WASM binaries
29+ // / Byte encodings of types in Wasm binaries
2930 struct Type {
3031 static constexpr std::byte emptyBlockType{0x40 };
3132 static constexpr std::byte funcType{0x60 };
@@ -38,15 +39,15 @@ struct WasmBinaryEncoding {
3839 static constexpr std::byte i32 {0x7F };
3940 };
4041
41- // / Byte encodings of WASM imports.
42+ // / Byte encodings of Wasm imports.
4243 struct Import {
4344 static constexpr std::byte typeID{0x00 };
4445 static constexpr std::byte tableType{0x01 };
4546 static constexpr std::byte memType{0x02 };
4647 static constexpr std::byte globalType{0x03 };
4748 };
4849
49- // / Byte encodings for WASM limits.
50+ // / Byte encodings for Wasm limits.
5051 struct LimitHeader {
5152 static constexpr std::byte lowLimitOnly{0x00 };
5253 static constexpr std::byte bothLimits{0x01 };
@@ -58,7 +59,7 @@ struct WasmBinaryEncoding {
5859 static constexpr std::byte isMutable{0x01 };
5960 };
6061
61- // / Byte encodings describing WASM exports.
62+ // / Byte encodings describing Wasm exports.
6263 struct Export {
6364 static constexpr std::byte function{0x00 };
6465 static constexpr std::byte table{0x01 };
0 commit comments