Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Frame ¶
type Frame struct {
IP int
Vars map[string]value.Value // Local scope
Fn *value.Lambda // Hàm đang được thực thi
Defers []*value.Lambda // Deferred functions
}
Frame đại diện cho một khung thực thi (Activation Record)
type VM ¶ added in v0.1.2
type VM struct {
Bytecode []byte
Constants []value.Value
Stack []value.Value
Vars map[string]value.Value // Biến của từng Request (Cho phép ghi)
Globals map[string]value.Value // Chung cho toàn bộ Host (Chỉ đọc)
Builtins []value.Value // Mảng các hàm hệ thống (Siêu nhanh - Index lookup)
Frames []Frame // Call Stack
FrameIdx int // Hiện tại đang ở Frame nào
Energy uint64 // Năng lượng tiêu thụ
MaxEnergy uint64 // Giới hạn năng lượng
SourceMap []int32 // Bản đồ dòng lệnh nguồn (IP -> Line)
Spawner func(s *value.Lambda)
}
func (*VM) ExecuteLambda ¶ added in v0.1.2
Click to show internal directories.
Click to hide internal directories.