Commit 7e3654b
committed
aero_proc::syslog: fix scopes
Previously something like the following was generated:
```rs
fn foo(bar: u64) -> u64 {
fn inner(bar: u64) -> u64 {
let body = {
// if return is used here then the syscall magic
// will not be called. This made the generated
// code skip some of the syscalls in the syslog
// because the return returned from the function
// not the scope it self. So to solve this
// problem the body is inserted into an
// even_inner function and to be nice, its
// annotated with #[inline(always)]
//
// return 69;
};
// syslog magic
body
}
inner(bar);
}
```
Sometimes it just happens. Stay safe with scopes guys! Stay Giga :^)
Signed-off-by: Andy-Python-Programmer <andypythonappdeveloper@gmail.com>1 parent 7983214 commit 7e3654b
1 file changed
+26
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
108 | 118 | | |
109 | 119 | | |
110 | 120 | | |
| |||
150 | 160 | | |
151 | 161 | | |
152 | 162 | | |
153 | | - | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
154 | 167 | | |
155 | 168 | | |
156 | | - | |
157 | | - | |
158 | | - | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
159 | 180 | | |
160 | 181 | | |
161 | 182 | | |
162 | 183 | | |
163 | 184 | | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
| 185 | + | |
169 | 186 | | |
170 | 187 | | |
171 | 188 | | |
| |||
0 commit comments