[fine] Classes!

It's kinda amazing this works actually
This commit is contained in:
John Doty 2024-01-20 11:03:33 -08:00
parent 0ee89bf26b
commit 4505996710
5 changed files with 319 additions and 40 deletions

View file

@ -9,5 +9,34 @@ fun test() -> f64 {
z
}
// @ignore
// @no-errors
// @eval: Float(7.0)
// @compiles-to:
// | function << module >> (0 args, 0 locals):
// | strings (0):
// | code (2):
// | 0: PushNothing
// | 1: Return
// | function Point (4 args, 0 locals):
// | strings (1):
// | 0: Point
// | code (5):
// | 0: LoadArgument(1)
// | 1: LoadArgument(0)
// | 2: PushString(0)
// | 3: NewObject(2)
// | 4: Return
// | function test (0 args, 2 locals):
// | strings (0):
// | code (10):
// | 0: PushFloat(23.0)
// | 1: PushFloat(7.0)
// | 2: LoadFunction(1)
// | 3: Call(2)
// | 4: StoreLocal(0)
// | 5: LoadLocal(0)
// | 6: LoadSlot(0)
// | 7: StoreLocal(1)
// | 8: LoadLocal(1)
// | 9: Return
// |