feat: 为内核构造、BuiltinWorld 初始化、ShapeForge/StringForge/CodeForge 添加结构化日志

This commit is contained in:
爱特每羊队
2026-06-26 21:09:36 +08:00
parent b986a8f229
commit b2dd7387a6
8 changed files with 45 additions and 5 deletions
+3 -1
View File
@@ -4,7 +4,7 @@ use std::sync::{Arc, RwLock};
use dashmap::DashMap;
use crate::kernel_debug;
use crate::{kernel_debug, kernel_trace};
pub type ShapeId = u32;
pub type StringIndex = u32;
@@ -83,6 +83,8 @@ impl ShapeForge {
pub fn make_shape(&self, parent_id: ShapeId, prop_name: StringIndex) -> ShapeId {
let key = Self::pack_key(parent_id, prop_name);
kernel_trace!("ShapeForge lookup: parent={} prop={}", parent_id, prop_name);
if let Some(entry) = self.transitions.get(&key) {
kernel_debug!("ShapeForge transition cached parent={} prop={} -> id={}", parent_id, prop_name, *entry);
return *entry;