-
-
Notifications
You must be signed in to change notification settings - Fork 667
Add Compile-Time Error-Checking and Avoid Boundschecking in Slice Expressions #4351
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
Closed
Closed
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
38ccc34
First try
nordlow bc850d5
First version that does anything useful
nordlow cf7f408
Add utility function lowerIsInBounds
nordlow 991c6bd
Set lowerIsLessThanUpper to true for [$ .. $] slicings
nordlow 80f1aaa
Simplify isOpDollar by making use of Id::dollar
nordlow 717d482
Handle case were lower bound is zero
nordlow 2be613e
Simplify
nordlow 4df5e9a
Implement Step 3
nordlow a811f6e
Keep lowerIsLessThanUpper as true if existing logic cannot prove things
nordlow ad6bebb
Put lower before upper and remove intermediate
nordlow a56d4bf
Simplify and use toInteger
nordlow 6079a6d
Implement Step 4
nordlow e23906c
Simplify
nordlow 4c0afec
Working comparison of rational bounds
nordlow 0cb9ae7
Be more restrictive
nordlow 1074985
Simplify
nordlow 3205b61
Turn lowerIsInBounds to a variable
nordlow 2599088
Break out into SliceExp::Boundness and SliceExp::analyzeRelativeBound…
nordlow 3079e38
Comment Boundness
nordlow 63d2ac5
Various feedback fixes
nordlow f713a38
Use printf instead of warning
nordlow 86d0907
Disable LOG_BOUNDNESS
nordlow f37f5b0
Use new function isInteger, move lowerIsInBounds, longer names for Bo…
nordlow 0a70d45
Better dollar offset error checking for (Step 5)
nordlow d1997cc
Disable LOG_BOUNDNESS again
nordlow 7e0a57f
Bugfix logic that sets lowerIsLessThanUpper
nordlow 9bc7015
Disable LOG_BOUNDNESS again
nordlow 64433ae
Add boundscheck for p*$, p >= 2
nordlow a571190
Better printing
nordlow 3e7349b
Add lower limit < 0
nordlow 7777ca0
Use isunsigned in analyzeSliceBound
nordlow 9e61acb
Make all negative bounds an error including minus dollar
nordlow 9abf724
Make use of conversion functions isXExp and error checking for - $ * N
nordlow a371fc2
Make isXExp into virtual members of Expression
nordlow 3b5e9dc
Add debug print
nordlow File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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.
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.
looks like
to me
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.
You're right. I'll wait and see if any more logic has to be added :) If not I'll change it.