Skip to content
This repository has been archived by the owner on Jan 7, 2022. It is now read-only.

Mark functions with loops in as do_not_trace by default #175

Open
ltratt opened this issue Mar 4, 2021 · 0 comments
Open

Mark functions with loops in as do_not_trace by default #175

ltratt opened this issue Mar 4, 2021 · 0 comments
Assignees

Comments

@ltratt
Copy link
Member

ltratt commented Mar 4, 2021

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants