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

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

Issue 1972153002: [wasm] Implement an interpreter for WASM. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 7 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/unittests/unittests.gyp ('k') | test/unittests/wasm/control-transfer-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/wasm/ast-decoder-unittest.cc
diff --git a/test/unittests/wasm/ast-decoder-unittest.cc b/test/unittests/wasm/ast-decoder-unittest.cc
index fe1011574966a1eff77edb779ded31ee1808a0fc..f9b78f14da5aa668cd7646448535c8dc5d4afcfb 100644
--- a/test/unittests/wasm/ast-decoder-unittest.cc
+++ b/test/unittests/wasm/ast-decoder-unittest.cc
@@ -82,7 +82,7 @@ class AstDecoderTest : public TestWithZone {
// verification failures.
void Verify(ErrorCode expected, FunctionSig* sig, const byte* start,
const byte* end) {
- local_decls.Prepend(&start, &end);
+ local_decls.Prepend(zone(), &start, &end);
// Verify the code.
TreeResult result =
VerifyWasmCode(zone()->allocator(), module, sig, start, end);
@@ -105,8 +105,6 @@ class AstDecoderTest : public TestWithZone {
}
FATAL(str.str().c_str());
}
-
- delete[] start; // local_decls.Prepend() allocated a new buffer.
}
void TestBinop(WasmOpcode opcode, FunctionSig* success) {
@@ -2427,7 +2425,7 @@ TEST_F(LocalDeclDecoderTest, UseEncoder) {
local_decls.AddLocals(5, kAstF32);
local_decls.AddLocals(1337, kAstI32);
local_decls.AddLocals(212, kAstI64);
- local_decls.Prepend(&data, &end);
+ local_decls.Prepend(zone(), &data, &end);
AstLocalDecls decls(zone());
bool result = DecodeLocalDecls(decls, data, end);
@@ -2439,7 +2437,6 @@ TEST_F(LocalDeclDecoderTest, UseEncoder) {
pos = ExpectRun(map, pos, kAstF32, 5);
pos = ExpectRun(map, pos, kAstI32, 1337);
pos = ExpectRun(map, pos, kAstI64, 212);
- delete[] data;
}
} // namespace wasm
« no previous file with comments | « test/unittests/unittests.gyp ('k') | test/unittests/wasm/control-transfer-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698