Files
subcoding/vm/stackframe.go

16 lines
385 B
Go
Raw Permalink Normal View History

2021-11-15 20:44:26 -10:00
package vm
2021-11-16 15:39:12 -10:00
type stackFrame struct {
previousFunctionIndex int64
previousInstructionIndex int64
2021-11-18 17:53:38 -10:00
functionMemory *Memory
2021-11-16 16:21:32 -10:00
}
func newStackFrame(state *State) *stackFrame {
return &stackFrame{
previousFunctionIndex: state.functionIndex,
previousInstructionIndex: state.instructionIndex,
2021-11-20 18:27:06 -10:00
functionMemory: NewMemory(state.program.FunctionMemorySize),
2021-11-16 16:21:32 -10:00
}
2021-11-15 20:44:26 -10:00
}