Ignore:
Timestamp:
Mar 1, 2014, 11:57:40 AM (11 years ago)
Author:
[email protected]
Message:

FTL should support PhantomArguments
https://bugs.webkit.org/show_bug.cgi?id=113986

Reviewed by Oliver Hunt.

Adding PhantomArguments to the FTL mostly means wiring the recovery of the Arguments
object into the FTL's OSR exit compiler.

This isn't a speed-up yet, since there is still more to be done to fully support
all of the arguments craziness that our varargs benchmarks do.

  • dfg/DFGOSRExitCompiler32_64.cpp:

(JSC::DFG::OSRExitCompiler::compileExit): move the recovery code to DFGOSRExitCompilerCommon.cpp

  • dfg/DFGOSRExitCompiler64.cpp:

(JSC::DFG::OSRExitCompiler::compileExit): move the recovery code to DFGOSRExitCompilerCommon.cpp

  • dfg/DFGOSRExitCompilerCommon.cpp:

(JSC::DFG::ArgumentsRecoveryGenerator::ArgumentsRecoveryGenerator):
(JSC::DFG::ArgumentsRecoveryGenerator::~ArgumentsRecoveryGenerator):
(JSC::DFG::ArgumentsRecoveryGenerator::generateFor): this is the common place for the recovery code

  • dfg/DFGOSRExitCompilerCommon.h:
  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLExitValue.cpp:

(JSC::FTL::ExitValue::dumpInContext):

  • ftl/FTLExitValue.h:

(JSC::FTL::ExitValue::argumentsObjectThatWasNotCreated):
(JSC::FTL::ExitValue::isArgumentsObjectThatWasNotCreated):
(JSC::FTL::ExitValue::valueFormat):

  • ftl/FTLLowerDFGToLLVM.cpp:

(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compilePhantomArguments):
(JSC::FTL::LowerDFGToLLVM::buildExitArguments):
(JSC::FTL::LowerDFGToLLVM::tryToSetConstantExitArgument):

  • ftl/FTLOSRExitCompiler.cpp:

(JSC::FTL::compileStub): Call into the ArgumentsRecoveryGenerator

  • tests/stress/slightly-more-difficult-to-fold-reflective-arguments-access.js: Added.
  • tests/stress/trivially-foldable-reflective-arguments-access.js: Added.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ftl/FTLExitValue.cpp

    r163844 r164923  
    6060        out.print("InJSStackAsDouble:r", virtualRegister());
    6161        return;
     62    case ExitValueArgumentsObjectThatWasNotCreated:
     63        out.print("ArgumentsObjectThatWasNotCreated");
     64        return;
    6265    case ExitValueRecovery:
    6366        out.print("Recovery(", recoveryOpcode(), ", arg", leftRecoveryArgument(), ", arg", rightRecoveryArgument(), ", ", recoveryFormat(), ")");
Note: See TracChangeset for help on using the changeset viewer.