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,27 @@
// Copyright 2023 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.
d8.file.execute('test/mjsunit/wasm/wasm-module-builder.js');
const builder = new WasmModuleBuilder();
builder.addType(makeSig([kWasmI32], [kWasmI64]));
builder.addMemory(1, 1, true);
// Generate function 1 (out of 1).
builder.addFunction('main', 0 /* sig */)
.addLocals(kWasmI64, 1)
.addBodyWithEnd([
// signature: l_i
// body:
kExprI32Const, 0x04, // i32.const
kExprI32Const, 0x00, // i32.const
kExprLocalGet, 0x00, // local.get
kExprI64SConvertI32, // i64.extend_i32_s
kExprLocalTee, 0x01, // local.tee
kAtomicPrefix, kExprI32AtomicWait, 0x02, 0x00, // memory.atomic.wait32
kExprDrop, // drop
kExprLocalGet, 0x01, // local.get
kExprEnd, // end @29
]).exportFunc();
const instance = builder.instantiate();
assertEquals(2000n, instance.exports.main(2000));