Commit 87936c8
Create LocalVariable
This should make it easier for us to move away from leaking pointers to
Bvariable everywhere. Since LocalVariable has a single field of type
tree, it should be the same size as a pointer to Bvariable, making the
switch to LocalVariable wherever possible strictly an improvement.
gcc/rust/ChangeLog:
* backend/rust-compile-expr.cc (CompileExpr::visit): Implicitly
convert LocalVariable to pointer to Bvariable.
* rust-backend.h (local_variable): Return LocalVariable.
(parameter_variable): Likewise.
(static_chain_variable): Likewise.
(temporary_variable): Likewise.
* rust-gcc.cc (local_variable): Likewise.
(parameter_variable): Likewise.
(static_chain_variable): Likewise.
(temporary_variable): Likewise.
(LocalVariable::get_tree): New function.
(LocalVariable::error_variable): Likewise.
* rust-gcc.h (class LocalVariable): New class.
Signed-off-by: Owen Avery <[email protected]>1 parent 8e708ed commit 87936c8
File tree
4 files changed
+64
-23
lines changed- gcc/rust
- backend
4 files changed
+64
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
| 178 | + | |
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | | - | |
| 217 | + | |
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
349 | 349 | | |
350 | 350 | | |
351 | 351 | | |
352 | | - | |
353 | | - | |
| 352 | + | |
| 353 | + | |
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
357 | 357 | | |
358 | | - | |
359 | | - | |
| 358 | + | |
| 359 | + | |
360 | 360 | | |
361 | 361 | | |
362 | | - | |
363 | | - | |
| 362 | + | |
| 363 | + | |
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
| |||
373 | 373 | | |
374 | 374 | | |
375 | 375 | | |
376 | | - | |
377 | | - | |
378 | | - | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
86 | 103 | | |
87 | 104 | | |
88 | 105 | | |
| |||
2014 | 2031 | | |
2015 | 2032 | | |
2016 | 2033 | | |
2017 | | - | |
| 2034 | + | |
2018 | 2035 | | |
2019 | 2036 | | |
2020 | 2037 | | |
2021 | 2038 | | |
2022 | | - | |
| 2039 | + | |
2023 | 2040 | | |
2024 | 2041 | | |
2025 | 2042 | | |
| |||
2029 | 2046 | | |
2030 | 2047 | | |
2031 | 2048 | | |
2032 | | - | |
| 2049 | + | |
2033 | 2050 | | |
2034 | 2051 | | |
2035 | 2052 | | |
2036 | 2053 | | |
2037 | | - | |
| 2054 | + | |
2038 | 2055 | | |
2039 | 2056 | | |
2040 | 2057 | | |
2041 | 2058 | | |
2042 | | - | |
| 2059 | + | |
2043 | 2060 | | |
2044 | 2061 | | |
2045 | 2062 | | |
2046 | 2063 | | |
2047 | 2064 | | |
2048 | | - | |
| 2065 | + | |
2049 | 2066 | | |
2050 | 2067 | | |
2051 | 2068 | | |
2052 | 2069 | | |
2053 | | - | |
| 2070 | + | |
2054 | 2071 | | |
2055 | 2072 | | |
2056 | 2073 | | |
2057 | 2074 | | |
2058 | | - | |
| 2075 | + | |
2059 | 2076 | | |
2060 | 2077 | | |
2061 | 2078 | | |
| |||
2076 | 2093 | | |
2077 | 2094 | | |
2078 | 2095 | | |
2079 | | - | |
| 2096 | + | |
2080 | 2097 | | |
2081 | 2098 | | |
2082 | 2099 | | |
2083 | 2100 | | |
2084 | | - | |
| 2101 | + | |
2085 | 2102 | | |
2086 | 2103 | | |
2087 | 2104 | | |
| |||
2091 | 2108 | | |
2092 | 2109 | | |
2093 | 2110 | | |
2094 | | - | |
| 2111 | + | |
2095 | 2112 | | |
2096 | 2113 | | |
2097 | 2114 | | |
| |||
2141 | 2158 | | |
2142 | 2159 | | |
2143 | 2160 | | |
2144 | | - | |
| 2161 | + | |
2145 | 2162 | | |
2146 | 2163 | | |
2147 | 2164 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
62 | 86 | | |
0 commit comments