Commit Graph

28 Commits

Author SHA1 Message Date
b9bdc55059 A good start on the macro idea
I call it macro because it lets you insert basically arbitrary risc code into the ruby level. The way it works:
Reserve namespace X
map any X.some_call to a Mom instruction
by the name SomeCall
which must take the same args in constructor as given
And obviously produce whatever risc it wants
Hoping to rewrite builtin around this idea (with the existing Mom builtn instructions)
2019-08-25 14:40:59 +03:00
57b0ad2c32 Fix super as statement
Super is a statement, a send really.
Not an expression (as maybe in c++)
The actual implementation will be a bit tricky, like raise, a bit of stack walking, but not impossible. Still, later
2019-08-19 18:48:13 +03:00
f87526f86f Renaming Vool exppressions rightly
Class, Method and Lambda (was block) are expressions.
Just making things clearer, especially for the blocks (ahem, lambdas) is matters.
wip
2019-08-19 11:33:12 +03:00
e6c30d98fb Fix if statements hoisting, now that send is working
Same same, just have to remembe to actually execute the condition if it is a send
Having send a possible expression, removes one tmp variable and associated move, for a little extra work.
Next return and assign (rest)
2019-08-16 18:42:57 +03:00
40581494de class Methods down to vool #24 2019-02-14 19:24:12 +02:00
2bb6ad5f61 remove unused code
Arrays and Hashes have to resolve to object creation calls
Not to constants. In the future off course
2018-09-01 15:14:07 +03:00
1d2ec8e8ac abstract CallStatement base class, just like in ruby
to_mom differs much more than the to_vool in ruby,
but data and base functionality still warrent unification
also we can check for CallStatement now
2018-07-30 14:45:37 +03:00
98788b52d3 fix ruby variables 2018-07-20 14:22:26 +03:00
ae3d64eb53 moved all the normalize stuff over to the ruby layer
Which is how it should have been from the start
2018-07-19 14:47:29 +03:00
3f80953385 passing compiler to to_mom, not method
To be able to delegate scope (block/method) things later
2018-07-05 14:02:38 +03:00
2ad24ab0bb add to_s for statements 2018-07-03 22:18:19 +03:00
63dd6d9039 moved statements up one dir 2018-06-29 22:46:00 +03:00
18994d2b4b start on yield statement 2018-06-28 20:15:24 +03:00
c6a903073a start on blocks 2018-06-26 20:28:27 +03:00
3909bdcc7d method tests working again 2018-03-16 10:32:11 +05:30
79bf416e58 collapsed slot classes into one
different slot operation have different right sides
mom assignment tests work again
157 others don’t
2018-03-15 20:33:38 +05:30
3247c2036c moving from collect to each
when iterating over tree.
Much cleaner, less hokuspukus methods that are noops

Mom is coming back out, but not linked yet
2018-03-15 17:22:56 +05:30
3702411043 first propper hoisting test
had to change course, normalising and object creation is not possible
in one go
have to now generate random tmp vars  that will have to be picked up
later (sorted by tmp_ prefix?)
2018-03-15 12:46:56 +05:30
9ddcb3224c rename 2018-03-15 11:32:32 +05:30
78ef1368de introducing expressions and constants
not everything statement anymore (as in ruby)
basic statement tests working, rest havoc
2018-03-15 11:24:14 +05:30
2779045caa small rename 2018-03-13 16:44:39 +05:30
b6fa8261e6 first stab at moms if 2017-08-30 17:21:13 +03:00
3e282c083d introduces compile time type (ct_type)
to determine whether we can call directly
2017-04-19 20:59:13 +03:00
be10e8c6af set up ivar_assignment correctly
for statement tests
and write mom tests
also implement to_mom
and fix local (self) bug
2017-04-12 20:29:45 +03:00
87133722b3 get guard to run several test on one change by setting up names accordingly 2017-04-12 20:18:41 +03:00
1deca34c23 adds basic to_mom machinery for class and method statement 2017-04-12 11:52:23 +03:00
f8b3fa1877 creates methods from method statement 2017-04-08 17:22:53 +03:00
0fe5685ad4 makes own file for statement base class
adds some functionality to it
moves the requires from compiler there
2017-04-08 12:09:25 +03:00