haikuwebkit/LayoutTests/js/dfg-tear-off-function-dot-a...

410 lines
9.6 KiB
Plaintext
Raw Permalink Normal View History

DFG misses arguments tear-off for function.arguments if 'arguments' is used https://bugs.webkit.org/show_bug.cgi?id=96227 Reviewed by Gavin Barraclough. Source/JavaScriptCore: We've decided not to allow function.arguments to alias the local 'arguments' object, or a local var or function named 'arguments'. Aliasing complicates the implementation (cf, this bug) and can produce surprising behavior for web programmers. Eliminating the aliasing has the side-effect of fixing this bug. The compatibilty story: function.arguments is deprecated, was never specified, and throws an exception in strict mode, so we expect it to disappear over time. Firefox does not alias to 'arguments'; Chrome does, but not if you use eval or with; IE does; Safari did. * dfg/DFGByteCodeParser.cpp: Noticed a little cleanup while verifying this code. Use the CodeBlock method for better encapsulation. * interpreter/Interpreter.cpp: (JSC::Interpreter::retrieveArgumentsFromVMCode): Behavior change: don't alias. * tests/mozilla/js1_4/Functions/function-001.js: (TestFunction_4): Updated test expectations for changed behavior. LayoutTests: New test, and updated expectations. * fast/js/script-tests/function-dot-arguments.js: * fast/js/function-dot-arguments-expected.txt: Updated for new behavior. * fast/js/dfg-tear-off-function-dot-arguments.html: * fast/js/script-tests/dfg-tear-off-function-dot-arguments.js: Added. New test for bug cited here. * fast/js/function-dot-arguments-identity-expected.txt: * fast/js/function-dot-arguments-identity.html: Added. New test for new behavior. Canonical link: https://commits.webkit.org/114204@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@128111 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-09-10 21:49:25 +00:00
Tests a function that might create 'arguments' but doesn't, but does create function.arguments.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS thingy.length is 1
PASS thingy[0] is false
PASS successfullyParsed is true
TEST COMPLETE