Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: src/wasm/wasm-module.h

Issue 2148743004: WIP: wasm oob trap handling experiments (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Undoing spurious changes Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/wasm/wasm-js.cc ('k') | src/wasm/wasm-module.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <memory> 8 #include <memory>
9 9
10 #include "src/api.h" 10 #include "src/api.h"
(...skipping 12 matching lines...) Expand all
23 } 23 }
24 24
25 namespace wasm { 25 namespace wasm {
26 const size_t kMaxModuleSize = 1024 * 1024 * 1024; 26 const size_t kMaxModuleSize = 1024 * 1024 * 1024;
27 const size_t kMaxFunctionSize = 128 * 1024; 27 const size_t kMaxFunctionSize = 128 * 1024;
28 const size_t kMaxStringSize = 256; 28 const size_t kMaxStringSize = 256;
29 const uint32_t kWasmMagic = 0x6d736100; 29 const uint32_t kWasmMagic = 0x6d736100;
30 const uint32_t kWasmVersion = 0x0b; 30 const uint32_t kWasmVersion = 0x0b;
31 const uint8_t kWasmFunctionTypeForm = 0x40; 31 const uint8_t kWasmFunctionTypeForm = 0x40;
32 32
33 struct TrapHandlerData {
34 Code* code;
35 TrapHandlerData* next;
36 };
37
38 extern TrapHandlerData* gTrapHandlers;
39
33 // WebAssembly sections are named as strings in the binary format, but 40 // WebAssembly sections are named as strings in the binary format, but
34 // internally V8 uses an enum to handle them. 41 // internally V8 uses an enum to handle them.
35 // 42 //
36 // Entries have the form F(enumerator, string). 43 // Entries have the form F(enumerator, string).
37 #define FOR_EACH_WASM_SECTION_TYPE(F) \ 44 #define FOR_EACH_WASM_SECTION_TYPE(F) \
38 F(Signatures, 1, "type") \ 45 F(Signatures, 1, "type") \
39 F(ImportTable, 2, "import") \ 46 F(ImportTable, 2, "import") \
40 F(FunctionSignatures, 3, "function") \ 47 F(FunctionSignatures, 3, "function") \
41 F(FunctionTable, 4, "table") \ 48 F(FunctionTable, 4, "table") \
42 F(Memory, 5, "memory") \ 49 F(Memory, 5, "memory") \
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 424
418 int32_t CallFunction(Isolate* isolate, Handle<JSObject> instance, 425 int32_t CallFunction(Isolate* isolate, Handle<JSObject> instance,
419 ErrorThrower* thrower, const char* name, int argc, 426 ErrorThrower* thrower, const char* name, int argc,
420 Handle<Object> argv[], bool asm_js = false); 427 Handle<Object> argv[], bool asm_js = false);
421 } // namespace testing 428 } // namespace testing
422 } // namespace wasm 429 } // namespace wasm
423 } // namespace internal 430 } // namespace internal
424 } // namespace v8 431 } // namespace v8
425 432
426 #endif // V8_WASM_MODULE_H_ 433 #endif // V8_WASM_MODULE_H_
OLDNEW
« no previous file with comments | « src/wasm/wasm-js.cc ('k') | src/wasm/wasm-module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698