Skip to content
  • ggaren's avatar
    JavaScriptCore: · 6b7f7edc
    ggaren authored
            Reviewed by Maciej Stachowiak.
            
            Fixed http://bugs.webkit.org/show_bug.cgi?id=15490
            Iteration statements sometimes incorrectly evaluate to the empty value 
            (KDE r670547). 
            
            [ Broken off from http://bugs.webkit.org/show_bug.cgi?id=14868 ]
            
            This patch is a merge of KDE r670547, with substantial modification 
            for performance.
            
            It fixes do-while statements to evaluate to a value. (They used
            to evaluate to the empty value in all cases.) 
    
            It also fixes SourceElementsNode to maintain the value of abnormal 
            completions like "break" and "continue."
            
            It also re-works the main execution loop in SourceElementsNode so that
            it (1) makes a little more sense and (2) avoids unnecessary work. This 
            is a .28% speedup on command-line JS iBench.
    
            * kjs/nodes.cpp:
            (DoWhileNode::execute):
            (SourceElementsNode::execute):
    
    LayoutTests:
    
            Reviewed by Maciej Stachowiak.
            
            Layout tests for http://bugs.webkit.org/show_bug.cgi?id=15490
            Iteration statements sometimes incorrectly evaluate to the empty value 
            (KDE r670547)        
    
            * fast/js/do-while-expression-value-expected.txt: Added.
            * fast/js/do-while-expression-value.html: Added.
            * fast/js/while-expression-value-expected.txt: Added.
            * fast/js/while-expression-value.html: Added.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@26617 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    6b7f7edc