compiling E: Phases of Transformations

Mark S. Miller markm@caplet.com
Wed, 09 Aug 2000 18:33:06 -0700


At 11:53 AM 8/9/00 , Mark S. Miller wrote:
>...
>             e`($a + $b) * $c`
>
>...  The original quasi-expression might now expand to:
>
>      e__quasiParser valueMaker("(${0} + ${1}) * ${2}",
>                                "foo.e",
>                                [0 => 102,       # "("
>                                 5 => 105,       # " + "
>                                 12 => 110       # ") * "
>                                ],
>                               ) substitute([a, b, c])

This kind of transformation implies that the expanded program can contain 
live information about positions in the source.  By "live" information, I 
mean that this information is available to the running program; not just 
meta-level tools like debuggers that might need special privileges.

I see no problem with this, but it is a kind of information leakage not 
previously considered in a capability context.  It doesn't correspond to 
anything in Java, but it corresponds directly to C's "__LINE__" and 
"__FILE__" predefined macro names.  These expand into literals (an integer and 
a string respectively) that the program can compute from.  Anyone have any 
objections?  Should I include magic like "__LINE__" and "__FILE__" in E as 
well?


         Cheers,
         --MarkM