OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_WASM_MODULE_H_ | 5 #ifndef V8_WASM_MODULE_H_ |
6 #define V8_WASM_MODULE_H_ | 6 #define V8_WASM_MODULE_H_ |
7 | 7 |
8 #include "src/wasm/wasm-opcodes.h" | 8 #include "src/wasm/wasm-opcodes.h" |
9 #include "src/wasm/wasm-result.h" | 9 #include "src/wasm/wasm-result.h" |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 const size_t kMaxFunctionSize = 128 * 1024; | 23 const size_t kMaxFunctionSize = 128 * 1024; |
24 const size_t kMaxStringSize = 256; | 24 const size_t kMaxStringSize = 256; |
25 | 25 |
26 enum WasmSectionDeclCode { | 26 enum WasmSectionDeclCode { |
27 kDeclMemory = 0x00, | 27 kDeclMemory = 0x00, |
28 kDeclSignatures = 0x01, | 28 kDeclSignatures = 0x01, |
29 kDeclFunctions = 0x02, | 29 kDeclFunctions = 0x02, |
30 kDeclGlobals = 0x03, | 30 kDeclGlobals = 0x03, |
31 kDeclDataSegments = 0x04, | 31 kDeclDataSegments = 0x04, |
32 kDeclFunctionTable = 0x05, | 32 kDeclFunctionTable = 0x05, |
| 33 kDeclWLL = 0x11, |
33 kDeclEnd = 0x06, | 34 kDeclEnd = 0x06, |
34 }; | 35 }; |
35 | 36 |
36 static const int kMaxModuleSectionCode = 6; | 37 static const int kMaxModuleSectionCode = 6; |
37 | 38 |
38 enum WasmFunctionDeclBit { | 39 enum WasmFunctionDeclBit { |
39 kDeclFunctionName = 0x01, | 40 kDeclFunctionName = 0x01, |
40 kDeclFunctionImport = 0x02, | 41 kDeclFunctionImport = 0x02, |
41 kDeclFunctionLocals = 0x04, | 42 kDeclFunctionLocals = 0x04, |
42 kDeclFunctionExport = 0x08 | 43 kDeclFunctionExport = 0x08 |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 const byte* module_end, bool asm_js = false); | 183 const byte* module_end, bool asm_js = false); |
183 | 184 |
184 // For testing. Decode, verify, and run the last exported function in the | 185 // For testing. Decode, verify, and run the last exported function in the |
185 // given decoded module. | 186 // given decoded module. |
186 int32_t CompileAndRunWasmModule(Isolate* isolate, WasmModule* module); | 187 int32_t CompileAndRunWasmModule(Isolate* isolate, WasmModule* module); |
187 } // namespace wasm | 188 } // namespace wasm |
188 } // namespace internal | 189 } // namespace internal |
189 } // namespace v8 | 190 } // namespace v8 |
190 | 191 |
191 #endif // V8_WASM_MODULE_H_ | 192 #endif // V8_WASM_MODULE_H_ |
OLD | NEW |