[<<][staapl][>>][..]
Sun May 18 22:40:40 CEST 2008

quoted macros (the 'address' word)

There's a problem with

  ' abc

This really should produce [qw #<word>], where #<word> is the SCAT
word representing the macro that postpones the compilation of the
word, such that (' abc compile) == (abc)

Note: choose 'run' instead of 'compile'.

But there's one problem. What is this?

   ' abc ,

On QW values, comma will always produce a [dw], so this should compile
the address of a function, and fail if it's a generic macro.

Ok, i solved it before, it's "address".

So, i wonder.. Can't this be done automatically, as part of a
postprocessing step before things are handed to the assembler? or as
part of target evaluation code?

What's the idea here:

    postpone the conversion from macro -> target-value as long as
    possible, because the former is more general, but cannot survive
    the assembler. the problem is the inclusion of such values in
    assembler expressions: in that case the expression evaluator needs
    to be aware of them.


target-rep can't know about macros (to simplify design), so either/or:

  * catch all macro instances before they go into a (target: ...)
    expression or end up as a plain macro in the assembly code.

  * use explicit 'address' after using the tick operator.

  * give target-rep a means to evaluate macros.


the middle one might be best.. that way representations of words
(quoted macros) are different from addresses. essentially, they are..



[Reply][About]
[<<][staapl][>>][..]