refactor: 引入 Arena 内存池并优化指令分发,为类型系统重构做准备

This commit is contained in:
2026-03-08 15:59:55 +08:00
parent 91e4eb734e
commit 90448006ff
13 changed files with 301 additions and 36 deletions

View File

@@ -33,6 +33,41 @@ namespace Fig
{
return tag == TypeTag::Any;
}
bool isNull() const
{
return tag == TypeTag::Null;
}
bool isInt() const
{
return tag == TypeTag::Int;
}
bool isDouble() const
{
return tag == TypeTag::Double;
}
bool isBool() const
{
return tag == TypeTag::Bool;
}
bool isString() const
{
return tag == TypeTag::String;
}
bool isFunction() const
{
return tag == TypeTag::Function;
}
bool isStruct() const
{
return tag == TypeTag::Struct;
}
};
// 全局唯一类型驻留池