Commit Graph

12 Commits

Author SHA1 Message Date
1d9445d9bc Tests for IO.read(). 2015-01-11 21:47:29 -08:00
db082967f4 Minor cleanup and refactoring. 2014-04-06 18:59:53 -07:00
e9ee4eb147 Add FFI support for returning strings and null. 2014-02-05 06:30:20 -08:00
36df70dba1 Move IO into a separate module. 2014-02-04 08:44:59 -08:00
ba06a4fd8a Define error type enum. 2014-02-03 06:51:44 -08:00
092107742d hack unused-value warning on POP() to pass build 2014-02-02 01:12:52 +08:00
48db3a9620 Start adding support for runtime errors:
- Primitives can now signal an error.
- An error prints a callstack and ends the current (and right 
  now only) fiber.
- Arithmetic operators error if the operand is not a number.
- Real error for method not found.
- Associate source file name, and method names with functions.
- Debug line number info for functions.

Unfortunately, this regresses perf on fib about 15%, mostly
because of the better checking in arithmetic ops.

There's still a bunch of clean up to do, but this is a big step
in the right direction.
2014-01-01 13:25:24 -08:00
63d1255566 Start sketching in the FFI. 2013-12-29 10:06:35 -08:00
315ed1c425 Make heap usage configurable. 2013-12-20 07:41:35 -08:00
7fe60499db Get rid of my name from TODOs. Anyone can do them. 2013-12-14 15:28:18 -08:00
5c807c0ec5 Track memory during deallocation correctly.
It used to subtract the number of bytes during deallocation, but
that required knowing the size of an object at free time. That
isn't always available. The old code could read a freed object
while doing this. Bad!

Instead, this tracks how much memory is still being used by
marked objects. It's correct, and is also a bit less code and
faster.
2013-12-14 14:17:16 -08:00
af6b73208c Start defining actual API for embedding Wren. 2013-11-25 07:47:02 -08:00