public: publish selfhost snapshot to public repo (SSOT using + AST merge + JSON VM fixes)
- SSOT using profiles (aliases/packages via nyash.toml), AST prelude merge - Parser/member guards; Builder pin/PHI and instance→function rewrite (dev on) - VM refactors (handlers split) and JSON roundtrip/nested stabilization - CURRENT_TASK.md updated with scope and acceptance criteria Notes: dev-only guards remain togglable via env; no default behavior changes for prod.
This commit is contained in:
@ -387,7 +387,10 @@ pub extern "C" fn nyrt_host_call_slot(
|
||||
crate::backend::vm::VMValue::String(s) => {
|
||||
Some(crate::value::NyashValue::String(s))
|
||||
}
|
||||
crate::backend::vm::VMValue::BoxRef(_) => None,
|
||||
crate::backend::vm::VMValue::BoxRef(_b) => {
|
||||
// Do not store BoxRef into unified map in this minimal host path
|
||||
None
|
||||
}
|
||||
_ => None,
|
||||
};
|
||||
if let Some(nv) = nv_opt {
|
||||
|
||||
@ -33,8 +33,13 @@ pub fn extern_call(
|
||||
fn handle_console(method_name: &str, args: &[Box<dyn NyashBox>]) -> BidResult<Option<Box<dyn NyashBox>>> {
|
||||
match method_name {
|
||||
"log" => {
|
||||
let trace = std::env::var("NYASH_CONSOLE_TRACE").ok().as_deref() == Some("1");
|
||||
for a in args {
|
||||
println!("{}", a.to_string_box().value);
|
||||
let s = a.to_string_box().value;
|
||||
if trace {
|
||||
eprintln!("[console.trace] len={} text=<{:.64}>", s.len(), s);
|
||||
}
|
||||
println!("{}", s);
|
||||
}
|
||||
Ok(None)
|
||||
}
|
||||
@ -259,4 +264,4 @@ mod tests {
|
||||
let result = extern_call("unknown.interface", "method", &args);
|
||||
assert!(matches!(result, Err(BidError::PluginError)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user