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

Unified Diff: test/cctest/wasm/test-run-wasm-module.cc

Issue 2295173002: [wasm] Use the right control input for the diamond in GrowMemory. (Closed)
Patch Set: Created 4 years, 4 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 | « src/wasm/wasm-macro-gen.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/wasm/test-run-wasm-module.cc
diff --git a/test/cctest/wasm/test-run-wasm-module.cc b/test/cctest/wasm/test-run-wasm-module.cc
index 8449a52ff3bc0f7be4eea87b12795c7842d6a3f0..b5da55a0cba8d9807995885c66b6c598ddae2f0f 100644
--- a/test/cctest/wasm/test-run-wasm-module.cc
+++ b/test/cctest/wasm/test-run-wasm-module.cc
@@ -256,3 +256,18 @@ TEST(Run_WasmModule_Serialization) {
new_ctx->Exit();
}
}
+
+TEST(Run_WasmModule_GrowMemoryInIf) {
+ TestSignatures sigs;
+ v8::base::AccountingAllocator allocator;
+ Zone zone(&allocator);
+ WasmModuleBuilder* builder = new (&zone) WasmModuleBuilder(&zone);
+ uint16_t f_index = builder->AddFunction();
+ WasmFunctionBuilder* f = builder->FunctionAt(f_index);
+ f->SetSignature(sigs.i_v());
+ ExportAsMain(f);
+ byte code[] = {WASM_IF_ELSE(WASM_I32V(0), WASM_GROW_MEMORY(WASM_I32V(1)),
+ WASM_I32V(12))};
+ f->EmitCode(code, sizeof(code));
+ TestModule(&zone, builder, 12);
+}
« no previous file with comments | « src/wasm/wasm-macro-gen.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698