Use memory type for function memory
This commit is contained in:
@@ -1,9 +1,15 @@
|
||||
package vm
|
||||
|
||||
const functionMemoryEntries = 16
|
||||
|
||||
type stackFrame struct {
|
||||
previousFunctionIndex int64
|
||||
previousInstructionIndex int64
|
||||
functionMemory [functionMemoryEntries]uint64
|
||||
functionMemory *memory
|
||||
}
|
||||
|
||||
func newStackFrame(state *State) *stackFrame {
|
||||
return &stackFrame{
|
||||
previousFunctionIndex: state.functionIndex,
|
||||
previousInstructionIndex: state.instructionIndex,
|
||||
functionMemory: newMemory(16),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user