Commit Graph

10 Commits

Author SHA1 Message Date
6c3aa85228 Make IO a static class instead of a singleton. 2013-12-21 19:25:09 -08:00
f2b036420d Fix a bunch of test TODOs.
- Added a bunch of tests.
- Removed some TODOs for stuff that's already done.
- Made list literals handle newlines better.
2013-12-20 12:42:11 -08:00
f9099791a1 Add another test for constructor syntax. 2013-12-19 09:10:45 -08:00
4d67f2270a Use more conventional syntax for constructors.
They are now invoked like "new Foo".
Also, superclass constructors are now much less semantically
and syntactically weird. Since the instance is created before
any constructor is called, there's no point in time where the
instance isn't there.
2013-12-19 07:02:27 -08:00
e7cf8ffe2e Make method_call benchmark use inheritance.
This also fixes a bug where constructors weren't being bound
correctly, and eliminates some unneeded instructions when
compiling ifs.

I also tweaked the other method_call languages to match Wren's.
Since Wren needs to do a super call to get to the parent _count,
the other languages do now too.

This is nice too because it means we're benchmarking super 
calls.
2013-12-18 07:37:41 -08:00
271fcec81b Start getting superclass constructors working.
This also means the metaclass inheritance hierarchy parallels
the regular inheritance chain so that the subclass can find
the superclass constructor.
2013-12-17 09:39:05 -08:00
7fe60499db Get rid of my name from TODOs. Anyone can do them. 2013-12-14 15:28:18 -08:00
510e3fc383 Add test for default constructor. 2013-12-10 21:58:02 -08:00
157944aa27 Get closures working!
In the process, I had to change the grammar. There is now a strong
separation between statements and expressions. The code was just wrong
before when it popped locals at the end of a block scope because there
could be temporaries on the stack if the block was in expression
position. This fixes that.

Still need to implement closing over `this`.
2013-12-04 07:43:50 -08:00
b390bdf604 Clean up constructor tests. 2013-11-29 15:21:36 -08:00