GLS 2/17/73 THE NEW FASLOAD "XCT HACK" SEEMS TO BE WORKING WELL NOW. (THIS IS THE HACK WHEREBY CODE TO BE PURIFIED HAS ITS CALLS AND JCALLS REPLACED BY XCTS WHICH POINT TO THE CALLS, WHICH ARE ALL COLLECTED INTO A FEW "IMPURABLE" PAGES.) IT WORKS AS FOLLOWS: WHEN FASLOAD IS INVOKED, IT INSPECTS THE VARIABLE "PURE". IF IT IS NIL OR UNBOUND A SIMPLE LOAD IS PERFORMED. IF IT IS A NON-NIL NON-FIXNUM, A NORMAL PURE LOAD IS DONE (ATTEMPTS TO REPLACE CALLS WITH PUSHJ'S, ETC). IF IT IS A FIXNUM (AND IT MUST BE BETWEEN 1 AND 8) THEN ONE OF TWO THINGS HAPPEN: [1] IF THIS IS THE FIRST TIME FASLOAD HAS NOTICED PURE BEING A FIXNUM, IT DOES A PAGEBPORG AND THEN GRABS TWO CHUNKS OF BINARY PROGRAM SPACE, EACH <VALUE OF PURE> PAGES IN LENGTH. THE FIRST IS CALLED "XCT AREA 1" AND THE SECOND (SURPRISE!) "XCT AREA 2". THESE TWO AREAS ARE HENCEFORTH, ON THIS AND AND SUBSEQUENT FASLOADS, USED FOR THE XCT HACKERY. [2] IF THESE XCT AREAS HAVE ALREADY BEEN SET UP, THEN FASLOAD USES THEM FOR XCT HACKERY. AS CALLS ARE READ IN, FASLOAD SEARCHES AREA 2 FOR A MATCHING CALL (USING A HASH SCHEME). IF NONE IS FOUND, THE CALL IS ADDED TO BOTH AREAS (UNLESS THEY ARE FULL) AND INSTEAD OF LOADING A CALL INTO BINARY PROGRAM SPACE AN XCT POINTING TO THE CALL IN AREA 1 IS USED. IF A MATCHING CALL IS FOUND, AN XCT POINTING TO IT IS USED; THUS MANY XCTS MAY SHARE THE SAME CALL. IF FOR ANY REASON FASLOAD CAN'T CREATE AN XCT FOR THE CALL (AREA 2 HAS BEEN PURIFIED (SEE BELOW), AREAS ARE FULL) THEN A NORMAL PURIFICATION ON THE CALL IS DONE (AS IF PURE=T FOR THAT CALL). NOW IT IS INTENDED THAT EVENTUALLY AREA 2 WILL BE PURIFIED, AND AREA 1 LEFT IMPURE. THIS MEANS THAT IF NOUUO=NIL THE CALLS IN AREA 1 WILL EVENTUALLY BE SMASHED TO PUSHJ'S AND JRST'S, SO THAT THE XCT'S WILL EXECUTE THE PUSHJ'S ETC. (IF NOUUO=T, THEN THE EXPECTED THINGS HAPPEN, OF COURSE.) AREA 2 IS USED IN CASE IT IS DESIRED TO RESTORE AREA 1. (SEE XCTBLT BELOW.) THE FUNCTION "PURIFY" HAS BEEN ALTERED SO THAT IF AREA 2 IS EVER PURIFIED (ACTUALLY, IF THE FIRST PAGE OF THAT AREA IS PURIFIED), THEN A SWITCH IS PERMANENTLY SET SO THAT FASLOAD CAN STILL CREATE XCTS POINTING TO CALLS ALREADY IN AREA (ACTUALLY TO PLACES IN AREA 1 CORRESPONDING TO CALLS IN AREA 2; THIS WAY IF SOME CALLS HAVE BEEN CLOBBERED IN AREA 1 FASLOAD CAN STILL FIND THEM), BUT CANNOT PUT NEW CALLS IN THE AREAS (SINCE DOING THIS WOULD BE A MEMORY VIOLATION). ANY ATTEMPT TO PUT A NEW CALL IN THE XCT AREAS IS CONVERTED TO A NORMAL PURIFICATION. IN CASE IT IS DESIRED TO "UNSMASH" THE CALLS IN AREA 1 (E.G. TRACING PURPOSES) THE FUNCTION "XCTBLT" OF NO ARGUMENTS IS PROVIDED. IF NO XCT AREAS EXIST IT RETURNS NIL; OTHERWISE IT BLT'S AREA 2 INTO AREA 1 AND RETURNS T. (THE NAME OF THIS FUNCTION IS VARIOUSLY PRONOUNCED "EXECUTE-BLIT", "KSICT-BLIT", AND (BY STAVROS) "SICK-BLIT". THE FIRST AND THIRD ARE TO BE CONSIDERED OFFICIAL; USE THE ONE WHICH SHOWS HOW MUCH YOU LIKE THE FEATURE.) ********* XCTBLT SUPERSEDED BY (SSTATUS UUOLINKS) - 10/15/73 ***** FINALLY, INVOKING (STATUS XCTPG) WILL RETURN SOME INFO ABOUT THE XCT AREAS: IF NONE HAVE BEEN SET UP, IT RETURNS NIL. IF THEY HAVE BEEN SET UP, IT RETURNS A 2-LIST; THE FIRST ITEM IS T/NIL IF AREA 2 HAS/HAS NOT BEEN PURIFIED; THE SECOND IS A COUNT OF HOW MUCH ROOM IS LEFT IN XCT AREA 2 FOR MORE CALLS OR WHATEVER. ******** (STATUS XCTPG) REPLACED BY (STATUS UUOLINKS) - 10/15/73 ***** AN EXAMPLE: (** MEANS TYPED BY LOSER, == BY LISP, ; MEANS COMMENTS) ** (NOUUO NIL) ;NOUUO IS NIL - CAN SMASH CALLS == NIL ** BPORG == 64000 ;BPORG IS 64000 ** (STATUS XCTPG) == NIL ;NO XCT AREAS YET ** (XCTBLT) == NIL ;THEREFORE CAN'T BLT THEM ** (SETQ PURE 2) ;MAKE PURE A FIXNUM TO == 2 ; RESERVE 2 2-PAGE AREAS ** (FASLOAD COUNT FASL DSK GLS) == 74056 ;56-WORD FILE, PLUS 4 PAGES ** (STATUS XCTPG) ;COUNT HAS 10 DIFFERENT CALLS, == (NIL 3770) ; THUS 3770 WORDS ARE FREE ** (PAGEBPORG) == 76000 ** (PURIFY 70000 75777 'BPORG) ;PURIFY COUNT AND XCT == 70000 ; AREA 2 ** (STATUS XCTPG) == (T 3770) ;XCT AREA 2 IS NOW PURE, THUS T ** (COUNT '(A B C)) ;TRY COUNT == ((A . 1) (B . 1) (C . 1) (NIL . 1)) ;OBVIOUSLY IT WORKS ** (TRACE COUNTX) ;TRACE COUNTX (USED BY COUNT) == TRACE 22 LOADING: == DONE == (COUNTX) ** (COUNT '(A B C)) ;BUT CALL TO COUNTX HAS BEEN == ((A . 1) (B . 1) (C . 1) (NIL . 1)) ; SMASHED ** (XCTBLT) ;BLT BACK CALLS == T ;WIN ** (COUNT '(A B C)) ;NOW WE CAN WIN WITH TRACE == [TRACE GARBAGE, ETC.]