88// 5. Free list for slot reuse
99// 6. GC headers embedded in objects for mark-sweep
1010
11+ use crate :: gc:: gc_object:: { CFunction , FunctionBody } ;
1112use crate :: lua_value:: { Chunk , LuaThread , LuaUserdata } ;
1213use crate :: {
1314 FunctionId , GcFunction , GcHeader , GcString , GcTable , GcThread , GcUpvalue , LuaString , LuaTable ,
1415 LuaValue , StringId , TableId , ThreadId , UpvalueId , UpvalueState , UserdataId ,
1516} ;
16- use crate :: gc:: gc_object:: { FunctionBody , CFunction } ;
1717use std:: rc:: Rc ;
1818
1919// ============ Pool Storage ============
@@ -397,12 +397,12 @@ pub struct ObjectPool {
397397 pub tm_shr : StringId , // "__shr"
398398 pub tm_concat : StringId , // "__concat"
399399 pub tm_metatable : StringId , // "__metatable"
400-
400+
401401 // Pre-cached coroutine status strings for fast coroutine.status
402- pub str_suspended : StringId , // "suspended"
403- pub str_running : StringId , // "running"
404- pub str_normal : StringId , // "normal"
405- pub str_dead : StringId , // "dead"
402+ pub str_suspended : StringId , // "suspended"
403+ pub str_running : StringId , // "running"
404+ pub str_normal : StringId , // "normal"
405+ pub str_dead : StringId , // "dead"
406406}
407407
408408// ============ Lua-style String Interning Table ============
@@ -668,7 +668,7 @@ impl ObjectPool {
668668 pool. tm_shr = pool. create_string ( "__shr" ) ;
669669 pool. tm_concat = pool. create_string ( "__concat" ) ;
670670 pool. tm_metatable = pool. create_string ( "__metatable" ) ;
671-
671+
672672 // Pre-create coroutine status strings
673673 pool. str_suspended = pool. create_string ( "suspended" ) ;
674674 pool. str_running = pool. create_string ( "running" ) ;
@@ -1036,7 +1036,7 @@ impl ObjectPool {
10361036 } ;
10371037 FunctionId ( self . functions . alloc ( gc_func) )
10381038 }
1039-
1039+
10401040 /// Create a C closure (native function with upvalues)
10411041 #[ inline]
10421042 pub fn create_c_closure ( & mut self , func : CFunction , upvalue_ids : Vec < UpvalueId > ) -> FunctionId {
@@ -1047,7 +1047,7 @@ impl ObjectPool {
10471047 } ;
10481048 FunctionId ( self . functions . alloc ( gc_func) )
10491049 }
1050-
1050+
10511051 /// Create a C closure with single inline upvalue (fast path)
10521052 /// This avoids UpvalueId allocation for common single-upvalue C closures
10531053 #[ inline]
0 commit comments