haikuwebkit/LayoutTests/js/dom/dfg-cross-global-object-inl...

11 lines
284 B
Plaintext
Raw Permalink Normal View History

DFG::operationNewArray is unnecessarily slow, and may use the wrong array prototype when inlined https://bugs.webkit.org/show_bug.cgi?id=89821 Source/JavaScriptCore: Reviewed by Geoffrey Garen. Fixes all array allocations to use the right structure, and hence the right prototype. Adds inlining of new Array(...) with a non-zero number of arguments. Optimizes allocations of empty arrays. * dfg/DFGAbstractState.cpp: (JSC::DFG::AbstractState::execute): * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::handleConstantInternalFunction): * dfg/DFGCCallHelpers.h: (JSC::DFG::CCallHelpers::setupArgumentsWithExecState): (CCallHelpers): * dfg/DFGNodeType.h: (DFG): * dfg/DFGOperations.cpp: * dfg/DFGOperations.h: * dfg/DFGPredictionPropagationPhase.cpp: (JSC::DFG::PredictionPropagationPhase::propagate): * dfg/DFGSpeculativeJIT.h: (JSC::DFG::SpeculativeJIT::callOperation): * dfg/DFGSpeculativeJIT32_64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::compile): * runtime/JSArray.h: (JSC): (JSC::constructArray): * runtime/JSGlobalObject.h: (JSC): (JSC::constructArray): LayoutTests: Rubber stamped by Geoffrey Garen. * fast/js/dfg-cross-global-object-inline-new-array-expected.txt: Added. * fast/js/dfg-cross-global-object-inline-new-array-literal-expected.txt: Added. * fast/js/dfg-cross-global-object-inline-new-array-literal-with-variables-expected.txt: Added. * fast/js/dfg-cross-global-object-inline-new-array-literal-with-variables.html: Added. * fast/js/dfg-cross-global-object-inline-new-array-literal.html: Added. * fast/js/dfg-cross-global-object-inline-new-array-with-elements-expected.txt: Added. * fast/js/dfg-cross-global-object-inline-new-array-with-elements.html: Added. * fast/js/dfg-cross-global-object-inline-new-array-with-size-expected.txt: Added. * fast/js/dfg-cross-global-object-inline-new-array-with-size.html: Added. * fast/js/dfg-cross-global-object-inline-new-array.html: Added. * fast/js/script-tests/cross-global-object-inline-global-var.js: (done): * fast/js/script-tests/dfg-cross-global-object-inline-new-array-literal-with-variables.js: Added. (foo): (done): (doit): * fast/js/script-tests/dfg-cross-global-object-inline-new-array-literal.js: Added. (foo): (done): (doit): * fast/js/script-tests/dfg-cross-global-object-inline-new-array-with-elements.js: Added. (foo): (done): (doit): * fast/js/script-tests/dfg-cross-global-object-inline-new-array-with-size.js: Added. (foo): (done): (doit): * fast/js/script-tests/dfg-cross-global-object-inline-new-array.js: Added. (foo): (done): (doit): Canonical link: https://commits.webkit.org/107849@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@121280 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-06-26 19:42:05 +00:00
This tests that function inlining in the DFG JIT doesn't get confused about the global object to use for array allocation.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
fast/js/dfg-* tests should wait for the concurrent JIT https://bugs.webkit.org/show_bug.cgi?id=120723 Rubber stamped by Oliver Hunt. Convert more tests. * fast/js/dfg-check-structure-elimination-for-non-cell-expected.txt: * fast/js/dfg-check-two-structures-expected.txt: * fast/js/dfg-compare-final-object-to-final-object-or-other-expected.txt: * fast/js/dfg-compare-final-object-to-final-object-or-other-when-both-proven-final-object-expected.txt: * fast/js/dfg-compare-final-object-to-final-object-or-other-when-proven-final-object-expected.txt: * fast/js/dfg-constant-fold-first-local-read-after-block-merge-expected.txt: * fast/js/dfg-constant-fold-logical-not-branch-expected.txt: * fast/js/dfg-constant-fold-misprediction-expected.txt: * fast/js/dfg-constant-fold-uncaptured-variable-that-is-later-captured-expected.txt: * fast/js/dfg-convert-this-dom-window-expected.txt: * fast/js/dfg-convert-this-object-then-exit-on-other-expected.txt: * fast/js/dfg-convert-this-other-then-exit-on-object-expected.txt: * fast/js/dfg-convert-this-polymorphic-object-then-exit-on-other-expected.txt: * fast/js/dfg-convert-this-polymorphic-object-then-exit-on-string-expected.txt: * fast/js/dfg-create-inlined-arguments-in-closure-inline-expected.txt: * fast/js/dfg-cross-global-object-inline-new-array-literal-expected.txt: * fast/js/dfg-cross-global-object-inline-new-array-literal-with-variables-expected.txt: * fast/js/jsc-test-list: * fast/js/script-tests/dfg-check-structure-elimination-for-non-cell.js: * fast/js/script-tests/dfg-check-two-structures.js: * fast/js/script-tests/dfg-compare-final-object-to-final-object-or-other-when-both-proven-final-object.js: * fast/js/script-tests/dfg-compare-final-object-to-final-object-or-other-when-proven-final-object.js: * fast/js/script-tests/dfg-compare-final-object-to-final-object-or-other.js: * fast/js/script-tests/dfg-constant-fold-first-local-read-after-block-merge.js: * fast/js/script-tests/dfg-constant-fold-logical-not-branch.js: * fast/js/script-tests/dfg-constant-fold-misprediction.js: * fast/js/script-tests/dfg-constant-fold-uncaptured-variable-that-is-later-captured.js: * fast/js/script-tests/dfg-convert-this-dom-window.js: * fast/js/script-tests/dfg-convert-this-object-then-exit-on-other.js: * fast/js/script-tests/dfg-convert-this-other-then-exit-on-object.js: * fast/js/script-tests/dfg-convert-this-polymorphic-object-then-exit-on-other.js: * fast/js/script-tests/dfg-convert-this-polymorphic-object-then-exit-on-string.js: * fast/js/script-tests/dfg-create-inlined-arguments-in-closure-inline.js: * fast/js/script-tests/dfg-cross-global-object-inline-new-array-literal-with-variables.js: (done): (doit): * fast/js/script-tests/dfg-cross-global-object-inline-new-array-literal.js: (done): (doit): Canonical link: https://commits.webkit.org/138811@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@155202 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-09-06 19:14:35 +00:00
PASS done() called with 33
DFG::operationNewArray is unnecessarily slow, and may use the wrong array prototype when inlined https://bugs.webkit.org/show_bug.cgi?id=89821 Source/JavaScriptCore: Reviewed by Geoffrey Garen. Fixes all array allocations to use the right structure, and hence the right prototype. Adds inlining of new Array(...) with a non-zero number of arguments. Optimizes allocations of empty arrays. * dfg/DFGAbstractState.cpp: (JSC::DFG::AbstractState::execute): * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::handleConstantInternalFunction): * dfg/DFGCCallHelpers.h: (JSC::DFG::CCallHelpers::setupArgumentsWithExecState): (CCallHelpers): * dfg/DFGNodeType.h: (DFG): * dfg/DFGOperations.cpp: * dfg/DFGOperations.h: * dfg/DFGPredictionPropagationPhase.cpp: (JSC::DFG::PredictionPropagationPhase::propagate): * dfg/DFGSpeculativeJIT.h: (JSC::DFG::SpeculativeJIT::callOperation): * dfg/DFGSpeculativeJIT32_64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::compile): * runtime/JSArray.h: (JSC): (JSC::constructArray): * runtime/JSGlobalObject.h: (JSC): (JSC::constructArray): LayoutTests: Rubber stamped by Geoffrey Garen. * fast/js/dfg-cross-global-object-inline-new-array-expected.txt: Added. * fast/js/dfg-cross-global-object-inline-new-array-literal-expected.txt: Added. * fast/js/dfg-cross-global-object-inline-new-array-literal-with-variables-expected.txt: Added. * fast/js/dfg-cross-global-object-inline-new-array-literal-with-variables.html: Added. * fast/js/dfg-cross-global-object-inline-new-array-literal.html: Added. * fast/js/dfg-cross-global-object-inline-new-array-with-elements-expected.txt: Added. * fast/js/dfg-cross-global-object-inline-new-array-with-elements.html: Added. * fast/js/dfg-cross-global-object-inline-new-array-with-size-expected.txt: Added. * fast/js/dfg-cross-global-object-inline-new-array-with-size.html: Added. * fast/js/dfg-cross-global-object-inline-new-array.html: Added. * fast/js/script-tests/cross-global-object-inline-global-var.js: (done): * fast/js/script-tests/dfg-cross-global-object-inline-new-array-literal-with-variables.js: Added. (foo): (done): (doit): * fast/js/script-tests/dfg-cross-global-object-inline-new-array-literal.js: Added. (foo): (done): (doit): * fast/js/script-tests/dfg-cross-global-object-inline-new-array-with-elements.js: Added. (foo): (done): (doit): * fast/js/script-tests/dfg-cross-global-object-inline-new-array-with-size.js: Added. (foo): (done): (doit): * fast/js/script-tests/dfg-cross-global-object-inline-new-array.js: Added. (foo): (done): (doit): Canonical link: https://commits.webkit.org/107849@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@121280 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-06-26 19:42:05 +00:00
PASS successfullyParsed is true
TEST COMPLETE