Use memory type for function memory

This commit is contained in:
Ian Gulliver
2021-11-16 16:21:32 -10:00
parent 012d5faecf
commit cf33a52392
2 changed files with 18 additions and 18 deletions

View File

@@ -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),
}
}