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

Side by Side Diff: test/unittests/wasm/module-decoder-unittest.cc

Issue 2628883006: Revert of [wasm] Enforce that function bodies end with the \"end\" opcode. (Closed)
Patch Set: Created 3 years, 11 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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 #include "test/unittests/test-utils.h" 5 #include "test/unittests/test-utils.h"
6 6
7 #include "src/handles.h" 7 #include "src/handles.h"
8 #include "src/objects-inl.h" 8 #include "src/objects-inl.h"
9 #include "src/wasm/module-decoder.h" 9 #include "src/wasm/module-decoder.h"
10 #include "src/wasm/wasm-limits.h" 10 #include "src/wasm/wasm-limits.h"
(...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after
926 SIG_ENTRY_v_v, // signature entry 926 SIG_ENTRY_v_v, // signature entry
927 4, // locals 927 4, // locals
928 3, 928 3,
929 kLocalI32, // -- 929 kLocalI32, // --
930 4, 930 4,
931 kLocalI64, // -- 931 kLocalI64, // --
932 5, 932 5,
933 kLocalF32, // -- 933 kLocalF32, // --
934 6, 934 6,
935 kLocalF64, // -- 935 kLocalF64, // --
936 kExprEnd // body 936 kExprNop // body
937 }; 937 };
938 938
939 FunctionResult result = 939 FunctionResult result =
940 DecodeWasmFunction(isolate(), zone(), nullptr, data, data + sizeof(data)); 940 DecodeWasmFunction(isolate(), zone(), nullptr, data, data + sizeof(data));
941 EXPECT_OK(result); 941 EXPECT_OK(result);
942 942
943 if (result.val && result.ok()) { 943 if (result.val && result.ok()) {
944 WasmFunction* function = result.val; 944 WasmFunction* function = result.val;
945 EXPECT_EQ(0u, function->sig->parameter_count()); 945 EXPECT_EQ(0u, function->sig->parameter_count());
946 EXPECT_EQ(0u, function->sig->return_count()); 946 EXPECT_EQ(0u, function->sig->return_count());
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
1504 SECTION(Unknown, 4), 1, 'X', 17, 18, // -- 1504 SECTION(Unknown, 4), 1, 'X', 17, 18, // --
1505 SECTION(Unknown, 9), 3, 'f', 'o', 'o', 5, 6, 7, 8, 9, // -- 1505 SECTION(Unknown, 9), 3, 'f', 'o', 'o', 5, 6, 7, 8, 9, // --
1506 SECTION(Unknown, 8), 5, 'o', 't', 'h', 'e', 'r', 7, 8, // -- 1506 SECTION(Unknown, 8), 5, 'o', 't', 'h', 'e', 'r', 7, 8, // --
1507 }; 1507 };
1508 EXPECT_VERIFIES(data); 1508 EXPECT_VERIFIES(data);
1509 } 1509 }
1510 1510
1511 } // namespace wasm 1511 } // namespace wasm
1512 } // namespace internal 1512 } // namespace internal
1513 } // namespace v8 1513 } // namespace v8
OLDNEW
« no previous file with comments | « test/unittests/wasm/function-body-decoder-unittest.cc ('k') | test/unittests/wasm/wasm-macro-gen-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698