Skip to content

Use more Datums in trans. #13004

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

Closed
wants to merge 4 commits into from
Closed

Use more Datums in trans. #13004

wants to merge 4 commits into from

Conversation

eddyb
Copy link
Member

@eddyb eddyb commented Mar 18, 2014

Datums are safer than plain ValueRefs, as they hold a type and a kind (specifying how the value should be handled), and potentially more efficient (e.g. repeated type lookups can be expensive, because of substitutions).
This PR begins the conversion of old code using ValueRefs to Datums.
It also introduces a new Datum kind, PodValue, which can be freely shared, akin to an Lvalue.

@alexcrichton
Copy link
Member

Can you add rationale for this change to the PR description?

@eddyb eddyb changed the title Use more Datums in trans::callee. Use more Datums in trans. Mar 20, 2014
@nikomatsakis
Copy link
Contributor

For the record, I would prefer for PodOrLvalue (or LvalueOrPod, whatever it's called) to be a datum kind like Expr. Also, I think the docs in trans/doc.rs should be updated to describe the pod changes.

bors added a commit that referenced this pull request Mar 24, 2014
Datums are safer than plain ValueRefs, as they hold a type and a kind (specifying how the value should be handled), and potentially more efficient (e.g. repeated type lookups can be expensive, because of substitutions).
This PR begins the conversion of old code using ValueRefs to Datums.
It also introduces a new Datum kind, PodValue, which can be freely shared, akin to an Lvalue.
@alexcrichton
Copy link
Member

Closing due to inactivity, but feel free to reopen with a rebase!

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

Successfully merging this pull request may close these issues.

4 participants