freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

編譯原理與實踐中英雙語版下ppt(已改無錯字)

2023-03-24 14:08:02 本頁面
  

【正文】 he type of data. A data type, such as a character, integer or real, can usually be stored in some bytes, . ? for example, integer is 2 bites, real is 4 bites. Storage for a bined type . 55 ? The length of data above is definite and their data are saved as fields in symbol table. ? Variablelength data is kept in other place outside this field。 ? such as a procedure data, its field in symbol table is only kept its address or use a pointer to label its memory location, the address or pointer is called relative address of it. 56 FORTUNE ? A FORTUNE program consists of a main program, subroutines, and functions. 57 ? Each occurrence of name has a scope that is consisted in one procedure only. We need only preserve the names of procedures and mon blocks that are external to the subroutines that were just processed. These names may not truly be external to the entire program being piled, but must be preserved until the entire collection of procedures in processing. . 58 ? In FORTUNE, there are data area for each procedure and area for variables named COMMON block. The symbol table must record each name’s data area in which it belongs to and it’s offset in that data area, that is, its position relative to the beginning of the area. Each block is declared by COMMON block. . ? The definition of declaration is, ? COMMON/BLOCK1/NAME1, NAME2 59 ? The storage procedure is as the following: ? (1) In the table for COMMON block, create a record for BLOCK1, if one does not already exist. . ? (2) In the symboltable entries for NAME1 and NAME2, set a pointer to the symbol table entry for BLOCK1, indicating that they are in COMMON and are members of BLOCK1. 60 ? (3) If the record has just now been created for BLOCK1, set a pointer to record the symbolt a b l e e n t r y f o r N A M E 1 , i n d i c a t i n g ? the first name in the COMMON block. . ? Then, link the symboltable entry for NAME1 to that for NAME2, using a field of the symbol table reserved for link members of the same COMMON block. . ? Finally, set a pointer in the record for BLOCK1 to the symboltable entry for NAME2, indicating the last found member of that block. 61 ? (4) If this is not the first declaration of BLOCK1, simply link NAME1 and NAME2 to the end of the list of names for BLOCK1. The pointer to the end of the list for BLOCK1, appearing in the record for BLOCK1, is updated of course. 62 ? There is a main program of FORTRAN that includes one subroutine “P” and one mon block “area”. The mon variables in mon b l o c k a r e a, b, c . PROGRAM main Real i, j COMMON /area/a,b,c …… CALL P(…) …… END 63 Level storage allocation ? We know that sometimes subroutine 1 may call subroutine 2, so firstly we allocate the subroutine 2, after subroutine 2 are released, we use the unit to store subroutine 1. With this method, we can spare a lot of space. This method is called level storage allocation. . 64 ? 65 ? There are five blocks in the program. ? T h e f i r s t one is t h e m a i n p r o g r a m , ? the others are subroutines. The relationship among subroutines is: subroutine 2 call subroutine 4, subroutine 3 call subroutine 5, , ? namely, subroutine 2 can reuse the space of subroutine 4, subroutine 3 can reuse the space of subroutine 5. The using space, start unit and end unit of each block are described in Table . ? In addition, the level of storage allocation is shown in Figure . . 66 ? Table Allocation of the example 表 例 存儲分配表 Block space10 Start unit End unit 1 10 20 29 subroutine2 8 10 17 subroutine3 10 10 19 subroutine4 9 1 9 subroutine5 8 1 8 67 ? Main 20~29 2 3 4 5 10~19 1~8 1~9 10~17 1 level storage allocation 圖 分層靜態(tài)存儲 68 ? The algorithm of static level storage is as follows: Step 1: ? If There is no relationship between block I and block J, we put matrix of A(I,J)=0 ( I,J=1, … ,n)。 on the other hand, If block I call block J, then A(I,J)=1. initial C(I)=0(I=1, … ,n), C(I)=0 refers to block I has not been allocated. We use B(I) to store the allocation of block I. The initial B(I)=0 (I=1 , … , n ) . . 69 Step 2: ? From I=1 to n, we judge if all the matrix of A(I,J)= 0(J=1, … ,n), and C(I)=0。 then B(I)=P,C(I)=1,(If space P is not allocated, P means the space of the storage of block I). Judge if the matrix of C(I)=0 (I =1, … ,n), , ? then go to step 2,otherwise go to end 70 Step 3: ? If A(K,J)=1(J=I,K=1, … ,n) and B(K)≤P, then B(K)=P+1,(because the units before unit P have been allocated, If B(K)≤P represents that the unit P has been reused. So the allocation of B(K) should begin from the unit of P+1). If B ( K ) P , t h e n B ( K ) w o u l d n o t be changed. . 71 Step 4: ? Turn matrix A(K,J)=1 into A(K,J)=0 Step 5: ? Judge if the matrix of C(I)=0 (I =1, … ,n), then go to step 2,otherwise go to end 72 Table . The relation matrix of example 表 例 模塊間關(guān)系矩陣 ? 73 ? The first time of running static level storage algorithm: : ? Step 1, B(I) =0, C(I) =0 the value of A(I,J) is shown in Table . ? S t e p 2, b e c a u s e A(4,J ) = 0 ( J= 1, … , 5), A(5,J)=0(J=1, … ,5), in addition C(4)=0, C(5)=0. The value of P in b
點擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1