home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.ee.pdx.edu
/
2014.02.ftp.ee.pdx.edu.tar
/
ftp.ee.pdx.edu
/
pub
/
users
/
Harry
/
compilers
/
p10
/
tst
/
frame2.out.bak
< prev
next >
Wrap
Text File
|
2006-02-17
|
3KB
|
125 lines
PROGRAM IS
PROCEDURE foo1 (a1: integer) : integer IS
BEGIN
RETURN 0;
END;
PROCEDURE foo2 (a1: integer; a2: integer) : integer IS
BEGIN
RETURN 0;
END;
PROCEDURE foo4 (a1: integer; a2: integer; a3: integer; a4: integer) : integer IS
BEGIN
RETURN 0;
END;
PROCEDURE bar1 () IS
VAR
i: integer := foo2 (1, 2);
PROCEDURE bar2 () IS
BEGIN
i := foo4 (1, 2, 3, 4);
RETURN;
END;
BEGIN
i := foo1 (1);
RETURN;
END;
PROCEDURE bar3 () IS
VAR
i: integer := foo2 (1, 2);
j: integer := 0;
PROCEDURE bar2 () IS
BEGIN
i := foo4 (1, 2, 3, 4);
RETURN;
END;
BEGIN
i := foo1 (1);
RETURN;
END;
BEGIN
END;
maxLexicalLevel = 2
===== String List Follows =====
===== Float List Follows =====
===== Intermediate Code Follows =====
! MAIN...
mainEntry
! MAIN EXIT...
mainExit
! PROCEDURE...
procEntry p1_foo1,lexLevel=1,frameSize=96
formal 1,a1
! RETURN...
returnExpr 0
! PROCEDURE...
procEntry p2_foo2,lexLevel=1,frameSize=96
formal 1,a1
formal 2,a2
! RETURN...
returnExpr 0
! PROCEDURE...
procEntry p3_foo4,lexLevel=1,frameSize=96
formal 1,a1
formal 2,a2
formal 3,a3
formal 4,a4
! RETURN...
returnExpr 0
! PROCEDURE...
procEntry p4_bar1,lexLevel=1,frameSize=104
! VAR INITIALIZATION...
param 1,1
param 2,2
call p2_foo2
resultTo t1
i := t1
! ASSIGNMENT STMT...
param 1,1
call p1_foo1
resultTo t2
i := t2
! RETURN...
returnVoid
! PROCEDURE...
procEntry p5_bar2,lexLevel=2,frameSize=96
! ASSIGNMENT STMT...
param 1,1
param 2,2
param 3,3
param 4,4
call p3_foo4
resultTo t3
i := t3
! RETURN...
returnVoid
! PROCEDURE...
procEntry p6_bar3,lexLevel=1,frameSize=112
! VAR INITIALIZATION...
param 1,1
param 2,2
call p2_foo2
resultTo t4
i := t4
! VAR INITIALIZATION...
j := 0
! ASSIGNMENT STMT...
param 1,1
call p1_foo1
resultTo t5
i := t5
! RETURN...
returnVoid
! PROCEDURE...
procEntry p7_bar2,lexLevel=2,frameSize=96
! ASSIGNMENT STMT...
param 1,1
param 2,2
param 3,3
param 4,4
call p3_foo4
resultTo t6
i := t6
! RETURN...
returnVoid
=======================================