-
-
Notifications
You must be signed in to change notification settings - Fork 805
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
feat: add optimization mode to vyper compiler #3493
feat: add optimization mode to vyper compiler #3493
Conversation
this commit adds the `--optimize` flag to the vyper cli, and as an option in vyper json. it is to be used separately from the `--no-optimize` flag. this commit does not actually add different options, just adds the flag and threads it through the codebase so it is available once we want to start differentiating between the two modes, and sets up the test harness to test both modes.
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## master #3493 +/- ##
==========================================
- Coverage 89.37% 88.94% -0.44%
==========================================
Files 84 84
Lines 10780 10882 +102
Branches 2457 2488 +31
==========================================
+ Hits 9635 9679 +44
- Misses 749 789 +40
- Partials 396 414 +18
... and 4 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
note: mypy needed bump to 0.940 to handle match/case
it was probably important when we supported pre-constantinople targets, not anymore
needed to update to 0.940 anyways to handle match/case
this commit adds the `--optimize` flag to the vyper cli, and as an option in vyper json. it is to be used separately from the `--no-optimize` flag. this commit does not actually change codegen, just adds the flag and threads it through the codebase so it is available once we want to start differentiating between the two modes, and sets up the test harness to test both modes. it also makes the `optimize` and `evm-version` available as source code pragmas, and adds an additional syntax for specifying the compiler version (`#pragma version X.Y.Z`). if the CLI / JSON options conflict with the source code pragmas, an exception is raised. this commit also: * bumps mypy - it was needed to bump to 0.940 to handle match/case, and discovered we could bump all the way to 0.98* without breaking anything * removes evm_version from bitwise op tests - it was probably important when we supported pre-constantinople targets, which we don't anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correction and replace please
this commit adds the
--optimize
flag to the vyper cli, which can take the values of"codesize"
and"gas"
, and as an option in vyper json. it is to be used separately from the--no-optimize
flag. this commit does not actually change any codegen, just adds the flag, threads it through the codebase so it is available once we want to start differentiating between the two modes, and sets up the test harness to test both modes.What I did
How I did it
How to verify it
Commit message
Description for the changelog
Cute Animal Picture