(types)
| 41 | let g_ref = builder.addGlobal(kWasmExternRef, true).exportAs('g_ref'); |
| 42 | |
| 43 | function 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 | |
| 70 | function CheckValuesOfType(types, block_sig, simd_local) { |
| 71 | let body = [ |
no test coverage detected