feat: replace special-cased block call method with primitive and remove source length parameter

Remove the `sourceLength` field from the parser and `compile()` signature, switching to null-terminated strings read by `readFile()`. Replace the special `METHOD_CALL` method type with a `block_call` primitive that invokes `callBlock()` on the fiber, and move the `Fiber` and `CallFrame` structs into the public header so primitives can access them. Add a test for block calling via the new primitive.
This commit is contained in:
Bob Nystrom
2013-11-05 15:56:59 +00:00
parent 074deebdfd
commit 86158193b3
7 changed files with 108 additions and 85 deletions
+1
View File
@@ -0,0 +1 @@
io.write({ 123 }.call) // expect: 123