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

Side by Side 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: 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 unified diff | Download patch
OLDNEW
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 // Flags: --expose-wasm --expose-gc --stress-compaction 5 // Flags: --expose-wasm --expose-gc --stress-compaction
6 6
7 load("test/mjsunit/wasm/wasm-constants.js"); 7 load("test/mjsunit/wasm/wasm-constants.js");
8 load("test/mjsunit/wasm/wasm-module-builder.js"); 8 load("test/mjsunit/wasm/wasm-module-builder.js");
9 9
10 var kPageSize = 0x10000; 10 var kPageSize = 0x10000;
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 function testGrowMemoryTrapMaxPages() { 110 function testGrowMemoryTrapMaxPages() {
111 var builder = genGrowMemoryBuilder(); 111 var builder = genGrowMemoryBuilder();
112 builder.addMemory(1, 1, false); 112 builder.addMemory(1, 1, false);
113 var module = builder.instantiate(); 113 var module = builder.instantiate();
114 var maxPages = 16384; 114 var maxPages = 16384;
115 function growMem(pages) { return module.exports.grow_memory(pages); } 115 function growMem(pages) { return module.exports.grow_memory(pages); }
116 assertEquals(-1, growMem(maxPages)); 116 assertEquals(-1, growMem(maxPages));
117 } 117 }
118 118
119 testGrowMemoryTrapMaxPages(); 119 testGrowMemoryTrapMaxPages();
120
121 function testGrowMemoryCurrentMemory() {
122 var builder = genGrowMemoryBuilder();
123 builder.addMemory(1, 1, false);
124 builder.addFunction("memory_size", kSig_i_v)
125 .addBody([kExprMemorySize])
126 .exportFunc();
127 var module = builder.instantiate();
128 function growMem(pages) { return module.exports.grow_memory(pages); }
129 function MemSize() { return module.exports.memory_size(); }
130
131 assertEquals(65536, MemSize());
132 assertEquals(1, growMem(1));
133 assertEquals(131072, MemSize());
134 }
135
136 testGrowMemoryCurrentMemory();
OLDNEW
« src/compiler/x64/code-generator-x64.cc ('K') | « src/compiler/x64/code-generator-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698