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