Skip to content

feat: Essential Statements/Expressions #57

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

Merged
merged 22 commits into from
Nov 17, 2024
Merged

Conversation

VincentRPS
Copy link
Contributor

@VincentRPS VincentRPS commented Nov 15, 2024

Adds:

  • Structs
  • Most basic math operators (TODO in future PR: abstract support / Support for Abstracts #56)
  • Corelib-specific flags (Struct's is_impl and impl_type properties for implementing core types)
  • Extern statement

@VincentRPS VincentRPS added p: high Priority: High pr: feature A PR that implements a feature request a: llvm Area: LLVM Backend a: mir Area: Mid-level IR labels Nov 15, 2024
@VincentRPS VincentRPS added this to the 0.1 milestone Nov 15, 2024
This was referenced Nov 16, 2024
pow/exp will instead be implemented in the corelib as a function for convenience.
implements a way for defining external functions
@VincentRPS VincentRPS marked this pull request as ready for review November 16, 2024 03:08
@VincentRPS VincentRPS changed the title feat/refactor: MIR Consistency with AST & More feat: Essential Statements/Expressions Nov 16, 2024
Comment on lines 35 to 38
/// All of the defined constants in this module.
pub constants: Vec<stmt::constant::Constant>,
/// All of the defined structs in this module.
pub structs: Vec<super::structure::Struct>,
Copy link
Contributor

Choose a reason for hiding this comment

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

At this point, is there even a reason to keep .statements?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Honestly, it might be more the other way around. But this data is mostly convenience and searching, only statements is used in codegen the others will be used in optimization and code checks.

Copy link
Contributor

@elenakrittik elenakrittik left a comment

Choose a reason for hiding this comment

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

A bunch of doc comment corrections, otherwise looks good! Since we don't have any kind of specification or even just docs on what means what in Metal, i tried to avoid changing meaning.

@elenakrittik elenakrittik merged commit 3a0a379 into main Nov 17, 2024
9 checks passed
@VincentRPS VincentRPS deleted the feat/llvm/mir-consistency branch December 3, 2024 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: llvm Area: LLVM Backend a: mir Area: Mid-level IR p: high Priority: High pr: feature A PR that implements a feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants