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

Unified Diff: test/unittests/wasm/module-decoder-unittest.cc

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/params.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/wasm/module-decoder-unittest.cc
diff --git a/test/unittests/wasm/module-decoder-unittest.cc b/test/unittests/wasm/module-decoder-unittest.cc
index cb61d48baa14d97fa8526017264b7aa92268ba4c..77d413acedff701830be6007cafc5abdd4c81e04 100644
--- a/test/unittests/wasm/module-decoder-unittest.cc
+++ b/test/unittests/wasm/module-decoder-unittest.cc
@@ -616,7 +616,7 @@ TEST_F(WasmModuleVerifyTest, TwoDataSegments) {
TEST_F(WasmModuleVerifyTest, DataSegmentWithInvalidSource) {
const int dest_addr = 0x100;
- const byte mem_size_log2 = 15;
+ const byte mem_pages = 1;
const int kHeaderSize = 8;
const int kDataSize = 19;
const int kTotalSize = kHeaderSize + kDataSize;
@@ -625,8 +625,8 @@ TEST_F(WasmModuleVerifyTest, DataSegmentWithInvalidSource) {
for (int source_size = -1; source_size < 5 + kDataSize; source_size += 3) {
byte data[] = {
kDeclMemory,
- mem_size_log2,
- mem_size_log2,
+ mem_pages,
+ mem_pages,
1,
kDeclDataSegments,
1,
@@ -653,15 +653,15 @@ TEST_F(WasmModuleVerifyTest, DataSegmentWithInvalidDest) {
const int source_size = 3;
const int source_offset = 11;
- for (byte mem_size_log2 = 12; mem_size_log2 < 20; mem_size_log2++) {
- int mem_size = 1 << mem_size_log2;
+ for (byte mem_pages = 1; mem_pages < 16; mem_pages++) {
+ int mem_size = mem_pages * 0x10000; // 64k pages.
for (int dest_addr = mem_size - source_size;
dest_addr < mem_size + source_size; dest_addr++) {
byte data[] = {
kDeclMemory,
- mem_size_log2,
- mem_size_log2,
+ mem_pages,
+ mem_pages,
1,
kDeclDataSegments,
1,
« no previous file with comments | « test/mjsunit/wasm/params.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698