Bug 107147

Summary: DFG Node::ref() and Node::deref() should not return bool, and should have postfixRef variants
Product: WebKit Reporter: Filip Pizlo <fpizlo>
Component: JavaScriptCoreAssignee: Filip Pizlo <fpizlo>
Status: RESOLVED FIXED    
Severity: Normal CC: barraclough, ggaren, mark.lam, mhahnenberg, msaboff, oliver, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 106868    
Attachments:
Description Flags
the patch
none
the patch mhahnenberg: review+

Filip Pizlo
Reported 2013-01-17 11:21:02 PST
This small refactoring will enable a world where ref() returns Node*, which is useful for https://bugs.webkit.org/show_bug.cgi?id=106868. Also, while this refactoring does lead to slightly less terse code, it's also slightly more self-explanatory. I could never quite remember what the meaning of the bool return from ref() and deref() was.
Attachments
the patch (4.47 KB, patch)
2013-01-17 11:22 PST, Filip Pizlo
no flags
the patch (4.43 KB, patch)
2013-01-17 12:43 PST, Filip Pizlo
mhahnenberg: review+
Filip Pizlo
Comment 1 2013-01-17 11:22:01 PST
Created attachment 183226 [details] the patch
Oliver Hunt
Comment 2 2013-01-17 12:00:49 PST
Comment on attachment 183226 [details] the patch I don't understand what "exchangeAnd(Der|Re)f" is exchanging, so the meaning of the name doesn't seem obvious to me.
Filip Pizlo
Comment 3 2013-01-17 12:35:50 PST
(In reply to comment #2) > (From update of attachment 183226 [details]) > I don't understand what "exchangeAnd(Der|Re)f" is exchanging, so the meaning of the name doesn't seem obvious to me. It's exchanging the ref count.
Filip Pizlo
Comment 4 2013-01-17 12:43:04 PST
Created attachment 183248 [details] the patch
Mark Hahnenberg
Comment 5 2013-01-17 12:44:29 PST
Comment on attachment 183248 [details] the patch r=me
Filip Pizlo
Comment 6 2013-01-17 12:46:46 PST
Note You need to log in before you can comment on or make changes to this bug.