Bug 167950 - SigillCrashAnalyzer::analyze() should use a do-while loop instead of a lambda.
Summary: SigillCrashAnalyzer::analyze() should use a do-while loop instead of a lambda.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-07 12:17 PST by Mark Lam
Modified: 2017-02-07 13:23 PST (History)
4 users (show)

See Also:


Attachments
proposed patch. (3.66 KB, patch)
2017-02-07 12:24 PST, Mark Lam
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 2017-02-07 12:17:45 PST
Michael pointed out to me that lambda's aren't free, and suggested I use a do-while loop instead.  I didn't think to use a loop when I first wrote this code (brain malfunction), but had reasoned that the compiler should be able to realize that the lambda does not escape, and hence can be inlined complete.  However, a quick disassembly of the compiled code reveals that this is not the case: the compiler did not inline the lambda.  Even though this code is not in a performance critical path, I'll switch the code to using a do-while loop just so it doesn't encourage uses of lambda (like this) where not needed.
Comment 1 Mark Lam 2017-02-07 12:24:39 PST
Created attachment 300834 [details]
proposed patch.
Comment 2 WebKit Commit Bot 2017-02-07 13:23:51 PST
Comment on attachment 300834 [details]
proposed patch.

Clearing flags on attachment: 300834

Committed r211834: <http://trac.webkit.org/changeset/211834>
Comment 3 WebKit Commit Bot 2017-02-07 13:23:55 PST
All reviewed patches have been landed.  Closing bug.