Ignore:
Timestamp:
Mar 18, 2008, 11:17:10 PM (17 years ago)
Author:
[email protected]
Message:

Bug 17929: Incorrect decompilation with |const|, comma
http://bugs.webkit.org/show_bug.cgi?id=17929

Reviewed by Mark Rowe

There were actually two bugs here. First we weren't correctly handling const
nodes with multiple declarations. The second issue was caused by us not
giving the correct precedence to the initialisers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/nodes2string.cpp

    r30944 r31148  
    768768    s << m_ident;
    769769    if (m_init)
    770         s << " = " << m_init;
     770        s << " = " << PrecAssignment << m_init;
    771771    for (ConstDeclNode* n = m_next.get(); n; n = n->m_next.get()) {
    772         s << ", " << m_ident;
     772        s << ", " << n->m_ident;
    773773        if (m_init)
    774             s << " = " << m_init;
     774            s << " = " << PrecAssignment << n->m_init;
    775775    }
    776776}
Note: See TracChangeset for help on using the changeset viewer.