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

[Codegen / Parsing] Add basic codegen for references, add parsing for arrays #81

Merged
merged 5 commits into from
Jan 23, 2024

Conversation

edg-l
Copy link
Member

@edg-l edg-l commented Jan 17, 2024

Depends on #79

  • Adds basic codegen for references and dereferences
  • Adds arrays to the ast and parser

The following program compiles and works:

mod Simple {
    fn main(argc: i64) -> i64 {
        let x: i64 = argc;
        return references(x) + dereference(&x);
    }

    fn dereference(a: &i64) -> i64 {
        return *a;
    }

    fn references(a: i64) -> i64 {
        let x: i64 = a;
        let y: &i64 = &x;
        return *y;
    }
}

@edg-l edg-l changed the base branch from main to add_imports January 17, 2024 16:12
@edg-l edg-l force-pushed the add_imports branch 2 times, most recently from a8e0919 to 68423e9 Compare January 18, 2024 13:43
@codecov-commenter
Copy link

codecov-commenter commented Jan 18, 2024

Codecov Report

Attention: 27 lines in your changes are missing coverage. Please review.

Comparison is base (68423e9) 68.75% compared to head (a7bc019) 69.61%.

Files Patch % Lines
crates/concrete_codegen_mlir/src/codegen.rs 84.00% 20 Missing ⚠️
crates/concrete_driver/src/lib.rs 0.00% 5 Missing ⚠️
crates/concrete_ast/src/types.rs 71.42% 2 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff               @@
##           add_imports      #81      +/-   ##
===============================================
+ Coverage        68.75%   69.61%   +0.86%     
===============================================
  Files               28       28              
  Lines             1309     1379      +70     
===============================================
+ Hits               900      960      +60     
- Misses             409      419      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@edg-l edg-l marked this pull request as ready for review January 18, 2024 14:54
juanbono
juanbono previously approved these changes Jan 22, 2024
Base automatically changed from add_imports to main January 22, 2024 19:13
@igaray igaray dismissed juanbono’s stale review January 22, 2024 19:13

The base branch was changed.

@edg-l edg-l added this to the 0.01 Talc milestone Jan 22, 2024
@igaray igaray merged commit 35506b6 into main Jan 23, 2024
4 checks passed
@igaray igaray deleted the references branch January 23, 2024 14:24
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