MCPcopy Create free account
hub / github.com/nodejs/node / GenerateValuesOfType

Function GenerateValuesOfType

deps/v8/test/mjsunit/wasm/cont-bind.js:43–68  ·  view source on GitHub ↗
(types)

Source from the content-addressed store, hash-verified

41let g_ref = builder.addGlobal(kWasmExternRef, true).exportAs('g_ref');
42
43function GenerateValuesOfType(types) {
44 body = [];
45 for (type of types) {
46 switch (type) {
47 case kWasmI32:
48 body.push(...wasmI32Const(12));
49 break;
50 case kWasmI64:
51 body.push(...wasmI64Const(34));
52 break;
53 case kWasmF32:
54 body.push(...wasmF32Const(56));
55 break;
56 case kWasmF64:
57 body.push(...wasmF64Const(78));
58 break;
59 case kWasmS128:
60 body.push(...wasmS128Const(Math.PI, Math.E));
61 break;
62 case kWasmExternRef:
63 body.push(kExprGlobalGet, g_ref.index);
64 break;
65 }
66 }
67 return body;
68}
69
70function CheckValuesOfType(types, block_sig, simd_local) {
71 let body = [

Callers 1

cont-bind.jsFile · 0.85

Calls 6

wasmI64ConstFunction · 0.85
wasmS128ConstFunction · 0.85
wasmI32ConstFunction · 0.70
wasmF32ConstFunction · 0.70
wasmF64ConstFunction · 0.70
pushMethod · 0.45

Tested by

no test coverage detected