docs(core): explain frame roots and suspended execution states
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
//! compiler 和宿主导入的 VM 公共入口;对象表示与堆操作从 objects 重导出,避免维护第二套类型。
|
||||
//! 两段示例分别展示显式根生命周期和直接执行已验证指令,文档测试使用同一公开 API。
|
||||
//! Embeddable wordcode VM backed by the independent objects crate. No parser or
|
||||
//! Python language type system; wordcode is not CPython bytecode compatible.
|
||||
//!
|
||||
@@ -38,14 +40,19 @@
|
||||
//! # Ok::<(), endor_core::VmError>(())
|
||||
//! ```
|
||||
|
||||
// 指令求值、调用准备、暂停/协程与根清理的内部实现。
|
||||
mod eval;
|
||||
// 执行帧、预算、回溯与进度状态结构;不定义另一套对象堆。
|
||||
mod frame;
|
||||
// VM 持有 Store 与执行状态,并提供宿主访问门面。
|
||||
mod vm;
|
||||
|
||||
// 公开执行观察和进度类型,内部 Coroutine 载荷状态不导出。
|
||||
pub use frame::{
|
||||
CoroutineProgress, EndorFrame, ExecutionLimits, ExecutionLocation, ExecutionProgress,
|
||||
};
|
||||
// Preserve existing embedding imports; objects owns these definitions.
|
||||
// 独立存储入口来自 objects,宿主可不创建求值器就使用。
|
||||
pub use objects::ObjectStore;
|
||||
pub use objects::{
|
||||
AnnotationType, AwaitPoll, ClassField, EndorTraitObject, EndorTypeObject, MethodRequirement,
|
||||
@@ -61,4 +68,5 @@ pub use objects::{
|
||||
NativeResult, ObjectChange, ObjectHeader, ObjectPayload, ObjectRef, Opcode, ReadAccess,
|
||||
ReadDependency, ReadSet, Record, SourceSignature, TrackedReads, Value, VmError, WeakObjectRef,
|
||||
};
|
||||
// 嵌入方启动/恢复调用和访问对象的主要入口。
|
||||
pub use vm::Vm;
|
||||
|
||||
Reference in New Issue
Block a user