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

Side by Side Diff: test/mjsunit/regress/wasm/ast-fuzz-1.js

Issue 2658723006: [wasm] Syntax- and Type-aware Fuzzer (Closed)
Patch Set: Adding support for more binops, etc. Created 3 years, 10 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
(Empty)
1 // Copyright 2017 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 load("test/mjsunit/wasm/wasm-constants.js");
6 load("test/mjsunit/wasm/wasm-module-builder.js");
7
8 (function() {
9 var builder = new WasmModuleBuilder();
10 builder.addMemory(32, 32, false);
11 builder.addFunction("test", kSig_i_iii)
12 .addBodyWithEnd([
13 // body:
14 kExprI64Const, 0xa2, 0xc5, 0x8a, 0x95, 0xaa, 0xd4, 0xa8, 0x80, 0x80, 0x00,
15 kExprI64Const, 0xff, 0xff, 0xeb, 0xa9, 0x85, 0x80, 0x80, 0x80, 0x80, 0x00,
16 kExprI64Mul,
17 kExprI64Const, 0xa8, 0x81, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00,
18 kExprI64Add,
19 kExprBlock, 0x7e, // @36 i64
20 kExprBlock, 0x7e, // @38 i64
21 kExprI64Const, 0xa2, 0x81, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00,
22 kExprI64Const, 0xa2, 0xc5, 0x8a, 0x85, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00,
23 kExprI64Const, 0xa2, 0xc5, 0x82, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00,
24 kExprI64Mul,
25 kExprI64Mul,
26 kExprEnd, // @75
27 kExprEnd, // @76
28 kExprI64Add,
29 kExprI64Const, 0xa2, 0x81, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00,
30 kExprI64Const, 0xef, 0xff, 0x8b, 0x95, 0xaa, 0xd4, 0xa8, 0xd1, 0x80, 0x00,
31 kExprI64Mul,
32 kExprI64GeS,
33 kExprEnd, // @102
34 ])
35 .exportFunc();
36 var module = builder.instantiate();
37 assertEquals(1, module.exports.test(1, 2, 3));
38 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698