haikuwebkit/LayoutTests/js/dfg-uint32-to-number-expect...

14 lines
373 B
Plaintext
Raw Permalink Normal View History

DFG OSR exit for UInt32ToNumber should roll forward, not roll backward https://bugs.webkit.org/show_bug.cgi?id=74463 Source/JavaScriptCore: Reviewed by Gavin Barraclough. Implements roll-forward OSR exit for UInt32ToNumber, which requires ValueRecoveries knowing how to execute the slow path of UInt32ToNumber. * bytecode/CodeBlock.h: (JSC::CodeBlock::lastOSRExit): * bytecode/CodeOrigin.h: (JSC::CodeOrigin::operator!=): * bytecode/ValueRecovery.h: (JSC::ValueRecovery::uint32InGPR): (JSC::ValueRecovery::gpr): (JSC::ValueRecovery::dump): * dfg/DFGAssemblyHelpers.cpp: * dfg/DFGAssemblyHelpers.h: * dfg/DFGOSRExit.h: (JSC::DFG::OSRExit::valueRecoveryForOperand): * dfg/DFGOSRExitCompiler32_64.cpp: (JSC::DFG::OSRExitCompiler::compileExit): * dfg/DFGOSRExitCompiler64.cpp: (JSC::DFG::OSRExitCompiler::compileExit): * dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::compileUInt32ToNumber): (JSC::DFG::SpeculativeJIT::compileGetByValOnIntTypedArray): * dfg/DFGSpeculativeJIT.h: * dfg/DFGSpeculativeJIT32_64.cpp: (JSC::DFG::SpeculativeJIT::nonSpeculativeUInt32ToNumber): (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::nonSpeculativeUInt32ToNumber): (JSC::DFG::SpeculativeJIT::compile): LayoutTests: Reviewed by Gavin Barraclough. * fast/js/dfg-uint32-to-number-expected.txt: Added. * fast/js/dfg-uint32-to-number.html: Added. * fast/js/script-tests/dfg-uint32-to-number.js: Added. (foo): Canonical link: https://commits.webkit.org/91111@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@102723 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-12-14 01:46:36 +00:00
This tests that if the DFG fails to convert a uint32 to a number, it will OSR exit correctly.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS result is 124500
PASS foo({f:2147483648}, {f:32}) is 2147483648
PASS foo({f:2147483648}, {f:31}) is 1
PASS foo({f:2147483648}, {f:30}) is 2
PASS successfullyParsed is true
TEST COMPLETE