Skip to content

Commit 1aecf9f

Browse files
committed
update gc
1 parent f04aa7f commit 1aecf9f

File tree

2 files changed

+529
-63
lines changed

2 files changed

+529
-63
lines changed

crates/luars/src/gc/gc_id.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub struct ThreadId(pub u32);
2828
/// Object type tags (3 bits, supports up to 8 types)
2929
#[repr(u8)]
3030
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
31-
pub enum GcType {
31+
pub enum GcObjectType {
3232
String = 0,
3333
Table = 1,
3434
Function = 2,
@@ -52,14 +52,14 @@ pub enum GcId {
5252

5353
impl GcId {
5454
#[inline(always)]
55-
pub fn gc_type(self) -> GcType {
55+
pub fn gc_type(self) -> GcObjectType {
5656
match self {
57-
GcId::StringId(_) => GcType::String,
58-
GcId::TableId(_) => GcType::Table,
59-
GcId::FunctionId(_) => GcType::Function,
60-
GcId::UpvalueId(_) => GcType::Upvalue,
61-
GcId::ThreadId(_) => GcType::Thread,
62-
GcId::UserdataId(_) => GcType::Userdata,
57+
GcId::StringId(_) => GcObjectType::String,
58+
GcId::TableId(_) => GcObjectType::Table,
59+
GcId::FunctionId(_) => GcObjectType::Function,
60+
GcId::UpvalueId(_) => GcObjectType::Upvalue,
61+
GcId::ThreadId(_) => GcObjectType::Thread,
62+
GcId::UserdataId(_) => GcObjectType::Userdata,
6363
}
6464
}
6565

0 commit comments

Comments
 (0)