Uh oh!
There was an error while loading. Please reload this page.
Add unused type parameter to retain and release to prepare for closures - #1287
Conversation
This comment has been minimized.
This comment has been minimized.
DuncanUszkay1
commented
May 25, 2020
@dcodeIO thoughts on this? If this is okay to go in then it'd be great to have it in sooner rather than later since it'll help people review the closures PR |
Yes, this change looks good, going to take a look at the PR now. |
dcodeIO
left a comment
There was a problem hiding this comment.
Generally looks good to make this change, just a few comments. Not all of the comments are strictly related to your change, but some also propose to establish a proper convention for the helpers, in that whenever a raw expression without a type is taken, the corresponding type must be provided as well. Does that sound good to you?
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
DuncanUszkay1
commented
May 25, 2020
Makes sense to me. If it's a more general thing though let's put it into a separate issue. |
DuncanUszkay1
commented
May 25, 2020
I likely haven't added the type everywhere, but everywhere which calls retain/release which feels appropriate for this PR, and then maybe spin out an issue if we feel like we need the rest? |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
DuncanUszkay1
commented
May 26, 2020
Looks like I'm failing the new lint now? |
No, it's still old tslint currently. Just replace top-level function |
Co-authored-by: Daniel Wirtz <dcode@dcode.io>
Co-authored-by: Daniel Wirtz <dcode@dcode.io>
52ed016 to
d61b7eaCompareDuncanUszkay1
commented
May 26, 2020
Should be good to go now |
MaxGraey
commented
May 27, 2020
@dcodeIO could you look? |
dcodeIO
commented
May 27, 2020
Thanks, rechecked and looks good! |
Extracting some no-op changes from my Closures PR to make it easier to parse.
What's been extracted is just the change to have type information passed into retain/release in any scenario where the expression could refer to a function pointer.
Context behind this change:
While none of the below is actually present in this change, which does nothing, it explains what this change will be used for in the closures implementation.
With our current scheme of altering function references so that they can hold closures or normal function references, we need to know the type of a block in order to know how to retain or release it.