OLD | NEW |
---|---|
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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_WASM_LIMITS_H_ | 5 #ifndef V8_WASM_WASM_LIMITS_H_ |
6 #define V8_WASM_WASM_LIMITS_H_ | 6 #define V8_WASM_WASM_LIMITS_H_ |
7 | 7 |
8 namespace v8 { | 8 namespace v8 { |
9 namespace internal { | 9 namespace internal { |
10 namespace wasm { | 10 namespace wasm { |
11 | 11 |
12 const size_t kV8MaxWasmSignatures = 10000000; | 12 const size_t kV8MaxWasmTypes = 1000000; |
ahaas
2016/12/14 12:44:14
Can you add a comment that these number are just p
titzer
2016/12/14 17:19:54
Done.
| |
13 const size_t kV8MaxWasmFunctions = 10000000; | 13 const size_t kV8MaxWasmFunctions = 1000000; |
14 const size_t kV8MaxWasmImports = 100000; | |
15 const size_t kV8MaxWasmGlobals = 1000000; | |
16 const size_t kV8MaxWasmDataSegments = 100000; | |
14 const size_t kV8MaxWasmMemoryPages = 16384; // = 1 GiB | 17 const size_t kV8MaxWasmMemoryPages = 16384; // = 1 GiB |
15 const size_t kV8MaxWasmStringSize = 256; | 18 const size_t kV8MaxWasmStringSize = 256; |
16 const size_t kV8MaxWasmModuleSize = 1024 * 1024 * 1024; // = 1 GiB | 19 const size_t kV8MaxWasmModuleSize = 1024 * 1024 * 1024; // = 1 GiB |
17 const size_t kV8MaxWasmFunctionSize = 128 * 1024; | 20 const size_t kV8MaxWasmFunctionSize = 128 * 1024; |
18 const size_t kV8MaxWasmFunctionLocals = 50000; | 21 const size_t kV8MaxWasmFunctionLocals = 50000; |
22 const size_t kV8MaxWasmFunctionParamCount = 1000; | |
23 const size_t kV8MaxWasmFunctionMultiReturnCount = 1000; | |
24 const size_t kV8MaxWasmFunctionReturnCount = 1; | |
19 const size_t kV8MaxWasmTableSize = 16 * 1024 * 1024; | 25 const size_t kV8MaxWasmTableSize = 16 * 1024 * 1024; |
20 | 26 |
21 const size_t kSpecMaxWasmMemoryPages = 65536; | 27 const size_t kSpecMaxWasmMemoryPages = 65536; |
22 | 28 |
23 const uint64_t kWasmMaxHeapOffset = | 29 const uint64_t kWasmMaxHeapOffset = |
24 static_cast<uint64_t>( | 30 static_cast<uint64_t>( |
25 std::numeric_limits<uint32_t>::max()) // maximum base value | 31 std::numeric_limits<uint32_t>::max()) // maximum base value |
26 + std::numeric_limits<uint32_t>::max(); // maximum index value | 32 + std::numeric_limits<uint32_t>::max(); // maximum index value |
27 | 33 |
28 } // namespace wasm | 34 } // namespace wasm |
29 } // namespace internal | 35 } // namespace internal |
30 } // namespace v8 | 36 } // namespace v8 |
31 | 37 |
32 #endif // V8_WASM_WASM_LIMITS_H_ | 38 #endif // V8_WASM_WASM_LIMITS_H_ |
OLD | NEW |