Fix VM memory allocation optimizations by reducing what we allocate on the heap
This commit is contained in:
@@ -15,7 +15,7 @@ func HashOf(args ...object.Object) object.Object {
|
||||
}
|
||||
|
||||
if hash, ok := args[0].(object.Hashable); ok {
|
||||
return &object.Integer{Value: int64(hash.HashKey().Value)}
|
||||
return object.Integer{Value: int64(hash.HashKey().Value)}
|
||||
}
|
||||
|
||||
return newError("TypeError: hash() expected argument #1 to be hashable")
|
||||
|
||||
Reference in New Issue
Block a user