mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-28 04:09:05 +00:00
perf: reduce IO
This commit is contained in:
parent
a7dbdb7c8d
commit
9e782bef2e
5 changed files with 51 additions and 21 deletions
|
@ -27,6 +27,7 @@ use erg_common::spawn::spawn_new_thread;
|
|||
use erg_common::str::Str;
|
||||
use erg_common::traits::{ExitStatus, New, Runnable, Stream};
|
||||
|
||||
use erg_common::vfs::VFS;
|
||||
use erg_parser::ast::{ClassAttr, Expr, InlineModule, Record, RecordAttrOrIdent, VarName, AST};
|
||||
use erg_parser::build_ast::{ASTBuildable, ASTBuilder as DefaultASTBuilder};
|
||||
use erg_parser::parse::SimpleParser;
|
||||
|
@ -703,6 +704,7 @@ impl<ASTBuilder: ASTBuildable, HIRBuilder: Buildable>
|
|||
.resolve_decl_path(path, cfg)
|
||||
.or_else(|| cfg.input.resolve_real_path(path, cfg))
|
||||
};
|
||||
VFS.cache_path(cfg.input.clone(), path.to_path_buf(), resolved.clone());
|
||||
let import_path = match resolved {
|
||||
Some(path) => path,
|
||||
None if ERG_MODE => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue