(FILECREATED " 6-Apr-86 13:15:43" {ERIS}<TAMARIN>WORK>MICROTEST>TAMUTEST.;18 41134  

      changes to:  (FNS BIND.UNBIND.TEST RUN.TEST SETP.TEST PVAR←.SETQ PVAR.SETUP FVAR.GLOBAL 
                        FVAR.FREE FVAR.TEST FVAR.TEST2 FVAR.TEST3 FVAR.TESTN UNBIND.TEST DUNBIND.TEST 
                        APPLYFN.TEST BASICDIAGNOSTICS.TEST)
                   (VARS TAMUTESTCOMS)

      previous date: " 2-Apr-86 17:08:37" {ERIS}<TAMARIN>WORK>MICROTEST>TAMUTEST.;10)


(* Copyright (c) 1986 by Xerox Corporation. All rights reserved.)

(PRETTYCOMPRINT TAMUTESTCOMS)

(RPAQQ TAMUTESTCOMS [(COMS (GLOBALVARS GVAR STACKTESTING)
                           (VARS (STACKTESTING))
                           (VARS (F0 0)
                                 (F1 1)
                                 (F2 2)
                                 (F3 3)
                                 (F4 4)
                                 (F5 5)
                                 (F6 6)
                                 (F7 7)
                                 (F8 8)
                                 (G0 0)
                                 (G1 1)
                                 (G2 2)
                                 (G3 3)
                                 (G4 4)
                                 (G5 5)
                                 (G6 6)
                                 (G7 7)
                                 (G8 8))
                           (CONSTANTS (TMAXI 536870911)
                                  (TMAXI.1 536870910)
                                  (TMAXI.2 536870909)
                                  (TMAXISH1 268435455)
                                  (TMAXISH8 2097151)
                                  (TMAXISH16 8191)
                                  (TMAXISH24 31)
                                  (TMINI -536870912)
                                  (TMINI.1 -536870911)
                                  (TMINI.2 -536870910)))
                     (COMS (* runs all the tests that work)
                           (FNS RUN.TEST))
                     (COMS (* the individual tests in MICROTEST-DIAGNOSTICS order -- those not 
                              otherwise commented here work and are in RUN.TEST)
                           (FNS DIAGNOSE.TEST.0 DIAGNOSE.TEST.1 (* need CAR/CDR))
                           (FNS BASICDIAGNOSTICS.TEST)
                           (FNS PUSH.TEST (* defer until (CHECKSTACK anyVar)
                                             doesn't optimize away the var ref))
                           (FNS JUMPX.TEST (* defer until compiler doesn't optimize away the 
                                              non-executable calls to FN.LASTARG))
                           (FNS CALLS.FIRSTARGTEST)
                           (FNS CALLS.LASTARGTEST CALLS.TOOFEWARGS CALLS.TOOMANYARGS (* have to 
                                                                                        handle >6 
                                                                                        args 1st))
                           (FNS CALLS.COUNTTEST (* have to handle >6 args 1st -- have to handle 
                                                   lambda* first -- also note conditionality on 
                                                   STACKTESTING))
                           (FNS BIND.UNBIND.TEST BIND.UNBIND.TEST2)
                           (FNS PVAR←.SETQ PVAR.SETUP FVAR.GLOBAL)
                           (FNS FVAR.FREE FVAR.TEST FVAR.TEST2 FVAR.TEST3 (* defer till free var 
                                                                             lookup))
                           (FNS CONST.TEST2 (* pull this ?? -- \ADDBASE to char consts))
                           (FNS CAR.CDR.TEST (* defer til we have CAR/CDR))
                           (FNS UNBIND.TEST DUNBIND.TEST)
                           (FNS APPLYFN.TEST (* defer till APPLYFN))
                           (FNS FCOPY.TEST)
                           (FNS FJUMPX.TEST (* defer until compiler doesn't optimize away the 
                                               non-executable calls to FN.LASTARG))
                           (FNS SETI.TEST SETP.TEST SIC.TEST IPLUS.TEST)
                           (* (FNS IPLUS.N.TEST)
                              skipped as irrelevant)
                           (FNS LOGOR.TEST LOGAND.TEST LOGXOR.TEST IGREATERP.TEST LRSH.TEST LLSH.TEST
                                )
                           (* (FNS TYPE.TEST)
                              don't have type-opcode design finalized yet)
                           (* (FNS HILOC.TEST LOLOC.TEST)
                              address arith)
                           (* (FNS GETBITS.TEST PUTBITS.TEST.ZERO PUTBITS.TEST.ONES))
                           (* (FNS VAG2.TEST)
                              address arith)
                           (* (FNS ADDBASE.TEST)
                              address arith)
                           (FNS GLOBALVAL.TEST)
                           (* (FNS CAR.UFN.TEST CDR.UFN.TEST LOGAND2.UFN.TEST LOGOR2.UFN.TEST 
                                   BASE.UFN.TEST ARITH.UFN.TEST PUTBITS.UFN.TEST RPLAC.UFN.TEST 
                                   IGREATERP.UFN.TEST LSH.UFN.TEST MISC.UFN.TEST)
                              ufns)
                           (* (FNS PUSHSTKOV.TEST CALL.TEST INTERP.TEST)
                              ??))
                     (COMS (* helpers for the tests)
                           (FNS FN.FIRSTARG FN.FIRSTARG.PVARS FN.FIRSTARG.FVARS 
                                FN.FIRSTARG.PVARS.FVARS)
                           (FNS FN.LASTARG FN.LASTARG.PVARS FN.LASTARG.FVARS FN.LASTARG.FVARS.PVARS)
                           (FNS FN.ARGCOUNT)
                           (FNS FVAR.TESTN))
                     (COMS (* utilities)
                           (FNS MT.LLSH MT.LRSH))
                     (COMS (ADDVARS (OPTIMIZATIONSOFFFILES TAMUTEST))
                           (* tell DT's CO not to optimize fns on this file))
                     (DECLARE: EVAL@COMPILE DONTCOPY (P (RESETSAVE OPTIMIZATIONSOFF T))
                            (MACROS CHECKVAL CHECKSTACK CHECKPUSH FREEVARTEST)
                            (PROP DOPVAL NOP .COPY.))
                     (DECLARE: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS (ADDVARS
                                                                                   (NLAMA)
                                                                                   (NLAML)
                                                                                   (LAMA FN.ARGCOUNT])
(DECLARE: DOEVAL@COMPILE DONTCOPY

(GLOBALVARS GVAR STACKTESTING)
)

(RPAQQ STACKTESTING NIL)

(RPAQQ F0 0)

(RPAQQ F1 1)

(RPAQQ F2 2)

(RPAQQ F3 3)

(RPAQQ F4 4)

(RPAQQ F5 5)

(RPAQQ F6 6)

(RPAQQ F7 7)

(RPAQQ F8 8)

(RPAQQ G0 0)

(RPAQQ G1 1)

(RPAQQ G2 2)

(RPAQQ G3 3)

(RPAQQ G4 4)

(RPAQQ G5 5)

(RPAQQ G6 6)

(RPAQQ G7 7)

(RPAQQ G8 8)
(DECLARE: EVAL@COMPILE 

(RPAQQ TMAXI 536870911)

(RPAQQ TMAXI.1 536870910)

(RPAQQ TMAXI.2 536870909)

(RPAQQ TMAXISH1 268435455)

(RPAQQ TMAXISH8 2097151)

(RPAQQ TMAXISH16 8191)

(RPAQQ TMAXISH24 31)

(RPAQQ TMINI -536870912)

(RPAQQ TMINI.1 -536870911)

(RPAQQ TMINI.2 -536870910)

(CONSTANTS (TMAXI 536870911)
       (TMAXI.1 536870910)
       (TMAXI.2 536870909)
       (TMAXISH1 268435455)
       (TMAXISH8 2097151)
       (TMAXISH16 8191)
       (TMAXISH24 31)
       (TMINI -536870912)
       (TMINI.1 -536870911)
       (TMINI.2 -536870910))
)



(* runs all the tests that work)

(DEFINEQ

(RUN.TEST
  [LAMBDA NIL                                                (* jmh " 6-Apr-86 11:59")
          
          (* * note on D/UNBIND tests -- (PROG NIL
          (FOO 1 2 (RETURN 3))) is compiled in such a way that the Tam code D/UNBIND does 
          not move the stack pointer <because of POPs before the 3 is generated> --
          also what should be UNBIND POP is optimized to DUNBIND but this is good because 
          it lets us test DUNBIND)
          
          (* * note SETI.TEST wants to be mod'd when can handle >6 args)

    (CHECKVAL (BASICDIAGNOSTICS.TEST)
           (CALLS.FIRSTARGTEST)
           (BIND.UNBIND.TEST)
           (BIND.UNBIND.TEST2)
           (PVAR←.SETQ)
           (PVAR.SETUP)
           (FVAR.GLOBAL)
           (UNBIND.TEST)
           (DUNBIND.TEST)
           (FCOPY.TEST)
           (SETI.TEST)
           (SETP.TEST)
           (SIC.TEST)
           (IPLUS.TEST)
           (LOGOR.TEST)
           (LOGAND.TEST)
           (LOGXOR.TEST)
           (IGREATERP.TEST)
           (LRSH.TEST)
           (LLSH.TEST)
           (GLOBALVAL.TEST])
)



(* the individual tests in MICROTEST-DIAGNOSTICS order -- those not otherwise commented here 
work and are in RUN.TEST)

(DEFINEQ

(DIAGNOSE.TEST.0
  [LAMBDA (ARG)                                              (* jmh " 1-Apr-86 14:59")
          
          (* * made from DIAGNOSE's first part)
                                                             (* RUN THRU ALL SIMPLE OPCODES ONCE)
          
          (* * no SWAP so no point -- (COPY.SWAP.POP NIL))
          
          (* * no type opcodes yet -- (LISTP NIL) (LISTP
          (QUOTE (A))) (STRINGP NIL) (STRINGP "A")
          (NTYPX NIL) (\DTEST NIL (QUOTE LITATOM)))
          
          (* * stay away from address arith for now --
          (\HILOC NIL) (\VAG2 0 0) (\ADDBASE NIL 1)
          (\LOLOC NIL) (\GETBASE \VALSPACE 0) (\GETBASEPTR \VALSPACE 0)
          (\PUTBASE \VALSPACE 1 0) (\PUTBASEPTR \VALSPACE 0 NIL))

    (DECLARE (GLOBALVARS DIAGNOSE.TEST.0))
    (NOP NIL T 0 1 2 -1 TMAXI TMINI (QUOTE ATOM)
         ARG
         (EQ (NOP (EQ NIL T))
             NIL)
         (CAR (QUOTE (A)))
         (CDR (QUOTE (A)))
         (CDR (QUOTE (A B)))
         (IGREATERP (IPLUS (IDIFFERENCE (LOGOR (LOGAND (MT.LRSH (MT.LLSH (MT.LRSH (MT.LLSH 1 1)
                                                                                1)
                                                                       8)
                                                              8)
                                                      1)
                                               2)
                                  1)
                           1)
                1)
         (AND 0 NIL (RAID))
         (COND
            (NIL (RAID))
            ((NOT 0)
             (RAID))
            (0 (OR NIL 0 (RAID)))
            (T (RAID)))
         (SETQ DIAGNOSE.TEST.0 123)
         (SETQ DIAGNOSE.TEST.0 DIAGNOSE.TEST.0)
         (PROG (PV)
               (NOP PV])

(DIAGNOSE.TEST.1
  [LAMBDA (ARG)                                              (* jmh " 1-Apr-86 17:08")
          
          (* * made from DIAGNOSE's second part, parallelling DIAGNOSE.TEST.0)
                                                             (* RUN THRU ALL SIMPLE OPCODES ONCE)
          
          (* * no SWAP so no point -- (COPY.SWAP.POP NIL))
          
          (* * no type opcodes yet -- (LISTP NIL) (LISTP
          (QUOTE (A))) (STRINGP NIL) (STRINGP "A")
          (NTYPX NIL) (\DTEST NIL (QUOTE LITATOM)))
          
          (* * stay away from address arith for now --
          (\HILOC NIL) (\VAG2 0 0) (\ADDBASE NIL 1)
          (\LOLOC NIL) (\GETBASE \VALSPACE 0) (\GETBASEPTR \VALSPACE 0)
          (\PUTBASE \VALSPACE 1 0) (\PUTBASEPTR \VALSPACE 0 NIL))

    (DECLARE (GLOBALVARS DIAGNOSE.TEST.1))
    (NOP (CHECKSTACK NIL)
         (CHECKSTACK T)
         (CHECKSTACK 0)
         (CHECKSTACK 1)
         (CHECKSTACK 2)
         (CHECKSTACK -1)
         (CHECKSTACK TMAXI)
         (CHECKSTACK TMINI)
         (CHECKSTACK (QUOTE ATOM))
         (CHECKSTACK ARG)
         (CHECKSTACK (EQ (NOP (EQ NIL T))
                         NIL))
         [CHECKSTACK (CAR (QUOTE (A]
         [CHECKSTACK (CDR (QUOTE (A]
         [CHECKSTACK (CDR (QUOTE (A B]
         (CHECKSTACK (IGREATERP (IPLUS (IDIFFERENCE (LOGOR (LOGAND (MT.LRSH
                                                                    (MT.LLSH (MT.LRSH (MT.LLSH 1 1)
                                                                                    1)
                                                                           8)
                                                                    8)
                                                                  1)
                                                           2)
                                              1)
                                       1)
                            1))
         (CHECKSTACK (AND 0 NIL (RAID)))
         [CHECKSTACK (COND
                        (NIL (RAID))
                        ((NOT 0)
                         (RAID))
                        (0 (OR NIL 0 (RAID)))
                        (T (RAID]
         (CHECKSTACK (SETQ DIAGNOSE.TEST.1 123))
         (CHECKSTACK (SETQ DIAGNOSE.TEST.1 DIAGNOSE.TEST.1))
         (CHECKSTACK (PROG (PV)
                           (NOP PV])
)
(DEFINEQ

(BASICDIAGNOSTICS.TEST
  [LAMBDA NIL                                                (* jmh " 3-Apr-86 18:08")
          
          (* * made from MICROTEST's BASICDIAGNOSTICS by pulling out all address 
          arithmetic)
          
          (* * also omit type instrs -- (LISTP (QUOTE A))
          (NOT (LISTP NIL)) (NOT (SMALLP T)) (EQ (NTYPX
          (QUOTE ATOM)) (NTYPX NIL)))

    (CHECKVAL (NOT NIL)
           0 T 14 (PROG ((N 0))
                        (RETURN (EQ N 0])
)
(DEFINEQ

(PUSH.TEST
  [LAMBDA (I0 I1 I2 I3 I4 I5 I6 I7 I8)                       (* lmm "29-NOV-81 11:37")
    (DECLARE (GLOBALVARS G0 G1 G2 G3 G4 G5 G6 G7 G8))
    (PROG (P0 P1 P2 P3 P4 P5 P6 P7 P8)
          (CHECKPUSH NIL)
          (CHECKPUSH T)
          (CHECKPUSH 0)
          (CHECKPUSH 1)
          (CHECKPUSH 2)
          (CHECKPUSH (QUOTE ATOM))
          (CHECKPUSH -1)
          (CHECKPUSH 4096)
          (CHECKPUSH (.COPY.))
          (CHECKPUSH (QUOTE (A)))
          (PROGN (CHECKPUSH I0)
                 (CHECKPUSH I1)
                 (CHECKPUSH I2)
                 (CHECKPUSH I3)
                 (CHECKPUSH I4)
                 (CHECKPUSH I5)
                 (CHECKPUSH I6)
                 (CHECKPUSH I7)
                 (CHECKPUSH I8))
          (PROGN (CHECKPUSH G0)
                 (CHECKPUSH G1)
                 (CHECKPUSH G2)
                 (CHECKPUSH G3)
                 (CHECKPUSH G4)
                 (CHECKPUSH G5)
                 (CHECKPUSH G6)
                 (CHECKPUSH G7)
                 (CHECKPUSH G8))
          (FREEVARTEST (CHECKPUSH F0)
                 (CHECKPUSH F1)
                 (CHECKPUSH F2)
                 (CHECKPUSH F3)
                 (CHECKPUSH F4)
                 (CHECKPUSH F5)
                 (CHECKPUSH F6)
                 (CHECKPUSH F7)
                 (CHECKPUSH F8))
          (PROGN (CHECKPUSH P0)
                 (CHECKPUSH P1)
                 (CHECKPUSH P2)
                 (CHECKPUSH P3)
                 (CHECKPUSH P4)
                 (CHECKPUSH P5)
                 (CHECKPUSH P6)
                 (CHECKPUSH P7)
                 (CHECKPUSH P8))
          (CHECKPUSH (FN.FIRSTARG])
)
(DEFINEQ

(JUMPX.TEST
  [LAMBDA NIL                                                (* lmm "19-JUL-80 22:15")
    (CHECKVAL (PROG NIL
                    (GO FAR)
                NEAR
                    (RETURN (EQ NIL (EQ NIL T)))
                    (FN.LASTARG 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)
                    (FN.LASTARG 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)
                    (FN.LASTARG 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)
                    (FN.LASTARG 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)
                    (FN.LASTARG 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)
                FAR (GO NEAR])
)
(DEFINEQ

(CALLS.FIRSTARGTEST
  [LAMBDA NIL                                                (* lmm " 3-JAN-80 01:10")
    (CHECKVAL (EQ (FN.FIRSTARG 1 2 3)
                  1)
           (EQ (FN.FIRSTARG.PVARS 1 2 3)
               1)
           (EQ (FN.FIRSTARG.FVARS 1 2 3)
               1)
           (EQ (FN.FIRSTARG.PVARS.FVARS 1 2 3)
               1])
)
(DEFINEQ

(CALLS.LASTARGTEST
  [LAMBDA NIL                                                (* lmm " 7-OCT-80 09:16")
    (CHECKVAL (EQ (FN.LASTARG 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)
                  15))
    (CHECKVAL (EQ (FN.LASTARG.PVARS 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)
                  15))
    (CHECKVAL (EQ (FN.LASTARG.FVARS 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)
                  15))
    (CHECKVAL (EQ (FN.LASTARG.FVARS.PVARS 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)
                  15])

(CALLS.TOOFEWARGS
  [LAMBDA NIL                                                (* lmm " 3-JAN-80 01:12")
    (CHECKVAL (EQ (FN.FIRSTARG 1 2)
                  1)
           (EQ (FN.FIRSTARG.PVARS.FVARS 1 2)
               1)
           (EQ (FN.FIRSTARG)
               NIL)
           (EQ (FN.FIRSTARG.PVARS.FVARS)
               NIL)
           (EQ (FN.FIRSTARG 1)
               1)
           (EQ (FN.LASTARG 1 2)
               NIL)
           (EQ (FN.LASTARG 1 2 3 4 5 6 7 8 9 10 11 12 13 14)
               NIL])

(CALLS.TOOMANYARGS
  [LAMBDA NIL                                                (* lmm " 3-JAN-80 01:12")
    (CHECKVAL (EQ (FN.FIRSTARG 1 2 3 4)
                  1)
           (EQ (FN.FIRSTARG 1 2 3 4 5 6 7 8 9 10)
               1)
           (EQ (FN.LASTARG 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16)
               15)
           (EQ (FN.LASTARG 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20)
               15])
)
(DEFINEQ

(CALLS.COUNTTEST
  [LAMBDA NIL                                                (* lmm " 2-OCT-81 22:22")
    (COND
       (STACKTESTING (CHECKVAL (EQ (FN.ARGCOUNT)
                                   0)
                            (EQ (FN.ARGCOUNT 1)
                                1)
                            (EQ (FN.ARGCOUNT 1 1)
                                2)
                            (EQ (FN.ARGCOUNT 1 1 1)
                                3)
                            (EQ (FN.ARGCOUNT 1 1 1 1)
                                4)
                            (EQ (FN.ARGCOUNT 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)
                                15))
              (CHECKPUSH (FN.ARGCOUNT))
              (CHECKPUSH (FN.ARGCOUNT 1 2 3 4 5 6])
)
(DEFINEQ

(BIND.UNBIND.TEST
  [LAMBDA NIL                                                (* lmm " 3-JAN-80 02:03")
    (CHECKVAL (EQ (PROG NIL)
                  NIL)
           (EQ (PROG (X)
                     (RETURN X))
               NIL)
           (EQ (PROG (A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15 A16 A17)
                     (RETURN (OR A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15 A16 A17)))
               NIL)
           (EQ [PROG ((A 1)
                      (B 2)
                      (C 4))
                     (NOP 8 16 32 (RETURN (IPLUS A B C]
               7)
           (EQ (PROG ((A 0)
                      (B 1)
                      (C 2)
                      D E F)
                     (NOP 5 6 7 8 9 (RETURN A)))
               0))
    (CHECKPUSH (PROG NIL))
    (CHECKPUSH (PROG (A B C D E F G)
                     (RETURN])

(BIND.UNBIND.TEST2
  [LAMBDA NIL                                                (* lmm " 3-JAN-80 02:13")
    (CHECKSTACK (PROG NIL
                      (RETURN NIL)))
    (CHECKSTACK (PROG (X)
                      (RETURN X)))
    [CHECKSTACK (PROG (A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15 A16 A17)
                      (COND
                         ((OR A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15 A16 A17)
                          (RETURN T]
    [CHECKSTACK (PROG ((A 1)
                       (B 2)
                       (C 4))
                      (NOP 8 16 32 (RETURN (IPLUS A B C]
    (CHECKSTACK (PROG ((A 0)
                       (B 1)
                       (C 2)
                       D E F)
                      (NOP 5 6 7 8 9 (RETURN A])
)
(DEFINEQ

(PVAR←.SETQ
  [LAMBDA NIL                                                (* lmm " 6-OCT-80 22:46")
    (PROG (SV0 SVP0 SV1 SVP1 SV2 SVP2 SV3 SVP3 SV4 SVP4 SV5 SVP5 SV6 SVP6 SV7 SVP7 SV8 SVP8)
          (SETQ SVP0 (SETQ SV0 0))
          (SETQ SVP1 (SETQ SV1 1))
          (SETQ SVP2 (SETQ SV2 2))
          (SETQ SVP3 (SETQ SV3 3))
          (SETQ SVP4 (SETQ SV4 4))
          (SETQ SVP5 (SETQ SV5 5))
          (SETQ SVP6 (SETQ SV6 6))
          (SETQ SVP7 (SETQ SV7 7))
          (SETQ SVP8 (SETQ SV8 8))
          (CHECKVAL (EQ SV0 0)
                 (EQ SVP0 0)
                 (EQ SV1 1)
                 (EQ SVP1 1)
                 (EQ SV2 2)
                 (EQ SVP2 2)
                 (EQ SV3 3)
                 (EQ SVP3 3)
                 (EQ SV4 4)
                 (EQ SVP4 4)
                 (EQ SV5 5)
                 (EQ SVP5 5)
                 (EQ SV6 6)
                 (EQ SVP6 6)
                 (EQ SV7 7)
                 (EQ SVP7 7)
                 (EQ SV8 8)
                 (EQ SVP8 8])

(PVAR.SETUP
  [LAMBDA NIL                                                (* lmm "31-JUL-81 15:54")
    (PROG ((P1 1)
           (P2 2)
           P3 P4 P5 P6 (P7 7)
           (P8 8)
           P9 P10 P11 P12 P13 P14 (P15 15)
           (P16 16)
           (P17 17)
           P18)
          (CHECKVAL (EQ P1 1)
                 (EQ P2 2)
                 (EQ P3 NIL)
                 (EQ P7 7)
                 (EQ P15 15)
                 (EQ P16 16)
                 (EQ P17 17)
                 (EQ P18 NIL])

(FVAR.GLOBAL
  [LAMBDA NIL                                                (* lmm "31-JUL-81 15:54")
    (DECLARE (GLOBALVARS G0 G1 G2 G3 G4 G5 G6 G7 G8))
    (SETQ G0 100)
    (SETQ G1 101)
    (SETQ G2 102)
    (SETQ G3 103)
    (SETQ G4 104)
    (SETQ G5 105)
    (SETQ G6 106)
    (SETQ G7 107)
    (SETQ G8 108)
    (CHECKVAL (EQ G0 100)
           (EQ G1 101)
           (EQ G2 102)
           (EQ G3 103)
           (EQ G4 104)
           (EQ G5 105)
           (EQ G6 106)
           (EQ G7 107)
           (EQ G8 108))
    (SETQ G0 0)
    (SETQ G1 1)
    (SETQ G2 2)
    (SETQ G3 3)
    (SETQ G4 4)
    (SETQ G5 5)
    (SETQ G6 6)
    (SETQ G7 7)
    (SETQ G8 8])
)
(DEFINEQ

(FVAR.FREE
  [LAMBDA NIL                                                (* lmm "31-JUL-81 15:55")
    (FREEVARTEST (SETQ F0 100)
           (SETQ F1 101)
           (SETQ F2 102)
           (SETQ F3 103)
           (SETQ F4 104)
           (SETQ F5 105)
           (SETQ F6 106)
           (SETQ F7 107)
           (SETQ F8 108)
           (CHECKVAL (EQ F0 100)
                  (EQ F1 101)
                  (EQ F2 102)
                  (EQ F3 103)
                  (EQ F4 104)
                  (EQ F5 105)
                  (EQ F6 106)
                  (EQ F7 107)
                  (EQ F8 108))
           (SETQ F0 0)
           (SETQ F1 1)
           (SETQ F2 2)
           (SETQ F3 3)
           (SETQ F4 4)
           (SETQ F5 5)
           (SETQ F6 6)
           (SETQ F7 7)
           (SETQ F8 8])

(FVAR.TEST
  [LAMBDA (FLG)                                              (* lmm "31-JUL-81 16:25")
    [PROG ((FREE.VAR.FLAG (QUOTE FREE.VALUE))
           (FREE.VAR (QUOTE GARBAGE)))
          (DECLARE (SPECVARS . T))
          (FREEVARTEST (FN.FR1)
                 (CHECKVAL (NULL FREE.VAR.FLAG))
                 (CHECKVAL (EQ FREE.VAR (QUOTE FREE.VALUE]
    (PROG ((FREE.VAR.FLAG (QUOTE FREE.VALUE)))
          (DECLARE (SPECVARS . T))
          (FREEVARTEST (FN.FR1)
                 (CHECKVAL (NULL FREE.VAR.FLAG))
                 (CHECKVAL (EQ FREE.VAR (QUOTE FREE.VALUE])

(FVAR.TEST2
  [LAMBDA NIL                                                (* lmm "31-JUL-81 15:58")
    (PROG ((FVAR1 1)
           (FVAR2 2)
           (FVAR3 3))
          (FVAR.TEST T])

(FVAR.TEST3
  [LAMBDA NIL                                                (* lmm " 3-JAN-80 01:46")
    (FVAR.TESTN 1 2 3])
)
(DEFINEQ

(CONST.TEST2
  [LAMBDA NIL                                                (* lmm "29-OCT-81 14:36")
    (COMPUTEFORM (CONS (QUOTE CHECKVAL)
		       (for I from 1 to 25
			  collect (LIST (QUOTE EQ)
					  (LIST (QUOTE \ADDBASE)
						(KWOTE (CHARACTER (IPLUS I (CHCON1 "A")
									 -1)))
						1)
					  (KWOTE (CHARACTER (IPLUS I (CHCON1 "A"])
)
(DEFINEQ

(CAR.CDR.TEST
  [LAMBDA NIL                                                (* rtk " 2-Apr-86 12:54")

          (* EQ (CAR (COMPUTEFORM (PROG (L) (RPTQ 129 (SETQ L (CONS RPTN L))) (SETQ L (LIST (QUOTE QUOTE) L)) 
	  (RPTQ 128 (SETQ L (LIST (QUOTE CDR) L))) (RETURN L)))) 129)


    (CHECKVAL (EQ (CAR (QUOTE NIL))
		  NIL)
	      (EQ (CDR (QUOTE NIL))
		  NIL)
	      (EQ (CAR (CONS (QUOTE A)
			     NIL))
		  (QUOTE A))
	      (EQ (CAR (LIST (QUOTE A)
			     (QUOTE B)
			     (QUOTE C)))
		  (QUOTE A))
	      (EQ [CAR (CAR (LIST (LIST (QUOTE Z]
		  (QUOTE Z))
	      (EQ (CDR (CONS (QUOTE CDR)
			     NIL))
		  NIL)
	      (EQ (CDR (CONS (QUOTE CDR.LIST)
			     (QUOTE K)))
		  (QUOTE K])
)
(DEFINEQ

(UNBIND.TEST
  [LAMBDA NIL                                                (* lmm " 3-JAN-80 01:12")
    (PROG (X)
          [SETQ X (PROG NIL
                        (FN.LASTARG 1 2 3 4 (RETURN 7]
          (CHECKVAL (EQ X 7])

(DUNBIND.TEST
  [LAMBDA NIL                                                (* lmm " 3-JAN-80 01:12")
    (CHECKVAL (EQ [PROG1 37 (PROG (A B C D (E (QUOTE X))
                                     (F (QUOTE G)))
                                  (FN.LASTARG 1 2 3 4 (RETURN 7]
                  37])
)
(DEFINEQ

(APPLYFN.TEST
  [LAMBDA NIL                                                (* lmm " 2-OCT-81 22:32")
    (CHECKVAL (EQ (SPREADAPPLY*(QUOTE FN.FIRSTARG)
                   (QUOTE A)
                   (QUOTE B)
                   (QUOTE C))
                  (QUOTE A))
           (EQ (SPREADAPPLY*(QUOTE FN.FIRSTARG)
                (QUOTE A)
                2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30)
               (QUOTE A))
           (EQ (SPREADAPPLY*(QUOTE FN.LASTARG)
                (QUOTE A)
                2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30)
               15))
    (COND
       (STACKTESTING (CHECKVAL (EQ (SPREADAPPLY*(QUOTE FN.ARGCOUNT))
                                   0)
                            (EQ (SPREADAPPLY*(QUOTE FN.ARGCOUNT)
                                 1 2 3)
                                3)
                            (EQ (SPREADAPPLY*(QUOTE FN.ARGCOUNT)
                                 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 
                                 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 
                                 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65)
                                65])
)
(DEFINEQ

(FCOPY.TEST
  [LAMBDA NIL                                                (* lmm "25-DEC-79 23:13")
    (PROG (X)
          (CHECKSTACK (SETQ X (AND T T)))
          (RETURN (CHECKVAL X])
)
(DEFINEQ

(FJUMPX.TEST
  [LAMBDA NIL                                                (* rtk " 1-Apr-86 14:44")
    (CHECKVAL (PROG NIL
		    (COND
		      ((NOT (EQ NIL T))
			(GO FAR)))
		NEAR(RETURN (EQ NIL (EQ NIL T)))
		    (FN.LASTARG 1 2 3 4 5 6)
		    (FN.LASTARG 1 2 3 4 5 6)
		    (FN.LASTARG 1 2 3 4 5 6)
		    (FN.LASTARG 1 2 3 4 5 6)
		    (FN.LASTARG 1 2 3 4 5 6)
		    (FN.LASTARG 1 2 3 4 5 6)
		    (FN.LASTARG 1 2 3 4 5 6)
		    (FN.LASTARG 1 2 3 4 5 6)
		    (FN.LASTARG 1 2 3 4 5 6)
		    (FN.LASTARG 1 2 3 4 5 6)
		FAR (COND
		      ((EQ (PROGN NIL NIL)
			   (PROGN NIL NIL))
			(GO NEAR])
)
(DEFINEQ

(SETI.TEST
  [LAMBDA (A1 A2 A3 A4 A5 A6)                                (* rtk " 1-Apr-86 14:35")
                                                             (* A7 A8 A9 A10 A11 A12 A13 A14 A15 A16)
                                                             (* lmm "26-DEC-79 11:45")
    (SETQ A1 1)
    (SETQ A2 2)
    (SETQ A3 3)
    (SETQ A4 4)
    (SETQ A5 5)
    (SETQ A6 6)

          (* (SETQ A7 7) (SETQ A8 8) (SETQ A9 9) (SETQ A10 10) (SETQ A11 11) (SETQ A12 12) (SETQ A13 13) 
	  (SETQ A14 14) (SETQ A15 15) (SETQ A16 16))


    (CHECKVAL (EQ A1 1)
	      (EQ A2 2)
	      (EQ A3 3)
	      (EQ A4 4)
	      (EQ A5 5)
	      (EQ A6 6))

          (* (EQ A7 7) (EQ A8 8) (EQ A9 9) (EQ A10 10) (EQ A11 11) (EQ A12 12) (EQ A13 13) (EQ A14 14) 
	  (EQ A15 15) (EQ A16 16))


    T])

(SETP.TEST
  [LAMBDA NIL                                                (* jmh " 6-Apr-86 12:28")
    (PROG (F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 F15 F16 F17 F18 F19 F20 F21 F22 F23 F24)
                                                             (* F25 F26 F27 F28 F29 F30)
          (SETQ F1 1)
          (SETQ F2 2)
          (SETQ F3 3)
          (SETQ F4 4)
          (SETQ F5 5)
          (SETQ F6 6)
          (SETQ F7 7)
          (SETQ F8 8)
          (SETQ F9 9)
          (SETQ F10 10)
          (SETQ F11 11)
          (SETQ F12 12)
          (SETQ F13 13)
          (SETQ F14 14)
          (SETQ F15 15)
          (SETQ F16 16)
          (SETQ F17 17)
          (SETQ F18 18)
          (SETQ F19 19)
          (SETQ F20 20)
          (SETQ F21 21)
          (SETQ F22 22)
          (SETQ F23 23)
          (SETQ F24 24)                                      (* SETQ F25 25)
                                                             (* SETQ F26 26)
                                                             (* SETQ F27 27)
                                                             (* SETQ F28 28)
                                                             (* SETQ F29 29)
                                                             (* SETQ F30 30)
          (RETURN (CHECKVAL (EQ F1 1)
                         (EQ F5 5)
                         (EQ F6 6)
                         (EQ F7 7)
                         (EQ F8 8)
                         (EQ F15 15)
                         (EQ F16 16)
                         (EQ F24 24])

(SIC.TEST
  [LAMBDA NIL                                                (* lmm "25-DEC-79 22:33")
    (CHECKVAL (EQ (IPLUS 1 255)
		  256])

(IPLUS.TEST
  [LAMBDA NIL                                                (* rtk "31-Mar-86 15:53")
    (CHECKVAL (EQ (IDIFFERENCE 65535 65535)
		  0)
	      (EQ (IDIFFERENCE 1 1)
		  0)
	      (EQ (IDIFFERENCE TMAXI.1 1)
		  TMAXI.2)
	      (EQ (IDIFFERENCE TMAXI 1)
		  TMAXI.1)
	      (EQ (IPLUS 0 0)
		  0)
	      (EQ (IPLUS 0 1)
		  1)
	      (EQ (IPLUS 0 TMAXI.1)
		  TMAXI.1)
	      (EQ (IPLUS 0 TMAXI)
		  TMAXI)
	      (EQ (IDIFFERENCE 1 1)
		  0)
	      (EQ (IPLUS 1 0)
		  1)
	      (EQ (IPLUS 1 1)
		  2)
	      (EQ (IPLUS 1 TMAXI.1)
		  TMAXI)
	      (EQ (IDIFFERENCE TMAXI.1 1)
		  TMAXI.2)
	      (EQ (IPLUS TMAXI.1 0)
		  TMAXI.1)
	      (EQ (IPLUS TMAXI.1 1)
		  TMAXI)
	      (EQ (IDIFFERENCE TMAXI TMAXI)
		  0)
	      (EQ (IDIFFERENCE TMAXI 1)
		  TMAXI.1)
	      (EQ (IPLUS TMAXI 0)
		  TMAXI)
	      (EQ (IPLUS TMINI.2 TMAXI.1)
		  0)
	      (EQ (IPLUS TMAXI.1 TMINI.2)
		  0)
	      (EQ (IPLUS -1 1)
		  0)
	      (EQ (IPLUS 1 -1)
		  0])
)



(* (FNS IPLUS.N.TEST) skipped as irrelevant)

(DEFINEQ

(LOGOR.TEST
  [LAMBDA NIL                                                (* rtk "31-Mar-86 15:45")
    (CHECKVAL (EQ (LOGOR 0 0)
		  0)
	      (EQ (LOGOR 0 1)
		  1)
	      (EQ (LOGOR 0 TMAXI.1)
		  TMAXI.1)
	      (EQ (LOGOR 0 TMAXI)
		  TMAXI)
	      (EQ (LOGOR 1 0)
		  1)
	      (EQ (LOGOR 1 1)
		  1)
	      (EQ (LOGOR 1 TMAXI.1)
		  TMAXI)
	      (EQ (LOGOR 1 TMAXI)
		  TMAXI)
	      (EQ (LOGOR TMAXI.1 0)
		  TMAXI.1)
	      (EQ (LOGOR TMAXI.1 1)
		  TMAXI)
	      (EQ (LOGOR TMAXI.1 TMAXI.1)
		  TMAXI.1)
	      (EQ (LOGOR TMAXI.1 TMAXI)
		  TMAXI)
	      (EQ (LOGOR TMAXI 0)
		  TMAXI)
	      (EQ (LOGOR TMAXI 1)
		  TMAXI)
	      (EQ (LOGOR TMAXI TMAXI.1)
		  TMAXI)
	      (EQ (LOGOR TMAXI TMAXI)
		  TMAXI])

(LOGAND.TEST
  [LAMBDA NIL                                                (* rtk "31-Mar-86 15:47")
    (CHECKVAL (EQ (LOGAND 0 0)
		  0)
	      (EQ (LOGAND 0 1)
		  0)
	      (EQ (LOGAND 0 TMAXI.1)
		  0)
	      (EQ (LOGAND 0 TMAXI)
		  0)
	      (EQ (LOGAND 1 0)
		  0)
	      (EQ (LOGAND 1 1)
		  1)
	      (EQ (LOGAND 1 TMAXI.1)
		  0)
	      (EQ (LOGAND 1 TMAXI)
		  1)
	      (EQ (LOGAND TMAXI.1 0)
		  0)
	      (EQ (LOGAND TMAXI.1 1)
		  0)
	      (EQ (LOGAND TMAXI.1 TMAXI.1)
		  TMAXI.1)
	      (EQ (LOGAND TMAXI.1 TMAXI)
		  TMAXI.1)
	      (EQ (LOGAND TMAXI 0)
		  0)
	      (EQ (LOGAND TMAXI 1)
		  1)
	      (EQ (LOGAND TMAXI TMAXI.1)
		  TMAXI.1)
	      (EQ (LOGAND TMAXI TMAXI)
		  TMAXI])

(LOGXOR.TEST
  [LAMBDA NIL                                                (* rtk "31-Mar-86 15:44")
    (CHECKVAL (EQ (LOGXOR 0 0)
		  0)
	      (EQ (LOGXOR 0 1)
		  1)
	      (EQ (LOGXOR 0 TMAXI.1)
		  TMAXI.1)
	      (EQ (LOGXOR 0 TMAXI)
		  TMAXI)
	      (EQ (LOGXOR 1 0)
		  1)
	      (EQ (LOGXOR 1 1)
		  0)
	      (EQ (LOGXOR 1 TMAXI.1)
		  TMAXI)
	      (EQ (LOGXOR 1 TMAXI)
		  TMAXI.1)
	      (EQ (LOGXOR TMAXI.1 0)
		  TMAXI.1)
	      (EQ (LOGXOR TMAXI.1 1)
		  TMAXI)
	      (EQ (LOGXOR TMAXI.1 TMAXI.1)
		  0)
	      (EQ (LOGXOR TMAXI.1 TMAXI)
		  1)
	      (EQ (LOGXOR TMAXI 0)
		  TMAXI)
	      (EQ (LOGXOR TMAXI 1)
		  TMAXI.1)
	      (EQ (LOGXOR TMAXI TMAXI.1)
		  1)
	      (EQ (LOGXOR TMAXI TMAXI)
		  0])

(IGREATERP.TEST
  [LAMBDA NIL                                                (* rtk "31-Mar-86 15:42")
    (CHECKVAL (NOT (IGREATERP 0 0))
	      (NOT (IGREATERP 0 1))
	      (NOT (IGREATERP 0 TMAXI.1))
	      (NOT (IGREATERP 0 TMAXI))
	      (IGREATERP 1 0)
	      (NOT (IGREATERP 1 1))
	      (NOT (IGREATERP 1 TMAXI.1))
	      (NOT (IGREATERP 1 TMAXI))
	      (IGREATERP TMAXI.1 0)
	      (IGREATERP TMAXI.1 1)
	      (NOT (IGREATERP TMAXI.1 TMAXI.1))
	      (NOT (IGREATERP TMAXI.1 TMAXI))
	      (IGREATERP TMAXI 0)
	      (IGREATERP TMAXI 1)
	      (IGREATERP TMAXI TMAXI.1)
	      (NOT (IGREATERP TMAXI TMAXI])

(LRSH.TEST
  [LAMBDA NIL                                                (* rtk "31-Mar-86 18:28")
    (CHECKVAL (EQ (MT.LRSH 0 1)
		  0)
	      (EQ (MT.LRSH 0 8)
		  0)
	      (EQ (MT.LRSH 1 1)
		  0)
	      (EQ (MT.LRSH 1 8)
		  0)
	      (EQ (MT.LRSH 65534 1)
		  32767)
	      (EQ (MT.LRSH 65534 8)
		  255)
	      (EQ (MT.LRSH 65535 1)
		  32767)
	      (EQ (MT.LRSH 65535 8)
		  255)
	      (EQ (MT.LRSH TMAXI.1 1)
		  TMAXISH1)
	      (EQ (MT.LRSH TMAXI.1 8)
		  TMAXISH8)
	      (EQ (MT.LRSH TMAXI.1 16)
		  TMAXISH16)
	      (EQ (MT.LRSH TMAXI.1 24)
		  TMAXISH24)
	      (EQ (MT.LRSH TMAXI 1)
		  TMAXISH1)
	      (EQ (MT.LRSH TMAXI 8)
		  TMAXISH8)
	      (EQ (MT.LRSH TMAXI 16)
		  TMAXISH16)
	      (EQ (MT.LRSH TMAXI 24)
		  TMAXISH24])

(LLSH.TEST
  [LAMBDA NIL                                                (* rtk "31-Mar-86 18:29")
    (CHECKVAL (EQ (MT.LLSH 0 1)
		  0)
	      (EQ (MT.LLSH 0 8)
		  0)
	      (EQ (MT.LLSH 1 1)
		  2)
	      (EQ (MT.LLSH 1 8)
		  256)
	      (EQ (MT.LLSH 255 1)
		  510)
	      (EQ (MT.LLSH 255 8)
		  65280)
	      (EQ (MT.LLSH 255 16)
		  16711680)
	      (EQ (MT.LLSH 31 24)
		  520093696])
)



(* (FNS TYPE.TEST) don't have type-opcode design finalized yet)




(* (FNS HILOC.TEST LOLOC.TEST) address arith)




(* (FNS GETBITS.TEST PUTBITS.TEST.ZERO PUTBITS.TEST.ONES))




(* (FNS VAG2.TEST) address arith)




(* (FNS ADDBASE.TEST) address arith)

(DEFINEQ

(GLOBALVAL.TEST
  [LAMBDA NIL                                                (* rtk " 1-Apr-86 14:13")
    (SETQ GVAR 123)
    (CHECKVAL (EQ GVAR 123])
)



(* (FNS CAR.UFN.TEST CDR.UFN.TEST LOGAND2.UFN.TEST LOGOR2.UFN.TEST BASE.UFN.TEST ARITH.UFN.TEST
 PUTBITS.UFN.TEST RPLAC.UFN.TEST IGREATERP.UFN.TEST LSH.UFN.TEST MISC.UFN.TEST) ufns)




(* (FNS PUSHSTKOV.TEST CALL.TEST INTERP.TEST) ??)




(* helpers for the tests)

(DEFINEQ

(FN.FIRSTARG
  [LAMBDA (X Y Z)                                            (* jmh " 1-Apr-86 18:05")
    X])

(FN.FIRSTARG.PVARS
  [LAMBDA (X Y Z)                                            (* lmm " 3-JAN-80 01:08")
    (PROG (P D Q)
          (RETURN X])

(FN.FIRSTARG.FVARS
  [LAMBDA (X Y Z)                                            (* lmm " 3-JAN-80 15:12")
    (COND
       (NIL FREE.1)
       (NIL FREE.2)
       (NIL FREE.3)
       (T X])

(FN.FIRSTARG.PVARS.FVARS
  [LAMBDA (X Y Z)                                            (* lmm " 3-JAN-80 01:08")
    (PROG (P D Q)
          (RETURN (COND
                     (P FREE.1)
                     (P FREE.2)
                     (P FREE.3)
                     (T X])
)
(DEFINEQ

(FN.LASTARG
  [LAMBDA (A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15)
    A15])

(FN.LASTARG.PVARS
  [LAMBDA (A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15)
                                                             (* lmm " 7-OCT-80 09:15")
    (PROG (P1 P2 P3)
          (RETURN A15])

(FN.LASTARG.FVARS
  [LAMBDA (A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15)
                                                             (* lmm " 7-OCT-80 09:16")
    (COND
       (NIL FVAR.1)
       (NIL FVAR.2)
       (NIL FVAR.3)
       (T A15])

(FN.LASTARG.FVARS.PVARS
  [LAMBDA (A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15)
                                                             (* lmm " 7-OCT-80 09:16")
    (PROG (P1 P2 P3)
          (RETURN (COND
                     (NIL FVAR.1)
                     (NIL FVAR.2)
                     (NIL FVAR.3)
                     (T A15])
)
(DEFINEQ

(FN.ARGCOUNT
  [LAMBDA N N])
)
(DEFINEQ

(FVAR.TESTN
  [LAMBDA (FVAR1 FVAR2 FVAR3)                                (* lmm " 3-JAN-80 01:46")
    (FVAR.TEST T])
)



(* utilities)

(DEFINEQ

(MT.LLSH
  [LAMBDA (X N)                                              (* rtk "31-Mar-86 18:26")
    (COND
      ((IGREATERP 0 N)
	(LRSH X (IMINUS N)))
      (T (FRPTQ N (SETQ X (LLSH X 1])

(MT.LRSH
  [LAMBDA (X N)                                              (* rtk "31-Mar-86 18:27")
                                                             (* assumes case where n is constant 1 handled in 
							     microcode or by \SLOWLRSHn)
    (COND
      ((IGREATERP 0 N)
	(LLSH X (IMINUS N)))
      (T (FRPTQ N (SETQ X (LRSH X 1])
)

(ADDTOVAR OPTIMIZATIONSOFFFILES TAMUTEST)



(* tell DT's CO not to optimize fns on this file)

(DECLARE: EVAL@COMPILE DONTCOPY 
(RESETSAVE OPTIMIZATIONSOFF T)

(DECLARE: EVAL@COMPILE 
[PUTPROPS CHECKVAL MACRO (X (MKPROGN (MAPCAR X (FUNCTION (LAMBDA (Y)
                                                                (LIST (QUOTE OR)
                                                                      Y
                                                                      (LIST (QUOTE RAID)
                                                                            (KWOTE Y]
[PUTPROPS CHECKSTACK MACRO (X (SUBPAIR (QUOTE (FORM N))
                                     (LIST (CAR X)
                                           (RAND 1 65535))
                                     (QUOTE (OR (EQ (PROG1 N FORM)
                                                    N)
                                                (RAID (QUOTE (push FORM lost N]
(PUTPROPS CHECKPUSH MACRO ((FORM)
                           (CHECKSTACK FORM)))
[PUTPROPS FREEVARTEST MACRO (X (COND ((NOT (EVALV (QUOTE FREEVARTESTING)))
                                      (CONS (QUOTE AND)
                                            (CONS NIL X)))
                                     (T (CONS (QUOTE PROGN)
                                              X]
)


(PUTPROPS NOP DOPVAL (1 NOP))

(PUTPROPS .COPY. DOPVAL (0 COPY))
)
(DECLARE: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS 

(ADDTOVAR NLAMA )

(ADDTOVAR NLAML )

(ADDTOVAR LAMA FN.ARGCOUNT)
)
(PUTPROPS TAMUTEST COPYRIGHT ("Xerox Corporation" 1986))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (7685 8909 (RUN.TEST 7695 . 8907)) (9038 13376 (DIAGNOSE.TEST.0 9048 . 10922) (
DIAGNOSE.TEST.1 10924 . 13374)) (13377 13907 (BASICDIAGNOSTICS.TEST 13387 . 13905)) (13908 15602 (
PUSH.TEST 13918 . 15600)) (15603 16244 (JUMPX.TEST 15613 . 16242)) (16245 16634 (CALLS.FIRSTARGTEST 
16255 . 16632)) (16635 18172 (CALLS.LASTARGTEST 16645 . 17162) (CALLS.TOOFEWARGS 17164 . 17721) (
CALLS.TOOMANYARGS 17723 . 18170)) (18173 18984 (CALLS.COUNTTEST 18183 . 18982)) (18985 20667 (
BIND.UNBIND.TEST 18995 . 19873) (BIND.UNBIND.TEST2 19875 . 20665)) (20668 22930 (PVAR←.SETQ 20678 . 
21713) (PVAR.SETUP 21715 . 22239) (FVAR.GLOBAL 22241 . 22928)) (22931 24712 (FVAR.FREE 22941 . 23763) 
(FVAR.TEST 23765 . 24365) (FVAR.TEST2 24367 . 24570) (FVAR.TEST3 24572 . 24710)) (24713 25100 (
CONST.TEST2 24723 . 25098)) (25101 25824 (CAR.CDR.TEST 25111 . 25822)) (25825 26394 (UNBIND.TEST 25835
 . 26077) (DUNBIND.TEST 26079 . 26392)) (26395 27719 (APPLYFN.TEST 26405 . 27717)) (27720 27926 (
FCOPY.TEST 27730 . 27924)) (27927 28545 (FJUMPX.TEST 27937 . 28543)) (28546 32111 (SETI.TEST 28556 . 
29378) (SETP.TEST 29380 . 30991) (SIC.TEST 30993 . 31139) (IPLUS.TEST 31141 . 32109)) (32165 36238 (
LOGOR.TEST 32175 . 32903) (LOGAND.TEST 32905 . 33618) (LOGXOR.TEST 33620 . 34351) (IGREATERP.TEST 
34353 . 34978) (LRSH.TEST 34980 . 35801) (LLSH.TEST 35803 . 36236)) (36519 36690 (GLOBALVAL.TEST 36529
 . 36688)) (36973 37757 (FN.FIRSTARG 36983 . 37102) (FN.FIRSTARG.PVARS 37104 . 37261) (
FN.FIRSTARG.FVARS 37263 . 37464) (FN.FIRSTARG.PVARS.FVARS 37466 . 37755)) (37758 38715 (FN.LASTARG 
37768 . 37856) (FN.LASTARG.PVARS 37858 . 38082) (FN.LASTARG.FVARS 38084 . 38349) (
FN.LASTARG.FVARS.PVARS 38351 . 38713)) (38716 38760 (FN.ARGCOUNT 38726 . 38758)) (38761 38906 (
FVAR.TESTN 38771 . 38904)) (38929 39494 (MT.LLSH 38939 . 39135) (MT.LRSH 39137 . 39492)))))
STOP