Bug 137144 - Fix typo in YARR at BOL check
Summary: Fix typo in YARR at BOL check
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P3 Normal
Assignee: Peter Varga
Depends on:
Reported: 2014-09-26 00:28 PDT by David Binderman
Modified: 2014-09-26 10:50 PDT (History)
4 users (show)

See Also:

proposed patch (1.21 KB, patch)
2014-09-26 05:28 PDT, Peter Varga
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Binderman 2014-09-26 00:28:38 PDT
webkitgtk-2.5.90/Source/JavaScriptCore/yarr/YarrPattern.cpp:300]: (style) Boolean result is used in bitwise operation. Clarify expression with parentheses.

Source code is

        if (!m_alternative->m_terms.size() & !m_invertParentheticalAssertion) {


        if (!m_alternative->m_terms.size() && !m_invertParentheticalAssertion) {

was intended.
Comment 1 Csaba Osztrogonác 2014-09-26 04:48:18 PDT
The code is still in trunk, cc-ing YARR experts.
Comment 2 Peter Varga 2014-09-26 05:28:07 PDT
Created attachment 238708 [details]
proposed patch
Comment 3 Darin Adler 2014-09-26 10:13:27 PDT
Comment on attachment 238708 [details]
proposed patch

OK to make this change, but it was OK to use & here since both values were booleans and the second expression had no side effect.
Comment 4 WebKit Commit Bot 2014-09-26 10:50:02 PDT
Comment on attachment 238708 [details]
proposed patch

Clearing flags on attachment: 238708

Committed r174012: <http://trac.webkit.org/changeset/174012>
Comment 5 WebKit Commit Bot 2014-09-26 10:50:04 PDT
All reviewed patches have been landed.  Closing bug.