Bug 170242 - WebAssembly: NFC s/goto/lambda/g
Summary: WebAssembly: NFC s/goto/lambda/g
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: JF Bastien
URL:
Keywords:
Depends on: 170219
Blocks:
  Show dependency treegraph
 
Reported: 2017-03-29 09:03 PDT by JF Bastien
Modified: 2017-03-29 10:17 PDT (History)
7 users (show)

See Also:


Attachments
patch (2.77 KB, patch)
2017-03-29 09:07 PDT, JF Bastien
mark.lam: review+
Details | Formatted Diff | Diff
patch (2.77 KB, patch)
2017-03-29 09:22 PDT, JF Bastien
mark.lam: review+
jfbastien: commit-queue+
Details | Formatted Diff | Diff
patch (2.76 KB, patch)
2017-03-29 10:02 PDT, JF Bastien
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description JF Bastien 2017-03-29 09:03:52 PDT
As suggested in https://bugs.webkit.org/show_bug.cgi?id=170219, my early-2000 C++ skillz should be updated to "post-modern C++". `goto fail` isn't as nice as lambdas.
Comment 1 JF Bastien 2017-03-29 09:07:30 PDT
Created attachment 305740 [details]
patch

goto lambda;
Comment 2 Mark Lam 2017-03-29 09:17:01 PDT
Comment on attachment 305740 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=305740&action=review

r=me with suggested fix.

> Source/JavaScriptCore/wasm/WasmMemory.cpp:121
> +    auto fail = [&] () -> bool {

This does not need to be a [&] lambda, right?  Just [] should do.
Comment 3 JF Bastien 2017-03-29 09:22:09 PDT
Created attachment 305746 [details]
patch

No need to capture in lambda.
Comment 4 JF Bastien 2017-03-29 10:02:21 PDT
Created attachment 305751 [details]
patch

Forgot to update reviewer.
Comment 5 WebKit Commit Bot 2017-03-29 10:17:52 PDT
Comment on attachment 305751 [details]
patch

Clearing flags on attachment: 305751

Committed r214541: <http://trac.webkit.org/changeset/214541>
Comment 6 WebKit Commit Bot 2017-03-29 10:17:56 PDT
All reviewed patches have been landed.  Closing bug.