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
Conversation
@@ -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"); |
There was a problem hiding this comment.
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 :/
Still need some parse tests for this stuff |
src/semantics/env.rs
Outdated
@@ -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 { |
There was a problem hiding this comment.
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/
8f3c873
to
a6fb915
Compare
No description provided.