| Index: src/wasm/wasm-module.h
|
| diff --git a/src/wasm/wasm-module.h b/src/wasm/wasm-module.h
|
| index 5f5777cebebe4c5a865aaa11dd37472eb61ea3f5..2249ba4dba6d7ef02feb90e0c62a38710ea9ff7e 100644
|
| --- a/src/wasm/wasm-module.h
|
| +++ b/src/wasm/wasm-module.h
|
| @@ -23,21 +23,28 @@ const size_t kMaxModuleSize = 1024 * 1024 * 1024;
|
| const size_t kMaxFunctionSize = 128 * 1024;
|
| const size_t kMaxStringSize = 256;
|
|
|
| +// WebAssembly sections are named as strings in the binary format, but
|
| +// internally V8 uses an enum to handle them.
|
| +//
|
| +// Entries have the form F(enumerator, string).
|
| +#define FOR_EACH_WASM_SECTION_TYPE(F) \
|
| + F(kDeclMemory, "memory") \
|
| + F(kDeclSignatures, "signatures") \
|
| + F(kDeclFunctions, "functions") \
|
| + F(kDeclGlobals, "globals") \
|
| + F(kDeclDataSegments, "data_segments") \
|
| + F(kDeclFunctionTable, "function_table") \
|
| + F(kDeclEnd, "end") \
|
| + F(kDeclStartFunction, "start_function") \
|
| + F(kDeclImportTable, "import_table")
|
| +
|
| enum WasmSectionDeclCode {
|
| - kDeclMemory = 0x00,
|
| - kDeclSignatures = 0x01,
|
| - kDeclFunctions = 0x02,
|
| - kDeclGlobals = 0x03,
|
| - kDeclDataSegments = 0x04,
|
| - kDeclFunctionTable = 0x05,
|
| - kDeclEnd = 0x06,
|
| - kDeclStartFunction = 0x07,
|
| - kDeclImportTable = 0x08,
|
| - kDeclWLL = 0x11,
|
| +#define F(enumerator, string) enumerator,
|
| + FOR_EACH_WASM_SECTION_TYPE(F)
|
| +#undef F
|
| + kMaxModuleSectionCode
|
| };
|
|
|
| -static const int kMaxModuleSectionCode = 0x11;
|
| -
|
| enum WasmFunctionDeclBit {
|
| kDeclFunctionName = 0x01,
|
| kDeclFunctionImport = 0x02,
|
|
|