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_DECODER_H_ | 5 #ifndef V8_WASM_MODULE_DECODER_H_ |
6 #define V8_WASM_MODULE_DECODER_H_ | 6 #define V8_WASM_MODULE_DECODER_H_ |
7 | 7 |
8 #include "src/wasm/ast-decoder.h" | 8 #include "src/wasm/ast-decoder.h" |
9 #include "src/wasm/wasm-module.h" | 9 #include "src/wasm/wasm-module.h" |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 // Decodes the bytes of a WASM function between | 24 // Decodes the bytes of a WASM function between |
25 // {function_start} and {function_end}. | 25 // {function_start} and {function_end}. |
26 FunctionResult DecodeWasmFunction(Isolate* isolate, Zone* zone, ModuleEnv* env, | 26 FunctionResult DecodeWasmFunction(Isolate* isolate, Zone* zone, ModuleEnv* env, |
27 const byte* function_start, | 27 const byte* function_start, |
28 const byte* function_end); | 28 const byte* function_end); |
29 | 29 |
30 // Extracts the function offset table from the wasm module bytes. | 30 // Extracts the function offset table from the wasm module bytes. |
31 // Returns a vector with <offset, length> entries, or failure if the wasm bytes | 31 // Returns a vector with <offset, length> entries, or failure if the wasm bytes |
32 // are detected as invalid. Note that this validation is not complete. | 32 // are detected as invalid. Note that this validation is not complete. |
33 FunctionOffsetsResult DecodeWasmFunctionOffsets( | 33 FunctionOffsetsResult DecodeWasmFunctionOffsets(const byte* module_start, |
34 const byte* module_start, const byte* module_end, | 34 const byte* module_end); |
35 uint32_t num_imported_functions); | |
36 | |
37 WasmInitExpr DecodeWasmInitExprForTesting(const byte* start, const byte* end); | |
38 | 35 |
39 } // namespace wasm | 36 } // namespace wasm |
40 } // namespace internal | 37 } // namespace internal |
41 } // namespace v8 | 38 } // namespace v8 |
42 | 39 |
43 #endif // V8_WASM_MODULE_DECODER_H_ | 40 #endif // V8_WASM_MODULE_DECODER_H_ |
OLD | NEW |