Ignore:
Timestamp:
Sep 13, 2017, 9:21:05 PM (8 years ago)
Author:
[email protected]
Message:

Rolling out r221832: Regresses Speedometer by ~4% and Dromaeo CSS YUI by ~20%.
https://bugs.webkit.org/show_bug.cgi?id=176888
<rdar://problem/34381832>

Not reviewed.

JSTests:

  • stress/op_mod-ConstVar.js:
  • stress/op_mod-VarConst.js:
  • stress/op_mod-VarVar.js:

Source/JavaScriptCore:

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • assembler/MacroAssembler.cpp:

(JSC::stdFunctionCallback):

  • assembler/MacroAssemblerPrinter.cpp:

(JSC::Printer::printCallback):

  • assembler/ProbeContext.h:

(JSC::Probe:: const):
(JSC::Probe::Context::Context):
(JSC::Probe::Context::gpr):
(JSC::Probe::Context::spr):
(JSC::Probe::Context::fpr):
(JSC::Probe::Context::gprName):
(JSC::Probe::Context::sprName):
(JSC::Probe::Context::fprName):
(JSC::Probe::Context::pc):
(JSC::Probe::Context::fp):
(JSC::Probe::Context::sp):
(JSC::Probe::CPUState::gpr const): Deleted.
(JSC::Probe::CPUState::spr const): Deleted.
(JSC::Probe::Context::arg): Deleted.
(JSC::Probe::Context::gpr const): Deleted.
(JSC::Probe::Context::spr const): Deleted.
(JSC::Probe::Context::fpr const): Deleted.

  • assembler/ProbeFrame.h: Removed.
  • assembler/ProbeStack.cpp:

(JSC::Probe::Page::Page):

  • assembler/ProbeStack.h:

(JSC::Probe::Page::get):
(JSC::Probe::Page::set):
(JSC::Probe::Page::physicalAddressFor):
(JSC::Probe::Stack::lowWatermark):
(JSC::Probe::Stack::get):
(JSC::Probe::Stack::set):

  • bytecode/ArithProfile.cpp:
  • bytecode/ArithProfile.h:
  • bytecode/ArrayProfile.h:

(JSC::ArrayProfile::observeArrayMode): Deleted.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::updateOSRExitCounterAndCheckIfNeedToReoptimize): Deleted.

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::addressOfOSRExitCounter):

  • bytecode/ExecutionCounter.h:

(JSC::ExecutionCounter::hasCrossedThreshold const): Deleted.
(JSC::ExecutionCounter::setNewThresholdForOSRExit): Deleted.

  • bytecode/MethodOfGettingAValueProfile.cpp:

(JSC::MethodOfGettingAValueProfile::reportValue): Deleted.

  • bytecode/MethodOfGettingAValueProfile.h:
  • dfg/DFGDriver.cpp:

(JSC::DFG::compileImpl):

  • dfg/DFGJITCode.cpp:

(JSC::DFG::JITCode::findPC):

  • dfg/DFGJITCode.h:
  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::linkOSRExits):
(JSC::DFG::JITCompiler::link):

  • dfg/DFGOSRExit.cpp:

(JSC::DFG::OSRExit::setPatchableCodeOffset):
(JSC::DFG::OSRExit::getPatchableCodeOffsetAsJump const):
(JSC::DFG::OSRExit::codeLocationForRepatch const):
(JSC::DFG::OSRExit::correctJump):
(JSC::DFG::OSRExit::emitRestoreArguments):
(JSC::DFG::OSRExit::compileOSRExit):
(JSC::DFG::OSRExit::compileExit):
(JSC::DFG::OSRExit::debugOperationPrintSpeculationFailure):
(JSC::DFG::jsValueFor): Deleted.
(JSC::DFG::restoreCalleeSavesFor): Deleted.
(JSC::DFG::saveCalleeSavesFor): Deleted.
(JSC::DFG::restoreCalleeSavesFromVMEntryFrameCalleeSavesBuffer): Deleted.
(JSC::DFG::copyCalleeSavesToVMEntryFrameCalleeSavesBuffer): Deleted.
(JSC::DFG::saveOrCopyCalleeSavesFor): Deleted.
(JSC::DFG::createDirectArgumentsDuringExit): Deleted.
(JSC::DFG::createClonedArgumentsDuringExit): Deleted.
(JSC::DFG::emitRestoreArguments): Deleted.
(JSC::DFG::OSRExit::executeOSRExit): Deleted.
(JSC::DFG::reifyInlinedCallFrames): Deleted.
(JSC::DFG::adjustAndJumpToTarget): Deleted.
(JSC::DFG::printOSRExit): Deleted.

  • dfg/DFGOSRExit.h:

(JSC::DFG::OSRExitState::OSRExitState): Deleted.

  • dfg/DFGOSRExitCompilerCommon.cpp:
  • dfg/DFGOSRExitCompilerCommon.h:
  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:
  • dfg/DFGThunks.cpp:

(JSC::DFG::osrExitGenerationThunkGenerator):
(JSC::DFG::osrExitThunkGenerator): Deleted.

  • dfg/DFGThunks.h:
  • jit/AssemblyHelpers.cpp:

(JSC::AssemblyHelpers::debugCall):

  • jit/AssemblyHelpers.h:
  • jit/JITOperations.cpp:
  • jit/JITOperations.h:
  • profiler/ProfilerOSRExit.h:

(JSC::Profiler::OSRExit::incCount): Deleted.

  • runtime/JSCJSValue.h:
  • runtime/JSCJSValueInlines.h:
  • runtime/VM.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jit/AssemblyHelpers.cpp

    r221832 r222009  
    5151}
    5252
    53 // FIXME: remove this when we fix https://bugs.webkit.org/show_bug.cgi?id=175145.
    5453Vector<BytecodeAndMachineOffset>& AssemblyHelpers::decodedCodeMapFor(CodeBlock* codeBlock)
    5554{
     
    822821#endif // ENABLE(WEBASSEMBLY)
    823822
     823void AssemblyHelpers::debugCall(VM& vm, V_DebugOperation_EPP function, void* argument)
     824{
     825    size_t scratchSize = sizeof(EncodedJSValue) * (GPRInfo::numberOfRegisters + FPRInfo::numberOfRegisters);
     826    ScratchBuffer* scratchBuffer = vm.scratchBufferForSize(scratchSize);
     827    EncodedJSValue* buffer = static_cast<EncodedJSValue*>(scratchBuffer->dataBuffer());
     828
     829    for (unsigned i = 0; i < GPRInfo::numberOfRegisters; ++i) {
     830#if USE(JSVALUE64)
     831        store64(GPRInfo::toRegister(i), buffer + i);
     832#else
     833        store32(GPRInfo::toRegister(i), buffer + i);
     834#endif
     835    }
     836
     837    for (unsigned i = 0; i < FPRInfo::numberOfRegisters; ++i) {
     838        move(TrustedImmPtr(buffer + GPRInfo::numberOfRegisters + i), GPRInfo::regT0);
     839        storeDouble(FPRInfo::toRegister(i), GPRInfo::regT0);
     840    }
     841
     842    // Tell GC mark phase how much of the scratch buffer is active during call.
     843    move(TrustedImmPtr(scratchBuffer->addressOfActiveLength()), GPRInfo::regT0);
     844    storePtr(TrustedImmPtr(scratchSize), GPRInfo::regT0);
     845
     846#if CPU(X86_64) || CPU(ARM) || CPU(ARM64) || CPU(MIPS)
     847    move(TrustedImmPtr(buffer), GPRInfo::argumentGPR2);
     848    move(TrustedImmPtr(argument), GPRInfo::argumentGPR1);
     849    move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0);
     850    GPRReg scratch = selectScratchGPR(GPRInfo::argumentGPR0, GPRInfo::argumentGPR1, GPRInfo::argumentGPR2);
     851#elif CPU(X86)
     852    poke(GPRInfo::callFrameRegister, 0);
     853    poke(TrustedImmPtr(argument), 1);
     854    poke(TrustedImmPtr(buffer), 2);
     855    GPRReg scratch = GPRInfo::regT0;
     856#else
     857#error "JIT not supported on this platform."
     858#endif
     859    move(TrustedImmPtr(reinterpret_cast<void*>(function)), scratch);
     860    call(scratch);
     861
     862    move(TrustedImmPtr(scratchBuffer->addressOfActiveLength()), GPRInfo::regT0);
     863    storePtr(TrustedImmPtr(0), GPRInfo::regT0);
     864
     865    for (unsigned i = 0; i < FPRInfo::numberOfRegisters; ++i) {
     866        move(TrustedImmPtr(buffer + GPRInfo::numberOfRegisters + i), GPRInfo::regT0);
     867        loadDouble(GPRInfo::regT0, FPRInfo::toRegister(i));
     868    }
     869    for (unsigned i = 0; i < GPRInfo::numberOfRegisters; ++i) {
     870#if USE(JSVALUE64)
     871        load64(buffer + i, GPRInfo::toRegister(i));
     872#else
     873        load32(buffer + i, GPRInfo::toRegister(i));
     874#endif
     875    }
     876}
     877
    824878void AssemblyHelpers::copyCalleeSavesToVMEntryFrameCalleeSavesBufferImpl(GPRReg calleeSavesBuffer)
    825879{
Note: See TracChangeset for help on using the changeset viewer.