rubyx/lib/vool
Torsten Rüger 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
..
assignment.rb Fixing ruby send with arguments 2019-08-15 21:30:36 +03:00
basic_values.rb Some docs and to_s testing 2018-09-01 15:54:25 +03:00
block_statement.rb fix a whole bunch of vool to_mom 2019-08-07 15:09:26 +03:00
call_statement.rb Some docs and to_s testing 2018-09-01 15:54:25 +03:00
class_method_statement.rb Copy risc compiler stuff to mom 2019-08-06 18:33:27 +03:00
class_statement.rb starting on mom to risc 2019-08-08 12:19:27 +03:00
if_statement.rb Fix if statements hoisting, now that send is working 2019-08-16 18:42:57 +03:00
ivar_assignment.rb Fix ruby normalising to_vool 2019-08-16 14:20:06 +03:00
local_assignment.rb fix a whole bunch of vool to_mom 2019-08-07 15:09:26 +03:00
method_statement.rb starting on mom to risc 2019-08-08 12:19:27 +03:00
README.md Some docs 2019-08-06 17:42:15 +03:00
return_statement.rb Fix if statements hoisting, now that send is working 2019-08-16 18:42:57 +03:00
send_statement.rb Fix ruby normalising to_vool 2019-08-16 14:20:06 +03:00
statement.rb Fix if statements hoisting, now that send is working 2019-08-16 18:42:57 +03:00
statements.rb Fix ruby normalising to_vool 2019-08-16 14:20:06 +03:00
variables.rb Fix if statements hoisting, now that send is working 2019-08-16 18:42:57 +03:00
while_statement.rb Fix ruby normalising to_vool 2019-08-16 14:20:06 +03:00
yield_statement.rb transformed object builtins 2019-08-11 20:36:10 +03:00

VOOL

Virtual Object Oriented Language

in other words, ruby without the fluff.

Possibly later other languages can compile to this level and use rx-file as code definition.

Syntax tree

Vool is a layer with concrete syntax tree, just like the ruby layer above. Vool is just simplified, without fluff, see below.

The next layer down is the Mom, Minimal object Machine, which uses an instruction list.

The nodes of the syntax tree are all the things one would expect from a language, if statements and the like. There is no context yet, and actual objects, representing classes and methods, will be created on the way down.

Fluff

Ruby has lots of duplication to help programmers to write less. An obvious example is the existence of until, which really means if not. Other examples, some more impactful are:

  • No implicit blocks, those get passed as normal arguments (the last)
  • No splats
  • no case
  • no elseif (no unless, no ternary operator)
  • no global variables.

Parfait objects

The compilation process ends up creating (parfait) objects to represent things like classes, types and constants. This is done in this layer, on the way down to MOM (ie not during init)