regress-791810.js 702 Bytes
Newer Older
1 2 3 4
// Copyright 2017 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

5
d8.file.execute('test/mjsunit/wasm/wasm-module-builder.js');
6 7 8 9

const builder = new WasmModuleBuilder();
builder.addFunction('test', kSig_i_i)
    .addBody([
10
      kExprLocalGet, 0x00,    // get_local 0
11
      kExprBlock, kWasmVoid,  // block
12 13
      kExprBr, 0x00,          // br depth=0
      kExprEnd,               // end
14
      kExprBlock, kWasmVoid,  // block
15 16 17 18 19 20
      kExprBr, 0x00,          // br depth=0
      kExprEnd,               // end
      kExprBr, 0x00,          // br depth=0
    ])
    .exportFunc();
builder.instantiate();