// 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.load('test/mjsunit/wasm/wasm-constants.js');load('test/mjsunit/wasm/wasm-module-builder.js');varbuilder=newWasmModuleBuilder();builder.addFunction('test',kSig_i_iii).addBodyWithEnd([kExprI32Const,0x00,// i32.const 0kExprI32Const,0x00,// i32.const 0kExprI32Add,// i32.add -> 0kExprI32Const,0x00,// i32.const 0kExprI32Const,0x00,// i32.const 0kExprI32Add,// i32.add -> 0kExprI32Add,// i32.add -> 0kExprI32Const,0x01,// i32.const 1kExprI32Const,0x00,// i32.const 0kExprI32Add,// i32.add -> 1kExprBlock,0x7f,// @39 i32kExprI32Const,0x00,// i32.const 0kExprBr,0x00,// depth=0kExprEnd,// @90kExprI32Add,// i32.add -> 1kExprI32Add,// i32.add -> 1kExprEnd]).exportFunc();varmodule=builder.instantiate();assertEquals(1,module.exports.test());