| 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 |
| 11 #include "src/api.h" | 11 #include "src/api.h" |
| 12 #include "src/handles.h" | 12 #include "src/handles.h" |
| 13 | 13 |
| 14 namespace v8 { | 14 namespace v8 { |
| 15 namespace internal { | 15 namespace internal { |
| 16 | 16 |
| 17 namespace compiler { | 17 namespace compiler { |
| 18 class CallDescriptor; | 18 class CallDescriptor; |
| 19 class WasmCompilationUnit; |
| 19 } | 20 } |
| 20 | 21 |
| 21 namespace wasm { | 22 namespace wasm { |
| 22 const size_t kMaxModuleSize = 1024 * 1024 * 1024; | 23 const size_t kMaxModuleSize = 1024 * 1024 * 1024; |
| 23 const size_t kMaxFunctionSize = 128 * 1024; | 24 const size_t kMaxFunctionSize = 128 * 1024; |
| 24 const size_t kMaxStringSize = 256; | 25 const size_t kMaxStringSize = 256; |
| 25 const uint32_t kWasmMagic = 0x6d736100; | 26 const uint32_t kWasmMagic = 0x6d736100; |
| 26 const uint32_t kWasmVersion = 0x0a; | 27 const uint32_t kWasmVersion = 0x0a; |
| 27 | 28 |
| 28 // WebAssembly sections are named as strings in the binary format, but | 29 // WebAssembly sections are named as strings in the binary format, but |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 | 323 |
| 323 // For testing. Decode, verify, and run the last exported function in the | 324 // For testing. Decode, verify, and run the last exported function in the |
| 324 // given decoded module. | 325 // given decoded module. |
| 325 int32_t CompileAndRunWasmModule(Isolate* isolate, WasmModule* module); | 326 int32_t CompileAndRunWasmModule(Isolate* isolate, WasmModule* module); |
| 326 | 327 |
| 327 } // namespace wasm | 328 } // namespace wasm |
| 328 } // namespace internal | 329 } // namespace internal |
| 329 } // namespace v8 | 330 } // namespace v8 |
| 330 | 331 |
| 331 #endif // V8_WASM_MODULE_H_ | 332 #endif // V8_WASM_MODULE_H_ |
| OLD | NEW |