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

Side by Side Diff: test/mjsunit/wasm/verify-function-simple.js

Issue 1763433002: [wasm] Rework encoding of local declarations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « test/mjsunit/wasm/test-wasm-module-builder.js ('k') | test/mjsunit/wasm/wasm-constants.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Flags: --expose-wasm 5 // Flags: --expose-wasm
6 6
7 load("test/mjsunit/wasm/wasm-constants.js"); 7 load("test/mjsunit/wasm/wasm-constants.js");
8 8
9 try { 9 try {
10 var data = bytes( 10 var data = bytes(
11 0, kAstStmt, // signature 11 0, kAstStmt, // signature
12 3, 0, // local int32 count 12 kDeclNoLocals, // --
13 4, 0, // local int64 count
14 5, 0, // local float32 count
15 6, 0, // local float64 count
16 kExprNop // body 13 kExprNop // body
17 ); 14 );
18 15
19 _WASMEXP_.verifyFunction(data); 16 _WASMEXP_.verifyFunction(data);
20 print("ok"); 17 print("ok");
21 } catch (e) { 18 } catch (e) {
22 assertTrue(false); 19 assertTrue(false);
23 } 20 }
24 21
25 22
26 var threw = false; 23 var threw = false;
27 try { 24 try {
28 var data = bytes( 25 var data = bytes(
29 0, kAstI32, // signature 26 0, kAstI32, // signature
30 2, 0, // local int32 count 27 kDeclNoLocals, // --
31 3, 0, // local int64 count
32 4, 0, // local float32 count
33 5, 0, // local float64 count
34 kExprBlock, 2, kExprNop, kExprNop // body 28 kExprBlock, 2, kExprNop, kExprNop // body
35 ); 29 );
36 30
37 _WASMEXP_.verifyFunction(data); 31 _WASMEXP_.verifyFunction(data);
38 print("not ok"); 32 print("not ok");
39 } catch (e) { 33 } catch (e) {
40 print("ok: " + e); 34 print("ok: " + e);
41 threw = true; 35 threw = true;
42 } 36 }
43 37
44 assertTrue(threw); 38 assertTrue(threw);
OLDNEW
« no previous file with comments | « test/mjsunit/wasm/test-wasm-module-builder.js ('k') | test/mjsunit/wasm/wasm-constants.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698