mirror of
https://github.com/erg-lang/erg.git
synced 2025-10-02 21:44:34 +00:00
chore: eliminate thread_local!
This commit is contained in:
parent
d6f30924f1
commit
393a018fb9
5 changed files with 63 additions and 84 deletions
|
@ -15,6 +15,7 @@ use std::path::PathBuf;
|
|||
use erg_common::config::ErgConfig;
|
||||
use erg_common::consts::{DEBUG_MODE, ERG_MODE, PYTHON_MODE};
|
||||
use erg_common::dict;
|
||||
use erg_common::env::erg_std_decl_path;
|
||||
use erg_common::error::Location;
|
||||
#[allow(unused_imports)]
|
||||
use erg_common::log;
|
||||
|
@ -515,10 +516,6 @@ pub fn builtins_path() -> PathBuf {
|
|||
erg_common::env::erg_pystd_path().join("builtins.d.er")
|
||||
}
|
||||
|
||||
pub fn std_decl_path() -> PathBuf {
|
||||
erg_common::env::erg_std_decl_path()
|
||||
}
|
||||
|
||||
impl Context {
|
||||
fn register_builtin_decl(
|
||||
&mut self,
|
||||
|
@ -667,7 +664,7 @@ impl Context {
|
|||
let module = if &self.name[..] == "<builtins>" {
|
||||
builtins_path()
|
||||
} else {
|
||||
std_decl_path().join(format!("{}.d.er", self.name))
|
||||
erg_std_decl_path().join(format!("{}.d.er", self.name))
|
||||
};
|
||||
let abs_loc = AbsLocation::new(Some(module), loc);
|
||||
self.register_builtin_impl(name, t, muty, vis, py_name, abs_loc);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue