|
9 | 9 | ;; the vector, and uncover-call-live-roots needs the type information
|
10 | 10 | ;; to identify roots at each collection call site.
|
11 | 11 | ;;
|
12 |
| -;; During the program level match for expose-allocation, the uncover |
13 |
| -;; types function can be called in order to get an association list |
14 |
| -;; mapping variables to types. This map can then be passed through the |
15 |
| -;; recursive steps of the expose-allocation pass. It is now possible |
16 |
| -;; determine the type of a vector at allocation by looking up the type |
17 |
| -;; of the variable to which that vector is assigned. After processing |
18 |
| -;; the entire program the type environment can be saved for the next |
19 |
| -;; pass is the locals slot of the program form. |
| 12 | +;; In the match clause for 'program' in expose-allocation, the uncover |
| 13 | +;; types function can be called to get an association list mapping |
| 14 | +;; variables to types. This map can then be passed as a parameter into |
| 15 | +;; expose-allocation so that you can determine the type of a vector |
| 16 | +;; needed for 'allocate' by looking up the type of the variable to |
| 17 | +;; which that vector is assigned. After processing the entire program |
| 18 | +;; the type environment can be saved for the next pass in the locals |
| 19 | +;; slot of the program form. |
20 | 20 | ;;
|
21 | 21 | ;; While processing the program form of uncover-call-live-roots, this
|
22 | 22 | ;; environment can be retrieved from the locals slot and again passed
|
23 | 23 | ;; without change throughout the processing of the body of the
|
24 | 24 | ;; program. When we find a variable in expression possition and the
|
25 |
| -;; type in of the variable is a Vector type then we consider this |
| 25 | +;; type of the variable is a Vector type then we consider this |
26 | 26 | ;; variable to be a live root. All such live roots are collected at
|
27 | 27 | ;; calls to the collector and stored in the live set. After this pass
|
28 | 28 | ;; the original locals form can be restored by taking the car of all
|
|
0 commit comments