Sitting bored in the office, so I decided to start documenting a little what has happened to arc2c so far. From my checklist in http://www.arclanguage.org/item?id=5818 : 1) Decoupling of primitives from globals - DONE. Pretty much done with the inlining globals step. However some of the existing primitives still need to be decoupled, notably the arithmetic operators. 2) Macros. Especially 'def - IN (very slow) PROGRESS. Currently 'def, 'and, 'or are handled specially, but no other macro-forms are. http://www.arclanguage.org/item?id=6458 contains a discussion of what I'm doing and why. 3) Strings - DONE (by sacado) 4) Threads - NOTHING 5) I/O - NOTHING Currently sacado has added since the previous update: 1. association tables. Not really hash tables, more like association lists implemented as two parallel arrays, but it works much like the Arc tables (possibly slower for large tables), except with list keys (which are possibly buggy in canonical Arc). 2. Floats. The rest of the numeric stack doesn't exist yet. My modifications so far have been mostly bugfixes of my code: 1. Intermediate results of each stage are now written to a2c.log in the current directory. 2. Fixed bug where immediate values that aren't used are not being removed. This is necessary in order for docstrings to be ignored. 3. The internal sharedvar objects (used to implement mutation of local variables) are now garbage-collected, and typed. 4. Changed handling of quoted constants slightly. http://www.arclanguage.org/item?id=6585 Now I have a few proposals: 1. Support for a (t ...) form, which acts like the C #pragma. For example: (set foo
(fn ()
(t arc2c named foo)
42))
Basically (t arc2c ...) is a command for the arc2c compiler, in this example one which names the anonymous function as 'foo.Of course this could simply be done in the AST's of the arc2c compiler instead, but it might be useful to allow the user to perform this (and other) specifications. We could modify ArcN so that (t ...) is simply converted by scheme-side 'ac to plain nil. 2. Subtype closures into continuations and non-continuations. Functions explicitly stated in the source code are non-continuations, while functions created by CPS conversion are continuations. This should allow us to more easily emit a backtrace (we backtrace continuations closures only), as well as support some memory optimizations (When a continuation function exits, its closure can be freed immediately, and/or reused for a new continuation - except when 'ccc has been used, which transforms the closure from continuation to non-continuation, since the continuation-type functions are not supposed to be passed around by Arc code). |