Upload Kmake

This commit is contained in:
Gorochu
2026-05-26 23:36:42 -07:00
parent ba051b2f74
commit 555ec72358
41615 changed files with 13344630 additions and 1 deletions

View File

@ -0,0 +1,36 @@
// Copyright 2024 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.
// Flags: --wasm-staging --no-liftoff
d8.file.execute('test/mjsunit/wasm/wasm-module-builder.js');
const builder = new WasmModuleBuilder();
const main_sig = builder.addType(kSig_i_iii);
const main = builder.addFunction('main', main_sig).exportAs('main');
builder.addMemory64(0, 8);
// func $main: [kWasmI32, kWasmI32, kWasmI32] -> [kWasmI32]
main.addBody([
kExprLoop, kWasmVoid,
kExprLocalGet, 0,
kExprIf, kWasmVoid,
kExprLocalGet, 0,
kExprBr, 2,
kExprEnd,
kExprEnd,
...wasmI32Const(0),
...wasmI32Const(1),
...wasmI32Const(2),
kExprRefFunc, main.index,
kExprCallRef, main_sig,
kExprF32SConvertI32,
kNumericPrefix, kExprI64SConvertSatF32,
kExprI64Const, 44,
kExprI64Shl,
kExprI32LoadMem8U, 0, ...wasmSignedLeb64(5n),
]);
const instance = builder.instantiate();
instance.exports.main(1, 2, 3);