SYSDOC COMPILE_MODE                                   A.Sloman July 1989


This is a temporary file, with information provided by John Gibson
that may be useful to poplog developers.

See also (in the masters)
    REF * POPCOMPILE/compile_mode and REF * VMCODE/compile_mode
and
    SHOWLIB * COMPILE_MODE

From johng@cogs.susx.ac.uk Fri Jul  7 22:09:02 1989
From: John Gibson <johng@cogs.susx.ac.uk>
Date: Fri, 7 Jul 89 22:09:00 BST
To: aarons@cogs.susx.ac.uk
Subject: Re:  popdefineprocedure, Xpop demo and next release of Poplog
Cc: poplog@cogs.susx.ac.uk

Yes, I'm afraid -caller_valof- doesn't work with active variables. It should,
of course, but unfortunately it's a fairly lengthy fix. (I hope to get round
to it sometime soon.)

As far as popdefineprocedure/constant in the new system are concerned, you can
replace

    set_global_valof(true, "popdefineprocedure");
    set_global_valof(true, "popdefineconstant");

with

    compile_mode:pop11 +defpdr +defcon;
    set_global_valof(pop_pop11_flags, "pop_pop11_flags");

etc.

On the other hand, I want to work towards having all POP11 files that are part
of POPLOG begin with

    compile_mode:pop11 +strict;

(either at the top of the file or in a #_INCLUDE file). This gives all modes
as per system source code, viz:

    * define defaults to "procedure" (old popdefineprocedure)
    * define defaults to "constant" at top-level (old popdefineconstant)
    * no defaults for procedure formal args/results, and no default
        for nested defines (old pop_args_warnings)
    * construct constant lists/vectors where possible (old popconstruct)

plus when -pop_debugging- is false

    * lexical define pdprops default to <false>
    * consistency check on redeclarations of perm identifiers

Every file is thus self-contained and not reliant on having a global
environment set up to compile it; if means that every file will compile the
same way both in POPC and in the normal system. I've already begun putting
it in libraries.

John
