JavaScriptCore:
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 26 Jan 2008 09:01:40 +0000 (09:01 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 26 Jan 2008 09:01:40 +0000 (09:01 +0000)
commit09141f57e23cd3871e276c04f3b7d590ebe34e43
treef70776aafee89a9cf991a04ef674175f0eca637f
parent021148fa0149ec65a8f22c6cf129742fb27d6f33
JavaScriptCore:

        Reviewed by Oliver.

        - fix http://bugs.webkit.org/show_bug.cgi?id=17013
          JSC can't round trip certain for-loops

        Test: fast/js/toString-for-var-decl.html

        * kjs/nodes.h: Added PlaceholderTrueNode so we can put nodes into
        for loops without injecting the word "true" into them (nice, but not
        the bug fix). Fixed ForNode constructor so expr1WasVarDecl is set
        only when there is an expression, since it's common for the actual
        variable declaration to be moved by the parser.

        * kjs/nodes2string.cpp:
        (KJS::PlaceholderTrueNode::streamTo): Added. Empty.

LayoutTests:

        Reviewed by Oliver.

        - test for http://bugs.webkit.org/show_bug.cgi?id=17013
          JSC can't round trip certain for-loops

        * fast/js/resources/toString-for-var-decl.js: Streamlined the test a bit, with more
        of the execution within shouldBe so that exceptions are caught for us. Added a new
        test case reflecting the just-fixed bug.
        * fast/js/toString-for-var-decl-expected.txt: Updated.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@29804 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JavaScriptCore/ChangeLog
JavaScriptCore/kjs/nodes.h
JavaScriptCore/kjs/nodes2string.cpp
LayoutTests/ChangeLog
LayoutTests/fast/js/resources/toString-for-var-decl.js
LayoutTests/fast/js/toString-for-var-decl-expected.txt