(DEFINE-FILE-INFO §PACKAGE "INTERLISP" §READTABLE "INTERLISP" §BASE 10) (FILECREATED " 7-Dec-86 17:26:23" {ERIS}LISPCORE>UNBOXEDOPS.;7 12906 changes to%: (OPTIMIZERS UFREMAINDER2 UFREMAINDER) (FNS UFREMAINDER) (VARS UNBOXEDOPSCOMS) previous date%: " 3-Nov-86 20:30:24" {ERIS}LISPCORE>UNBOXEDOPS.;6) (* " Copyright (c) 1986 by Xerox Corporation. All rights reserved. ") (PRETTYCOMPRINT UNBOXEDOPSCOMS) (RPAQQ UNBOXEDOPSCOMS [(FNS UFABS UFEQP UFGEQ UFGREATERP UFIX UFLEQ UFLESSP UFMAX UFMIN UFMINUS UFREMAINDER) (OPTIMIZERS UFABS UFABS1 UFEQP UFEQP2 UFGEQ UFGEQ2 UFGREATERP UFGREATERP2 UFIX UFIX1 UFLEQ UFLEQ2 UFLESSP UFLESSP2 UFMAX UFMAX2 UFMIN UFMIN2 UFMINUS UFMINUS1 UFREMAINDER) (PROP FILETYPE UNBOXEDOPS) (DECLARE%: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY (LOCALVARS . T)) (DECLARE%: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS (ADDVARS (NLAMA) (NLAML) (LAMA UFMIN UFMAX]) (DEFINEQ (UFABS [LAMBDA (X) (* jop%: "30-Jan-86 15:10") (FABS X]) (UFEQP [LAMBDA (X Y) (* jop%: "31-Jan-86 12:35") (FEQP X Y]) (UFGEQ [LAMBDA (X Y) (* jop%: " 2-Feb-86 12:36") (GEQ X Y]) (UFGREATERP [LAMBDA (X Y) (* jop%: "30-Jan-86 15:11") (FGREATERP X Y]) (UFIX [LAMBDA (X) (* jop%: "30-Jan-86 15:11") (FIX X]) (UFLEQ [LAMBDA (X Y) (* jop%: " 2-Feb-86 12:37") (LEQ X Y]) (UFLESSP [LAMBDA (X Y) (* jop%: "31-Jan-86 12:20") (FLESSP X Y]) (UFMAX [LAMBDA ARGS (* jop%: "30-Jan-86 15:12") (bind (MAX _ MIN.FLOAT) for I from 1 to ARGS do (if (FGREATERP (ARG ARGS I) MAX) then (SETQ MAX (ARG ARGS I))) finally (RETURN MAX]) (UFMIN [LAMBDA ARGS (* jop%: "30-Jan-86 15:13") (bind (MIN _ MAX.FLOAT) for I from 1 to ARGS do (if (FLESSP (ARG ARGS I) MIN) then (SETQ MIN (ARG ARGS I))) finally (RETURN MIN]) (UFMINUS [LAMBDA (X) (* jop%: "30-Jan-86 15:14") (FMINUS X]) (UFREMAINDER [LAMBDA (X Y) (* ; "Edited 7-Dec-86 17:21 by jop:") (LET ((FX (FLOAT X)) (FY (FLOAT Y)) RESULT) (DECLARE (TYPE FLOATP FX FY RESULT)) (SETQ RESULT (FDIFFERENCE FX (FTIMES (FLOAT (UFIX (FQUOTIENT FX FY))) FY]) ) (DEFOPTIMIZER UFABS (&OPTIONAL (ARG1 NIL ARG1GIVEN) &REST RESTARGS &WHOLE ORIGINAL) (if (OR (NOT ARG1GIVEN) RESTARGS) then (PRINTOUT T "************" T) (PRINTOUT T "Illegal args to UFABS" %, %, ORIGINAL T) (PRINTOUT T "************" T)) (LIST 'UFABS1 ARG1)) (DEFOPTIMIZER UFABS1 (X) `[\FLOATBOX ((OPCODES UBFLOAT1 2) (\FLOATUNBOX ,X]) (DEFOPTIMIZER UFEQP (&WHOLE ORIGINAL &OPTIONAL (ARG1 NIL ARG1GIVEN) (ARG2 NIL ARG2GIVEN) &REST RESTARGS) (if (OR (NOT ARG1GIVEN) (NOT ARG2GIVEN) RESTARGS) then (PRINTOUT T "************" T) (PRINTOUT T "Illegal args to UFEQP" %, %, ORIGINAL T) (PRINTOUT T "************" T)) (LIST 'UFEQP2 ARG1 ARG2)) (DEFOPTIMIZER UFEQP2 (X Y) `(EQ (\FLOATUNBOX (FDIFFERENCE ,X ,Y)) NIL)) (DEFOPTIMIZER UFGEQ (&WHOLE ORIGINAL &OPTIONAL (ARG1 NIL ARG1GIVEN) (ARG2 NIL ARG2GIVEN) &REST RESTARGS) (if (OR (NOT ARG1GIVEN) (NOT ARG2GIVEN) RESTARGS) then (PRINTOUT T "************" T) (PRINTOUT T "Illegal args to UFGEQ" %, %, ORIGINAL T) (PRINTOUT T "************" T)) (LIST 'UFGEQ2 ARG1 ARG2)) (DEFOPTIMIZER UFGEQ2 (X Y) `[NOT ((OPCODES SWAP UBFLOAT2 5) (\FLOATUNBOX ,X) (\FLOATUNBOX ,Y]) (DEFOPTIMIZER UFGREATERP (&WHOLE ORIGINAL &OPTIONAL (ARG1 NIL ARG1GIVEN) (ARG2 NIL ARG2GIVEN) &REST RESTARGS) (if (OR (NOT ARG1GIVEN) (NOT ARG2GIVEN) RESTARGS) then (PRINTOUT T "************" T) (PRINTOUT T "Illegal args to UFGREATERP" %, %, ORIGINAL T) (PRINTOUT T "************" T)) (LIST 'UFGREATERP2 ARG1 ARG2)) (DEFOPTIMIZER UFGREATERP2 (X Y) `((OPCODES UBFLOAT2 5) (\FLOATUNBOX ,X) (\FLOATUNBOX ,Y))) (DEFOPTIMIZER UFIX (&WHOLE ORIGINAL &OPTIONAL (ARG1 NIL ARG1GIVEN) &REST RESTARGS) (if (OR (NOT ARG1GIVEN) RESTARGS) then (PRINTOUT T "************" T) (PRINTOUT T "Illegal args to UFIX" %, %, ORIGINAL T) (PRINTOUT T "************" T)) (LIST 'UFIX1 ARG1)) (DEFOPTIMIZER UFIX1 (X) `((OPCODES UBFLOAT1 4) (\FLOATUNBOX ,X))) (DEFOPTIMIZER UFLEQ (&WHOLE ORIGINAL &OPTIONAL (ARG1 NIL ARG1GIVEN) (ARG2 NIL ARG2GIVEN) &REST RESTARGS) (if (OR (NOT ARG1GIVEN) (NOT ARG2GIVEN) RESTARGS) then (PRINTOUT T "************" T) (PRINTOUT T "Illegal args to UFLEQ" %, %, ORIGINAL T) (PRINTOUT T "************" T)) (LIST 'UFLEQ2 ARG1 ARG2)) (DEFOPTIMIZER UFLEQ2 (X Y) `[NOT ((OPCODES UBFLOAT2 5) (\FLOATUNBOX ,X) (\FLOATUNBOX ,Y]) (DEFOPTIMIZER UFLESSP (&WHOLE ORIGINAL &OPTIONAL (ARG1 NIL ARG1GIVEN) (ARG2 NIL ARG2GIVEN) &REST RESTARGS) (if (OR (NOT ARG1GIVEN) (NOT ARG2GIVEN) RESTARGS) then (PRINTOUT T "************" T) (PRINTOUT T "Illegal args to UFLESSP" %, %, ORIGINAL T) (PRINTOUT T "************" T)) (LIST 'UFLESSP2 ARG1 ARG2)) (DEFOPTIMIZER UFLESSP2 (X Y) `((OPCODES SWAP UBFLOAT2 5) (\FLOATUNBOX ,X) (\FLOATUNBOX ,Y))) (DEFOPTIMIZER UFMAX (&OPTIONAL (ARG1 NIL ARG1GIVEN) (ARG2 NIL ARG2GIVEN) &REST RESTARGS) (if (NOT ARG1GIVEN) then 'MIN.FLOAT elseif (NOT ARG2GIVEN) then `(FLOAT %, ARG1) elseif RESTARGS then `(UFMAX (UFMAX2 %, ARG1 %, ARG2) ., RESTARGS) else (LIST 'UFMAX2 ARG1 ARG2))) (DEFOPTIMIZER UFMAX2 (X Y) `[\FLOATBOX ((OPCODES UBFLOAT2 6) (\FLOATUNBOX ,X) (\FLOATUNBOX ,Y]) (DEFOPTIMIZER UFMIN (&OPTIONAL (ARG1 NIL ARG1GIVEN) (ARG2 NIL ARG2GIVEN) &REST RESTARGS) (if (NOT ARG1GIVEN) then 'MAX.FLOAT elseif (NOT ARG2GIVEN) then `(FLOAT %, ARG1) elseif RESTARGS then `(UFMIN (UFMIN2 %, ARG1 %, ARG2) ., RESTARGS) else (LIST 'UFMIN2 ARG1 ARG2))) (DEFOPTIMIZER UFMIN2 (X Y) `[\FLOATBOX ((OPCODES UBFLOAT2 7) (\FLOATUNBOX ,X) (\FLOATUNBOX ,Y]) (DEFOPTIMIZER UFMINUS (&WHOLE ORIGINAL &OPTIONAL (ARG1 NIL ARG1GIVEN) &REST RESTARGS) (if (OR (NOT ARG1GIVEN) RESTARGS) then (PRINTOUT T "************" T) (PRINTOUT T "Illegal args to UFMINUS" %, %, ORIGINAL T) (PRINTOUT T "************" T)) (LIST 'UFMINUS1 ARG1)) (DEFOPTIMIZER UFMINUS1 (X) `[\FLOATBOX ((OPCODES UBFLOAT1 3) (\FLOATUNBOX ,X]) (DEFOPTIMIZER UFREMAINDER (X Y) (CL:IF (AND (OR (CL:CONSTANTP X) (CL:SYMBOLP X)) (OR (CL:CONSTANTP Y) (CL:SYMBOLP Y))) `(FDIFFERENCE ,X (FTIMES [FLOAT (UFIX (FQUOTIENT ,X ,Y] ,Y)) 'COMPILER:PASS)) (PUTPROPS UNBOXEDOPS FILETYPE CL:COMPILE-FILE) (DECLARE%: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY (DECLARE%: DOEVAL@COMPILE DONTCOPY (LOCALVARS . T) ) ) (DECLARE%: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS (ADDTOVAR NLAMA ) (ADDTOVAR NLAML ) (ADDTOVAR LAMA UFMIN UFMAX) ) (PUTPROPS UNBOXEDOPS COPYRIGHT ("Xerox Corporation" 1986)) (DECLARE%: DONTCOPY (FILEMAP (NIL (1185 3385 (UFABS 1195 . 1316) (UFEQP 1318 . 1441) (UFGEQ 1443 . 1565) (UFGREATERP 1567 . 1700) (UFIX 1702 . 1821) (UFLEQ 1823 . 1945) (UFLESSP 1947 . 2074) (UFMAX 2076 . 2478) (UFMIN 2480 . 2879) (UFMINUS 2881 . 3006) (UFREMAINDER 3008 . 3383))))) STOP