chore: cleanup

This commit is contained in:
2025-06-08 00:59:31 +08:00
parent 0fd846e844
commit 3797544fc2
25 changed files with 1028 additions and 1481 deletions

View File

@@ -1,12 +1,11 @@
use ecow::EcoString;
use hashbrown::HashMap;
use crate::ty::common::Const;
use crate::ir::{DowngradeContext, Ir};
use crate::ir::{DowngradeContext, Ir, Const};
pub fn ir_env(ctx: &mut DowngradeContext) -> HashMap<usize, Ir> {
pub fn ir_env(ctx: &mut DowngradeContext) -> HashMap<EcoString, Ir> {
let mut map = HashMap::new();
map.insert(ctx.new_sym("true"), ctx.new_const(Const::Bool(true)).ir());
map.insert(ctx.new_sym("false"), ctx.new_const(Const::Bool(false)).ir());
map.insert("true".into(), Const::from(true).ir());
map.insert("false".into(), Const::from(false).ir());
map
}