Jesse D. McDonald
fd17fcd99c
Update compiler description (now a working Scheme program).
...
Maps lexical variables, decodes argument lists, and flattens procedures
to simple lists of primitive operations, but does not yet convert to
CPS or perform register (gN, iN, fN) allocation, much less optimization.
2012-07-14 13:43:40 -05:00
Jesse D. McDonald
314e167e6e
Commit initial notes on compilation from Scheme-like source code.
2012-07-14 13:43:37 -05:00
Jesse D. McDonald
f542fa2bd5
Add bytecodes to skip the rest of a block based on a condition.
...
Should simplify error-handling and sequences of primitive tests.
Also, automatically instantiate templates used in the tail-call lambda & cont'n fields.
2012-07-14 13:43:33 -05:00
Jesse D. McDonald
bc3df6dd17
Swap continuation & context in the lambda and template structures.
...
This is to separate the three 'call' parameters (target, argv, ctx) from
the 'return to' parameter (k). The old order made it look as if the dynamic
context was in some way related to the continuation, which is not the case.
2012-07-14 13:43:26 -05:00
Jesse D. McDonald
8ca34f40ec
Add a bytecode which returns the type of a given structure.
2012-07-14 13:42:59 -05:00
Jesse D. McDonald
8f263daffc
Add a reserved input code for 'self', the current lambda.
...
Correct an error in the documentation for the condition bytecode(s).
Adjust the printer to limit the depth of non-cyclic object output.
2012-07-14 13:42:04 -05:00
Jesse D. McDonald
0e62641919
Check in a second program, this time demonstrating basic I/O.
...
Also filter cycles and long byte-strings from print_value() output.
Added three new bytecodes to get the sizes of vectors, strings, and structs.
2012-07-14 13:41:37 -05:00
Jesse D. McDonald
b74f0cddda
Adjust number-reader to allow 'negative zero' FP values.
...
Also add builtins for NaN and +/- infinity, and bytecodes for classification.
2012-07-14 13:40:52 -05:00
Jesse D. McDonald
10fbc269c5
Implement the remaining bytecodes. Adjust some of the numbering.
...
Also, use #<undefined> for "not yet initialized" and #f for "no value".
2012-07-14 13:38:40 -05:00
Jesse D. McDonald
0005ef2f86
Assign numbers to the bytecodes. Place all unary codes into one group.
2012-07-14 13:38:34 -05:00
Jesse D. McDonald
0a2f13b523
Added built-in structure types and interpreter core (w/o bytecode).
...
Improved timing resolution by using clock_gettime() instead of clock().
Also gave project a name: Rosella. Play on 'Parrot' (Perl 6 VM).
2012-07-14 13:38:02 -05:00
Jesse D. McDonald
080906fa72
Move documentation into a subdirectory.
2012-07-14 13:37:48 -05:00