Torsten Rüger
17f87f7464
resolve had the wrong approach, sort of class based oo It took methods from "derived" types and just used them To be correct, those methods would have to be recompiled for the current type, rubyx is type, not class based. Started on that, still soe strange hang though Later, type and method analysis may reveal "compatible" types (down only off course) where one could use the exact same code, but that is phase 2 |
||
---|---|---|
.. | ||
assignment.rb | ||
basic_values.rb | ||
builtin.rb | ||
call_statement.rb | ||
class_expression.rb | ||
class_method_expression.rb | ||
if_statement.rb | ||
ivar_assignment.rb | ||
lambda_expression.rb | ||
local_assignment.rb | ||
macro_expression.rb | ||
method_expression.rb | ||
README.md | ||
return_statement.rb | ||
send_statement.rb | ||
statement.rb | ||
statements.rb | ||
super_statement.rb | ||
variables.rb | ||
while_statement.rb | ||
yield_statement.rb |
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)