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

native: split codegen into multiple files and refactor assign statement generation #18546

Merged
merged 3 commits into from
Jun 25, 2023

Conversation

Spydr06
Copy link
Member

@Spydr06 Spydr06 commented Jun 24, 2023

In continuation of #17782:

  • Splitting up the code into multiple files (gen.v, expr.v, stmt.v) makes navigating much easier.
  • Assignment statements now don't rely on hard-coded initializer expressions, but can take values from every expression classified trough the type-system

🤖 Generated by Copilot at 951f5e3

This pull request implements the basic infrastructure and logic for generating native code for expressions and statements in the V language, and adds a test program and its expected output for the native backend. It also adds a license header and a stub function for the ARM64 code generator.

🤖 Generated by Copilot at 951f5e3

  • Add license header to vlib/v/gen/native/arm64.v (link)
  • Add stub function for init_array in Arm64 struct (link)
  • Add vlib/v/gen/native/expr.v with logic for expression code generation (link)

@spytheman spytheman merged commit 31f68ee into vlang:master Jun 25, 2023
@Spydr06 Spydr06 deleted the native-refactor branch June 25, 2023 07:29
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.

2 participants