fox garbage collection fox gc example 1 ex1 garbage at end
play

FOX Garbage Collection FOX / GC Example 1 ex1: garbage at end let - PowerPoint PPT Presentation

FOX Garbage Collection FOX / GC Example 1 ex1: garbage at end let x = (1, 2) , y = let tmp = (10, 20) in tmp[0] + tmp[1] , p0 = x[0] + y , p1 = x[1] + y in (p0, p1) ebp 0x00 0x04 0x08 0x0c 0x10 0x14 0x18 0x1c 0x20 0x24 esi


  1. ex3: garbage in the middle (with stack) def foo(p, q): let tmp = (p, q) in tmp[0] + tmp[1] esp retaddr0 let y = foo(10, 20) 10 p , x = (y, y + 1) 20 q , z = foo(100, 200) in x[0] + y + z ebp 0x00 0x04 0x08 0x0c 0x10 esi

  2. ex3: garbage in the middle (with stack) def foo(p, q): esp let tmp = (p, q) in tmp[0] + tmp[1] ebp0 ebp retaddr0 let y = foo(10, 20) 10 p , x = (y, y + 1) 20 q , z = foo(100, 200) in x[0] + y + z ebp0 0x00 0x04 0x08 0x0c 0x10 esi

  3. ex3: garbage in the middle (with stack) def foo(p, q): esp let tmp = (p, q) 1 local var ( tmp ) in tmp[0] + tmp[1] ebp0 ebp retaddr0 let y = foo(10, 20) 10 p , x = (y, y + 1) 20 q , z = foo(100, 200) in x[0] + y + z ebp0 0x00 0x04 0x08 0x0c 0x10 esi

  4. ex3: garbage in the middle (with stack) def foo(p, q): esp let tmp = (p, q) in tmp[0] + tmp[1] ebp0 ebp retaddr0 let y = foo(10, 20) 10 p , x = (y, y + 1) 20 q , z = foo(100, 200) in x[0] + y + z ebp0 10 20 0x00 0x04 0x08 0x0c 0x10 esi

  5. ex3: garbage in the middle (with stack) def foo(p, q): esp let tmp = (p, q) 0x01 tmp in tmp[0] + tmp[1] ebp0 ebp retaddr0 let y = foo(10, 20) 10 p , x = (y, y + 1) 20 q , z = foo(100, 200) in x[0] + y + z ebp0 10 20 0x00 0x04 0x08 0x0c 0x10 esi

  6. ex3: garbage in the middle (with stack) def foo(p, q): esp let tmp = (p, q) 0x01 tmp in tmp[0] + tmp[1] ebp0 ebp retaddr0 let y = foo(10, 20) 10 p , x = (y, y + 1) 20 q , z = foo(100, 200) in x[0] + y + z ebp0 Return (eax) = 30 10 20 0x00 0x04 0x08 0x0c 0x10 esi

  7. ex3: garbage in the middle (with stack) def foo(p, q): let tmp = (p, q) in tmp[0] + tmp[1] let y = foo(10, 20) , x = (y, y + 1) esp , z = foo(100, 200) in x[0] + z 30 y ebp ebp0 Return (eax) = 30 10 20 0x00 0x04 0x08 0x0c 0x10 esi

  8. ex3: garbage in the middle (with stack) def foo(p, q): let tmp = (p, q) in tmp[0] + tmp[1] let y = foo(10, 20) , x = (y, y + 1) esp , z = foo(100, 200) in x[0] + z 30 y ebp ebp0 10 20 0x00 0x04 0x08 0x0c 0x10 esi

  9. ex3: garbage in the middle (with stack) def foo(p, q): let tmp = (p, q) in tmp[0] + tmp[1] let y = foo(10, 20) , x = (y, y + 1) esp , z = foo(100, 200) in x[0] + z 30 y ebp ebp0 10 20 30 31 0x00 0x04 0x08 0x0c 0x10 esi

  10. ex3: garbage in the middle (with stack) def foo(p, q): let tmp = (p, q) in tmp[0] + tmp[1] let y = foo(10, 20) , x = (y, y + 1) esp , z = foo(100, 200) in 0x09 x x[0] + z 30 y ebp ebp0 10 20 30 31 0x00 0x04 0x08 0x0c 0x10 esi

  11. ex3: garbage in the middle (with stack) def foo(p, q): let tmp = (p, q) in tmp[0] + tmp[1] let y = foo(10, 20) , x = (y, y + 1) esp , z = foo(100, 200) in 0x09 x x[0] + z 30 y ebp ebp0 10 20 30 31 0x00 0x04 0x08 0x0c 0x10 esi

  12. ex3: garbage in the middle (with stack) def foo(p, q): let tmp = (p, q) in tmp[0] + tmp[1] esp retaddr1 let y = foo(10, 20) 100 p , x = (y, y + 1) 200 q , z = foo(100, 200) in 0x09 x x[0] + z 30 y ebp ebp0 10 20 30 31 0x00 0x04 0x08 0x0c 0x10 esi

  13. ex3: garbage in the middle (with stack) def foo(p, q): esp let tmp = (p, q) 1 local var ( tmp ) in tmp[0] + tmp[1] ebp0 ebp retaddr1 let y = foo(10, 20) 100 p , x = (y, y + 1) 200 q , z = foo(100, 200) in 0x09 x x[0] + z 30 y ebp0 10 20 30 31 0x00 0x04 0x08 0x0c 0x10 esi

  14. ex3: garbage in the middle (with stack) def foo(p, q): esp let tmp = (p, q) in tmp[0] + tmp[1] ebp0 ebp retaddr1 let y = foo(10, 20) 100 p , x = (y, y + 1) 200 q , z = foo(100, 200) in 0x09 x x[0] + z 30 y ebp0 10 20 30 31 0x00 0x04 0x08 0x0c 0x10 esi

  15. ex3: garbage in the middle (with stack) def foo(p, q): esp let tmp = (p, q) in tmp[0] + tmp[1] ebp0 ebp retaddr1 let y = foo(10, 20) 100 p , x = (y, y + 1) 200 q , z = foo(100, 200) in 0x09 x x[0] + z 30 y ebp0 Lets reclaim & recycle garbage! 10 20 30 31 0x00 0x04 0x08 0x0c 0x10 esi

  16. ex3: garbage in the middle (with stack) def foo(p, q): esp let tmp = (p, q) in tmp[0] + tmp[1] ebp0 ebp retaddr1 let y = foo(10, 20) 100 p , x = (y, y + 1) 200 q , z = foo(100, 200) in 0x09 x x[0] + z 30 y ebp0 Lets reclaim & recycle garbage! 10 20 30 31 0x00 0x04 0x08 0x0c 0x10 QUIZ: Which cells are garbage? esi (A) 0x00, 0x04 (B) 0x04, 0x08 (C) 0x08, 0x0c (D) None (E) All

  17. ex3: garbage in the middle (with stack) def foo(p, q): esp let tmp = (p, q) in tmp[0] + tmp[1] ebp0 ebp retaddr1 let y = foo(10, 20) 100 p , x = (y, y + 1) 200 q , z = foo(100, 200) in 0x09 x x[0] + z 30 y ebp0 Lets reclaim & recycle garbage! 10 20 30 31 0x00 0x04 0x08 0x0c 0x10 QUIZ: Which cells are garbage? esi Those that are not reachable from any stack frame

  18. ex3: garbage in the middle (with stack) def foo(p, q): esp let tmp = (p, q) in tmp[0] + tmp[1] Traverse Stack ebp0 ebp from top ( esp ) retaddr1 let y = foo(10, 20) 100 p , x = (y, y + 1) to bottom ( ebp0 ) 200 q , z = foo(100, 200) to mark in reachable cells. 0x09 x x[0] + z 30 y ebp0 Lets reclaim & recycle garbage! 10 20 30 31 0x00 0x04 0x08 0x0c 0x10 QUIZ: Which cells are garbage? esi Those that are not reachable from any stack frame

  19. ex3: garbage in the middle (with stack) def foo(p, q): esp let tmp = (p, q) in tmp[0] + tmp[1] Traverse Stack ebp0 ebp from top ( esp ) retaddr1 let y = foo(10, 20) 100 p , x = (y, y + 1) to bottom ( ebp0 ) 200 q , z = foo(100, 200) to mark in reachable cells. 0x09 x x[0] + z 30 y ebp0 Lets reclaim & recycle garbage! 10 20 30 31 0x00 0x04 0x08 0x0c 0x10 esi QUIZ: Which cells are garbage?

  20. ex3: garbage in the middle (with stack) def foo(p, q): esp let tmp = (p, q) in tmp[0] + tmp[1] ebp0 ebp retaddr1 let y = foo(10, 20) 100 p , x = (y, y + 1) 200 q , z = foo(100, 200) in 0x09 x x[0] + z 30 y ebp0 30 31 0x00 0x04 0x08 0x0c 0x10 esi Compact the live cells

  21. ex3: garbage in the middle (with stack) def foo(p, q): esp let tmp = (p, q) in tmp[0] + tmp[1] ebp0 ebp retaddr1 let y = foo(10, 20) 100 p , x = (y, y + 1) 200 q , z = foo(100, 200) in 0x09 x x[0] + z 30 y ebp0 30 31 0x00 0x04 0x08 0x0c 0x10 esi Compact the live cells

  22. ex3: garbage in the middle (with stack) def foo(p, q): esp let tmp = (p, q) in tmp[0] + tmp[1] ebp0 ebp retaddr1 let y = foo(10, 20) 100 p , x = (y, y + 1) 200 q , z = foo(100, 200) in 0x09 x x[0] + z 30 y ebp0 30 31 0x00 0x04 0x08 0x0c 0x10 esi Compact the live cells

  23. ex3: garbage in the middle (with stack) def foo(p, q): esp let tmp = (p, q) in tmp[0] + tmp[1] ebp0 ebp retaddr1 let y = foo(10, 20) 100 p , x = (y, y + 1) 200 q , z = foo(100, 200) in 0x09 x x[0] + z 30 y ebp0 30 31 0x00 0x04 0x08 0x0c 0x10 esi Compact the live cells

  24. ex3: garbage in the middle (with stack) def foo(p, q): esp let tmp = (p, q) in tmp[0] + tmp[1] ebp0 ebp retaddr1 let y = foo(10, 20) 100 p , x = (y, y + 1) 200 q , z = foo(100, 200) in 0x09 x x[0] + z 30 y ebp0 30 31 0x00 0x04 0x08 0x0c 0x10 esi Compact the live cells … then rewind esi

  25. ex3: garbage in the middle (with stack) def foo(p, q): esp let tmp = (p, q) in tmp[0] + tmp[1] ebp0 ebp retaddr1 let y = foo(10, 20) 100 p , x = (y, y + 1) 200 q , z = foo(100, 200) in 0x09 x x[0] + z 30 y ebp0 30 31 0x00 0x04 0x08 0x0c 0x10 esi Compact the live cells … then rewind esi

  26. ex3: garbage in the middle (with stack) def foo(p, q): esp let tmp = (p, q) in tmp[0] + tmp[1] ebp0 ebp retaddr1 let y = foo(10, 20) 100 p , x = (y, y + 1) 200 q , z = foo(100, 200) in 0x09 x x[0] + z 30 y ebp0 30 31 0x00 0x04 0x08 0x0c 0x10 esi Problem???

  27. ex3: garbage in the middle (with stack) def foo(p, q): esp let tmp = (p, q) in tmp[0] + tmp[1] ebp0 ebp retaddr1 let y = foo(10, 20) 100 p , x = (y, y + 1) 200 q , z = foo(100, 200) in 0x09 x x[0] + z 30 y ebp0 30 31 0x00 0x04 0x08 0x0c 0x10 esi Problem! Have to REDIRECT existing pointers

  28. ex3: garbage in the middle (with stack) def foo(p, q): esp let tmp = (p, q) in tmp[0] + tmp[1] ebp0 ebp retaddr1 let y = foo(10, 20) 100 p , x = (y, y + 1) 200 q , z = foo(100, 200) in 0x09 x x[0] + z 30 y ebp0 30 31 0x00 0x04 0x08 0x0c 0x10 esi

  29. ex3: garbage in the middle (with stack) def foo(p, q): esp let tmp = (p, q) in tmp[0] + tmp[1] ebp0 ebp retaddr1 let y = foo(10, 20) 100 p , x = (y, y + 1) 200 q , z = foo(100, 200) in 0x09 x x[0] + z 30 y ebp0 1. Compute FORWARD addrs 30 31 (i.e. new compacted addrs) 0x00 0x04 0x08 0x0c 0x10 esi

  30. ex3: garbage in the middle (with stack) def foo(p, q): esp let tmp = (p, q) in tmp[0] + tmp[1] ebp0 ebp retaddr1 let y = foo(10, 20) 100 p , x = (y, y + 1) 200 q , z = foo(100, 200) in 0x09 x x[0] + z 30 y ebp0 1. Compute FORWARD addrs 30 31 e.g. 0x09 —> 0x01 0x00 0x04 0x08 0x0c 0x10 esi

  31. ex3: garbage in the middle (with stack) def foo(p, q): esp let tmp = (p, q) in tmp[0] + tmp[1] ebp0 ebp retaddr1 let y = foo(10, 20) 100 p , x = (y, y + 1) 200 q , z = foo(100, 200) in 0x01 0x09 x x[0] + z 30 y ebp0 1. Compute FORWARD addrs 30 31 e.g. 0x09 —> 0x01 0x00 0x04 0x08 0x0c 0x10 2. REDIRECT addrs on stack esi

  32. ex3: garbage in the middle (with stack) def foo(p, q): esp let tmp = (p, q) in tmp[0] + tmp[1] ebp0 ebp retaddr1 let y = foo(10, 20) 100 p , x = (y, y + 1) 200 q , z = foo(100, 200) in 0x01 x x[0] + z 30 y ebp0 1. Compute FORWARD addrs 30 31 e.g. 0x09 —> 0x01 0x00 0x04 0x08 0x0c 0x10 2. REDIRECT addrs on stack esi 3. COMPACT cells on heap

  33. ex3: garbage in the middle (with stack) def foo(p, q): esp let tmp = (p, q) in tmp[0] + tmp[1] ebp0 ebp retaddr1 let y = foo(10, 20) 100 p , x = (y, y + 1) 200 q , z = foo(100, 200) in 0x01 x x[0] + z 30 y ebp0 1. Compute FORWARD addrs 30 31 e.g. 0x09 —> 0x01 0x00 0x04 0x08 0x0c 0x10 2. REDIRECT addrs on stack esi 3. COMPACT cells on heap

  34. ex3: garbage in the middle (with stack) def foo(p, q): esp let tmp = (p, q) in tmp[0] + tmp[1] ebp0 ebp retaddr1 let y = foo(10, 20) 100 p , x = (y, y + 1) 200 q , z = foo(100, 200) in 0x01 x x[0] + z 30 y ebp0 Yay! Have space for (p, q) 30 31 0x00 0x04 0x08 0x0c 0x10 esi

  35. ex3: garbage in the middle (with stack) def foo(p, q): esp let tmp = (p, q) in tmp[0] + tmp[1] ebp0 ebp retaddr1 let y = foo(10, 20) 100 p , x = (y, y + 1) 200 q , z = foo(100, 200) in 0x01 x x[0] + z 30 y ebp0 Yay! Have space for (p, q) 30 31 100 200 0x00 0x04 0x08 0x0c 0x10 esi

  36. ex3: garbage in the middle (with stack) def foo(p, q): esp let tmp = (p, q) 0x09 tmp in tmp[0] + tmp[1] ebp0 ebp retaddr1 let y = foo(10, 20) 100 p , x = (y, y + 1) 200 q , z = foo(100, 200) in 0x01 x x[0] + z 30 y ebp0 Return (eax) = 300 30 31 100 200 0x00 0x04 0x08 0x0c 0x10 esi

  37. ex3: garbage in the middle (with stack) def foo(p, q): let tmp = (p, q) in tmp[0] + tmp[1] let y = foo(10, 20) , x = (y, y + 1) esp , z = foo(100, 200) 300 z in 0x01 x x[0] + z 30 y ebp Return (eax) = 300 30 31 100 200 0x00 0x04 0x08 0x0c 0x10 esi

  38. ex3: garbage in the middle (with stack) def foo(p, q): let tmp = (p, q) in tmp[0] + tmp[1] let y = foo(10, 20) , x = (y, y + 1) esp , z = foo(100, 200) 300 z in 0x01 x x[0] + z 30 y ebp 30 31 100 200 0x00 0x04 0x08 0x0c 0x10 esi

  39. ex3: garbage in the middle (with stack) def foo(p, q): let tmp = (p, q) in tmp[0] + tmp[1] let y = foo(10, 20) , x = (y, y + 1) esp , z = foo(100, 200) 300 z in 0x01 x x[0] + z 30 y ebp Return (eax) = 30+300 = 330 30 31 100 200 0x00 0x04 0x08 0x0c 0x10 esi

  40. FOX / GC Example 4

  41. ex4: recursive data def range(i, j): if (j <= i): false else : (i,range(i+1, j)) def sum(l): if l == false: 0 else : l[0] + sum(l[1]) let t1 = let l1 = range(0, 3) esp in sum(l1) , l = range(t1, t1 + 3) in (1000, l) ebp esi 0x00 0x04 0x08 0x0c 0x10 0x14 0x18 0x1c 0x20 0x24 0x28 0x2c 0x30

  42. ex4: recursive data def range(i, j): if (j <= i): false else : (i,range(i+1, j)) def sum(l): if l == false: 0 else : l[0] + sum(l[1]) let t1 = let l1 = range(0, 3) esp in sum(l1) , l = range(t1, t1 + 3) in (1000, l) ebp call range(0, 3) esi 0x00 0x04 0x08 0x0c 0x10 0x14 0x18 0x1c 0x20 0x24 0x28 0x2c 0x30

  43. ex4: recursive data def range(i, j): if (j <= i): false else : (i,range(i+1, j)) def sum(l): if l == false: 0 else : l[0] + sum(l[1]) let t1 = let l1 = range(0, 3) esp in sum(l1) , l = range(t1, t1 + 3) in (1000, l) ebp QUIZ: What is heap when range(0,3) returns? esi (A) 0 1 2 0x09 0x11 false 0x00 0x04 0x08 0x0c 0x10 0x14 0x18 0x1c 0x20 0x24 0x28 0x2c 0x30 esi (B) 2 1 0x01 0 0x09 false 0x00 0x04 0x08 0x0c 0x10 0x14 0x18 0x1c 0x20 0x24 0x28 0x2c 0x30

  44. ex4: recursive data def range(i, j): if (j <= i): false else : (i,range(i+1, j)) def sum(l): if l == false: 0 else : l[0] + sum(l[1]) let t1 = let l1 = range(0, 3) esp in sum(l1) , l = range(t1, t1 + 3) in 0x11 l1 (1000, l) ebp esi 2 1 0x01 0 0x09 false 0x00 0x04 0x08 0x0c 0x10 0x14 0x18 0x1c 0x20 0x24 0x28 0x2c 0x30

  45. ex4: recursive data def range(i, j): if (j <= i): false else : (i,range(i+1, j)) def sum(l): if l == false: 0 else : l[0] + sum(l[1]) let t1 = let l1 = range(0, 3) esp in sum(l1) , l = range(t1, t1 + 3) in 3 t1 (1000, l) ebp Result sum(0x11) = 3 esi 2 1 0x01 0 0x09 false 0x00 0x04 0x08 0x0c 0x10 0x14 0x18 0x1c 0x20 0x24 0x28 0x2c 0x30

  46. ex4: recursive data def range(i, j): if (j <= i): false else : (i,range(i+1, j)) def sum(l): if l == false: 0 else : l[0] + sum(l[1]) let t1 = let l1 = range(0, 3) esp in sum(l1) , l = range(t1, t1 + 3) in 3 t1 (1000, l) ebp esi 2 1 0x01 0 0x09 false 0x00 0x04 0x08 0x0c 0x10 0x14 0x18 0x1c 0x20 0x24 0x28 0x2c 0x30

  47. ex4: recursive data def range(i, j): if (j <= i): false else : (i,range(i+1, j)) def sum(l): if l == false: 0 else : l[0] + sum(l[1]) let t1 = let l1 = range(0, 3) esp in sum(l1) , l = range(t1, t1 + 3) in 3 t1 (1000, l) ebp call range(3,6) esi 2 1 0x01 0 0x09 false 0x00 0x04 0x08 0x0c 0x10 0x14 0x18 0x1c 0x20 0x24 0x28 0x2c 0x30

  48. ex4: recursive data def range(i, j): if (j <= i): false else : (i,range(i+1, j)) def sum(l): if l == false: 0 else : l[0] + sum(l[1]) let t1 = let l1 = range(0, 3) esp in sum(l1) , l = range(t1, t1 + 3) ??? l in 3 t1 (1000, l) ebp call range(3,6) esi 2 1 0x01 0 0x09 5 4 0x19 3 0x21 false false 0x00 0x04 0x08 0x0c 0x10 0x14 0x18 0x1c 0x20 0x24 0x28 0x2c 0x30 QUIZ: What is the value of l ? (A) 0x18 (B) 0x19 (C) 0x28 (D) 0x29 (E) 0x30

  49. ex4: recursive data def range(i, j): if (j <= i): false else : (i,range(i+1, j)) def sum(l): if l == false: 0 else : l[0] + sum(l[1]) let t1 = let l1 = range(0, 3) esp in sum(l1) , l = range(t1, t1 + 3) 0x29 l in 3 t1 (1000, l) ebp Yikes! Out of Memory! esi 2 1 0x01 0 0x09 5 4 0x19 3 0x21 false false 0x00 0x04 0x08 0x0c 0x10 0x14 0x18 0x1c 0x20 0x24 0x28 0x2c 0x30

  50. ex4: recursive data QUIZ: Which cells are “live” on the heap? (A) 0x00 (B) 0x08 (C) 0x10 (D) 0x18 esp 0x29 l (E) 0x20 3 t1 (F) 0x28 ebp esi 2 1 0x01 0 0x09 5 4 0x19 3 0x21 false false 0x00 0x04 0x08 0x0c 0x10 0x14 0x18 0x1c 0x20 0x24 0x28 0x2c 0x30

  51. ex4: recursive data def range(i, j): if (j <= i): false else : (i,range(i+1, j)) def sum(l): if l == false: 0 else : l[0] + sum(l[1]) let t1 = let l1 = range(0, 3) esp in sum(l1) , l = range(t1, t1 + 3) 0x29 l in 3 t1 (1000, l) ebp esi 2 1 0 5 4 3 0x01 0x09 0x19 0x21 false false 0x00 0x04 0x08 0x0c 0x10 0x14 0x18 0x1c 0x20 0x24 0x28 0x2c 0x30 1. MARK live addrs 2. Compute FORWARD addrs 3. REDIRECT addrs on stack 4. COMPACT cells on heap

  52. ex4: recursive data def range(i, j): if (j <= i): false else : (i,range(i+1, j)) def sum(l): if l == false: 0 else : l[0] + sum(l[1]) let t1 = let l1 = range(0, 3) esp in sum(l1) , l = range(t1, t1 + 3) 0x29 l in 3 t1 (1000, l) ebp esi 2 1 0 5 4 3 0x01 0x09 0x19 0x21 false false 0x00 0x04 0x08 0x0c 0x10 0x14 0x18 0x1c 0x20 0x24 0x28 0x2c 0x30 1.MARK live addrs reachable from stack

  53. ex4: recursive data def range(i, j): if (j <= i): false else : (i,range(i+1, j)) def sum(l): if l == false: 0 else : l[0] + sum(l[1]) let t1 = let l1 = range(0, 3) esp in sum(l1) , l = range(t1, t1 + 3) 0x29 l in 3 t1 (1000, l) ebp esi 2 1 0 5 4 3 0x01 0x09 0x19 0x21 false false 0x00 0x04 0x08 0x0c 0x10 0x14 0x18 0x1c 0x20 0x24 0x28 0x2c 0x30 1.MARK live addrs reachable from stack

  54. ex4: recursive data def range(i, j): if (j <= i): false else : (i,range(i+1, j)) def sum(l): if l == false: 0 else : l[0] + sum(l[1]) let t1 = let l1 = range(0, 3) esp in sum(l1) , l = range(t1, t1 + 3) 0x29 l in 3 t1 (1000, l) ebp fwd esi 5 4 3 0x19 0x21 false 0x00 0x04 0x08 0x0c 0x10 0x14 0x18 0x1c 0x20 0x24 0x28 0x2c 0x30 orig 2.Compute FORWARD addrs

  55. ex4: recursive data def range(i, j): if (j <= i): false else : (i,range(i+1, j)) def sum(l): if l == false: 0 else : l[0] + sum(l[1]) let t1 = let l1 = range(0, 3) esp in sum(l1) , l = range(t1, t1 + 3) 0x29 l in 3 t1 (1000, l) ebp fwd esi 5 4 3 0x19 0x21 false 0x00 0x04 0x08 0x0c 0x10 0x14 0x18 0x1c 0x20 0x24 0x28 0x2c 0x30 orig 2.Compute FORWARD addrs

  56. ex4: recursive data def range(i, j): if (j <= i): false else : (i,range(i+1, j)) def sum(l): if l == false: 0 else : l[0] + sum(l[1]) let t1 = let l1 = range(0, 3) esp in sum(l1) , l = range(t1, t1 + 3) 0x29 l in 3 t1 (1000, l) ebp fwd esi 5 4 3 0x19 0x21 false 0x00 0x04 0x08 0x0c 0x10 0x14 0x18 0x1c 0x20 0x24 0x28 0x2c 0x30 orig 2.Compute FORWARD addrs

  57. ex4: recursive data def range(i, j): if (j <= i): false else : (i,range(i+1, j)) def sum(l): if l == false: 0 else : l[0] + sum(l[1]) let t1 = let l1 = range(0, 3) esp in sum(l1) , l = range(t1, t1 + 3) 0x29 l in 3 t1 (1000, l) ebp fwd esi 5 4 3 0x19 0x21 false 0x00 0x04 0x08 0x0c 0x10 0x14 0x18 0x1c 0x20 0x24 0x28 0x2c 0x30 orig 2.Compute FORWARD addrs

  58. ex4: recursive data def range(i, j): if (j <= i): false else : (i,range(i+1, j)) def sum(l): if l == false: 0 else : l[0] + sum(l[1]) let t1 = let l1 = range(0, 3) esp in sum(l1) , l = range(t1, t1 + 3) 0x29 l in 3 t1 (1000, l) ebp fwd esi 5 4 3 0x19 0x21 false 0x00 0x04 0x08 0x0c 0x10 0x14 0x18 0x1c 0x20 0x24 0x28 0x2c 0x30 orig 2.Compute FORWARD addrs

  59. ex4: recursive data def range(i, j): if (j <= i): false else : (i,range(i+1, j)) def sum(l): if l == false: 0 else : l[0] + sum(l[1]) let t1 = let l1 = range(0, 3) esp in sum(l1) , l = range(t1, t1 + 3) 0x29 l in 3 t1 (1000, l) ebp fwd esi 5 4 3 0x19 0x21 false 0x00 0x04 0x08 0x0c 0x10 0x14 0x18 0x1c 0x20 0x24 0x28 0x2c 0x30 orig 2.Compute FORWARD addrs

  60. ex4: recursive data def range(i, j): if (j <= i): false else : (i,range(i+1, j)) def sum(l): if l == false: 0 else : l[0] + sum(l[1]) let t1 = let l1 = range(0, 3) esp in sum(l1) , l = range(t1, t1 + 3) 0x29 l in 3 t1 (1000, l) ebp fwd esi 5 4 3 0x19 0x21 false 0x00 0x04 0x08 0x0c 0x10 0x14 0x18 0x1c 0x20 0x24 0x28 0x2c 0x30 orig 2.Compute FORWARD addrs

Recommend


More recommend