-
Notifications
You must be signed in to change notification settings - Fork 46
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
Verify tmp registers #1010
Open
ushirask
wants to merge
24
commits into
ballerina-platform:main
Choose a base branch
from
ushirask:995_register
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Verify tmp registers #1010
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
4d7932a
Verify register kinds
ushirask 11f3509
Rename function
ushirask 9318029
make variables private
ushirask 753c457
Merge branch 'ballerina-platform:main' into 995_register
ushirask abdbf53
fix conflicts
ushirask 3a4c0df
Refactor code
ushirask 8eba31b
Merge branch 'ballerina-platform:main' into 995_register
ushirask f2a1382
Refactor code
ushirask e2ec714
Use match statment
ushirask d6879e7
Remove unused param
ushirask 4d12ef0
Refactor code
ushirask 54ce38f
Refactor code
ushirask 87e1184
Refactor code
ushirask 0b1638e
Rename to tmpRegisterInit
ushirask 06d93f7
Rename function
ushirask d16e0b2
Rename param
ushirask a5b3a3f
Remove incorrect verification
ushirask 9546bee
Remove incorrect verification
ushirask 82cfbb3
Move TypeMerge/Branch checks
ushirask 59b6c9f
Fix match stmt assign tmp
ushirask 88838a1
Fix foreach stmt assign tmp
ushirask 2895ca3
Remove tmp register read check
ushirask f264fd5
Remove unused function
ushirask 029c548
Rename function
ushirask 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 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.
In a match we are only reading
matched
, aren't we ? why do we needAssignTmpRegister
?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.
In a case like
even though matched is a
TmpRegister
it will be used in multiple blocks for Equality instructions, so to avoid that I think we can either do something like this or change all expr code gens to createAssignTmpRegister
instead of Tmp depending on the situation.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.
I think we'll have to change the definition of
TmpRegister
to, assigned once, but can be used form multiple blocks.@jclark what do you think?
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.
I believe this is already the case, the problem is when the
TmpRegister
is used in a different block than the block it was initially assigned.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.
I meant
let me edit.