()
| 873 | } |
| 874 | |
| 875 | initRootApply(): RootApply { |
| 876 | if (this.c.preJit) { |
| 877 | if (this.checksUncompiled) { |
| 878 | const rootApply = this.createRootApply() |
| 879 | // marked used once it returns, so an allows it calls doesn't compile |
| 880 | const apply: RootApply = (data, onFail) => { |
| 881 | const result = rootApply(data, onFail) |
| 882 | this.c.usedPreJit = true |
| 883 | return result |
| 884 | } |
| 885 | const checked = |
| 886 | $ark.inPlace ? |
| 887 | $ark.inPlace.checkedUncompiled(this as never, apply) |
| 888 | : apply |
| 889 | if (checked) return checked |
| 890 | } |
| 891 | this.$.jit(this) |
| 892 | } |
| 893 | const compiled = |
| 894 | (this.unitFn || $ark.inPlace?.writesInPlace(this as never)) && |
| 895 | this.isRoot() && |
| 896 | canJit(this.$.cfg) && |
| 897 | tryJit(() => |
| 898 | compileRootApply($ark.inPlace?.applied(this as never) ?? this) |
| 899 | ) |
| 900 | if (compiled) return (this.c.rootApply = compiled) |
| 901 | if ( |
| 902 | (this.unitFn || (canJit(this.$.cfg) && !Object.isExtensible(this))) && |
| 903 | this.isRoot() |
| 904 | ) |
| 905 | $ark.inPlace?.unbindCompiled(this as never) |
| 906 | return (this.c.rootApply = this.createRootApply()) |
| 907 | } |
| 908 | |
| 909 | protected createRootApply(): RootApply { |
| 910 | const byErrors = rootApplyRuntimeOf(this.$.cfg) |
nothing calls this directly
no test coverage detected