Fix VM memory allocation optimizations by reducing what we allocate on the heap
This commit is contained in:
@@ -27,8 +27,8 @@ func Pow(args ...object.Object) object.Object {
|
||||
return newError(err.Error())
|
||||
}
|
||||
|
||||
x := args[0].(*object.Integer)
|
||||
y := args[1].(*object.Integer)
|
||||
x := args[0].(object.Integer)
|
||||
y := args[1].(object.Integer)
|
||||
value := pow(x.Value, y.Value)
|
||||
return &object.Integer{Value: value}
|
||||
return object.Integer{Value: value}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user