refactor: extract core objects into a standalone package
Verify databases and deploy Aster VM / verify-and-deploy (push) Successful in 7m34s

This commit is contained in:
2026-10-19 13:33:24 +08:00
parent 78fc859825
commit f77b8370ea
40 changed files with 631 additions and 202 deletions
+9 -22
View File
@@ -1,4 +1,4 @@
//! Embeddable object runtime and a small wordcode interpreter. No parser or
//! Embeddable wordcode VM backed by the independent objects crate. No parser or
//! Python language type system; wordcode is not CPython bytecode compatible.
//!
//! ```
@@ -38,30 +38,17 @@
//! # Ok::<(), endor_core::VmError>(())
//! ```
mod builtins;
mod code;
mod eval;
mod frame;
mod heap;
mod instruction;
mod number;
mod object;
mod vm;
mod vm_builtins;
pub use builtins::{
EndorBaseExceptionObject, EndorCellObject, EndorDictObject, EndorFunctionObject,
EndorStringObject, EndorTracebackEntry,
};
pub use code::{CodeLayout, EndorCode, EndorCodeObject};
pub use frame::{EndorFrame, ExecutionLimits, ExecutionLocation};
pub use heap::ObjectRef;
pub use instruction::{DecodedInstruction, Instruction, Opcode};
pub use number::{
EndorDecimal, EndorInteger, EndorNumber, EndorNumberObject, EndorRational, EndorReal,
// Preserve existing embedding imports; objects owns these definitions.
pub use objects::{
CodeLayout, CompareOp, DecodedInstruction, EndorBaseExceptionObject, EndorCellObject,
EndorCode, EndorCodeObject, EndorDecimal, EndorDictObject, EndorFunctionObject, EndorInteger,
EndorNativeCall, EndorNativeFunctionObject, EndorNumber, EndorNumberObject, EndorObject,
EndorRational, EndorReal, EndorStringObject, EndorTracebackEntry, Instruction, NativeCall,
NativeFunction, ObjectHeader, ObjectPayload, ObjectRef, Opcode, Record, Value, VmError,
};
pub use object::{
CompareOp, EndorNativeCall, EndorNativeFunctionObject, EndorObject, NativeCall, NativeFunction,
ObjectHeader, ObjectPayload, Record, Value,
};
pub use vm::{Vm, VmError};
pub use vm::Vm;