.TITLE STORE_REGULAR IN SYMBOL TABLE SIMPLE INDEX .ENABLE DEBUG .SUBTITLE LOCAL DATA STORAGE .PSECT IMPURE_DATA,NOEXE,RD,WRT,NOSHR,CON,GBL,NOVEC,LONG ARG1: .LONG 0 ARG2: .LONG 0 NEW_NODE: ;V1.10 .LONG 0 ;V1.10 NEW_SYMBOL: ;V1.10 .LONG 0,0 ;V1.10 STRUCTURE: ;V3.00 .LONG 0 ;V3.00 NESTED_STRUCTURE: ;V3.03 .LONG 0 ;V3.03 .PSECT PURE_DATA,RD,NOEXE,NOWRT,SHR,CON,GBL,NOVEC ARG: .LONG 2 .ADDRESS ARG1,ARG2 INSERT_ARG: ;V1.10 .LONG 7 ;V1.10 .ADDRESS SYMBOL_TABLE_QUEUE ;V1.10 .ADDRESS NEW_SYMBOL ;V1.10 .ADDRESS NULL ;V1.10 .ADDRESS COMPARE ;V1.10 .ADDRESS GET_NODE ;V1.10 .ADDRESS NEW_NODE ;V1.10 .LONG -1 ;V1.10 .PAGE .SUBTITLE STORE IN SYMBOLE TABLE CODE .PSECT CODE,EXE,RD,NOWRT,SHR,CON,GBL,NOVEC .ENTRY STORE_SYMBOL,^M ; ; IADDR=STORE_SYMBOL(SYMBOL,HOW_USED,LINE_NUMBER, ;V1.15 ; FLAGS,[COMMON_NAME],[EQUIVALENCED_ELEMENT],[ARGUEMNT NUMBER], ;V3.00 ; [ENTRY_POINT NAME POINTER]) ;V3.00 ; ; SYMBOL PASS BY DESCRIPTER SYMBOL TO BE PUT INTO TABLE ; HOW_USED PASS BY REFERENCE HOW USED TOKEN ; LINE_NUMBER PASS BY REFERENCE LINE NUMBER ; FLAGS PASS BY REFERENCE FLAGS TO BE SET IN SYMBOL ; FLAG WORD ; COMMON_NAME OR STRUCTURE_NAME ;V3.00 ; PASS BY DESCRIPTER NAMED COMMON ID CONTAINING SYMBOL ;V3.00 ; OR PASS BY REFERENCE POINTER TO SYMBOL TABLE ELEMENT ;V3.00 ; CONTAINING NAME OF STRUCTURE ;V3.00 ; ; ;V1.11 ; EQUIVALENCED_ELEMENT ;V1.15 ; SYMBOL TABLE ELEMENT OF SYMBOL TO WHICH THIS SYMBOL IS ;V1.15 ; EQUIVALENCED TOO. ;V1.15 ; ARGUEMNT NUMBER ;V2.08 ; FOR STORAGE INFO-CALLLING ARGUMENT-WHICH ARGUMENT NUMBER;V2.08 ; IS THIS VAR. ;V2.08 ; ENTRY POINT NAME POINTER ;V2.09 ; POINTS TO THE SYMBOL TABLE ENTRY FOR THE ENTRY POINT ;V2.09 ; NAME OF THE ROUTINE CALLED. ;V2.09 ; RETURN IN R0 THE ADDRESS OF THE SYMBOL TABLE ENTRY ELEMENT ;V1.15 SYMBOL_FLAG_ARRAY ==^X1 ;FLAGS THIS VARIABLE AS BEING ;V1.4 ;A DECLARED ARRAY. IT IS ;V1.4 ;EXPECTED TO BE FOLLOWED BY ;V1.4 ;A "(" AND NOT BE A FUNCTION ;V1.4 ;V1.4 SYMBOL_FLAG_ENTRY_POINT ==^X2 ;SYMBOL IS AN ENTRY POINT, ;V1.4 ;EITHER DECLARED OR IMPLIED ;V1.4 ;IN SUBROUTINE,[type]FUNCTION ;V1.4 ;BLOCKDATA,PROGRAM,ENTRY,CALL ;V1.4 ;OR CALLED AS A FUNCTION(EXCEPT ;V1.4 ;FOR STATEMENT FUNCTIONS) ;V1.4 ;V1.4 SYMBOL_FLAG_STATEMENT_FN ==^X4 ;SYMBOL IS A STATEMENT FUNCTION ;V1.4 ;V1.4 SYMBOL_FLAG_DEFINED_ENTRY_POINT ==^X8 ;SYMBOL IS AN ENTRY POINT ;V1.4 ;WHOSE ADDRESS IS WITHIN THE ;V1.4 ;CURRENT MODULE-PROGRAM, ;V1.4 ;BLOCKDATA,SUBROUTINE,ENTRY ;V1.4 ;[type] FUNCTION ;V1.4 ;SYMBOL_FLAG_ENTRY_POINT ALSO ;V1.4 ;SET ;V1.4 ;V1.4 SYMBOL_FLAG_GLOBAL ==^X10 ;SYMBOL IS A VARIABLE THAT ;V1.4 ;APPEARS IN A COMMON BLOCK ;V1.4 ;V1.4 SYMBOL_FLAG_USED ==^X20 ;SYMBOL IS USED (NOT JUST ;V1.4 ;DECLARED) IN THE CURRENT ;V1.4 ;MODULE ;V1.4 ;V1.4 SYMBOL_FLAG_CHANGED ==^X40 ;SYMBOL TS SET IN VALUE IN ;V1.4 ;THE CURRENT MODULE. ;V1.4 ;DEPENDING ON THE SITUATION ;V1.4 ;SYMBOL_FLAG_USED MAY ALSO ;V1.4 ;BE SET(DATA,PARAMETER, ;V1.4 ;EQUIVALENCE DO NOT SET IT) ;V1.4 ;V1.4 SYMBOL_FLAG_CALLING_ARG ==^X80 ;SYMBOL APPEARS AS AN ARGUMENT ;V1.4 ;IN A CALL STATEMENT OR IN ;V1.4 ;A FUNCTION INVOCATION ;V1.4 ;V1.4 SYMBOL_FLAG_CALLED_BY_ARG ==^X100 ;SYMBOL APPEARS AS AN ARGUMENT ;V1.4 ;IN THE MODULE DEFINED ENTRY ;V1.4 ;POINTS (SUBROUTINE,ENTRY, ;V1.4 ;[type] FUNCTION). ;V1.4 ;V1.4 SYMBOL_FLAG_CHARACTER ==^X200 ;SYMBOL HAS BEEN DECLARED TO BE ;V1.4 ;A CHARACTER. IT STILL COULD BE ;V1.4 ;A FUNCTION BUT MORE CHECKS ;V1.4 ;HAVE TO BE MADE TO SEE IF THE ;V1.4 ;TRAILING "(" IS A POSITION ;V1.4 ;ARGUMENT OR THE START OF A ;V1.4 ;FUNCTION ARGUMENT LIST. ;V1.4 ;THE POSITION FORM IS "(p1:p2)" ;V1.4 ;A FUNCTION FORM WOULD NOT ;V1.4 ;INCLUDE A POSITION ARGUMENT ;V1.4 ;V1.4 SYMBOL_FLAG_CALL_ENTRY_POINT ==^X400 ;SYMBOL IS AN ENTRY POINT ;V1.4 ;DECLARED IN A CALL ;V1.4 ;STATEMENT ;V1.4 ;V1.4 SYMBOL_FLAG_FN_CALLING_ARG ==^X800 ;SYMBOL IS AN ARGUMENT IN ;V1.4 ;A FUNCTION INVOCATION ;V1.4 ;(NOT A STATEMENT FUNCTION). ;V1.4 SYMBOL_FLAG_COMMON_NAME ==^X1000 ;SYMBOL IS A NAMED COMMON NAME ;V1.11 SYMBOL_FLAG_IN_NAMED_COMMON ==^X2000 ;SYMBOL USED IN NAMED COMMON ;V1.11 SYMBOL_FLAG_IN_BLANK_COMMON ==^X4000 ;SYMBOL USED IN BLANK COMMON ;V1.11 SYMBOL_FLAG_PARAMETER ==^X8000 ;SYMBOL IS PARAMETER ;V1.11 SYMBOL_FLAG_EQUIVALENCE ==^X10000 ;SYMBOL IS EQUIVALENCED ;V1.15 SYMBOL_FLAG_LABEL ==^X20000 ;SYMBOL IS A LABEL ;V1.29 SYMBOL_FLAG_RECORD ==^X40000 ;SYMBOL IS A RECORD(STRUCTURED) ;V3.00 SYMBOL_FLAG_STRUCTURE ==^X80000 ;SYMBOL IS A STRUCTURE NAME ;V3.00 SYMBOL_FLAG_STRUCTURE_ELEMENT ==^X100000 ;SYMBOL IS AN ELEMENT IN A ;V3.00 ;STRUCTURE ;V3.00 SYMBOL_FLAG_COMMON_STRUCTURE ==^X200000 ;SYMBOL IS A STRUCTURE ELEMENT ;V3.00 ;AND ONE OF SEVERAL AS A COMMON ;V3.00 ;SUBSTRUCTURE DECLARATION ;V3.00 SYMBOL_FLAG_IN_USE ==^X400000 ;STRUCTURE DEFINITION ELEMENT ;V3.00 ;IN USE(USED IN CLEANUP) ;V3.00 SYMBOL_FLAG_ARRAY_ELEMENT ==^X800000 ;VAR IS USED INSIDE AN ARRAY ;V3.00 ;ELEMENT TYPE DECLARATION ;V3.00 SYMBOL_FLAG_LIBRARY_FUNCTION ==^X1000000 ;ELEMENT NAME IS IN FORTRAN ;V3.05 ;LIBRARY ;V3.05 ; ;V1.11 ; TWO TYPES OF QUEUE ELEMENTS ARE USED FOR EACH SYMBOL ; ; THE QUEUE IS SET UP AS FOLLOWS-THE HEAD OF THE QUEUE IS ; "SYMBOL_TABLE_QUEUE" ; WHICH IS A TREE STRUCTURED LIST OF SYMBOL ELEMENTS IN ; ALPHABETICAL ORDER (ASCII COALLATEING SEQUENCE) ; ONLY ONE ENTRY IN THE SYMBOL TABLE LIST FOR EACH ; UNIQUE SYMBOL. ; EACH SYMBOL ENTRY IS ITSELF THE HEADER FOR A LINKED LIST ; QUEUE OF HOW USED ELEMENTS FOR THAT SYMBOL ; ; SYMBOL ELEMENT TOTAL LENGTH 15 LONG WORDS (60 BYTES) ; ---------------------------------- ; !SYMBOL TABLE LEFT LINK ! 0 ;V1.10 ; ---------------------------------- ;V1.10 ; !SYMBOL TABLE RIGHT LINK ! 4 ;V1.10 ; ---------------------------------- ;V1.10 ; ! ! BALANCE ! 8 ;V1.10 ; ---------------------------------- ;V1.10 ; !COMMON NAME POINTER !12 ;V1.10 ; ---------------------------------- ;V1.15 ; !STRUCTURE NAME POINTER !16 ;V3.00 ; ---------------------------------- ;V3.00 ; !EQUIVALENCE QUEUE FWD PTR !20 ;V3.00 ; ---------------------------------- ;V1.15 ; !EQUIVALENCE QUEUE BCK PTR !24 ;V3.00 ; ---------------------------------- ; !HOW USED QUEUE HDR LIST FWD PTR !28 ;V3.00 ; ---------------------------------- ; !HOW USED QUEUE HDR LIST BCK PTR !32 ;V3.00 ; ---------------------------------- ; !SYMBOL FLAG WORD !36 ;V3.00 ; ---------------------------------- ; !ARGUMENT NUMBER !40 ;V3.00 ; ---------------------------------- ;V2.08 ; !SYMBOL 31 BYTES !SIZE !44<=1 BYTE NUMBER OF CHRS IN SYMBOL ;V3.00 ; ---------------------------------- ; !NULL PADDED !48 ;V3.00 ; ---------------------------------- ; ! !52 ;V3.00 ; ---------------------------------- ; ! !56 ;V3.00 ; ---------------------------------- ; ! !60 ;V3.00 ; ---------------------------------- ; ! !64 ;V3.00 ; ---------------------------------- ; ! !68 ;V3.00 ; ---------------------------------- ; ! !72 ;V3.00 ; ---------------------------------- ; !TYPE POINTER !76 ;V3.16 ; ---------------------------------- ;V3.16 SYMBOL_TABLE_L_LEFT_LINK==0 ;V1.10 SYMBOL_TABLE_L_RIGHT_LINK==4 ;V1.10 SYMBOL_TABLE_W_BALANCE==8 ;V1.10 SYMBOL_TABLE_L_COMMON_POINTER==12 ;V1.10 SYMBOL_TABLE_L_STRUCTURE_PTR==16 ;V3.00 SYMBOL_TABLE_Q_EQUIVALENCE_Q==20 ;V3.00 SYMBOL_TABLE_Q_HOW_USED_QUEUE==28 ;V3.00 SYMBOL_TABLE_L_FLAG_WORD==36 ;V3.00 SYMBOL_TABLE_L_ARGUMENT==40 ;V3.00 SYMBOL_TABLE_B_SIZE==44 ;V3.00 SYMBOL_TABLE_S_NAME==45 ;V3.00 SYMBOL_TABLE_L_TYPE_PTR==76 ;V3.16 SYMBOL_TABLE_LENGTH==80 ;V3.16 ; ; HOW USED ELEMENT TOTAL LENGTH 4 LONG WORDS (16 BYTES) ; ; ---------------------------------- ; !HOW USED LINKED LIST FWD PTR ! 0 ; ---------------------------------- ; !HOW USED LINKED LIST BCK PTR ! 4 ; ---------------------------------- ; !LINE NUMBER OF THIS USE ! 8 ; ---------------------------------- ; !TOKEN OF HOW USED !12 ; ---------------------------------- ; !ARGUEMNT NUMBER !16 ;V2.08 ; ----------------------------------- ;V2.08 ; !ENTRY POINT NAME POINTER TO TABLE!20 ;V2.09 ; ----------------------------------- ;V2.09 SYMBOL_HOW_USED_Q_QUEUE==0 ;V1.10 SYMBOL_HOW_USED_L_LINE_NUMBER==8 ;V1.10 SYMBOL_HOW_USED_L_TOKEN==12 ;V1.10 SYMBOL_HOW_USED_L_ARGUMENT==16 ;V2.08 SYMBOL_HOW_USED_L_ENTRY_POINTER==20 ;V2.09 SYMBOL_HOW_USED_LENGTH==24 ;V2.09 ; ;V3.00 ; STRUCTURE ELEMENT NAME ELEMENT ;V3.00 ; ;V3.00 ; --------------------------------------- ;V3.00 ; !NEXT ELEMENT IN LEVEL ! 0 ;V3.00 ; --------------------------------------- ;V3.00 ; !PREVIOUS ELEMENT IN LEVEL ! 4 ;V3.00 ; --------------------------------------- ;V3.00 ; !ELEMENT IN NEXT LEVEL DOWN ! 8 ;V3.00 ; --------------------------------------- ;V3.00 ; !FLAG WORD ! 12 ;V3.00 ; --------------------------------------- ;V3.00 ; !SYMBOL 31 BYTES !COUNT! 16-17 ;V3.00 ; --------------------------------------- ;V3.00 ; !NULL PADDED ! ;V3.00 ; ;V3.00 ; ! ! ;V3.00 ; --------------------------------------- ;V3.00 STRUCTURE_L_NEXT_ELEMENT==0 ;V3.00 STRUCTURE_L_PREVIOUS_ELEMENT==4 ;V3.00 STRUCTURE_L_NEXT_LEVEL==8 ;V3.00 STRUCTURE_L_FLAG_WORD==12 ;V3.00 STRUCTURE_B_SIZE==16 ;V3.00 STRUCTURE_S_NAME==17 ;V3.00 STRUCTURE_LENGTH==48 ;V3.00 ; THE STRUCTURE ELEMENT IS USED IN A TREE STRUCURE ROOTED IN THE SYMBOL ;V3.00 ; TABLE ENTRY DEFINEING THE STRUCURE NAME. THE TREE DEFINES THE FORM OF ;V3.00 ; THE STRUCTURE. AS INDIVIDUAL ELEMENTS AND BRANCHES AND EVEN WHOLE TREES ;V3.00 ; CAN EXIST IN MORE THAN ONE STRUCRURE OR SUB STRUCTURE DEFINITION, A BIT ;V3.00 ; IN THE STRUCTURE FLAG WORD IS SET WHEN THE ELEMENT IS ALLOCATED AS A ;V3.00 ; STRUCURE ELEMENT AND CLEARED WHEN IT IS REMOVED. THIS IS TO PREVENT ;V3.00 ; ONE ELEMENT FROM BEING PUT BACK IN THE UNUSED QUEUE SEVERAL TIMES THUS ;V3.00 ; CAUSEING THE FREE ELEMENTS QUEUE TO BE GARBAGED. ;V3.00 ; ;V3.00 ; SEE IF THIS IS A NULL IDENTIFIER AS GENERATED BY %FILL ;V3.00 ; ;V3.00 TSTW @4(AP) ;V3.00 BNEQ 32$ ;V3.00 CLRL R0 ;V3.00 RET ;V3.00 ; ;V3.00 ; SEE IF THIS AN ENTRY INTO A STRUCTURE DEFINITION ;V3.00 ; ;V3.00 32$: CMPL #4,PROGRAM_LEVEL ;V3.00 BNEQ 30$ ;V3.00 TSTB STRUCTURE_LEVEL ;V3.00 BEQL 30$ ;V3.00 BITL #^C,@16(AP) ;V3.25 BNEQ 33$ ;V3.25 BITL #SYMBOL_FLAG_USED,@16(AP) ;V3.25 BNEQ 30$ ;V3.25 33$: ;V3.25 BITL #SYMBOL_FLAG_STRUCTURE,@16(AP) ;V3.00 BEQL 36$ ;V3.00 BITL #SYMBOL_FLAG_STRUCTURE_ELEMENT,@16(AP) ;V3.00 BEQL 30$ ;V3.00 36$: BITL #SYMBOL_FLAG_ARRAY_ELEMENT,@16(AP) ;V3.00 BNEQ 30$ ;V3.00 BITL #SYMBOL_FLAG_PARAMETER,@16(AP) ;V3.07 BNEQ 30$ ;V3.07 JMP ENTER_STRUCTURE_ELEMENT ;V3.00 30$: ;V3.00 ; ;V1.10 ; LOCATE SYMBOL IN TREE (IF ANY) AND IF NOT INSERT ;V1.10 ; ;V1.10 MOVQ @4(AP),NEW_SYMBOL ;V1.10 CALLG INSERT_ARG,G^LIB$INSERT_TREE ;V1.10 MOVL NEW_NODE,R8 ;V1.10 ; R8 POINTS TO SYMBOL TABLE ELEMENT BISL2 @16(AP),SYMBOL_TABLE_L_FLAG_WORD(R8) ;SET THE FLAG ;V1.10 ; SEE ABOUT CALLING ARGUMENT NUMBER ;V2.08 CMPL #TOKEN_EVAL_CALLED_BY_ARG,@8(AP) ;V2.08 BNEQ 1001$ ;V2.08 CMPW #7,(AP) ;V2.08 BGTR 1001$ ;V2.08 MOVL @28(AP),SYMBOL_TABLE_L_ARGUMENT(R8) ;V2.08 1001$: ;V2.08 ; CHECK TO SEE IF USED IN NAMED COMMON ;V1.11 BITL #SYMBOL_FLAG_IN_NAMED_COMMON,@16(AP) ;V1.15 BEQL 1$ ;NO ;V1.11 PUSHAL NEW_NODE ;V1.11 PUSHAL COMPARE ;V1.11 PUSHL 20(AP) ;V1.11 PUSHAL SYMBOL_TABLE_QUEUE ;V1.11 CALLS #4,G^LIB$LOOKUP_TREE ;FIND COMMMON NAME ENTRY IN TABLE ;V1.11 CMPL #LIB$_NORMAL,R0 ;CHECK IF FOUND ;V1.11 BNEQ 1$ ;SKIP IF NOT ;V1.11 MOVL NEW_NODE,SYMBOL_TABLE_L_COMMON_POINTER(R8) ;V1.15 1$: ;V1.11 ; ;V1.15 ; SEE IF THIS VARIABLE WAS JUST EQUIVALENCED ;V1.15 ; ;V1.15 BITL #SYMBOL_FLAG_EQUIVALENCE,@16(AP) ;V1.15 BEQL 5$ ;NO ;V1.15 ; ;V1.15 ; SYMBOL IS EQUIVALENCED. INSERT IN CIRCULAR QUEUE OF SYMBOLS THAT ARE ;V1.15 ; TIED TOGEATHER THIS WAY ;V1.15 ; ;V1.15 ; 4 POSSABLE COMBINATIONS MAY EXIST HERE ;V1.15 ; 1 TWO INDIVIDUAL ELEMENTS NOTPART OF EQ. QUEUE'S ;V1.15 ; 2 THE CURRENT SYMBOL IS BY ITSELF AND THE SYMBOL TO ;V1.15 ; BE EQ. TO -24(AP) IS A MULTI ELEMENT QUEUE ;V1.15 ; 3 THE CURRENT SYMBOL IS A QUEUE AND THE EQ TO SYMBOL ;V1.15 ; IS BY ITSELF ;V1.15 ; 4 BOTH SYMBOLS ARE PART OF INDEPENDED EQ. QUEUES ;V1.15 ; ;V1.15 ; CHECK CURRENT ELEMENT ;V1.15 MOVAL SYMBOL_TABLE_Q_EQUIVALENCE_Q(R8),R0 ;GET ADDR OF QUE;V1.15 CMPL R0,SYMBOL_TABLE_Q_EQUIVALENCE_Q(R8) ;IS IT ALONE ? ;V1.15 BNEQ 3$ ;NO-IT IS PART OF A QUEUE ;V1.15 ; SYMBOL IS ALONE-CASE 1 OR 2-HANDLE THE SAME WAY-INSERT ;V1.15 MOVL 24(AP),R1 ;GET ADDR OF EQ. SYMBOL ELEMENT ;V1.15 MOVAL SYMBOL_TABLE_Q_EQUIVALENCE_Q(R1),R1 ;GET ADDR OF Q ;V1.15 INSQUE (R0),(R1) ;INSERT INTO QUEUE ;V1.15 BRW 5$ ;GO PROCESS THE EQUIV. QUEUE ;V1.15 3$: MOVL 24(AP),R1 ;GET ADDR OF EQ SYMBOL ;V1.15 MOVAL SYMBOL_TABLE_Q_EQUIVALENCE_Q(R1),R1 ;V1.15 CMPL R1,(R1) ;IS IT SINGLE ELEMENT ;V1.15 BNEQ 6$ ;NO-GO HANDLE CASE 4 ;V1.15 ; WE HAVE CASE 3 INSERT ;V1.15 INSQUE (R1),(R0) ;V1.15 BRW 5$ ;GO DO COMMON PROCESSING ;V1.15 6$: ;BOTH ARE QUEUE'S-MERGE THEM ;V1.15 PUSHR #^M ;V1.15 MOVL 4(R0),R0 ;GET PRECEEDING ELEMENT ;V1.15 MOVL (R0),R3 ;SAVE OLD POINTER ;V1.15 MOVL (R1),(R0) ;UPDATE POINTER ;V1.15 MOVL R3,(R1) ;COMPLETE FIRST SWAP ;V1.15 POPR #^M ;V1.15 MOVL (R1),R1 ;GET NEXT ELEMENT ;V1.15 MOVL 4(R1),R3 ;SAVE OLD FOR SWAP ;V1.15 MOVL 4(R0),4(R1) ;UPDATE ;V1.15 MOVL R3,4(R0) ;COMPLETE SWAP ;V1.15 ; ;V1.15 ; COMMON CODE-SEE IF WE NEED TO UPDATE SELECTED SHARED FLAGS ;V1.15 ; BETWEEN EQUIVALENCED SYMBOLS ;V1.15 ; ;V1.15 5$: BITL #SYMBOL_FLAG_EQUIVALENCE,SYMBOL_TABLE_L_FLAG_WORD(R8) ;V1.15 BEQL 2$ ;NO NEED ;V1.15 MOVAL SYMBOL_TABLE_Q_EQUIVALENCE_Q(R8),R0 ;V1.15 ; SCAN THROUGH THE FLAGS OF ALL THE EQIVALENCED SYMBOLS TO SEE IF ;V1.15 ; THE FLAGS GLOBAL,NAMED_COMMON,BLANK_COMMON,EQUIVAENCE, ;V1.16 ; USED,CHANGED ;V2.18 ; CALLED_BY_ARG,CALLING_ARG,FN_CALLING_ARG ARE SET, IF SO IN ;V1.16 ; ONE-PROPIGATE TO ALL INCL POINTER TO COMMON NAME ;V1.15 MOVL R0,R1 ;USE R1 TO STEP THROUGH QUEUE ;V1.15 MOVL - ;V1.15 (R1),R2 ;V1.15 ;SET INITIAL FLAGS ;V1.15 MOVL - ;V1.15 (R1),R3 ;V1.15 ;SET POINTER TO COMMON NAME ;V1.15 8$: MOVL (R1),R1 ;GET NEXT SYMBOL ;V1.15 CMPL R0,R1 ;SEE IF LOOP COMPLETED ;V1.15 BEQL 7$ ;YES-CONTINUE ;V1.15 BISL2 - ;V1.15 (R1),R2 ;V1.15 ;SET FLAGS ;V1.15 TSTL - ;V1.15 (R1) ;V1.15 BEQL 8$ ;V1.15 MOVL - ;V1.15 (R1),R3 ;V1.15 ;SET POINTER TO COMMON NAME ;V1.15 BRB 8$ ;CONTINUE ;V1.15 7$: BICL2 - ;V1.15 #<^C>,R2 ;V2.18 ;ONLY WANTED FLAGS ;V1.15 MOVL R0,R1 ;SET UP TO SET BITS ;V1.15 BISL2 R2,- ;V1.15 (R1) ;V1.15 ;SET FLAGS ;V1.15 MOVL R3,- ;V1.15 (R1) ;V1.15 ;SET POINTER TO COMMON NAME ;V1.15 9$: MOVL (R1),R1 ;NEXT SYMBOL ;V1.15 CMPL R0,R1 ;SEE IF DONE ;V1.15 BEQL 2$ ;DONE ;V1.15 BISL2 R2,- ;V1.15 (R1) ;V1.15 ;SET FLAGS ;V1.15 MOVL R3,- ;V1.15 (R1) ;V1.15 ;SET POINTER TO COMMON NAME ;V1.15 BRB 9$ ;V1.15 2$: ;V1.15 ; ;V1.15 ; CHECK TO SEE IF IN NAMED COMMON AND IF SO- SEE IF USED/CHANGED BITS ;V1.15 ; NEED TO BE SET ;V1.15 BITL #SYMBOL_FLAG_IN_NAMED_COMMON,- ;V1.15 SYMBOL_TABLE_L_FLAG_WORD(R8) ;V1.15 BEQL 11$ ;NO ;V1.15 MOVL SYMBOL_TABLE_L_FLAG_WORD(R8),R0 ;GET FLAG WORD ;V1.15 BICL2 #<^C>,R0 ;V1.15 MOVL SYMBOL_TABLE_L_COMMON_POINTER(R8),R1 ;V1.15 BISL2 R0,SYMBOL_TABLE_L_FLAG_WORD(R1) ;SET NAMES CHAR ;V1.15 11$: ;V1.15 ; CHECK TO SEE IF THIS IS A DEFINITION OF A STRUCTURED VARIABLE ;V3.00 BITL #SYMBOL_FLAG_RECORD,@16(AP) ;V3.00 BEQL 25$ ;V3.00 BITL #SYMBOL_FLAG_STRUCTURE,@16(AP) ;V3.00 BNEQ 25$ ;V3.00 MOVL @20(AP),SYMBOL_TABLE_L_STRUCTURE_PTR(R8) ;V3.00 25$: ;V3.00 ; CHECK TO SEE IF THIS SYMBOL ALREADY USED ON SAME LINE ; IN SAME WAY MOVAL SYMBOL_TABLE_Q_HOW_USED_QUEUE(R8),R7 ;GET QUEUE HEADER ;V1.10 MOVL R7,R6 ;USE COPY 10$: MOVL SYMBOL_HOW_USED_Q_QUEUE(R6),R6 ;BACK UP FROM END OF QUEUE ;V1.10 CMPL R7,R6 ;SEE IF DONE BEQL 20$ ;YES CMPL @12(AP),SYMBOL_HOW_USED_L_LINE_NUMBER(R6);COMPARE LINE NUMBERS ;V1.10 BNEQ 20$ ;IF NOT SAME-ENTER CMPL @8(AP),SYMBOL_HOW_USED_L_TOKEN(R6) ;HOW USED THE SAME ?? ;V1.10 BNEQ 10$ CMPW #TOKEN_EVAL_CALLING_ARG,@8(AP) ;V2.08 BEQL 20$ ;V2.08 CMPW #TOKEN_EVAL_CALLED_BY_ARG,@8(AP) ;V2.08 BEQL 20$ ;V2.08 MOVL R8,R0 ;RETURN SYMBOL ADDRESS ;V1.15 CALLG NULL,CHECK_LIBRARY ;SEE ABOUT LIBRARY ITEM ;V2.15 BITL #SYMBOL_FLAG_STRUCTURE,@16(AP) ;V3.00 BEQL 27$ ;V3.00 BITL #SYMBOL_FLAG_RECORD,@16(AP) ;V3.00 BNEQ 27$ ;V3.00 CMPB #1,STRUCTURE_LEVEL ;V3.03 BLSS 37$ ;V3.03 MOVL R0,STRUCTURE ;V3.00 CLRL NESTED_STRUCTURE ;V3.03 BRB 27$ ;V3.03 37$: MOVL R0,NESTED_STRUCTURE ;V3.03 27$: ;V3.00 RET ;MULTIPLE SAME HOW USED ON SAME LINE ;DON'T BOTHER ENTERING ; ALLOCATE MEMORY FOR HOW USED ELEMENT 20$: MOVL #SYMBOL_HOW_USED_LENGTH,ARG1 ;ALLOCATE MEMORY ;V1.10 CALLG ARG,ALLOCATE INCL HOW_USED_PROCESSED ;V1.4 INSQUE SYMBOL_HOW_USED_Q_QUEUE(R0),- ;V1.10 @SYMBOL_TABLE_Q_HOW_USED_QUEUE+4(R8) ;V1.10 ;INSTALL IN HOW USED QUEUE AT TAIL ;V1.10 MOVL @12(AP),SYMBOL_HOW_USED_L_LINE_NUMBER(R0);LOAD LINE NUMBER ;V1.10 MOVL @8(AP),SYMBOL_HOW_USED_L_TOKEN(R0) ;LOAD HOW USED TOKEN ;V1.10 CLRL SYMBOL_HOW_USED_L_ARGUMENT(R0) ;V2.08 CLRL SYMBOL_HOW_USED_L_ENTRY_POINTER(R0) ;V2.09 CMPW #7,(AP) ;V2.08 BGTR 21$ ;V2.08 MOVL @28(AP),SYMBOL_HOW_USED_L_ARGUMENT(R0) ;V2.08 CMPW #8,(AP) ;V2.09 BGTR 21$ ;V2.09 MOVL @32(AP),SYMBOL_HOW_USED_L_ENTRY_POINTER(R0) ;V2.09 21$: ;V2.08 MOVL R8,R0 ;RETURN SYMBOL ADDRESS ;V1.15 CALLG NULL,CHECK_LIBRARY ;SEE ABOUT LIBRARY ITEM ;V2.15 BITL #SYMBOL_FLAG_STRUCTURE,@16(AP) ;V3.00 BEQL 28$ ;V3.00 BITL #SYMBOL_FLAG_RECORD,@16(AP) ;V3.00 BNEQ 28$ ;V3.00 CMPB #1,STRUCTURE_LEVEL ;V3.03 BLSS 38$ ;V3.03 MOVL R0,STRUCTURE ;V3.00 CLRL NESTED_STRUCTURE ;V3.03 BRB 28$ ;V3.03 38$: MOVL R0,NESTED_STRUCTURE ;V3.03 28$: ;V3.00 RET ;DONE .PAGE ;V2.15 .SUBTITLE SEE IF IDENTIFER IS ENTRY POINT AND IF SO-IN LIBRARY ;V2.15 .ENTRY CHECK_LIBRARY,^M ;V2.15 ; R0 POINTS TO SYMBOL TABLE ENTRY-MUST EXIT WITH SAME VALUE ;V2.15 BITL #,SYMBOL_TABLE_L_FLAG_WORD(R0) ;V2.15 BNEQ 1$ ;IT IS AN ENTRY POINT ;V2.15 RET ;NOT ENTRY POINT-SKIP IT ;V2.15 1$: BITL #,SYMBOL_TABLE_L_FLAG_WORD(R0) ;V2.15 BEQL 2$ ;NOT DEFINED HERE ;V2.15 RET ;DEFINED HERE-SKIP ;V2.15 2$: PUSHR #^M ;V2.15 MOVL R0,R11 ;SET TARGET POINTER ;V2.15 CLRL R10 ;SET LOW POINTER ;V2.15 MOVL #,R9 ;SET HIGH POINTER ;V2.15 CVTBL SYMBOL_TABLE_B_SIZE(R11),R8 ;GET LENGTH OF TARGET ;V2.15 ; FIRST CHECK HIGH AND LOW FOR MATCH/OUT OF RANGE ;V2.15 MOVL R10,R7 ;SET UP COMPARE ;V2.15 CVTBL L^LIBRARY_POINTER_TABLE,R6 ;V2.15 CMPC5 R8,SYMBOL_TABLE_S_NAME(R11),#0,R6,@L^LIBRARY_POINTER_TABLE+4 ;V2.15 BGTR 3$ ;SYMBOL IS BELOW(HIGHER THAN TOP OF TABLE) ;V2.15 BLSS 4$ ;SYMBOL ABOVE TABLE ;V2.15 BRW 19$ ;IS FIRST SYMBOL INTABLE ;V2.15 4$: BRW 20$ ;V2.15 3$: MOVL R9,R7 ;SET UP HIGH END COMPARE ;V2.15 MULL3 #8,R7,R6 ;V2.15 CVTBL L^LIBRARY_POINTER_TABLE(R6),R5 ;V2.15 CMPC5 R8,SYMBOL_TABLE_S_NAME(R11),#0,R5,@L^LIBRARY_POINTER_TABLE+4(R6);V2.15 BLSS 5$ ;SYMBOL IS ABOVE END OF TABLE ;V2.15 BGTR 6$ ;SYMBOL BELOW TABLE ;V2.15 BRW 19$ ;FOUND SYMBOL ;V2.15 6$: BRW 20$ ;V2.15 5$: ;NOW START BINARY SEARCH OF TABLE ;V2.15 CMPL R9,R10 ;SEE IF DONE ;V2.15 BNEQ 7$ ;V2.15 BRW 20$ ;V2.15 7$: ADDL3 R9,R10,R7 ;GET NEXT INDEX TO CHECK ;V2.15 DIVL2 #2,R7 ;V2.15 MULL3 #8,R7,R6 ;V2.15 CVTBL L^LIBRARY_POINTER_TABLE(R6),R5 ;V2.15 CMPC5 R8,SYMBOL_TABLE_S_NAME(R11),#0,R5,@L^LIBRARY_POINTER_TABLE+4(R6);V2.15 BLSS 9$ ;SYMBOL IS ABOVE ;V2.15 BGTR 8$ ;SYMBOL IS BELOW ;V2.15 BRW 19$ ;ITS A HIT ;V2.15 8$: CMPL R7,R10 ;SEE IF UPDATE IS REALLY-IF NOT THEN DONE-NO HIT ;V2.15 BEQL 20$ ;V2.15 MOVL R7,R10 ;V2.15 BRW 5$ ;V2.15 9$: CMPL R7,R9 ;V2.15 BEQL 20$ ;V2.15 MOVL R7,R9 ;V2.15 BRW 5$ ;V2.15 19$: INCL LIBRARY_STAT[R7] ;V2.15 POPR #^M ;V3.05 BISL #SYMBOL_FLAG_LIBRARY_FUNCTION,SYMBOL_TABLE_L_FLAG_WORD(R0) ;V3.05 RET ;V3.05 20$: POPR #^M ;V2.15 RET ;V2.15 .PAGE ;V3.05 .SUBTITLE SET VARIABLE TYPE POINTER ;V3.05 .ENTRY SET_VAR_TYPE,^M ;V3.05 ; ;V3.05 ; CALL SET_VAR_TYPE(SYMBOL,VARTYPE) ;V3.05 ; SYMBOL PASS BY DESCRIPTER-SYMBOL TO BE UPDATED ;V3.05 ; VARTYPE PASS BY DESCRIPER-VAR TYPE OF SYMBOL TO SET ;V3.05 TSTB L^STRUCTURE_LEVEL ;V3.07 BNEQ 1$ ;V3.07 MOVL 4(AP),R11 ;V3.05 MOVL (R11),NEW_SYMBOL ;V3.05 MOVL 4(R11),NEW_SYMBOL+4 ;V3.05 CALLG INSERT_ARG,G^LIB$INSERT_TREE ;V3.05 MOVL NEW_NODE,R11 ;V3.05 MOVL 8(AP),SYMBOL_TABLE_L_TYPE_PTR(R11) ;V3.05 1$: RET ;V3.07 .PAGE ;V1.10 .SUBTITLE INSERT UTILITY ROUTINES CALLED BY LIB$INSERT_TREE ;V1.10 .ENTRY COMPARE,^M ;V1.10 ; ;V1.10 ; RET_VALUE=COMPARE(SYMBOL DESCRIPTER,TREE ELEMENT) ;V1.10 ; RETURNS -1 IF SYMBOL < CURRENT TREE ELEMENT ;V1.10 ; 0 = ;V1.10 ; 1 > ;V1.10 ; ;V1.10 MOVL 4(AP),R2 ;GET ADDRESS OF SYMBOL DESCRIPTER ;V1.10 MOVL 8(AP),R3 ;GET ADDRESS OF TREE ELEMENT ;V1.10 CVTBL (R2),R0 ;V1.10 CVTBL SYMBOL_TABLE_B_SIZE(R3),R1 ;V1.10 CMPC5 R0,@4(R2),#0,R1,SYMBOL_TABLE_S_NAME(R3) ;V1.10 BLSS 1$ ;V1.10 BEQL 2$ ;V1.10 MOVL #1,R0 ;V1.10 RET ;V1.10 1$: MOVL #-1,R0 ;V1.10 RET ;V1.10 2$: CLRL R0 ;V1.10 RET ;V1.10 .ENTRY GET_NODE,^M ;V1.10 ; ;V1.10 ; IRET=GET_NODE(SYMBOL,NEW_NODE,) ;V1.10 ; ;V1.10 MOVL #SYMBOL_TABLE_LENGTH,ARG1 ;V1.10 CALLG ARG,ALLOCATE ;V1.10 INCL SYMBOLS_PROCESSED ;V1.10 MOVL R0,@8(AP) ;V1.10 CLRL SYMBOL_TABLE_L_COMMON_POINTER(R0) ;V1.10 MOVAL SYMBOL_TABLE_Q_HOW_USED_QUEUE(R0),- ;V1.10 SYMBOL_TABLE_Q_HOW_USED_QUEUE(R0) ;V1.10 MOVL SYMBOL_TABLE_Q_HOW_USED_QUEUE(R0),- ;V1.10 SYMBOL_TABLE_Q_HOW_USED_QUEUE+4(R0) ;V1.10 MOVAL SYMBOL_TABLE_Q_EQUIVALENCE_Q(R0),- ;V1.15 SYMBOL_TABLE_Q_EQUIVALENCE_Q(R0) ;V1.15 MOVL SYMBOL_TABLE_Q_EQUIVALENCE_Q(R0),- ;V1.15 SYMBOL_TABLE_Q_EQUIVALENCE_Q+4(R0) ;V1.15 CLRL SYMBOL_TABLE_L_FLAG_WORD(R0) ;V1.10 CLRL SYMBOL_TABLE_L_ARGUMENT(R0) ;V2.08 MOVL 4(AP),R1 ;V1.10 CVTBL (R1),R2 ;V1.10 MOVB R2,SYMBOL_TABLE_B_SIZE(R0) ;V1.10 CMPB #^A/0/,@4(R1) ;SEE IF LABEL ;V1.29 BGTR 1$ ;V1.29 CMPB #^A/9/,@4(R1) ;SEE IF IN RANGE 0-9 ;V1.29 BLSS 1$ ;V1.29 BISL #SYMBOL_FLAG_LABEL,SYMBOL_TABLE_L_FLAG_WORD(R0) ;V1.29 1$: ;V1.29 MOVC5 R2,@4(R1),#0,#31,SYMBOL_TABLE_S_NAME(R0) ;V1.10 MOVL #LIB$_NORMAL,R0 ;V1.10 RET ;V1.10 .PAGE ;V3.00 .SUBTITLE ENTER NEW STRUCTURE ELEMENT ;V3.00 ENTER_STRUCTURE_ELEMENT: ;V3.00 ; FIRST GET POINTER TO CURRENT STRUCUTRE ;V3.00 MOVL STRUCTURE,R11 ;V3.00 ; SPECIAL CASE-FIRST LEVEL 1 ENTRY ;V3.00 TSTL SYMBOL_TABLE_L_STRUCTURE_PTR(R11) ;V3.00 BNEQ 1$ ;NOPE-NOT FIRST ;V3.00 ; FIRST STRUCTURE ENTRY-GET ELEMENT ;V3.00 MOVL #STRUCTURE_LENGTH,ARG1 ;V3.00 CALLG ARG,ALLOCATE ;V3.00 INCL STRUCTURE_ELE_PROCESSED ;V3.00 MOVL R0,R10 ;V3.00 ; LOAD ELEMENT IN TOP STRUCTUR SYMBOLE ELEMENT ;V3.00 MOVL R10,SYMBOL_TABLE_L_STRUCTURE_PTR(R11) ;V3.00 TSTL NESTED_STRUCTURE ;V3.03 BEQL 30$ ;V3.03 PUSHR #^M ;V3.03 MOVL NESTED_STRUCTURE,R1 ;V3.03 MOVL R10,SYMBOL_TABLE_L_STRUCTURE_PTR(R1) ;V3.03 CLRL NESTED_STRUCTURE ;V3.03 POPR #^M ;V3.03 30$: ;V3.03 ; LOAD FLAG WORD OF STRUCTURE ;V3.00 BISL3 #SYMBOL_FLAG_IN_USE,@16(AP),STRUCTURE_L_FLAG_WORD(R10) ;V3.00 ; LOAD SYMBOL COUNTED STRING ;V3.00 MOVL 4(AP),R9 ;V3.00 CVTBL (R9),R8 ;V3.00 MOVB R8,STRUCTURE_B_SIZE(R10) ;V3.00 MOVL 4(R9),R7 ;V3.00 MOVC3 R8,(R7),STRUCTURE_S_NAME(R10) ;V3.00 MOVL R10,R0 ;V3.00 BITL #SYMBOL_FLAG_RECORD,@16(AP) ;V3.00 BEQL 6$ ;V3.00 MOVL @20(AP),R1 ;V3.00 MOVL SYMBOL_TABLE_L_STRUCTURE_PTR(R1),STRUCTURE_L_NEXT_LEVEL(R0) ;V3.00 6$: RET ;V3.00 1$: CVTBL STRUCTURE_COUNT,R10 ;V3.00 BITL #SYMBOL_FLAG_STRUCTURE,@16(AP) ;V3.00 BEQL 1001$ ;V3.00 BITL #SYMBOL_FLAG_STRUCTURE_ELEMENT,@16(AP) ;V3.00 BEQL 1001$ ;V3.00 BITL #SYMBOL_FLAG_RECORD,@16(AP) ;V3.00 BNEQ 1001$ ;V3.00 DECL R10 ;V3.00 1001$: MOVL SYMBOL_TABLE_L_STRUCTURE_PTR(R11),R9 ;V3.00 ; SKIP TO END OF CURRENT LEVEL OF STRUCTURE ELEMENTS ;V3.00 2$: TSTL STRUCTURE_L_NEXT_ELEMENT(R9) ;V3.00 BEQL 3$ ;V3.00 MOVL STRUCTURE_L_NEXT_ELEMENT(R9),R9 ;V3.00 BRB 2$ ;V3.00 3$: DECL R10 ;SEE IF AT REQUIRED LEVEL YET ;V3.00 BNEQ 1003$ ;V3.00 BRW 4$ ;YES-ADD ON NEW ELEMENT AT END ;V3.00 ; NO-SEE IF CAN GO DOWN ONE MORE LEVEL ;V3.00 1003$: TSTL STRUCTURE_L_NEXT_LEVEL(R9) ;V3.00 BEQL 5$ ;NO MORE LEVELS-ADD NEW ONE ;V3.00 MOVL STRUCTURE_L_NEXT_LEVEL(R9),R9 ;V3.00 BRB 2$ ;REPEAT TILL END OF CURRENT LEVEL ;V3.00 5$: ;ADD FIRST ELEMENT OF NEXT LEVEL BELOW CURRENT LEVEL ;V3.00 MOVL R9,R11 ;V3.00 MOVL #STRUCTURE_LENGTH,ARG1 ;V3.00 CALLG ARG,ALLOCATE ;V3.00 INCL STRUCTURE_ELE_PROCESSED ;V3.00 MOVL R0,R10 ;V3.00 TSTL NESTED_STRUCTURE ;V3.03 BEQL 31$ ;V3.03 PUSHR #^M ;V3.03 MOVL NESTED_STRUCTURE,R1 ;V3.03 MOVL R10,SYMBOL_TABLE_L_STRUCTURE_PTR(R1) ;V3.03 CLRL NESTED_STRUCTURE ;V3.03 POPR #^M ;V3.03 31$: ;V3.03 ; LOAD ELEMENT IN UPPER STRUCTUR SYMBOLE ELEMENT ;V3.00 MOVL R10,STRUCTURE_L_NEXT_LEVEL(R11) ;V3.00 BITL #SYMBOL_FLAG_COMMON_STRUCTURE,STRUCTURE_L_FLAG_WORD(R11) ;V3.00 BEQL 11$ ;V3.00 MOVL STRUCTURE_L_PREVIOUS_ELEMENT(R11),R0 ;V3.00 BEQL 11$ ;V3.00 12$: MOVL R10,STRUCTURE_L_NEXT_LEVEL(R0) ;V3.00 BITL #SYMBOL_FLAG_COMMON_STRUCTURE,STRUCTURE_L_FLAG_WORD(R0) ;V3.00 BEQL 11$ ;V3.00 MOVL STRUCTURE_L_PREVIOUS_ELEMENT(R0),R0 ;V3.00 BNEQ 12$ ;V3.00 11$: ;V3.00 ; LOAD FLAG WORD OF STRUCTURE ;V3.00 BISL3 #SYMBOL_FLAG_IN_USE,@16(AP),STRUCTURE_L_FLAG_WORD(R10) ;V3.00 ; LOAD SYMBOL COUNTED STRING ;V3.00 MOVL 4(AP),R9 ;V3.00 CVTBL (R9),R8 ;V3.00 MOVB R8,STRUCTURE_B_SIZE(R10) ;V3.00 MOVL 4(R9),R7 ;V3.00 MOVC3 R8,(R7),STRUCTURE_S_NAME(R10) ;V3.00 MOVL R10,R0 ;V3.00 BITL #SYMBOL_FLAG_RECORD,@16(AP) ;V3.00 BEQL 7$ ;V3.00 MOVL @20(AP),R1 ;V3.00 MOVL SYMBOL_TABLE_L_STRUCTURE_PTR(R1),STRUCTURE_L_NEXT_LEVEL(R0) ;V3.00 7$: RET ;V3.00 ; ADD TO END OF CURRENT LEVEL ;V3.00 4$: MOVL R9,R11 ;V3.00 MOVL #STRUCTURE_LENGTH,ARG1 ;V3.00 CALLG ARG,ALLOCATE ;V3.00 INCL STRUCTURE_ELE_PROCESSED ;V3.00 MOVL R0,R10 ;V3.00 TSTL NESTED_STRUCTURE ;V3.03 BEQL 32$ ;V3.03 PUSHR #^M ;V3.03 MOVL NESTED_STRUCTURE,R1 ;V3.03 MOVL R10,SYMBOL_TABLE_L_STRUCTURE_PTR(R1) ;V3.03 CLRL NESTED_STRUCTURE ;V3.03 POPR #^M ;V3.03 32$: ;V3.03 ; LOAD ELEMENT IN TOP STRUCTUR SYMBOLE ELEMENT ;V3.00 MOVL R10,STRUCTURE_L_NEXT_ELEMENT(R11) ;V3.00 MOVL R11,STRUCTURE_L_PREVIOUS_ELEMENT(R10) ;V3.00 ; LOAD FLAG WORD OF STRUCTURE ;V3.00 BISL3 #SYMBOL_FLAG_IN_USE,@16(AP),STRUCTURE_L_FLAG_WORD(R10) ;V3.00 ; LOAD SYMBOL COUNTED STRING ;V3.00 MOVL 4(AP),R9 ;V3.00 CVTBL (R9),R8 ;V3.00 MOVB R8,STRUCTURE_B_SIZE(R10) ;V3.00 MOVL 4(R9),R7 ;V3.00 MOVC3 R8,(R7),STRUCTURE_S_NAME(R10) ;V3.00 MOVL R10,R0 ;V3.00 BITL #SYMBOL_FLAG_RECORD,@16(AP) ;V3.00 BEQL 8$ ;V3.00 MOVL @20(AP),R1 ;V3.00 MOVL SYMBOL_TABLE_L_STRUCTURE_PTR(R1),STRUCTURE_L_NEXT_LEVEL(R0) ;V3.00 8$: RET ;V3.00 .PAGE .SUBTITLE GET_FLAG .ENTRY GET_FLAG,^M ; ; FUNCTION GET_FLAG(SYMBOL) ; ; SYMBOL PASS BY DESCRIPTER SYMBOL TO GET FLAG WORD FOR ; ; RETURN FLAG LONG WORD IN R0 AND POINTER TO SYMBOL ENTRY IN R1 ;V1.15 ; ; SET UP TO SCAN THE SYMBOL QUEUE FOR A MATCHING SYMBOL ALREADY ; IN TABLE PUSHAL NEW_NODE ;V1.10 PUSHAL COMPARE ;V1.10 PUSHAL @4(AP) ;V1.10 PUSHAL SYMBOL_TABLE_QUEUE ;V1.10 CALLS #4,G^LIB$LOOKUP_TREE ;V1.10 CMPL #LIB$_NORMAL,R0 ;V1.10 BNEQ NO_SYMBOL ;V1.10 MOVL NEW_NODE,R1 ;V1.10 MOVL SYMBOL_TABLE_L_FLAG_WORD(R1),R0 ;V1.10 RET ;V1.10 NO_SYMBOL: CLRL R0 ;NO SUCH SYMBOL-RETURN 0 (NO FLAGS SET) CLRL R1 ;V1.15 RET .PAGE .SUBTITLE CLEAN UP SYMBOL TABLE SPACE .ENTRY CLEAR_SYMBOL_TABLE,^M MOVL ELEMENT_64+4,ELEMENT_64+12 ;V1.4 MOVL ELEMENT_128+4,ELEMENT_128+12 ;V1.4 MOVL ELEMENT_192+4,ELEMENT_192+12 ;V1.4 MOVL ELEMENT_256+4,ELEMENT_256+12 ;V1.4 MOVL ELEMENT_LARGE+4,ELEMENT_LARGE+12 ;V1.4 BITL #INDEX_SAVE_FLAG,FLAG_WORD+4 ;SEE IF DATA TO BE SAVED ;V2.13 BEQL 1000$ ;V2.13 MOVL #1,INDEX_SAVED_FLAG ;YES-SET FLAG ;V2.13 RET ;V2.13 1000$: CLRL INDEX_SAVED_FLAG ;V2.13 ; REMOVE ALL ENTRYS IN SYMBOL TABLE AND RETURN THEM TO HEAP MOVAL SYMBOL_TABLE_QUEUE,R11 ;GET ADDR OF QUEUE HEADER TSTL (R11) ;CHECK TO SEE IF TREE EMPTY ;V1.10 BNEQ 1$ RET 1$: MOVL (R11),R10 ;GET QUEUE ELEMENT ; IF THIS IS A STRUCURE NAME-DELETE ALL STRUCURE DEFINITION ELEMENTS ;V3.00 BITL #SYMBOL_FLAG_STRUCTURE,SYMBOL_TABLE_L_FLAG_WORD(R10) ;V3.00 BEQL 2$ ;V3.00 PUSHAL SYMBOL_TABLE_L_STRUCTURE_PTR(R10) ;V3.00 CALLS #1,REMOVE_STRUCTURE ;V3.00 2$: ;V3.00 CALLG NULL,REMOVE_TAIL ;REMOVE ALL ATTACHED ITEMS CLRQ SYMBOL_TABLE_QUEUE ;CLEAN UP QUEUE ;V1.10 MOVL #SYMBOL_TABLE_LENGTH,ARG1 ;V1.10 MOVL R10,ARG2 CALLG ARG,FREE RET .ENTRY REMOVE_TAIL,^M ; ; DOES IT HAVE A LEFT LINK ;V1.10 TSTL SYMBOL_TABLE_L_LEFT_LINK(R10) ;V1.10 BEQL 1$ ;NO-SEE ABOUT HIGHER ; HAS LOWER SYMBOL TO REMOVE PUSHR #^M ;SAVE CURRENT MOVL SYMBOL_TABLE_L_LEFT_LINK(R10),R10;GET LEFT ELEMENT ;V1.10 CALLG NULL,REMOVE_TAIL MOVL #SYMBOL_TABLE_LENGTH,ARG1 ;V1.10 MOVL R10,ARG2 ;V1.10 CALLG ARG,FREE ;FREE BLOCK POPR #^M 1$: TSTL SYMBOL_TABLE_L_RIGHT_LINK(R10) ;ANY RIGHT ;V1.10 BEQL 2$ ;NO ; HAS HIGHER SYMBOLS TO REMOVE PUSHR #^M ;SAVE REGESTERS ;V1.10 MOVL SYMBOL_TABLE_L_RIGHT_LINK(R10),R10 ;V1.10 CALLG NULL,REMOVE_TAIL MOVL #SYMBOL_TABLE_LENGTH,ARG1 MOVL R10,ARG2 CALLG ARG,FREE POPR #^M 2$:; REMOVE ALL HOW USED FROM ELEMENT MOVAL SYMBOL_TABLE_Q_HOW_USED_QUEUE(R10),R9 ;V1.10 ;GET ADDR OF HOW USED QUEUE HEADER ;V1.10 3$: REMQUE @(R9),ARG2 ;GET ELEMENT BVS 4$ MOVL #SYMBOL_HOW_USED_LENGTH,ARG1 ;V1.10 CALLG ARG,FREE BRB 3$ 4$: RET .ENTRY REMOVE_STRUCTURE,^M ;V3.00 MOVL @4(AP),R11 ;GET STRUCTURE ELEMENT TO BE DELETEED ;V3.00 BEQL 1$ ;NONE-DONE ;V3.00 BITL #SYMBOL_FLAG_IN_USE,STRUCTURE_L_FLAG_WORD(R11) ;V3.00 BEQL 1$ ;V3.00 PUSHAL STRUCTURE_L_NEXT_ELEMENT(R11) ;V3.00 CALLS #1,REMOVE_STRUCTURE ;V3.00 PUSHAL STRUCTURE_L_NEXT_LEVEL(R11) ;V3.00 CALLS #1,REMOVE_STRUCTURE ;V3.00 CLRL STRUCTURE_L_FLAG_WORD(R11) ;V3.00 MOVL #STRUCTURE_LENGTH,ARG1 ;V3.00 MOVL R11,ARG2 ;V3.00 CALLG ARG,FREE ;V3.00 1$: RET ;V3.00 .END