()
| 21876 | return await this._fuseRequest |
| 21877 | } |
| 21878 | async _singlePassFuse() { |
| 21879 | const { fileSystem, filePath, codeAtStart } = this |
| 21880 | if (codeAtStart !== undefined) { |
| 21881 | await this.scrollProgram.appendFromStream(codeAtStart) |
| 21882 | } else { |
| 21883 | if (!(await fileSystem.exists(filePath))) { |
| 21884 | this.exists = false |
| 21885 | this.isFused = true |
| 21886 | return this |
| 21887 | } |
| 21888 | this.timestamp = await fileSystem.getCTime(filePath) |
| 21889 | const stream = await fileSystem.createReadStream(filePath) |
| 21890 | await this.scrollProgram.appendFromStream(stream) |
| 21891 | } |
| 21892 | this.scrollProgram.wake() |
| 21893 | // What happens if we encounter a new parser? |
| 21894 | // very frequently if we encounter 1 parser we will encounter a sequence of parsers so |
| 21895 | // perhaps on wake, for now, we switch into collecting parsers mode |
| 21896 | // and then when we hit a non parser, only at that moment do we recompile the parsers |
| 21897 | } |
| 21898 | } |
| 21899 | let scrollFileSystemIdNumber = 0 |
| 21900 | class ScrollFileSystem { |
no test coverage detected