| 858 | // keeps what compiled, as a detached reference can call this after |
| 859 | let compiled: BaseNode["allows"] | undefined |
| 860 | const wrapper: BaseNode["allows"] = data => { |
| 861 | if (compiled !== undefined) return compiled(data) |
| 862 | if (this.c.preJit) { |
| 863 | if (this.checksUncompiled) { |
| 864 | this.c.usedPreJit = true |
| 865 | return allows(data) |
| 866 | } |
| 867 | this.$.jit(this) |
| 868 | } |
| 869 | // if the node was frozen before jit ran, this.allows wasn't overwritten |
| 870 | return (compiled = this.allows === wrapper ? allows : this.allows)(data) |
| 871 | } |
| 872 | this.allows = wrapper |
| 873 | } |
| 874 | |