(callType)
| 78 | let {instance1, instance2} = setup(); |
| 79 | |
| 80 | function test(callType) { |
| 81 | print("test " + callType); |
| 82 | |
| 83 | // A function from the second instance is invoked, which then indirectly |
| 84 | // calls `callee` from the first instance, which should semantically close |
| 85 | // over (in the sense of "closure") the global with value 1000. |
| 86 | const f = instance2.exports[callType]; |
| 87 | f(); |
| 88 | %WasmTierUpFunction(f); |
| 89 | assertEquals(1005, f()); |
| 90 | } |
| 91 | test("call_indirect"); |
| 92 | test("return_call_indirect"); |
| 93 | test("call_ref"); |
no test coverage detected
searching dependent graphs…