-
Notifications
You must be signed in to change notification settings - Fork 603
Common structure for concrete and extern enum lowering #7738
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
Conversation
e71717d
to
df330b0
Compare
32cc510
to
f508da1
Compare
f508da1
to
a5c6392
Compare
df330b0
to
14d8d40
Compare
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.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @TomerStarkware)
crates/cairo-lang-lowering/src/lower/lower_match.rs
line 1341 at r1 (raw file):
/// A context for lowering patterns of enum variants in a match statement. struct EnumVariantBuilderContext<'a> {
add fn new
for this struct.
most construction now id duplicated as well.
Code quote:
struct EnumVariantBuilderContext<'a> {
14d8d40
to
66e27c8
Compare
a5c6392
to
17a03a2
Compare
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.
Reviewed all commit messages.
Reviewable status: 0 of 1 files reviewed, 2 unresolved discussions (waiting on @eytan-starkware and @TomerStarkware)
crates/cairo-lang-lowering/src/lower/lower_match.rs
line 1207 at r2 (raw file):
get_underscore_pattern_path_and_mark_unreachable(ctx, match_arms, match_type); let variant_map = get_variant_to_arm_map(ctx, match_arms, extern_enum.concrete_enum_id, match_type)?;
move into the new
fn.
Code quote:
let otherwise_variant =
get_underscore_pattern_path_and_mark_unreachable(ctx, match_arms, match_type);
let variant_map =
get_variant_to_arm_map(ctx, match_arms, extern_enum.concrete_enum_id, match_type)?;
66e27c8
to
26c12fc
Compare
17a03a2
to
235d7f6
Compare
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.
Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @TomerStarkware)
This is in preparation for having a common trait for common code commit-id:f4e87162
26c12fc
to
0d81ae7
Compare
This is in preparation for having a common trait for common code
Stack: