refactor(builder): route debug logs via trace
This commit is contained in:
@ -39,17 +39,19 @@ impl super::MirBuilder {
|
||||
.as_deref()
|
||||
== Some("1")
|
||||
{
|
||||
let trace = crate::mir::builder::control_flow::joinir::trace::trace();
|
||||
// NamingBox SSOT: Use encode_static_method for main/arity entry
|
||||
let func_name =
|
||||
crate::mir::naming::encode_static_method(&box_name, "main", params.len());
|
||||
eprintln!(
|
||||
"[DEBUG] build_static_main_box: Before lower_static_method_as_function"
|
||||
trace.stderr_if(
|
||||
"[DEBUG] build_static_main_box: Before lower_static_method_as_function",
|
||||
true,
|
||||
);
|
||||
eprintln!("[DEBUG] params.len() = {}", params.len());
|
||||
eprintln!("[DEBUG] body.len() = {}", body.len());
|
||||
eprintln!(
|
||||
"[DEBUG] variable_map = {:?}",
|
||||
self.variable_ctx.variable_map
|
||||
trace.stderr_if(&format!("[DEBUG] params.len() = {}", params.len()), true);
|
||||
trace.stderr_if(&format!("[DEBUG] body.len() = {}", body.len()), true);
|
||||
trace.stderr_if(
|
||||
&format!("[DEBUG] variable_map = {:?}", self.variable_ctx.variable_map),
|
||||
true,
|
||||
);
|
||||
// Note: Metadata clearing is now handled by BoxCompilationContext (箱理論)
|
||||
// See lifecycle.rs and builder_calls.rs for context swap implementation
|
||||
@ -58,12 +60,13 @@ impl super::MirBuilder {
|
||||
params.clone(),
|
||||
body.clone(),
|
||||
);
|
||||
eprintln!(
|
||||
"[DEBUG] build_static_main_box: After lower_static_method_as_function"
|
||||
trace.stderr_if(
|
||||
"[DEBUG] build_static_main_box: After lower_static_method_as_function",
|
||||
true,
|
||||
);
|
||||
eprintln!(
|
||||
"[DEBUG] variable_map = {:?}",
|
||||
self.variable_ctx.variable_map
|
||||
trace.stderr_if(
|
||||
&format!("[DEBUG] variable_map = {:?}", self.variable_ctx.variable_map),
|
||||
true,
|
||||
);
|
||||
}
|
||||
// Initialize local variables for Main.main() parameters
|
||||
|
||||
Reference in New Issue
Block a user