-
Notifications
You must be signed in to change notification settings - Fork 25
Progress
headius edited this page Dec 29, 2012
·
2 revisions
The goal of RubyFlux is to support as much of Ruby syntax and core class behavior as possible. Since this is a large goal, this page serves to enumerate what has been implemented and what remains.
- Syntax
- Literals
- Strings compile to RString, but no interpolation yet
- Fixnums (Integers) compile as RFixnum
- Floats compile as RFloat
- Arrays compile as RArray
- nil is a singleton instance of RObject
- true and false are singleton instances of RBoolean
- Method calls
- Specific-arity only (no hash or splat args)
- No block/closure support
- No super invocations yet
- Classes
- Classes emit as their own Java classes
- No modules yet
- No metaclasses (may be needed for proper class method overriding)
- Method definition
- Specific-arity only (no optional, rest, or block args)
- No class-level (static) methods yet
- Constants
- Emitted and accessed as static final values on current class
- Flow control
- "if" and "while" compile to appropriate Java code
- "if" statements can be treated as expressions as in Ruby
- "return" compiles as a Java return
- No "unless" or flip-flop yet
- Variables
- Local variables compile to Java locals
- No instance variables yet
- No class variables yet
- Boolean logic
- "or" and "and" forms work (||, "or", &&, "and")
- No not (boolean negation) yet
- Literals
- Core Classes
- Object/Kernel (RObject/RKernel)
- RObject is entirely generated code
- Kernel supports puts, print, ==, to_i, to_int, to_f, to_s, and method_missing
- Fixnum (RFixnum)
- to_s, to_i, +, -, *, /, **, <=>, <, >, <=, >=
- No overflow into Bignum
- Float (RFloat)
- to_s, to_f, +, -, *, /, **, <=>, <, >, <=, >=
- String (RString)
- to_s, %
- Array (RArray)
- <<, [], []=, size, clear
- Only Fixnum indexing supported for now
- Time (RTime)
- to_s, to_int, to_f, -
- Only supports construction via Time.new
- Object/Kernel (RObject/RKernel)