JavaScriptCore:
authorandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 20 May 2006 20:19:22 +0000 (20:19 +0000)
committerandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 20 May 2006 20:19:22 +0000 (20:19 +0000)
commit034c5dc6d829677398c3a4c089536aa01c7f972e
treea3892a00f244503c77768ab6161fbaf77ecc8485
parentaa393750ba7e697fd1ffd5775471932fd054f6bc
JavaScriptCore:

2006-05-20  Anders Carlsson  <acarlsson@apple.com>

        Reviewed by Geoff.

        http://bugzilla.opendarwin.org/show_bug.cgi?id=8993
        Support function declaration in case statements

        * kjs/grammar.y: Get rid of StatementList and use SourceElements instead.

        * kjs/nodes.cpp:
        (CaseClauseNode::evalStatements):
        (CaseClauseNode::processVarDecls):
        (CaseClauseNode::processFuncDecl):
        (ClauseListNode::processFuncDecl):
        (CaseBlockNode::processFuncDecl):
        (SwitchNode::processFuncDecl):
        * kjs/nodes.h:
        (KJS::CaseClauseNode::CaseClauseNode):
        (KJS::ClauseListNode::ClauseListNode):
        (KJS::ClauseListNode::getClause):
        (KJS::ClauseListNode::getNext):
        (KJS::ClauseListNode::releaseNext):
        (KJS::SwitchNode::SwitchNode):
        Add processFuncDecl for the relevant nodes.

        * kjs/nodes2string.cpp:
        (CaseClauseNode::streamTo):
        next got renamed to source.

LayoutTests:

2006-05-20  Anders Carlsson  <acarlsson@apple.com>

        Reviewed by Geoff.

        * fast/js/function-declarations-in-switch-statement-expected.txt: Added.
        * fast/js/function-declarations-in-switch-statement.html: Added.
        * fast/js/resources/function-declarations-in-switch-statement.js: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@14502 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JavaScriptCore/ChangeLog
JavaScriptCore/kjs/grammar.y
JavaScriptCore/kjs/nodes.cpp
JavaScriptCore/kjs/nodes.h
JavaScriptCore/kjs/nodes2string.cpp
LayoutTests/ChangeLog
LayoutTests/fast/js/function-declarations-in-switch-statement-expected.txt [new file with mode: 0644]
LayoutTests/fast/js/function-declarations-in-switch-statement.html [new file with mode: 0644]
LayoutTests/fast/js/resources/function-declarations-in-switch-statement.js [new file with mode: 0644]