(node: node, jit = true)
| 1174 | } |
| 1175 | |
| 1176 | fin<node extends BaseRoot>(node: node, jit = true): node { |
| 1177 | // an alias may reference a definition still parsing, e.g. Record<string, this> |
| 1178 | if ((inProgress.definitions || inProgress.resolutions) && node.hasAlias) |
| 1179 | return node |
| 1180 | |
| 1181 | // resolving aliases can throw, so they resolve on definition |
| 1182 | if (node.hasAlias) resolveReachedAliases(node) |
| 1183 | if (node.unitFn || !jit) { |
| 1184 | if ( |
| 1185 | $ark.cfg && |
| 1186 | !$ark.cfgFrozenBy && |
| 1187 | !inProgress.definitions && |
| 1188 | !inProgress.resolutions |
| 1189 | ) |
| 1190 | recordFirstType(node) |
| 1191 | return node |
| 1192 | } |
| 1193 | bindPrecompiledUnits?.([node]) |
| 1194 | const canCompile = !node.unitFn && canJit(this.cfg) |
| 1195 | if ( |
| 1196 | $ark.cfg && |
| 1197 | !$ark.cfgFrozenBy && |
| 1198 | !inProgress.definitions && |
| 1199 | !inProgress.resolutions |
| 1200 | ) |
| 1201 | recordFirstType(node) |
| 1202 | if (canCompile) node.deferJit() |
| 1203 | return node |
| 1204 | } |
| 1205 | |
| 1206 | jit(node: BaseNode): void { |
| 1207 | tryJit(() => |
nothing calls this directly
no test coverage detected