Fix VM memory allocation optimizations by reducing what we allocate on the heap
Some checks failed
Build / build (push) Successful in 10m25s
Publish Image / publish (push) Failing after 39s
Test / build (push) Successful in 11m19s

This commit is contained in:
Charles Smith
2024-03-31 20:44:50 -04:00
parent a85dc73954
commit aebbe43999
61 changed files with 383 additions and 370 deletions

View File

@@ -1220,16 +1220,16 @@ func testConstants2(t *testing.T, expected []interface{}, actual []object.Object
)
case string:
assert.Equal(constant, actual[i].(*object.String).Value)
assert.Equal(constant, actual[i].(object.String).Value)
case int:
assert.Equal(int64(constant), actual[i].(*object.Integer).Value)
assert.Equal(int64(constant), actual[i].(object.Integer).Value)
}
}
}
func testIntegerObject(expected int64, actual object.Object) interface{} {
result, ok := actual.(*object.Integer)
result, ok := actual.(object.Integer)
if !ok {
return fmt.Errorf("object is not Integer. got=%T (%+v", actual, actual)
}
@@ -1242,7 +1242,7 @@ func testIntegerObject(expected int64, actual object.Object) interface{} {
}
func testStringObject(expected string, actual object.Object) error {
result, ok := actual.(*object.String)
result, ok := actual.(object.String)
if !ok {
return fmt.Errorf("object is not String. got %T (%+v", actual, actual)
}