Skip to main content

shape_runtime/
content_methods.rs

1//! Content method dispatch for ContentNode instance methods.
2//!
3//! Phase 1.B (ADR-006 §2.7.4 audit-accuracy ruling): the pre-bulldozer
4//! method handlers decoded `&ValueWord` arguments via tag-bit dispatch
5//! (`as_str()`, `as_f64()`, `as_content_ref()`, etc.) and constructed
6//! results via `ValueWord::from_content`. The kind-threaded rebuild
7//! lands in Phase 2c alongside the broader content-tree marshalling
8//! migration. Until then, the dispatcher returns `None` for every
9//! method name (so callers fall through to the generic
10//! "method not found" error path) and the helper signatures are
11//! retained at the [`KindedSlot`] shape per ADR-006 §2.7.5.
12//!
13//! shape-vm consumers (`vm_impl/builtins.rs`) call these handlers
14//! directly and break in the next-session shape-vm cleanup workstream
15//! per ADR-006 §2.7.5. Phase 1.B does not preserve the legacy
16//! `ValueWord` signature on the runtime side just to keep shape-vm
17//! compiling through this session.
18
19use shape_ast::error::Result;
20use shape_value::KindedSlot;
21
22/// Look up and call a content method by name.
23///
24/// Phase 1.B: returns `None` for every method name; the kind-threaded
25/// dispatcher lands in Phase 2c. shape-vm consumers will see the
26/// "method not found" path until the rebuild.
27pub fn call_content_method(
28    _method_name: &str,
29    _receiver: KindedSlot,
30    _args: Vec<KindedSlot>,
31) -> Option<Result<KindedSlot>> {
32    None
33}