Commit Graph

27 Commits

Author SHA1 Message Date
58e4d26648 "IO" -> "System".
Get rid of the separate opt-in IO class and replace it with a core
System class.

- Remove wren_io.c, wren_io.h, and io.wren.
- Remove the flags that disable it.
- Remove the overloads for print() with different arity. (It was an
  experiment, but I don't think it's that useful.)
- Remove IO.read(). That will reappear using libuv in the CLI at some
  point.
- Remove IO.time. Doesn't seem to have been used.
- Update all of the tests, docs, etc.

I'm sorry for all the breakage this causes, but I think "System" is a
better name for this class (it makes it natural to add things like
"System.gc()") and frees up "IO" for referring to the CLI's IO module.
2015-09-15 07:46:09 -07:00
2b044666ee Reorganize trailing comma code a bit.
- Split out syntax error tests.
- Avoid redundant handling of empty literals.
2015-08-31 07:23:36 -07:00
556af50f83 Revise low level fiber semantics to play nicer with schedulers.
Now that I'm starting to write a real async scheduler on top of Wren's
basic fiber API, I have a better feel for what it needs. It turns out
run() is not it.

- Remove run() methods.
- Add transfer() which leaves the caller of the invoked fiber alone.
- Add suspend() to return control to the host application.
- Add Timer.schedule() to start a new independently scheduled fiber.
- Change Timer.sleep() so that it only transfers control to explicitly
  scheduled fibers, not any one.
2015-08-30 22:15:37 -07:00
9845ed5126 Tests for Timer.sleep(). 2015-08-08 07:17:30 -07:00
bc822cd4c7 Merge branch 'master' into constructor-methods 2015-07-19 12:49:23 -07:00
6ece2c173b More test runner fixes. 2015-07-19 10:31:55 -07:00
1b27d556e0 Fix bug in test runner. 2015-07-19 09:33:00 -07:00
5fb6186d7d Make constructors just methods.
* Eliminate "new" reserved word.
* Allow "this" before a method definition to define a constructor.
* Only create a default constructor for classes that don't define one.
2015-07-10 09:18:22 -07:00
fa8ac84a8b Fix broken test runner (!).
If a test expected an error and found at least one, it would not fail
on any other expected errors that didn't occur.

Also, some tests were expecting a compile time error message even though
the test script doesn't validate those (yet).

The test function was getting monolithic, so I went ahead and split it
into a separate little class.
2015-07-09 08:06:33 -07:00
6c135e9941 Show number of expectations in test output. 2015-05-24 09:45:52 -07:00
7084d6bfd5 Add infrastructure to test embedding API. 2015-05-24 09:23:30 -07:00
5ad94fb4da Add ignored to walk() in test.py to clean up list of test dirs. 2015-05-21 09:17:40 -05:00
fc7612c843 Run examples as tests. Would have prevented #266 2015-05-20 10:10:40 -05:00
a937bd1cf9 Adds a Meta library with an eval function for interpreting code inline. 2015-03-22 14:17:02 -07:00
64eccdd9be Reorganize tests and benchmark scripts.
Mainly to get rid of one top level directory. But this will
also be useful when there are tests of the embedding API.
2015-03-14 12:45:56 -07:00
d1b48a7213 Ugh, fix test script. 2015-03-14 09:49:55 -07:00
db9e5737f6 Handle malformed UTF-8 output in test runner.
Thanks, Michel!
2015-03-14 08:47:31 -07:00
3ff56d48ee Normalize path handling on Windows in test script. 2015-03-13 07:26:23 -07:00
8408e862a3 Clean up the test script a bit. 2015-02-27 07:22:27 -08:00
a8a5805895 Fix test script. 2015-02-22 10:42:21 -08:00
e3ccb68c79 Get main.c and compiler compiling as C++. 2015-01-15 15:59:14 -08:00
1d9445d9bc Tests for IO.read(). 2015-01-11 21:47:29 -08:00
ca9b399d56 Make Python scripts Python 2 and 3 compatible. An alternative to #71. 2015-01-05 20:09:23 -06:00
6b510da872 Get Travis set up. 2015-01-02 08:13:51 -08:00
f03895b17e Symmetric coroutines! 2014-04-14 07:23:05 -07:00
d146018559 Convert all fns to block arg syntax. 2014-04-02 19:41:53 -07:00
96d728cc5d Reorganize makefile and scripts. 2014-01-23 23:29:50 -08:00