We should almost certainly follow RPython's lead and make functions do_not_trace by default if they contain a loop so that we don't unroll arbitrary loops. For example if someone has a function like this:
fn f() {
for _ in 0..100000 { ... }
}
we don't want to trace the whole function! Rather we want that to be equivalent to:
#[do_not_trace]
fn f() {
for _ in 0..100000 { ... }
}
At some point we'll probably want to introduce an RPython-esque unroll_safe annotation that allows one to override this default.
We should almost certainly follow RPython's lead and make functions
do_not_traceby default if they contain a loop so that we don't unroll arbitrary loops. For example if someone has a function like this:we don't want to trace the whole function! Rather we want that to be equivalent to:
At some point we'll probably want to introduce an RPython-esque
unroll_safeannotation that allows one to override this default.