[hot_reload] assorted hot reload fixes for cumulative property updates#85351
Merged
carlossanlop merged 4 commits intodotnet:mainfrom Apr 25, 2023
Merged
Conversation
`is_addition` is already defined as `token_index-1 >= delta_info->count[token_table].prev_gen_rows` so: 1. the assertion as written is wrong for cumulative updates that add new properties or events 2. the assertion would be trivially true if it was updated to use `delta_info->count[token_table].prev_gen_rows`. Fixes the ability to cumulatively add new properties
Give recompute_ginst_update_info something to work with.
lewing
approved these changes
Apr 25, 2023
token-based lookup should only happen for class defs or GTDs
Member
Author
|
There are additional changes. And also an updated regression test |
fanyang-mono
approved these changes
Apr 25, 2023
Member
|
@carlossanlop we'd like this in the snap |
This was referenced Apr 26, 2023
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
is_additionis already defined astoken_index-1 >= delta_info->count[token_table].prev_gen_rowsso:delta_info->count[token_table].prev_gen_rows.Fixes the ability to cumulatively add new properties
Assert that we don't see generic instances in
hot_reload_get_propertyandhot_reload_get_event.They only get called when we're looking at a definition (class def or gtd) and want to find a property using a token.
Allow overwriting getter/setter (and event add/remove/raise) methods - if a setter is updated in a cumulative update, the previously added prop (or event) will have its semantic method overwritten with a new one.
Actually set the generation on a class update info when adding members. This will allow the generic instance code to trigger a recomputation and see the second (or later) generation updated info on instances.