Google
 

Trailing-Edge - PDP-10 Archives - AP-4172F-BM - 3a-sources/xr0n.bli
There are 18 other files named xr0n.bli in the archive. Click here to see a list.
!THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
!  OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
!
!COPYRIGHT (C) 1972,1973,1974,1977,1978 DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. 01754
!FILENAME:	LOXREF.BLI
!DATE:		24 MAY 73	MGM/FLD

%3.2%	GLOBAL BIND LOXRV=1;	!MODULE VERSION NUMBER




%



				BLISS
			CROSS-REFERENCE MODULE
			----------------------

					C. WEINSTOCK
					DEC.  1970



%




MACRO TRUE=1$;
! *** ***  XREF ENTRY  *** ***


!	+-----------------------------------------+
!	!					  !
!	!		   XID1			  !
!	!					  !
!	+-----------------------------------------+
!	!					  !
!	!		   XID2			  !
!	!					  !
!	+-----------------------------------------+
!	!		     !			  !
!	!	XCBL	     !	     NXREF	  !
!	!		     !			  !
!	+-----------------------------------------+
!	!		     !			  !
!	!	XFLAG	     !	     DBLK	  !
!	!		     !			  !
!	+-----------------------------------------+



!	+-----------------------------------------+
!	!		     !			  !
!	!	DTPTR	     !	     DBPTR	  !
!	!		     !			  !
!	+-----------------------------------------+
!	!		     !			  !
!	!	DLINE	     !	     DBKWD	  !
!	!		     !			  !
!	+-----------------------------------------+
!	!		     !			  !
!	!	DBLEV	     !	     DFWRD	  !
!	!		     !			  !
!	+-----------------------------------------+
!	!		     !			  !
!	!	DFLAG	     !	     DSUBS	  !
!	!		     !			  !
!	+-----------------------------------------+




%
BLISS CROSS-REFERENCE INTERFACES WITH THE BLISS 
COMPILER AT FIVE POINTS.

1.	IN THE INITIALIZATION PHASE WHERE SWITCHES ARE SET

2.	IN THE SYMBOL TABLE INSERT ROUTINE

3.	IN THE SYMBOL TABLE LOOKUP ROUTINE

4.	IN THE END OF BLOCK ROUTINE
5.	BEFORE BLISS EXITS - TO PRINT OUT CROSS-REFERENCE

THE ROUTINE THAT INTERFACES AT THE SYMBOL TABLE

INSERT ROUTINE IS CALLED XREFINS. IT TAKES ONE PARAMETER
THE ADDINFO PARAMETER TO STINSERT. IT WORKS AS FOLLOWS:

1.	USE THE HASH FUNCTION TO FIND THE PROPER INDEX
	INTO XHT (XREF HASH TABLE).

2.	USING ROUTINE XFIND, SEE IF THE XREF TABLE ALREADY
	HAS AN XREF ENTRY FOR .ACCUM AND .ACCUM+1
3.	IF ONE DOES NOT EXIST, CREATE ONE, GOTO 8.
4.	IF ONE DOES EXIST, FIND MOST RECENT
	DECLARATION BLOCK FOR IT. (THE MOST RECENT DECLARATION
	BLOCK IS THAT FOUND BY SEARCHING DOWN DSUBS OR DBLK
	FOR THE LAST ONE WITHOUT THE END-OF-SCOPE FLAG ON.)
5.	IF NO SUCH DECLARATION BLOCK IS FOUND, LINK A NEW
	DECLARATION BLOCK ONTO THE TOP LEVEL LIST. (THIS IS
	DONE BY CAUSING DBLK TO POINT TO IT AND THE OLD VALUE
	OF DBLK GOES TO DFWRD).
6.	IF ONE IS FOUND, COMPARE BLOCKLEVELS AND IF EQUAL,
	SET ON DUPLICATE FLAG ON OLD ONE.
7.	LINK NEW DECLARATION BLOCK ONTO CHAIN POINTED TO
	BY DSUBS OF CURRENT DECLARATION BLOCK.
8.	IF .ADDINFO NEQ 0 THEN SET DLINE=.LINCNT.
9.	RETURN

THE ROUTINE THAT INTERFACES AT THE SYMBOL TABLE

LOOKUP ROUTINE IS CALLED XLINE.  IT TAKES NO
PARAMETERS.  IT ASSUMES THAT IF IT CANT FIND THE
SYMBOL BEING USED, IT WILL BE UNDECLARED BY BLISS
IT WORKS AS FOLLOWS:

1.	USE THE HASH FUNCTION TO FIND THE PROPER INDEX
	INTO XHT.
2.	USE XFIND TO FIND ENTRY.
3.	USE XDFIND TO FIND MOST RECENT ENTRY.
4.	IF