New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add debug-info to access variables from generator state #58077

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
6 participants
@Nemo157
Copy link
Contributor

Nemo157 commented Feb 2, 2019

No description provided.

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Feb 2, 2019

r? @petrochenkov

(rust_highfive has picked a reviewer for you, use r? to override)

@Nemo157

This comment has been minimized.

Copy link
Contributor Author

Nemo157 commented Feb 2, 2019

I previously ran the tests when I first implemented this, but since then I've got a new laptop and haven't been able to get debuginfo tests running properly; hopefully Travis is happy (although, I just figured out a way to manually test it).

This will make all the variables in the generator available even when they haven't been initialized yet (or after they've been de-initialized), I'm not sure if there's an easy way to make it so the correct variables are specified in each state.

@Nemo157 Nemo157 force-pushed the Nemo157:generator-state-debug-info branch 2 times, most recently from f1bb5b9 to 2e91276 Feb 2, 2019

@Nemo157 Nemo157 force-pushed the Nemo157:generator-state-debug-info branch from 2e91276 to f5d8005 Feb 2, 2019

DUMMY_SP
);
}
}

This comment has been minimized.

@Zoxc

Zoxc Feb 3, 2019

Contributor

Probably should factor this out to a method instead of duplicating it

This comment has been minimized.

@Nemo157

Nemo157 Feb 3, 2019

Author Contributor

I'll have another go at doing it as a single iteration over all upvars and generator locals, just have to find a decent way to merge the UpvarDecls and LocalDecls into a single iterable with the data we care about.

@Centril

This comment has been minimized.

Copy link
Contributor

Centril commented Feb 23, 2019

Ping from triage @Nemo157 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment