| 1370 | static constexpr size_t kFrameMarginSizeBytes = 1024; |
| 1371 | |
| 1372 | js_force_inline JSValue call_closure_callable(tsn_vm* ctx, |
| 1373 | tsn_value_const func, |
| 1374 | tsn_value_const thisObject, |
| 1375 | int argc, |
| 1376 | tsn_value_const* argv, |
| 1377 | tsn_closure* closure) { |
| 1378 | JSStackFrame stackFrame; |
| 1379 | stackFrame.cur_func = (JSValue)func; |
| 1380 | stackFrame.arg_buf = nullptr; |
| 1381 | stackFrame.var_buf = nullptr; |
| 1382 | stackFrame.cur_pc = nullptr; |
| 1383 | stackFrame.arg_count = 0; |
| 1384 | stackFrame.js_mode = 0; |
| 1385 | stackFrame.cur_sp = nullptr; |
| 1386 | |
| 1387 | if (JS_PushStackFrame_tsn(ctx, &stackFrame, kFrameMarginSizeBytes) != 0) { |
| 1388 | return JS_EXCEPTION; |
| 1389 | } |
| 1390 | |
| 1391 | auto value = closure->callable(ctx, thisObject, &stackFrame, argc, argv, closure); |
| 1392 | JS_PopStackFrame_tsn(ctx, &stackFrame); |
| 1393 | return value; |
| 1394 | } |
| 1395 | |
| 1396 | static JSValue __tsn_call_trampoline( |
| 1397 | JSContext* context, JSValueConst funcObject, JSValueConst thisValue, int argc, JSValueConst* argv, int flags) { |
no outgoing calls
no test coverage detected