Skip to content

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

Merged
spytheman merged 3 commits intovlang:masterfrom
Spydr06:native-refactor
Jun 25, 2023
Merged

native: split codegen into multiple files and refactor assign statement generation#18546
spytheman merged 3 commits intovlang:masterfrom
Spydr06:native-refactor

Conversation

@Spydr06
Copy link
Contributor

@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