Folding builtins#1949
Merged
fubuloubu merged 21 commits intoMay 8, 2020
Merged
Conversation
181fa49 to
fe1b920
Compare
00b54f2 to
2efda86
Compare
Codecov Report
@@ Coverage Diff @@
## master #1949 +/- ##
==========================================
- Coverage 87.04% 84.79% -2.25%
==========================================
Files 55 56 +1
Lines 6444 6642 +198
Branches 1629 1689 +60
==========================================
+ Hits 5609 5632 +23
- Misses 531 692 +161
- Partials 304 318 +14
Continue to review full report at Codecov.
|
e9b3aca to
f6cf5bb
Compare
Contributor
|
Lol, looks like you found a Hypothesis bug https://github.com/vyperlang/vyper/pull/1949/checks?check_run_id=651123760 |
7eb7112 to
6ba150a
Compare
fubuloubu
reviewed
May 7, 2020
6ba150a to
71636d3
Compare
71636d3 to
82ae1af
Compare
Contributor
Author
|
@fubuloubu unless you have other comments I think this is ready for merging after #1956 merges. |
fubuloubu
approved these changes
May 8, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I did
Add constant folding logic for builtin functions.
How I did it
evaluatemethod of each class invyper/functions/functions.pyreplace_builtin_functionsinvyper/ast/folding.pytests/functions/folding/The only folding implementation I'm not testing is
method_id. This function should always fold, so verifying the result of folding vs not-folding seems redundant. Once we add folding into the compiler process we can update the existing test cases around this function.Next Steps
Things to do next that are outside the scope of this PR.
vyper/functions/functions.pyREADME.mdtovyper/functionsCute Animal Picture