Ed,

It's a pretty simple change, which shouldn't break any reasonable code
and doesn't need to be documented because it's an implementation
detail. There are pathological cases where it'd act differently, but I
don't think these exist in the current code base.

Basically, I made it so that, if a macro is used as a word directly
rather than a compiler transform (in non-optimized-compiled code, in
other words), then that invocation is memoized. This is so that, when
going through a single piece of code several times, the same
transformation does not need to happen multiple times. This is
particularly appropriate for complicated transformations like in pegs
and inverse. If you think this is a bad idea, like that it'd have bad
memory behavior or something, then I can change this back.

I implemented it by adding a new word to the memoize vocab (which I
probably should document) called memoize-quot, which takes a stack
effect and a quotation and produces a new quotation which acts like
the original, but is memoized.

Dan

On Jan 5, 2008 3:03 AM, Eduardo Cavazos <[EMAIL PROTECTED]> wrote:
> Daniel,
>
> I noticed a message from you in the #concatenative logs about using
> memoization in the implementation of macros. Is that correct? If so, can you
> describe what you did a little bit? I haven't pulled from your repos yet so I
> haven't messed around with the new macro code yet.
>
> Ed

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to