Make memory sizes parameters
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
package vm
|
||||
|
||||
const FunctionMemorySize = 16
|
||||
|
||||
type stackFrame struct {
|
||||
previousFunctionIndex int64
|
||||
previousInstructionIndex int64
|
||||
@@ -12,6 +10,6 @@ func newStackFrame(state *State) *stackFrame {
|
||||
return &stackFrame{
|
||||
previousFunctionIndex: state.functionIndex,
|
||||
previousInstructionIndex: state.instructionIndex,
|
||||
functionMemory: NewMemory(FunctionMemorySize),
|
||||
functionMemory: NewMemory(state.program.FunctionMemorySize),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user