haikuwebkit/LayoutTests/js/destructuring-assignment-ex...

92 lines
5.0 KiB
Plaintext
Raw Permalink Normal View History

basic tests for destructuring assignment
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS var [a,b]=['1','2']; var r=a+b; r is '12'
Function as String: (function([a,b]) { return a+b;})
PASS (function([a,b]) { return a+b;})(['1','2']) is '12'
ES6: Object Literal Methods toString is missing method name https://bugs.webkit.org/show_bug.cgi?id=142992 Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-03-24 Reviewed by Geoffrey Garen. Source/JavaScriptCore: Always stringify functions in the pattern: "function " + <function name> + <text from opening parenthesis to closing brace>. * runtime/FunctionPrototype.cpp: (JSC::functionProtoFuncToString): Update the path that was not stringifying in this pattern. * bytecode/UnlinkedCodeBlock.cpp: (JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable): * bytecode/UnlinkedCodeBlock.h: (JSC::UnlinkedFunctionExecutable::parametersStartOffset): * parser/Nodes.h: * runtime/Executable.cpp: (JSC::FunctionExecutable::FunctionExecutable): * runtime/Executable.h: (JSC::FunctionExecutable::parametersStartOffset): Pass the already known function parameter opening parenthesis start offset through to the FunctionExecutable. * tests/mozilla/js1_5/Scope/regress-185485.js: (with.g): Add back original space in this test that was removed by r181810 now that we have the space again in stringification. LayoutTests: * js/class-syntax-default-constructor-expected.txt: This test was already failing, it now fails in a different way. * js/object-literal-computed-methods-expected.txt: * js/object-literal-methods-expected.txt: These tests now pass. * fast/dom/TreeWalker/acceptNode-filter-expected.txt: * js/destructuring-assignment-expected.txt: * js/dfg-redundant-load-of-captured-variable-proven-constant-expected.txt: * js/dfg-resolve-global-specific-dictionary-expected.txt: * js/dom/JSON-parse-expected.txt: * js/dom/JSON-stringify-expected.txt: * js/dom/dfg-strcat-over-objects-then-exit-on-it-expected.txt: * js/dom/function-prototype-expected.txt: * js/dom/toString-and-valueOf-override-expected.txt: * js/kde/lval-exceptions-expected.txt: * storage/domstorage/localstorage/string-conversion-expected.txt: * storage/domstorage/sessionstorage/string-conversion-expected.txt: * js/dom/script-tests/dfg-strcat-over-objects-then-exit-on-it.js: * js/script-tests/dfg-redundant-load-of-captured-variable-proven-constant.js: * js/script-tests/dfg-resolve-global-specific-dictionary.js: * js/dom/function-prototype.html: Update tests to add expected whitespace for stringifying a function with no name. Canonical link: https://commits.webkit.org/161029@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181901 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-03-24 20:07:26 +00:00
PASS (function ([a,b]) { return a+b;})(['1','2']) is '12'
PASS ([a,b]=['1','2']); var r=a+b; r is '12'
PASS [a,b]=['1','2']; var r=a+b; r is '12'
PASS var {a,b}={a:'1',b:'2'}; var r=a+b; r is '12'
Function as String: (function({a,b}) { return a+b;})
PASS (function({a,b}) { return a+b;})({a:'1',b:'2'}) is '12'
ES6: Object Literal Methods toString is missing method name https://bugs.webkit.org/show_bug.cgi?id=142992 Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-03-24 Reviewed by Geoffrey Garen. Source/JavaScriptCore: Always stringify functions in the pattern: "function " + <function name> + <text from opening parenthesis to closing brace>. * runtime/FunctionPrototype.cpp: (JSC::functionProtoFuncToString): Update the path that was not stringifying in this pattern. * bytecode/UnlinkedCodeBlock.cpp: (JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable): * bytecode/UnlinkedCodeBlock.h: (JSC::UnlinkedFunctionExecutable::parametersStartOffset): * parser/Nodes.h: * runtime/Executable.cpp: (JSC::FunctionExecutable::FunctionExecutable): * runtime/Executable.h: (JSC::FunctionExecutable::parametersStartOffset): Pass the already known function parameter opening parenthesis start offset through to the FunctionExecutable. * tests/mozilla/js1_5/Scope/regress-185485.js: (with.g): Add back original space in this test that was removed by r181810 now that we have the space again in stringification. LayoutTests: * js/class-syntax-default-constructor-expected.txt: This test was already failing, it now fails in a different way. * js/object-literal-computed-methods-expected.txt: * js/object-literal-methods-expected.txt: These tests now pass. * fast/dom/TreeWalker/acceptNode-filter-expected.txt: * js/destructuring-assignment-expected.txt: * js/dfg-redundant-load-of-captured-variable-proven-constant-expected.txt: * js/dfg-resolve-global-specific-dictionary-expected.txt: * js/dom/JSON-parse-expected.txt: * js/dom/JSON-stringify-expected.txt: * js/dom/dfg-strcat-over-objects-then-exit-on-it-expected.txt: * js/dom/function-prototype-expected.txt: * js/dom/toString-and-valueOf-override-expected.txt: * js/kde/lval-exceptions-expected.txt: * storage/domstorage/localstorage/string-conversion-expected.txt: * storage/domstorage/sessionstorage/string-conversion-expected.txt: * js/dom/script-tests/dfg-strcat-over-objects-then-exit-on-it.js: * js/script-tests/dfg-redundant-load-of-captured-variable-proven-constant.js: * js/script-tests/dfg-resolve-global-specific-dictionary.js: * js/dom/function-prototype.html: Update tests to add expected whitespace for stringifying a function with no name. Canonical link: https://commits.webkit.org/161029@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181901 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-03-24 20:07:26 +00:00
PASS (function ({a,b}) { return a+b;})({a:'1',b:'2'}) is '12'
PASS ({a,b}={a:'1',b:'2'}); var r=a+b; r is '12'
PASS var {c:a,d:b}={c:'1',d:'2'}; var r=a+b; r is '12'
Function as String: (function({c:a,d:b}) { return a+b;})
PASS (function({c:a,d:b}) { return a+b;})({c:'1',d:'2'}) is '12'
ES6: Object Literal Methods toString is missing method name https://bugs.webkit.org/show_bug.cgi?id=142992 Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-03-24 Reviewed by Geoffrey Garen. Source/JavaScriptCore: Always stringify functions in the pattern: "function " + <function name> + <text from opening parenthesis to closing brace>. * runtime/FunctionPrototype.cpp: (JSC::functionProtoFuncToString): Update the path that was not stringifying in this pattern. * bytecode/UnlinkedCodeBlock.cpp: (JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable): * bytecode/UnlinkedCodeBlock.h: (JSC::UnlinkedFunctionExecutable::parametersStartOffset): * parser/Nodes.h: * runtime/Executable.cpp: (JSC::FunctionExecutable::FunctionExecutable): * runtime/Executable.h: (JSC::FunctionExecutable::parametersStartOffset): Pass the already known function parameter opening parenthesis start offset through to the FunctionExecutable. * tests/mozilla/js1_5/Scope/regress-185485.js: (with.g): Add back original space in this test that was removed by r181810 now that we have the space again in stringification. LayoutTests: * js/class-syntax-default-constructor-expected.txt: This test was already failing, it now fails in a different way. * js/object-literal-computed-methods-expected.txt: * js/object-literal-methods-expected.txt: These tests now pass. * fast/dom/TreeWalker/acceptNode-filter-expected.txt: * js/destructuring-assignment-expected.txt: * js/dfg-redundant-load-of-captured-variable-proven-constant-expected.txt: * js/dfg-resolve-global-specific-dictionary-expected.txt: * js/dom/JSON-parse-expected.txt: * js/dom/JSON-stringify-expected.txt: * js/dom/dfg-strcat-over-objects-then-exit-on-it-expected.txt: * js/dom/function-prototype-expected.txt: * js/dom/toString-and-valueOf-override-expected.txt: * js/kde/lval-exceptions-expected.txt: * storage/domstorage/localstorage/string-conversion-expected.txt: * storage/domstorage/sessionstorage/string-conversion-expected.txt: * js/dom/script-tests/dfg-strcat-over-objects-then-exit-on-it.js: * js/script-tests/dfg-redundant-load-of-captured-variable-proven-constant.js: * js/script-tests/dfg-resolve-global-specific-dictionary.js: * js/dom/function-prototype.html: Update tests to add expected whitespace for stringifying a function with no name. Canonical link: https://commits.webkit.org/161029@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181901 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-03-24 20:07:26 +00:00
PASS (function ({c:a,d:b}) { return a+b;})({c:'1',d:'2'}) is '12'
PASS ({c:a,d:b}={c:'1',d:'2'}); var r=a+b; r is '12'
PASS var {c:b,d:a}={c:'1',d:'2'}; var r=a+b; r is '21'
Function as String: (function({c:b,d:a}) { return a+b;})
PASS (function({c:b,d:a}) { return a+b;})({c:'1',d:'2'}) is '21'
ES6: Object Literal Methods toString is missing method name https://bugs.webkit.org/show_bug.cgi?id=142992 Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-03-24 Reviewed by Geoffrey Garen. Source/JavaScriptCore: Always stringify functions in the pattern: "function " + <function name> + <text from opening parenthesis to closing brace>. * runtime/FunctionPrototype.cpp: (JSC::functionProtoFuncToString): Update the path that was not stringifying in this pattern. * bytecode/UnlinkedCodeBlock.cpp: (JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable): * bytecode/UnlinkedCodeBlock.h: (JSC::UnlinkedFunctionExecutable::parametersStartOffset): * parser/Nodes.h: * runtime/Executable.cpp: (JSC::FunctionExecutable::FunctionExecutable): * runtime/Executable.h: (JSC::FunctionExecutable::parametersStartOffset): Pass the already known function parameter opening parenthesis start offset through to the FunctionExecutable. * tests/mozilla/js1_5/Scope/regress-185485.js: (with.g): Add back original space in this test that was removed by r181810 now that we have the space again in stringification. LayoutTests: * js/class-syntax-default-constructor-expected.txt: This test was already failing, it now fails in a different way. * js/object-literal-computed-methods-expected.txt: * js/object-literal-methods-expected.txt: These tests now pass. * fast/dom/TreeWalker/acceptNode-filter-expected.txt: * js/destructuring-assignment-expected.txt: * js/dfg-redundant-load-of-captured-variable-proven-constant-expected.txt: * js/dfg-resolve-global-specific-dictionary-expected.txt: * js/dom/JSON-parse-expected.txt: * js/dom/JSON-stringify-expected.txt: * js/dom/dfg-strcat-over-objects-then-exit-on-it-expected.txt: * js/dom/function-prototype-expected.txt: * js/dom/toString-and-valueOf-override-expected.txt: * js/kde/lval-exceptions-expected.txt: * storage/domstorage/localstorage/string-conversion-expected.txt: * storage/domstorage/sessionstorage/string-conversion-expected.txt: * js/dom/script-tests/dfg-strcat-over-objects-then-exit-on-it.js: * js/script-tests/dfg-redundant-load-of-captured-variable-proven-constant.js: * js/script-tests/dfg-resolve-global-specific-dictionary.js: * js/dom/function-prototype.html: Update tests to add expected whitespace for stringifying a function with no name. Canonical link: https://commits.webkit.org/161029@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181901 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-03-24 20:07:26 +00:00
PASS (function ({c:b,d:a}) { return a+b;})({c:'1',d:'2'}) is '21'
PASS ({c:b,d:a}={c:'1',d:'2'}); var r=a+b; r is '21'
PASS var {true:a,false:b,undefined:c,null:d,in:e,for:f,1.5:g,'foo bar':h}={true:'a',false:'b',undefined:'c',null:'d',in:'e',for:'f',1.5:'g','foo bar':'h'}; var r=a+b+c+d+e+f+g+h; r is 'abcdefgh'
Function as String: (function({true:a,false:b,undefined:c,null:d,in:e,for:f,1.5:g,'foo bar':h}) { return a+b+c+d+e+f+g+h;})
PASS (function({true:a,false:b,undefined:c,null:d,in:e,for:f,1.5:g,'foo bar':h}) { return a+b+c+d+e+f+g+h;})({true:'a',false:'b',undefined:'c',null:'d',in:'e',for:'f',1.5:'g','foo bar':'h'}) is 'abcdefgh'
ES6: Object Literal Methods toString is missing method name https://bugs.webkit.org/show_bug.cgi?id=142992 Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-03-24 Reviewed by Geoffrey Garen. Source/JavaScriptCore: Always stringify functions in the pattern: "function " + <function name> + <text from opening parenthesis to closing brace>. * runtime/FunctionPrototype.cpp: (JSC::functionProtoFuncToString): Update the path that was not stringifying in this pattern. * bytecode/UnlinkedCodeBlock.cpp: (JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable): * bytecode/UnlinkedCodeBlock.h: (JSC::UnlinkedFunctionExecutable::parametersStartOffset): * parser/Nodes.h: * runtime/Executable.cpp: (JSC::FunctionExecutable::FunctionExecutable): * runtime/Executable.h: (JSC::FunctionExecutable::parametersStartOffset): Pass the already known function parameter opening parenthesis start offset through to the FunctionExecutable. * tests/mozilla/js1_5/Scope/regress-185485.js: (with.g): Add back original space in this test that was removed by r181810 now that we have the space again in stringification. LayoutTests: * js/class-syntax-default-constructor-expected.txt: This test was already failing, it now fails in a different way. * js/object-literal-computed-methods-expected.txt: * js/object-literal-methods-expected.txt: These tests now pass. * fast/dom/TreeWalker/acceptNode-filter-expected.txt: * js/destructuring-assignment-expected.txt: * js/dfg-redundant-load-of-captured-variable-proven-constant-expected.txt: * js/dfg-resolve-global-specific-dictionary-expected.txt: * js/dom/JSON-parse-expected.txt: * js/dom/JSON-stringify-expected.txt: * js/dom/dfg-strcat-over-objects-then-exit-on-it-expected.txt: * js/dom/function-prototype-expected.txt: * js/dom/toString-and-valueOf-override-expected.txt: * js/kde/lval-exceptions-expected.txt: * storage/domstorage/localstorage/string-conversion-expected.txt: * storage/domstorage/sessionstorage/string-conversion-expected.txt: * js/dom/script-tests/dfg-strcat-over-objects-then-exit-on-it.js: * js/script-tests/dfg-redundant-load-of-captured-variable-proven-constant.js: * js/script-tests/dfg-resolve-global-specific-dictionary.js: * js/dom/function-prototype.html: Update tests to add expected whitespace for stringifying a function with no name. Canonical link: https://commits.webkit.org/161029@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181901 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-03-24 20:07:26 +00:00
PASS (function ({true:a,false:b,undefined:c,null:d,in:e,for:f,1.5:g,'foo bar':h}) { return a+b+c+d+e+f+g+h;})({true:'a',false:'b',undefined:'c',null:'d',in:'e',for:'f',1.5:'g','foo bar':'h'}) is 'abcdefgh'
PASS ({true:a,false:b,undefined:c,null:d,in:e,for:f,1.5:g,'foo bar':h}={true:'a',false:'b',undefined:'c',null:'d',in:'e',for:'f',1.5:'g','foo bar':'h'}); var r=a+b+c+d+e+f+g+h; r is 'abcdefgh'
PASS var [{c:a,d:b}]=[{c:'1',d:'2'}]; var r=a+b; r is '12'
Function as String: (function([{c:a,d:b}]) { return a+b;})
PASS (function([{c:a,d:b}]) { return a+b;})([{c:'1',d:'2'}]) is '12'
ES6: Object Literal Methods toString is missing method name https://bugs.webkit.org/show_bug.cgi?id=142992 Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-03-24 Reviewed by Geoffrey Garen. Source/JavaScriptCore: Always stringify functions in the pattern: "function " + <function name> + <text from opening parenthesis to closing brace>. * runtime/FunctionPrototype.cpp: (JSC::functionProtoFuncToString): Update the path that was not stringifying in this pattern. * bytecode/UnlinkedCodeBlock.cpp: (JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable): * bytecode/UnlinkedCodeBlock.h: (JSC::UnlinkedFunctionExecutable::parametersStartOffset): * parser/Nodes.h: * runtime/Executable.cpp: (JSC::FunctionExecutable::FunctionExecutable): * runtime/Executable.h: (JSC::FunctionExecutable::parametersStartOffset): Pass the already known function parameter opening parenthesis start offset through to the FunctionExecutable. * tests/mozilla/js1_5/Scope/regress-185485.js: (with.g): Add back original space in this test that was removed by r181810 now that we have the space again in stringification. LayoutTests: * js/class-syntax-default-constructor-expected.txt: This test was already failing, it now fails in a different way. * js/object-literal-computed-methods-expected.txt: * js/object-literal-methods-expected.txt: These tests now pass. * fast/dom/TreeWalker/acceptNode-filter-expected.txt: * js/destructuring-assignment-expected.txt: * js/dfg-redundant-load-of-captured-variable-proven-constant-expected.txt: * js/dfg-resolve-global-specific-dictionary-expected.txt: * js/dom/JSON-parse-expected.txt: * js/dom/JSON-stringify-expected.txt: * js/dom/dfg-strcat-over-objects-then-exit-on-it-expected.txt: * js/dom/function-prototype-expected.txt: * js/dom/toString-and-valueOf-override-expected.txt: * js/kde/lval-exceptions-expected.txt: * storage/domstorage/localstorage/string-conversion-expected.txt: * storage/domstorage/sessionstorage/string-conversion-expected.txt: * js/dom/script-tests/dfg-strcat-over-objects-then-exit-on-it.js: * js/script-tests/dfg-redundant-load-of-captured-variable-proven-constant.js: * js/script-tests/dfg-resolve-global-specific-dictionary.js: * js/dom/function-prototype.html: Update tests to add expected whitespace for stringifying a function with no name. Canonical link: https://commits.webkit.org/161029@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181901 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-03-24 20:07:26 +00:00
PASS (function ([{c:a,d:b}]) { return a+b;})([{c:'1',d:'2'}]) is '12'
PASS ([{c:a,d:b}]=[{c:'1',d:'2'}]); var r=a+b; r is '12'
PASS [{c:a,d:b}]=[{c:'1',d:'2'}]; var r=a+b; r is '12'
PASS var {x:[{c:a,d:b}]}={x:[{c:'1',d:'2'}]}; var r=a+b; r is '12'
Function as String: (function({x:[{c:a,d:b}]}) { return a+b;})
PASS (function({x:[{c:a,d:b}]}) { return a+b;})({x:[{c:'1',d:'2'}]}) is '12'
ES6: Object Literal Methods toString is missing method name https://bugs.webkit.org/show_bug.cgi?id=142992 Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-03-24 Reviewed by Geoffrey Garen. Source/JavaScriptCore: Always stringify functions in the pattern: "function " + <function name> + <text from opening parenthesis to closing brace>. * runtime/FunctionPrototype.cpp: (JSC::functionProtoFuncToString): Update the path that was not stringifying in this pattern. * bytecode/UnlinkedCodeBlock.cpp: (JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable): * bytecode/UnlinkedCodeBlock.h: (JSC::UnlinkedFunctionExecutable::parametersStartOffset): * parser/Nodes.h: * runtime/Executable.cpp: (JSC::FunctionExecutable::FunctionExecutable): * runtime/Executable.h: (JSC::FunctionExecutable::parametersStartOffset): Pass the already known function parameter opening parenthesis start offset through to the FunctionExecutable. * tests/mozilla/js1_5/Scope/regress-185485.js: (with.g): Add back original space in this test that was removed by r181810 now that we have the space again in stringification. LayoutTests: * js/class-syntax-default-constructor-expected.txt: This test was already failing, it now fails in a different way. * js/object-literal-computed-methods-expected.txt: * js/object-literal-methods-expected.txt: These tests now pass. * fast/dom/TreeWalker/acceptNode-filter-expected.txt: * js/destructuring-assignment-expected.txt: * js/dfg-redundant-load-of-captured-variable-proven-constant-expected.txt: * js/dfg-resolve-global-specific-dictionary-expected.txt: * js/dom/JSON-parse-expected.txt: * js/dom/JSON-stringify-expected.txt: * js/dom/dfg-strcat-over-objects-then-exit-on-it-expected.txt: * js/dom/function-prototype-expected.txt: * js/dom/toString-and-valueOf-override-expected.txt: * js/kde/lval-exceptions-expected.txt: * storage/domstorage/localstorage/string-conversion-expected.txt: * storage/domstorage/sessionstorage/string-conversion-expected.txt: * js/dom/script-tests/dfg-strcat-over-objects-then-exit-on-it.js: * js/script-tests/dfg-redundant-load-of-captured-variable-proven-constant.js: * js/script-tests/dfg-resolve-global-specific-dictionary.js: * js/dom/function-prototype.html: Update tests to add expected whitespace for stringifying a function with no name. Canonical link: https://commits.webkit.org/161029@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181901 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-03-24 20:07:26 +00:00
PASS (function ({x:[{c:a,d:b}]}) { return a+b;})({x:[{c:'1',d:'2'}]}) is '12'
PASS ({x:[{c:a,d:b}]}={x:[{c:'1',d:'2'}]}); var r=a+b; r is '12'
PASS var [a,b]=anArray; var r=a+b; r is '12'
Function as String: (function([a,b]) { return a+b;})
PASS (function([a,b]) { return a+b;})(anArray) is '12'
ES6: Object Literal Methods toString is missing method name https://bugs.webkit.org/show_bug.cgi?id=142992 Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-03-24 Reviewed by Geoffrey Garen. Source/JavaScriptCore: Always stringify functions in the pattern: "function " + <function name> + <text from opening parenthesis to closing brace>. * runtime/FunctionPrototype.cpp: (JSC::functionProtoFuncToString): Update the path that was not stringifying in this pattern. * bytecode/UnlinkedCodeBlock.cpp: (JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable): * bytecode/UnlinkedCodeBlock.h: (JSC::UnlinkedFunctionExecutable::parametersStartOffset): * parser/Nodes.h: * runtime/Executable.cpp: (JSC::FunctionExecutable::FunctionExecutable): * runtime/Executable.h: (JSC::FunctionExecutable::parametersStartOffset): Pass the already known function parameter opening parenthesis start offset through to the FunctionExecutable. * tests/mozilla/js1_5/Scope/regress-185485.js: (with.g): Add back original space in this test that was removed by r181810 now that we have the space again in stringification. LayoutTests: * js/class-syntax-default-constructor-expected.txt: This test was already failing, it now fails in a different way. * js/object-literal-computed-methods-expected.txt: * js/object-literal-methods-expected.txt: These tests now pass. * fast/dom/TreeWalker/acceptNode-filter-expected.txt: * js/destructuring-assignment-expected.txt: * js/dfg-redundant-load-of-captured-variable-proven-constant-expected.txt: * js/dfg-resolve-global-specific-dictionary-expected.txt: * js/dom/JSON-parse-expected.txt: * js/dom/JSON-stringify-expected.txt: * js/dom/dfg-strcat-over-objects-then-exit-on-it-expected.txt: * js/dom/function-prototype-expected.txt: * js/dom/toString-and-valueOf-override-expected.txt: * js/kde/lval-exceptions-expected.txt: * storage/domstorage/localstorage/string-conversion-expected.txt: * storage/domstorage/sessionstorage/string-conversion-expected.txt: * js/dom/script-tests/dfg-strcat-over-objects-then-exit-on-it.js: * js/script-tests/dfg-redundant-load-of-captured-variable-proven-constant.js: * js/script-tests/dfg-resolve-global-specific-dictionary.js: * js/dom/function-prototype.html: Update tests to add expected whitespace for stringifying a function with no name. Canonical link: https://commits.webkit.org/161029@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181901 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-03-24 20:07:26 +00:00
PASS (function ([a,b]) { return a+b;})(anArray) is '12'
PASS ([a,b]=anArray); var r=a+b; r is '12'
PASS [a,b]=anArray; var r=a+b; r is '12'
PASS var {a,b}=anArray; var r=a+b; r is '34'
Function as String: (function({a,b}) { return a+b;})
PASS (function({a,b}) { return a+b;})(anArray) is '34'
ES6: Object Literal Methods toString is missing method name https://bugs.webkit.org/show_bug.cgi?id=142992 Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-03-24 Reviewed by Geoffrey Garen. Source/JavaScriptCore: Always stringify functions in the pattern: "function " + <function name> + <text from opening parenthesis to closing brace>. * runtime/FunctionPrototype.cpp: (JSC::functionProtoFuncToString): Update the path that was not stringifying in this pattern. * bytecode/UnlinkedCodeBlock.cpp: (JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable): * bytecode/UnlinkedCodeBlock.h: (JSC::UnlinkedFunctionExecutable::parametersStartOffset): * parser/Nodes.h: * runtime/Executable.cpp: (JSC::FunctionExecutable::FunctionExecutable): * runtime/Executable.h: (JSC::FunctionExecutable::parametersStartOffset): Pass the already known function parameter opening parenthesis start offset through to the FunctionExecutable. * tests/mozilla/js1_5/Scope/regress-185485.js: (with.g): Add back original space in this test that was removed by r181810 now that we have the space again in stringification. LayoutTests: * js/class-syntax-default-constructor-expected.txt: This test was already failing, it now fails in a different way. * js/object-literal-computed-methods-expected.txt: * js/object-literal-methods-expected.txt: These tests now pass. * fast/dom/TreeWalker/acceptNode-filter-expected.txt: * js/destructuring-assignment-expected.txt: * js/dfg-redundant-load-of-captured-variable-proven-constant-expected.txt: * js/dfg-resolve-global-specific-dictionary-expected.txt: * js/dom/JSON-parse-expected.txt: * js/dom/JSON-stringify-expected.txt: * js/dom/dfg-strcat-over-objects-then-exit-on-it-expected.txt: * js/dom/function-prototype-expected.txt: * js/dom/toString-and-valueOf-override-expected.txt: * js/kde/lval-exceptions-expected.txt: * storage/domstorage/localstorage/string-conversion-expected.txt: * storage/domstorage/sessionstorage/string-conversion-expected.txt: * js/dom/script-tests/dfg-strcat-over-objects-then-exit-on-it.js: * js/script-tests/dfg-redundant-load-of-captured-variable-proven-constant.js: * js/script-tests/dfg-resolve-global-specific-dictionary.js: * js/dom/function-prototype.html: Update tests to add expected whitespace for stringifying a function with no name. Canonical link: https://commits.webkit.org/161029@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181901 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-03-24 20:07:26 +00:00
PASS (function ({a,b}) { return a+b;})(anArray) is '34'
PASS ({a,b}=anArray); var r=a+b; r is '34'
PASS var {a:a,b:b}=anArray; var r=a+b; r is '34'
Function as String: (function({a:a,b:b}) { return a+b;})
PASS (function({a:a,b:b}) { return a+b;})(anArray) is '34'
ES6: Object Literal Methods toString is missing method name https://bugs.webkit.org/show_bug.cgi?id=142992 Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-03-24 Reviewed by Geoffrey Garen. Source/JavaScriptCore: Always stringify functions in the pattern: "function " + <function name> + <text from opening parenthesis to closing brace>. * runtime/FunctionPrototype.cpp: (JSC::functionProtoFuncToString): Update the path that was not stringifying in this pattern. * bytecode/UnlinkedCodeBlock.cpp: (JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable): * bytecode/UnlinkedCodeBlock.h: (JSC::UnlinkedFunctionExecutable::parametersStartOffset): * parser/Nodes.h: * runtime/Executable.cpp: (JSC::FunctionExecutable::FunctionExecutable): * runtime/Executable.h: (JSC::FunctionExecutable::parametersStartOffset): Pass the already known function parameter opening parenthesis start offset through to the FunctionExecutable. * tests/mozilla/js1_5/Scope/regress-185485.js: (with.g): Add back original space in this test that was removed by r181810 now that we have the space again in stringification. LayoutTests: * js/class-syntax-default-constructor-expected.txt: This test was already failing, it now fails in a different way. * js/object-literal-computed-methods-expected.txt: * js/object-literal-methods-expected.txt: These tests now pass. * fast/dom/TreeWalker/acceptNode-filter-expected.txt: * js/destructuring-assignment-expected.txt: * js/dfg-redundant-load-of-captured-variable-proven-constant-expected.txt: * js/dfg-resolve-global-specific-dictionary-expected.txt: * js/dom/JSON-parse-expected.txt: * js/dom/JSON-stringify-expected.txt: * js/dom/dfg-strcat-over-objects-then-exit-on-it-expected.txt: * js/dom/function-prototype-expected.txt: * js/dom/toString-and-valueOf-override-expected.txt: * js/kde/lval-exceptions-expected.txt: * storage/domstorage/localstorage/string-conversion-expected.txt: * storage/domstorage/sessionstorage/string-conversion-expected.txt: * js/dom/script-tests/dfg-strcat-over-objects-then-exit-on-it.js: * js/script-tests/dfg-redundant-load-of-captured-variable-proven-constant.js: * js/script-tests/dfg-resolve-global-specific-dictionary.js: * js/dom/function-prototype.html: Update tests to add expected whitespace for stringifying a function with no name. Canonical link: https://commits.webkit.org/161029@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181901 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-03-24 20:07:26 +00:00
PASS (function ({a:a,b:b}) { return a+b;})(anArray) is '34'
PASS ({a:a,b:b}=anArray); var r=a+b; r is '34'
PASS var {a,b}=anObject; var r=a+b; r is '12'
Function as String: (function({a,b}) { return a+b;})
PASS (function({a,b}) { return a+b;})(anObject) is '12'
ES6: Object Literal Methods toString is missing method name https://bugs.webkit.org/show_bug.cgi?id=142992 Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-03-24 Reviewed by Geoffrey Garen. Source/JavaScriptCore: Always stringify functions in the pattern: "function " + <function name> + <text from opening parenthesis to closing brace>. * runtime/FunctionPrototype.cpp: (JSC::functionProtoFuncToString): Update the path that was not stringifying in this pattern. * bytecode/UnlinkedCodeBlock.cpp: (JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable): * bytecode/UnlinkedCodeBlock.h: (JSC::UnlinkedFunctionExecutable::parametersStartOffset): * parser/Nodes.h: * runtime/Executable.cpp: (JSC::FunctionExecutable::FunctionExecutable): * runtime/Executable.h: (JSC::FunctionExecutable::parametersStartOffset): Pass the already known function parameter opening parenthesis start offset through to the FunctionExecutable. * tests/mozilla/js1_5/Scope/regress-185485.js: (with.g): Add back original space in this test that was removed by r181810 now that we have the space again in stringification. LayoutTests: * js/class-syntax-default-constructor-expected.txt: This test was already failing, it now fails in a different way. * js/object-literal-computed-methods-expected.txt: * js/object-literal-methods-expected.txt: These tests now pass. * fast/dom/TreeWalker/acceptNode-filter-expected.txt: * js/destructuring-assignment-expected.txt: * js/dfg-redundant-load-of-captured-variable-proven-constant-expected.txt: * js/dfg-resolve-global-specific-dictionary-expected.txt: * js/dom/JSON-parse-expected.txt: * js/dom/JSON-stringify-expected.txt: * js/dom/dfg-strcat-over-objects-then-exit-on-it-expected.txt: * js/dom/function-prototype-expected.txt: * js/dom/toString-and-valueOf-override-expected.txt: * js/kde/lval-exceptions-expected.txt: * storage/domstorage/localstorage/string-conversion-expected.txt: * storage/domstorage/sessionstorage/string-conversion-expected.txt: * js/dom/script-tests/dfg-strcat-over-objects-then-exit-on-it.js: * js/script-tests/dfg-redundant-load-of-captured-variable-proven-constant.js: * js/script-tests/dfg-resolve-global-specific-dictionary.js: * js/dom/function-prototype.html: Update tests to add expected whitespace for stringifying a function with no name. Canonical link: https://commits.webkit.org/161029@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181901 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-03-24 20:07:26 +00:00
PASS (function ({a,b}) { return a+b;})(anObject) is '12'
PASS ({a,b}=anObject); var r=a+b; r is '12'
PASS var {a:a,b:b}=anObject; var r=a+b; r is '12'
Function as String: (function({a:a,b:b}) { return a+b;})
PASS (function({a:a,b:b}) { return a+b;})(anObject) is '12'
ES6: Object Literal Methods toString is missing method name https://bugs.webkit.org/show_bug.cgi?id=142992 Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-03-24 Reviewed by Geoffrey Garen. Source/JavaScriptCore: Always stringify functions in the pattern: "function " + <function name> + <text from opening parenthesis to closing brace>. * runtime/FunctionPrototype.cpp: (JSC::functionProtoFuncToString): Update the path that was not stringifying in this pattern. * bytecode/UnlinkedCodeBlock.cpp: (JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable): * bytecode/UnlinkedCodeBlock.h: (JSC::UnlinkedFunctionExecutable::parametersStartOffset): * parser/Nodes.h: * runtime/Executable.cpp: (JSC::FunctionExecutable::FunctionExecutable): * runtime/Executable.h: (JSC::FunctionExecutable::parametersStartOffset): Pass the already known function parameter opening parenthesis start offset through to the FunctionExecutable. * tests/mozilla/js1_5/Scope/regress-185485.js: (with.g): Add back original space in this test that was removed by r181810 now that we have the space again in stringification. LayoutTests: * js/class-syntax-default-constructor-expected.txt: This test was already failing, it now fails in a different way. * js/object-literal-computed-methods-expected.txt: * js/object-literal-methods-expected.txt: These tests now pass. * fast/dom/TreeWalker/acceptNode-filter-expected.txt: * js/destructuring-assignment-expected.txt: * js/dfg-redundant-load-of-captured-variable-proven-constant-expected.txt: * js/dfg-resolve-global-specific-dictionary-expected.txt: * js/dom/JSON-parse-expected.txt: * js/dom/JSON-stringify-expected.txt: * js/dom/dfg-strcat-over-objects-then-exit-on-it-expected.txt: * js/dom/function-prototype-expected.txt: * js/dom/toString-and-valueOf-override-expected.txt: * js/kde/lval-exceptions-expected.txt: * storage/domstorage/localstorage/string-conversion-expected.txt: * storage/domstorage/sessionstorage/string-conversion-expected.txt: * js/dom/script-tests/dfg-strcat-over-objects-then-exit-on-it.js: * js/script-tests/dfg-redundant-load-of-captured-variable-proven-constant.js: * js/script-tests/dfg-resolve-global-specific-dictionary.js: * js/dom/function-prototype.html: Update tests to add expected whitespace for stringifying a function with no name. Canonical link: https://commits.webkit.org/161029@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181901 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-03-24 20:07:26 +00:00
PASS (function ({a:a,b:b}) { return a+b;})(anObject) is '12'
PASS ({a:a,b:b}=anObject); var r=a+b; r is '12'
PASS var {0:a,1:b}=anObject; var r=a+b; r is '34'
Function as String: (function({0:a,1:b}) { return a+b;})
PASS (function({0:a,1:b}) { return a+b;})(anObject) is '34'
ES6: Object Literal Methods toString is missing method name https://bugs.webkit.org/show_bug.cgi?id=142992 Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-03-24 Reviewed by Geoffrey Garen. Source/JavaScriptCore: Always stringify functions in the pattern: "function " + <function name> + <text from opening parenthesis to closing brace>. * runtime/FunctionPrototype.cpp: (JSC::functionProtoFuncToString): Update the path that was not stringifying in this pattern. * bytecode/UnlinkedCodeBlock.cpp: (JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable): * bytecode/UnlinkedCodeBlock.h: (JSC::UnlinkedFunctionExecutable::parametersStartOffset): * parser/Nodes.h: * runtime/Executable.cpp: (JSC::FunctionExecutable::FunctionExecutable): * runtime/Executable.h: (JSC::FunctionExecutable::parametersStartOffset): Pass the already known function parameter opening parenthesis start offset through to the FunctionExecutable. * tests/mozilla/js1_5/Scope/regress-185485.js: (with.g): Add back original space in this test that was removed by r181810 now that we have the space again in stringification. LayoutTests: * js/class-syntax-default-constructor-expected.txt: This test was already failing, it now fails in a different way. * js/object-literal-computed-methods-expected.txt: * js/object-literal-methods-expected.txt: These tests now pass. * fast/dom/TreeWalker/acceptNode-filter-expected.txt: * js/destructuring-assignment-expected.txt: * js/dfg-redundant-load-of-captured-variable-proven-constant-expected.txt: * js/dfg-resolve-global-specific-dictionary-expected.txt: * js/dom/JSON-parse-expected.txt: * js/dom/JSON-stringify-expected.txt: * js/dom/dfg-strcat-over-objects-then-exit-on-it-expected.txt: * js/dom/function-prototype-expected.txt: * js/dom/toString-and-valueOf-override-expected.txt: * js/kde/lval-exceptions-expected.txt: * storage/domstorage/localstorage/string-conversion-expected.txt: * storage/domstorage/sessionstorage/string-conversion-expected.txt: * js/dom/script-tests/dfg-strcat-over-objects-then-exit-on-it.js: * js/script-tests/dfg-redundant-load-of-captured-variable-proven-constant.js: * js/script-tests/dfg-resolve-global-specific-dictionary.js: * js/dom/function-prototype.html: Update tests to add expected whitespace for stringifying a function with no name. Canonical link: https://commits.webkit.org/161029@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181901 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-03-24 20:07:26 +00:00
PASS (function ({0:a,1:b}) { return a+b;})(anObject) is '34'
PASS ({0:a,1:b}=anObject); var r=a+b; r is '34'
PASS var {'a':a,'b':b}=anObject; var r=a+b; r is '12'
Function as String: (function({'a':a,'b':b}) { return a+b;})
PASS (function({'a':a,'b':b}) { return a+b;})(anObject) is '12'
ES6: Object Literal Methods toString is missing method name https://bugs.webkit.org/show_bug.cgi?id=142992 Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-03-24 Reviewed by Geoffrey Garen. Source/JavaScriptCore: Always stringify functions in the pattern: "function " + <function name> + <text from opening parenthesis to closing brace>. * runtime/FunctionPrototype.cpp: (JSC::functionProtoFuncToString): Update the path that was not stringifying in this pattern. * bytecode/UnlinkedCodeBlock.cpp: (JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable): * bytecode/UnlinkedCodeBlock.h: (JSC::UnlinkedFunctionExecutable::parametersStartOffset): * parser/Nodes.h: * runtime/Executable.cpp: (JSC::FunctionExecutable::FunctionExecutable): * runtime/Executable.h: (JSC::FunctionExecutable::parametersStartOffset): Pass the already known function parameter opening parenthesis start offset through to the FunctionExecutable. * tests/mozilla/js1_5/Scope/regress-185485.js: (with.g): Add back original space in this test that was removed by r181810 now that we have the space again in stringification. LayoutTests: * js/class-syntax-default-constructor-expected.txt: This test was already failing, it now fails in a different way. * js/object-literal-computed-methods-expected.txt: * js/object-literal-methods-expected.txt: These tests now pass. * fast/dom/TreeWalker/acceptNode-filter-expected.txt: * js/destructuring-assignment-expected.txt: * js/dfg-redundant-load-of-captured-variable-proven-constant-expected.txt: * js/dfg-resolve-global-specific-dictionary-expected.txt: * js/dom/JSON-parse-expected.txt: * js/dom/JSON-stringify-expected.txt: * js/dom/dfg-strcat-over-objects-then-exit-on-it-expected.txt: * js/dom/function-prototype-expected.txt: * js/dom/toString-and-valueOf-override-expected.txt: * js/kde/lval-exceptions-expected.txt: * storage/domstorage/localstorage/string-conversion-expected.txt: * storage/domstorage/sessionstorage/string-conversion-expected.txt: * js/dom/script-tests/dfg-strcat-over-objects-then-exit-on-it.js: * js/script-tests/dfg-redundant-load-of-captured-variable-proven-constant.js: * js/script-tests/dfg-resolve-global-specific-dictionary.js: * js/dom/function-prototype.html: Update tests to add expected whitespace for stringifying a function with no name. Canonical link: https://commits.webkit.org/161029@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181901 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-03-24 20:07:26 +00:00
PASS (function ({'a':a,'b':b}) { return a+b;})(anObject) is '12'
PASS ({'a':a,'b':b}=anObject); var r=a+b; r is '12'
PASS a+b is '1122'
PASS a+b is '2211'
Rename "Deconstruction" to "Destructuring" throughout JSC https://bugs.webkit.org/show_bug.cgi?id=146100 Reviewed by Mark Lam. Source/JavaScriptCore: It is good to use the same naming conventions as the ES6 spec because it is the de facto way of speaking about these language features. This also has the benefit of improving JSC's hackability because it improves code readability for newcomers to JSC or newcomers to this part of the code base. * bytecompiler/BytecodeGenerator.cpp: (JSC::BytecodeGenerator::generate): (JSC::BytecodeGenerator::BytecodeGenerator): (JSC::BytecodeGenerator::initializeNextParameter): (JSC::BytecodeGenerator::visibleNameForParameter): * bytecompiler/BytecodeGenerator.h: (JSC::BytecodeGenerator::registerFor): * bytecompiler/NodesCodegen.cpp: (JSC::ForInNode::tryGetBoundLocal): (JSC::ForInNode::emitLoopHeader): (JSC::ForOfNode::emitBytecode): (JSC::ClassExprNode::emitBytecode): (JSC::DestructuringAssignmentNode::emitBytecode): (JSC::DestructuringPatternNode::~DestructuringPatternNode): (JSC::ArrayPatternNode::collectBoundIdentifiers): (JSC::DeconstructingAssignmentNode::emitBytecode): Deleted. (JSC::DeconstructionPatternNode::~DeconstructionPatternNode): Deleted. * parser/ASTBuilder.h: (JSC::ASTBuilder::createElementList): (JSC::ASTBuilder::createFormalParameterList): (JSC::ASTBuilder::createClause): (JSC::ASTBuilder::createClauseList): (JSC::ASTBuilder::createForInLoop): (JSC::ASTBuilder::createForOfLoop): (JSC::ASTBuilder::isBindingNode): (JSC::ASTBuilder::isResolve): (JSC::ASTBuilder::createDestructuringAssignment): (JSC::ASTBuilder::createArrayPattern): (JSC::ASTBuilder::appendArrayPatternSkipEntry): (JSC::ASTBuilder::appendArrayPatternEntry): (JSC::ASTBuilder::appendArrayPatternRestEntry): (JSC::ASTBuilder::createObjectPattern): (JSC::ASTBuilder::appendObjectPatternEntry): (JSC::ASTBuilder::createDeconstructingAssignment): Deleted. * parser/NodeConstructors.h: (JSC::TryNode::TryNode): (JSC::ParameterNode::ParameterNode): (JSC::ForOfNode::ForOfNode): (JSC::DestructuringPatternNode::DestructuringPatternNode): (JSC::ArrayPatternNode::ArrayPatternNode): (JSC::ArrayPatternNode::create): (JSC::ObjectPatternNode::ObjectPatternNode): (JSC::BindingNode::create): (JSC::BindingNode::BindingNode): (JSC::DestructuringAssignmentNode::DestructuringAssignmentNode): (JSC::DeconstructionPatternNode::DeconstructionPatternNode): Deleted. (JSC::DeconstructingAssignmentNode::DeconstructingAssignmentNode): Deleted. * parser/Nodes.cpp: (JSC::FunctionParameters::create): * parser/Nodes.h: (JSC::ExpressionNode::isResolveNode): (JSC::ExpressionNode::isBracketAccessorNode): (JSC::ExpressionNode::isDotAccessorNode): (JSC::ExpressionNode::isDestructuringNode): (JSC::ExpressionNode::isFuncExprNode): (JSC::ExpressionNode::isCommaNode): (JSC::ExpressionNode::isSimpleArray): (JSC::ParameterNode::pattern): (JSC::ParameterNode::nextParam): (JSC::FunctionParameters::size): (JSC::FunctionParameters::at): (JSC::FunctionParameters::patterns): (JSC::DestructuringPatternNode::isBindingNode): (JSC::DestructuringPatternNode::emitDirectBinding): (JSC::ArrayPatternNode::appendIndex): (JSC::ObjectPatternNode::appendEntry): (JSC::BindingNode::boundProperty): (JSC::DestructuringAssignmentNode::bindings): (JSC::ExpressionNode::isDeconstructionNode): Deleted. (JSC::DeconstructionPatternNode::isBindingNode): Deleted. (JSC::DeconstructionPatternNode::emitDirectBinding): Deleted. (JSC::DeconstructingAssignmentNode::bindings): Deleted. * parser/Parser.cpp: (JSC::Parser<LexerType>::parseVarDeclaration): (JSC::Parser<LexerType>::parseWhileStatement): (JSC::Parser<LexerType>::parseVarDeclarationList): (JSC::Parser<LexerType>::createBindingPattern): (JSC::Parser<LexerType>::tryParseDestructuringPatternExpression): (JSC::Parser<LexerType>::parseDestructuringPattern): (JSC::Parser<LexerType>::parseDefaultValueForDestructuringPattern): (JSC::Parser<LexerType>::parseForStatement): (JSC::Parser<LexerType>::parseFormalParameters): (JSC::Parser<LexerType>::parseFunctionParameters): (JSC::Parser<LexerType>::parseAssignmentExpression): (JSC::Parser<LexerType>::tryParseDeconstructionPatternExpression): Deleted. (JSC::Parser<LexerType>::parseDeconstructionPattern): Deleted. (JSC::Parser<LexerType>::parseDefaultValueForDeconstructionPattern): Deleted. * parser/Parser.h: (JSC::isEvalNode): * parser/SyntaxChecker.h: (JSC::SyntaxChecker::createPropertyList): (JSC::SyntaxChecker::createElementList): (JSC::SyntaxChecker::createFormalParameterList): (JSC::SyntaxChecker::createClause): (JSC::SyntaxChecker::createClauseList): (JSC::SyntaxChecker::operatorStackPop): * tests/stress/reserved-word-with-escape.js: * tests/stress/rest-elements.js: LayoutTests: * js/deconstructing-parameters-should-be-locals-expected.txt: Removed. * js/deconstructing-parameters-should-be-locals.html: Removed. * js/destructuring-assignment-expected.txt: * js/destructuring-parameters-should-be-locals-expected.txt: Copied from LayoutTests/js/deconstructing-parameters-should-be-locals-expected.txt. * js/destructuring-parameters-should-be-locals.html: Copied from LayoutTests/js/deconstructing-parameters-should-be-locals.html. * js/regress/deconstructing-parameters-overridden-by-function-expected.txt: Removed. * js/regress/deconstructing-parameters-overridden-by-function.html: Removed. * js/regress/destructuring-parameters-overridden-by-function-expected.txt: Copied from LayoutTests/js/regress/deconstructing-parameters-overridden-by-function-expected.txt. * js/regress/destructuring-parameters-overridden-by-function.html: Copied from LayoutTests/js/regress/deconstructing-parameters-overridden-by-function.html. * js/regress/script-tests/deconstructing-parameters-overridden-by-function.js: Removed. * js/regress/script-tests/destructuring-parameters-overridden-by-function.js: Copied from LayoutTests/js/regress/script-tests/deconstructing-parameters-overridden-by-function.js. * js/script-tests/deconstructing-parameters-should-be-locals.js: Removed. * js/script-tests/destructuring-assignment.js: (testDestructuredArgs): (testDestructuredArgLength): (testDeconstructArgs): Deleted. (testDeconstructArgLength): Deleted. * js/script-tests/destructuring-parameters-should-be-locals.js: Copied from LayoutTests/js/script-tests/deconstructing-parameters-should-be-locals.js. (description.value.string_appeared_here.readDestructuredParameter): (overwriteDestructuredParameter): (readCapturedDestructuredParameter): (overwriteCapturedDestructuredParameter): (description.value.string_appeared_here.readDeconstructedParameter): Deleted. (overwriteDeconstructedParameter): Deleted. (readCapturedDeconstructedParameter): Deleted. (overwriteCapturedDeconstructedParameter): Deleted. Canonical link: https://commits.webkit.org/164658@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186246 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-07-02 23:53:10 +00:00
PASS testDestructuredArgs('1', '2') is '12'
PASS testDestructuredArgLength('1', '2') is 2
PASS testDestructuredArgs('2') is '2undefined'
PASS a is 1
PASS b is 2
PASS c is 3
PASS d is 4
PASS successfullyParsed is true
TEST COMPLETE