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

Unified Diff: src/wasm/wasm-limits.h

Issue 2551463002: [wasm] Move all V8-specific limitations to wasm-limits.h (Closed)
Patch Set: Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/wasm/wasm-js.cc ('k') | src/wasm/wasm-module.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-limits.h
diff --git a/src/wasm/wasm-limits.h b/src/wasm/wasm-limits.h
new file mode 100644
index 0000000000000000000000000000000000000000..56517ede6432222aafe4e1748e30fb190055480a
--- /dev/null
+++ b/src/wasm/wasm-limits.h
@@ -0,0 +1,32 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef V8_WASM_WASM_LIMITS_H_
+#define V8_WASM_WASM_LIMITS_H_
+
+namespace v8 {
+namespace internal {
+namespace wasm {
+
+const size_t kV8MaxWasmSignatures = 10000000;
+const size_t kV8MaxWasmFunctions = 10000000;
+const size_t kV8MaxWasmMemoryPages = 16384; // = 1 GiB
+const size_t kV8MaxWasmStringSize = 256;
+const size_t kV8MaxWasmModuleSize = 1024 * 1024 * 1024; // = 1 GiB
+const size_t kV8MaxWasmFunctionSize = 128 * 1024;
+const size_t kV8MaxWasmFunctionLocals = 50000;
+const size_t kV8MaxWasmTableSize = 16 * 1024 * 1024;
+
+const size_t kSpecMaxWasmMemoryPages = 65536;
+
+const uint64_t kWasmMaxHeapOffset =
+ static_cast<uint64_t>(
+ std::numeric_limits<uint32_t>::max()) // maximum base value
+ + std::numeric_limits<uint32_t>::max(); // maximum index value
+
+} // namespace wasm
+} // namespace internal
+} // namespace v8
+
+#endif // V8_WASM_WASM_LIMITS_H_
« no previous file with comments | « src/wasm/wasm-js.cc ('k') | src/wasm/wasm-module.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698