Docsity

OOPS - Position, Study notes of Object Oriented Programming

Toggle sidebar
bg1
Position
In
Program
Var Decl
proc
Ref
proc
Chain offset
RefSD โ€“ DeclSD
Refrence
(CS, LS)
1
(a = b + c)
a Sub1 Sub1 2 โ€“ 2 = 0 (0,3)
b Bigsub Sub1 2 โ€“ 1 = 1 (1,4)
c Bigsub Sub1 2 โ€“ 1 = 0 (1,5)
2
(e = b + a)
e Sub3 Sub3 3 โ€“ 3 = 0 (0,4)
b Sub2 Sub3 3 โ€“ 2 = 1 (1,4)
a Bigsub Sub3 3 โ€“ 1 = 2 (2,3)
3
(a = d + e)
a Bigsub Sub2 2 โ€“ 1 = 1 (1,3)
d Nil Sub2 Semantics error error
e Sub2 Sub2 2 โ€“ 2 = 0 (0,5)
pf3

Partial preview of the text

Download OOPS - Position and more Study notes Object Oriented Programming in PDF only on Docsity!

Position In Program

Var Decl proc

Ref proc

Chain offset RefSD โ€“ DeclSD

Refrence (CS, LS)

1 (a = b + c)

a Sub1 Sub1 2 โ€“ 2 = 0 (0,3) b Bigsub Sub1 2 โ€“ 1 = 1 (1,4) c Bigsub Sub1 2 โ€“ 1 = 0 (1,5) 2 (e = b + a)

e Sub3 Sub3 3 โ€“ 3 = 0 (0,4)

b Sub2 Sub3 3 โ€“ 2 = 1 (1,4) a Bigsub Sub3 3 โ€“ 1 = 2 (2,3) 3 (a = d + e)

a Bigsub Sub2 2 โ€“ 1 = 1 (1,3)

d Nil Sub2 Semantics error error e Sub2 Sub2 2 โ€“ 2 = 0 (0,5)

Proc Record name

Local offset Big sub

RA 0

SL 1

DL 2

a 3 b 4 c 5 Proc Record name

Local offset Sub 1

RA 0

SL 1

DL 2

a 3 d 4

Proc Record name

Local offset Sub 3

RA 0

SL 1

DL 2

c 3 e 4

Proc Record name

Local offset Sub 2

RA 0

SL 1