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

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

Issue 1869183002: Debug error (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | 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 118a91f3e9e33eccc2bb60421dd4858a41589d55..b8c3b66815a3f384e68f893d5e5da8260ccf34d6 100644
--- a/test/cctest/wasm/test-run-wasm-module.cc
+++ b/test/cctest/wasm/test-run-wasm-module.cc
@@ -193,3 +193,21 @@ TEST(Run_WasmModule_Global) {
WasmModuleWriter* writer = builder->Build(&zone);
TestModule(writer->WriteTo(&zone), 97);
}
+
+TEST(Run_WasmModule_SubDebug) {
+ 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->ReturnType(kAstI32);
+ f->Exported(1);
+ uint16_t local = f->AddLocal(kAstI32);
+ byte code[] = {
+ WASM_SET_LOCAL(local, WASM_I32V(-1)),
+ WASM_RETURN(WASM_I32_SUB(WASM_GET_LOCAL(local), WASM_I32V(0)))};
+ uint32_t local_indices[] = {1, 11};
+ f->EmitCode(code, sizeof(code), local_indices, sizeof(local_indices) / 4);
+ WasmModuleWriter* writer = builder->Build(&zone);
+ TestModule(writer->WriteTo(&zone), -1);
+}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698