Commit Graph

63 Commits (46cf5837bcd96ae7584491b6bfa2a5bf32c0de1e)

Author SHA1 Message Date
_ 46cf5837bc 🐛 bug: impl opcodes 2023-09-30 10:05:07 -05:00
_ e59dd85246 🐛 bug: impl opcodes 2023-09-30 10:01:30 -05:00
_ 1943f0a40b 🐛 bug: impl OP_ADDI 2023-09-30 09:57:51 -05:00
_ 81743108c3 🐛 bug: implement OP_MULK 2023-09-30 09:52:42 -05:00
_ 64384e7ca5 🐛 bug: fix loader using the old broken `parse_int` for instruction count 2023-09-30 09:49:36 -05:00
_ 9bfd3c64c3 ✅ tests: add failing benchmark
It doesn't even want to load the bytecode lol
2023-09-30 09:48:02 -05:00
_ 15e4832623 ➖ remove unused artifacts 2023-09-29 17:46:46 -05:00
_ 57486f7a65 🐛 bug: fma test passes with a hack
So closures are kinda working, but I'm probably missing some edge cases.
2023-09-29 17:44:54 -05:00
_ 2a0e02aec4 ✅ test: closure passing again, fma still not 2023-09-29 17:25:54 -05:00
_ 24d576879b make Debug print easier to read 2023-09-29 17:17:53 -05:00
_ 35e62027e6 🐛 bug 2023-09-29 16:58:40 -05:00
_ e499d27dfc 🚧 wip: improving debugging 2023-09-29 16:55:02 -05:00
_ a460b5a932 ♻️ refactor: hoist breakpoints out of State 2023-09-29 16:32:29 -05:00
_ a9e14d0f47 ♻️ refactor: extract a single step method for State 2023-09-29 16:27:50 -05:00
_ f0d4f25cec implement a couple more opcodes fighting the closure issue 2023-09-29 16:15:00 -05:00
_ 4da634a2aa 🚧 wip: working on closures / upvalues 2023-09-28 01:31:23 -05:00
_ 05b1d6e1f7 ⭐ loading upvalue metadata 2023-09-28 00:55:16 -05:00
_ b639d02027 remove unused file 2023-09-28 00:28:33 -05:00
_ 96c82c27c8 🐛 bug: fix long string loading and int adding
Long strings didn't work before because I hadn't implemented Lua's varint
decoding. It's an easy translation from the original C.

Int adding previously created a float because I always coerced to float.
Also an easy fix.
2023-09-28 00:27:05 -05:00
_ 5649f38698 ⭐ add OP_LEN and allow telling luac a file name
This make debugging easier, since the bytecodes will match between
a terminal and lunar_wave
2023-09-28 00:11:25 -05:00
_ 565fd19e66 📝 doc: links 2023-09-27 14:13:56 -05:00
_ fe2bb4cca2 📝 doc 2023-09-27 14:12:48 -05:00
_ d9bba9fc07 📝 doc: make it obvious that LWVM only handles bytecode for now 2023-09-27 14:12:29 -05:00
_ af49dc68be 📝 doc 2023-09-27 14:06:54 -05:00
_ 2d309c37bf 🐛 bug: spaces in filename 2023-09-27 14:05:03 -05:00
_ 57992e6bd4 📝 doc: license 2023-09-27 14:03:21 -05:00
_ 5c4a545369 📝 doc: roadmap 2023-09-27 13:58:37 -05:00
_ bebc96916b ⭐ allow Lua to call native Rust functions
And Value::BogusPrint is gone. So the only Bogus remaining is closures.
2023-09-27 01:46:53 -05:00
_ 5ab30ac5b4 ♻️ refactor: remove special types BogusArg and BogusEnv
This is a milestone towards actually implementing all of Lua.
2023-09-26 23:19:33 -05:00
_ 062c6e6a2d 🐛 bug: fix loader bug 2023-09-26 23:19:12 -05:00
_ 2f676adc19 ⭐ FizzBuzz with some caveats 2023-09-26 22:45:41 -05:00
_ 9811d265f6 ⭐ for loops with integer counters counting up only 2023-09-26 22:34:47 -05:00
_ fcfd9397ff 🐛 bug: switch to RefCell so some more of the tables tests will pass 2023-09-26 22:03:37 -05:00
_ 0d5e1098bc ✅ test: found a bug in my tables impl 2023-09-26 20:47:47 -05:00
_ 1d813b0f44 ✅ test: add tables test 2023-09-26 20:41:47 -05:00
_ 9d29aeb43b ⭐ tables are working okay
Still missing a lot of stuff. And I'm pretty sure the Rc handling code
is totally wrong.

And they don't have the Lua 5.0 optimization of an internal array,
but that's probably easy to put in.
2023-09-26 20:31:00 -05:00
_ 79e9df852c ♻️ refactor: remove unused fn 2023-09-26 16:50:29 -05:00
_ 448ecc08d2 ♻️ refactor: extract module 2023-09-26 16:48:01 -05:00
_ 5466e6ec56 ♻️ refactor: make register access easier to read 2023-09-26 16:45:04 -05:00
_ 2bd1ff3d59 ♻️ refactor impl Display for Value 2023-09-26 15:57:23 -05:00
_ 72b2d6e656 ⭐ can create an empty table 2023-09-26 15:49:12 -05:00
_ e12d749c7c ♻️ refactor: extract value module 2023-09-26 14:41:10 -05:00
_ 693efa47bd impl Hash for Value 2023-09-26 14:38:38 -05:00
_ 8d80ebc052 ⭐ add integers 2023-09-26 14:23:57 -05:00
_ e87265373c 🐛 bug: shrank the Value size to 16 bytes
This is a little pre-mature, since it's still in the "make it work"
phase of "make it work, make it fast, make it pretty".

But it was bugging me, and I'd have to ditch the raw strings and vecs
some day to add a GC anyway.
2023-09-26 14:10:57 -05:00
_ f29eaac1d0 ✅ test: measure size of my Value compared to PUC Lua
(mine's bigger sadly, like 40 bytes)
2023-09-26 14:00:11 -05:00
_ bc15781457 🐛 bug: fix up printing to mostly match PUC Lua
The numbers are still off, since I didn't separate floats and ints yet
2023-09-26 13:46:01 -05:00
_ 7b1fb49775 use luac in `main` 2023-09-26 13:33:59 -05:00
_ d9469b4440 ♻️ refactor: invoke luac during tests so I don't have to version artifacts 2023-09-26 12:04:17 -05:00
_ 0d88653c21 ⭐ the nested functions thing is working, though I wish I didn't have to use recursion 2023-09-25 03:05:00 -05:00