refactor(print): remove HostOp::Print and legacy formatting (Compat-C)
- Delete HostOp::Print and StdHost::op_print; the print builtin only routes to bundled io.写值 when Program.print_override is set, otherwise returns a structured kernel.unavailable error (ADR-0031). - Keep the 打印/print builtin name for arity/static validation; Value::display remains only for CLI result rendering, not print execution. - Teach the direct-runtime semantic harness to mirror loader stdlib injection and import edges; replace runtime tests that used print with non-print effects. - Update spec/security/status/changelog/README, add ADR-0031 and evidence. Gate: fmt, clippy -D warnings, 419 tests passed.
This commit is contained in:
1 parent
e26971f489
commit
49910ece43
16 files changed
+304
-56
No files matched your search
@@ -27,10 +27,15 @@ pub(crate) fn dispatch(
|
||||
let module = frame.module().clone();
|
||||
match builtin.name {
|
||||
"打印" => {
|
||||
let value = take(&bound, "值", builtin, span)?;
|
||||
interpreter
|
||||
.host_invoke(HostOp::Print, vec![value], span, &module)
|
||||
.map(|_| Value::Unit)
|
||||
// Compat-C (ADR-0031): the legacy HostOp::Print path is gone. On
|
||||
// the official CLI the loader routes 打印/print to stdlib io.写值;
|
||||
// reaching this builtin means the verified bundle was unavailable.
|
||||
let _ = take(&bound, "值", builtin, span)?;
|
||||
Err(RuntimeError::new(
|
||||
ErrorCategory::KernelUnavailable,
|
||||
span,
|
||||
"打印 requires the bundled stdlib print module; install the official CLI bundle",
|
||||
))
|
||||
}
|
||||
"长度" => {
|
||||
let value = take(&bound, "值", builtin, span)?;
|
||||
|
||||
Reference in new issue
Block a user