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

Unified Diff: test/mjsunit/wasm/module-memory.js

Issue 1597163002: wasm: change the module memory size to be multiples of the page size, 64k. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/wasm/instantiate-module-basic.js ('k') | test/mjsunit/wasm/params.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/wasm/module-memory.js
diff --git a/test/mjsunit/wasm/module-memory.js b/test/mjsunit/wasm/module-memory.js
index b3a3a226e545a4630d49e198b54960023ce870a1..1d615e96cc5752ce9fef5385774704afed286ada 100644
--- a/test/mjsunit/wasm/module-memory.js
+++ b/test/mjsunit/wasm/module-memory.js
@@ -6,7 +6,7 @@
load("test/mjsunit/wasm/wasm-constants.js");
-var kMemSize = 4096;
+var kMemSize = 65536;
function genModule(memory) {
var kBodySize = 27;
@@ -14,7 +14,7 @@ function genModule(memory) {
var data = bytesWithHeader(
kDeclMemory,
- 12, 12, 1, // memory
+ 1, 1, 1, // memory
// -- signatures
kDeclSignatures, 1,
1, kAstI32, kAstI32, // int->int
@@ -137,7 +137,7 @@ function testOOBThrows() {
var data = bytesWithHeader(
kDeclMemory,
- 12, 12, 1, // memory = 4KB
+ 1, 1, 1, // memory = 64KB
// -- signatures
kDeclSignatures, 1,
2, kAstI32, kAstI32, kAstI32, // int->int
@@ -166,13 +166,13 @@ function testOOBThrows() {
function read() { return module.geti(0, offset); }
function write() { return module.geti(offset, 0); }
- for (offset = 0; offset < 4092; offset++) {
+ for (offset = 0; offset < 65533; offset++) {
assertEquals(0, read());
assertEquals(0, write());
}
- for (offset = 4093; offset < 4124; offset++) {
+ for (offset = 65534; offset < 66536; offset++) {
assertTraps(kTrapMemOutOfBounds, read);
assertTraps(kTrapMemOutOfBounds, write);
}
« no previous file with comments | « test/mjsunit/wasm/instantiate-module-basic.js ('k') | test/mjsunit/wasm/params.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698