Typerew uses checking operations (e.g. CAR with type checks enabled,
authorStephen Adams <edu/mit/csail/zurich/adams>
Tue, 30 Jul 1996 19:29:57 +0000 (19:29 +0000)
committerStephen Adams <edu/mit/csail/zurich/adams>
Tue, 30 Jul 1996 19:29:57 +0000 (19:29 +0000)
commitfe422a513bd2597a3f26b95df422c757b679df92
tree2090adab3cd19542bee1b2279264d8ccb13527a7
parente028e40f0bcf7dff0070502f0d1940884ccbe137
Typerew uses checking operations (e.g. CAR with type checks enabled,
or explicit calls to ERROR:WRONG-TYPE-ARGUMENT, etc) to deduce type
information about values in the program.  The assumption is that the
error signalling code never returns.

This set of changes makes these operations bulletproof by arranging
that the continuations of the error signalling procedures cannot
resume the code that was compiled under the types deduced from the
assumption.  The error continuations now `trap' by jumping to an
appropriate handler.

  fakeprim.scm
    New operator %halt.
    New operator %reference.

  errcont.scm
    Edits a program to replace continuations to error procedures
    (which typically merge back with the non-error case) with
    continuations that just call %halt.

  laterew.scm
    Eliminate %reference.

  rtlgen.scm
    Recognise continuations containing %halt and produce terse code to
    `trap' to the appropriate support procedure.

  simplify.scm
    Tweak to LETREC case for recognizing dead procedures earlier.
    This allows `diamond' code to be linearized in one pass rather than
    two.

  typerew.scm
    Changed to generate code to signal errors calling global procedure
    %COMPILED-CODE-SUPPORT:SIGNAL-ERROR-IN-PRIMITIVE
v8/src/compiler/machines/spectrum/compiler.pkg
v8/src/compiler/machines/spectrum/decls.scm
v8/src/compiler/midend/closconv.scm
v8/src/compiler/midend/errcont.scm
v8/src/compiler/midend/fakeprim.scm
v8/src/compiler/midend/laterew.scm
v8/src/compiler/midend/rtlgen.scm
v8/src/compiler/midend/simplify.scm
v8/src/compiler/midend/typerew.scm