Skip to content
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 computed position types #115

Merged
merged 5 commits into from Oct 29, 2018
Merged

Add computed position types #115

merged 5 commits into from Oct 29, 2018

Conversation

brendanzab
Copy link
Member

No description provided.

@@ -430,6 +432,7 @@ impl Default for TcEnv {
let var_offset64be = FreeVar::fresh_named("Offset64Be");

let var_array = FreeVar::fresh_named("Array");
let var_offset_pos = FreeVar::fresh_named("OffsetPos");
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really sold on this naming... computed stuff kind hurts my brain :/

@brendanzab
Copy link
Member Author

Still need some parse tests for this stuff

@@ -785,6 +800,18 @@ impl GlobalEnv for TcEnv {
_ => None,
})
}

fn offset_pos<'a>(&self, ty: &'a RcType) -> Option<(u64, &'a BigInt, &'a RcType)> {
free_var_app(&self.globals.var_array, ty).and_then(|spine| match spine {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BAHAHA! Copy-pastey bug here: s/var_array/var_offset_pos/

@brendanzab brendanzab merged commit 43c03c6 into master Oct 29, 2018
@brendanzab brendanzab deleted the brendanzab/computed-pos branch October 29, 2018 02:17
@brendanzab brendanzab mentioned this pull request Oct 29, 2018
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.

None yet

1 participant