(...customSections)
| 17 | |
| 18 | // Create module with given custom sections. |
| 19 | function createModule(...customSections) { |
| 20 | var builder = new WasmModuleBuilder(); |
| 21 | builder.addFunction('nopFunction', kSig_v_v).addBody([kExprNop]); |
| 22 | builder.addFunction('main', kSig_v_v) |
| 23 | .addBody([kExprBlock, kWasmVoid, kExprI32Const, 2, kExprDrop, kExprEnd]) |
| 24 | .exportAs('main'); |
| 25 | for (var { name, value } of customSections) { |
| 26 | builder.addCustomSection(name, value); |
| 27 | } |
| 28 | return builder.toArray(); |
| 29 | } |
| 30 | |
| 31 | function testFunction(bytes) { |
| 32 | // Compilation triggers registration of wasm scripts. |
no test coverage detected
searching dependent graphs…