Skip to content
This repository has been archived by the owner on Nov 6, 2022. It is now read-only.

Function centric codegen #594

Merged
merged 22 commits into from
Sep 7, 2021
Merged

Function centric codegen #594

merged 22 commits into from
Sep 7, 2021

Conversation

rachel-bousfield
Copy link
Contributor

@rachel-bousfield rachel-bousfield commented Aug 14, 2021

Makes codegen function-centric so that codegen is module-agnostic.
This makes future optimizations possible and enables other refactors to codgen.

This PR also

  • Reduces the number of backward jumps from 279 to 11 for a 0.5% performance gain
  • Reduces the number of AVM instructions in ArbOS by 12.88%
  • Multi-threads codegen
  • Creates .dot graph files for callgraph viewing
  • Globals can now have attributes & debug info
  • Refactors unused function procedure to not generate code for stdlib funcs
  • Refactors label_gen to be less stateful
  • Removes lifetime parameters from codegen
  • Removes all code relocation & simplifies linking
  • Adds the string datatype
  • Reduces special-casing around closures
  • Improves import error messages and logic

@rachel-bousfield rachel-bousfield marked this pull request as draft August 14, 2021 23:15
@rachel-bousfield rachel-bousfield marked this pull request as ready for review August 15, 2021 22:47
@rachel-bousfield
Copy link
Contributor Author

The nightly tests are failing due to a bug in the rust compiler.

@codecov-commenter
Copy link

Codecov Report

Merging #594 (8b465a3) into next (8792056) will increase coverage by 0.25%.
The diff coverage is 86.91%.

@@            Coverage Diff             @@
##             next     #594      +/-   ##
==========================================
+ Coverage   77.40%   77.66%   +0.25%     
==========================================
  Files          88       88              
  Lines       29012    28694     -318     
==========================================
- Hits        22458    22286     -172     
+ Misses       6554     6408     -146     

Copy link
Contributor

@RGates94 RGates94 left a comment

Choose a reason for hiding this comment

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

LGTM

@rachel-bousfield rachel-bousfield merged commit f06ebc2 into next Sep 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants