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

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

Issue 2277443009: Populate relocation information correctly for RelocatableInt32Constants. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase + fix serializer test flakiness Created 4 years, 3 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/cctest/wasm/test-run-wasm-module.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/wasm/grow-memory.js
diff --git a/test/mjsunit/wasm/grow-memory.js b/test/mjsunit/wasm/grow-memory.js
index 473760fc3d1c2601cbc9274f6692762902b01798..93db651c1bb49633800585c6382ae071e4934c7b 100644
--- a/test/mjsunit/wasm/grow-memory.js
+++ b/test/mjsunit/wasm/grow-memory.js
@@ -128,3 +128,19 @@ function testGrowMemoryTrapsWithNonSmiInput() {
};
testGrowMemoryTrapsWithNonSmiInput();
+
+function testGrowMemoryCurrentMemory() {
+ var builder = genGrowMemoryBuilder();
+ builder.addMemory(1, 1, false);
+ builder.addFunction("memory_size", kSig_i_v)
+ .addBody([kExprMemorySize])
+ .exportFunc();
+ var module = builder.instantiate();
+ function growMem(pages) { return module.exports.grow_memory(pages); }
+ function MemSize() { return module.exports.memory_size(); }
+ assertEquals(65536, MemSize());
+ assertEquals(1, growMem(1));
+ assertEquals(131072, MemSize());
+}
+
+testGrowMemoryCurrentMemory();
« no previous file with comments | « test/cctest/wasm/test-run-wasm-module.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698