-
Notifications
You must be signed in to change notification settings - Fork 31
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
Fix to #225, added better error reporting for internal compiler errors. #329
Merged
Merged
Changes from 21 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
6a08daa
added tag_matches and tag_error functions to typedecl module
srijan-paul fd0d9ef
added a test file, and replaced all error("impossible") calls in type…
srijan-paul b8ee216
added proper error messages in ast.lua, print_ir.lua and checker.lua
srijan-paul 95b4d3d
added proper error reporting to 'to_ir.lua'
srijan-paul 7f74d2e
fixed typo
srijan-paul f02aaf7
added error reporting to 'coder.lua' and 'constant_propagation.lua'
srijan-paul a06532b
updated error_tag error message
srijan-paul 7a0729b
removed uneccessary whitespace after doc comments. added usage exampl…
srijan-paul ca72031
removed uneccessary whitespace after doc comments. added usage exampl…
srijan-paul 2134fe5
replaced all uses of tag_is_type(tag) with tag_matches(tag, "types.T"
srijan-paul 6910a0d
replaced old uses of string.match with typedecl.tag_matches for check…
srijan-paul b6091ac
removed uneccessary error messages.
srijan-paul 706aed2
better default error message
srijan-paul 29c9bef
updated doc comment
srijan-paul edd073a
fixed incorrect require path
srijan-paul e99c0dd
fixed bug with assert guards, now passes all tests
srijan-paul 07350ca
Merge branch 'better-errors' into master
srijan-paul 81a5676
updated calls to match_tag , removed the "." at end of each call argu…
srijan-paul 88b1f02
Merge branch 'better-errors' into master
srijan-paul 51123e9
replaced the remaining string.matches with tag_matches
srijan-paul 1827abb
changed function tag_matches to match_tag, now returns the captured s…
srijan-paul 619c89d
updated match_tag to not treat the 2nd argument as regex
srijan-paul 93d2669
updated a previously missed assert guard
srijan-paul 9367f29
added some test cases to typedecl_spec
srijan-paul f7f553f
Merge branch 'better-errors' into master
srijan-paul e99a95b
removed uneccessary comment
srijan-paul ceb5309
Merge branch 'better-errors' into master
srijan-paul 9189ba0
updated the test cases to be more precise with logs
srijan-paul 170094a
Merge branch 'better-errors' into master
srijan-paul File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains 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 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 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 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 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 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
Oops, something went wrong.
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.
Should this be
local tagname = assert(typedecl.match_tag(cmd._tag, "ir.Cmd"))
?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.
Oh yes, my bad.