haikuwebkit/Source/JavaScriptCore/dfg/DFGOSRExitCompilationInfo.h

44 lines
1.7 KiB
C
Raw Permalink Normal View History

DFG OSR exit code should be lazily generated https://bugs.webkit.org/show_bug.cgi?id=71744 Reviewed by Gavin Barraclough. The OSR exit code is now generated the first time it is executed, rather than right after speculative compilation. Because most OSR exits are never taken, this should greatly reduce both code size and compilation time. This is a 1% win on SunSpider, and a 1% win on V8 when running in my harness. No change in V8 in V8's harness (due to the long runs, so compile time is not an issue) and no change in Kraken (again, long runs of small code so compile time has no measurable effect). * CMakeListsEfl.txt: * GNUmakefile.list.am: * JavaScriptCore.xcodeproj/project.pbxproj: * Target.pri: * assembler/AbstractMacroAssembler.h: * assembler/MacroAssemblerX86.h: (JSC::MacroAssemblerX86::jump): * assembler/MacroAssemblerX86_64.h: (JSC::MacroAssemblerX86_64::jump): * assembler/X86Assembler.h: (JSC::X86Assembler::jmp_m): * bytecode/CodeBlock.h: (JSC::CodeBlock::createDFGDataIfNecessary): (JSC::CodeBlock::appendDFGOSREntryData): (JSC::CodeBlock::numberOfDFGOSREntries): (JSC::CodeBlock::dfgOSREntryData): (JSC::CodeBlock::dfgOSREntryDataForBytecodeIndex): (JSC::CodeBlock::appendOSRExit): (JSC::CodeBlock::appendSpeculationRecovery): (JSC::CodeBlock::numberOfOSRExits): (JSC::CodeBlock::numberOfSpeculationRecoveries): (JSC::CodeBlock::osrExit): (JSC::CodeBlock::speculationRecovery): * dfg/DFGAssemblyHelpers.h: (JSC::DFG::AssemblyHelpers::debugCall): * dfg/DFGCorrectableJumpPoint.cpp: Added. (JSC::DFG::CorrectableJumpPoint::codeLocationForRepatch): * dfg/DFGCorrectableJumpPoint.h: Added. (JSC::DFG::CorrectableJumpPoint::CorrectableJumpPoint): (JSC::DFG::CorrectableJumpPoint::switchToLateJump): (JSC::DFG::CorrectableJumpPoint::correctInitialJump): (JSC::DFG::CorrectableJumpPoint::correctLateJump): (JSC::DFG::CorrectableJumpPoint::initialJump): (JSC::DFG::CorrectableJumpPoint::lateJump): (JSC::DFG::CorrectableJumpPoint::correctJump): (JSC::DFG::CorrectableJumpPoint::getJump): * dfg/DFGJITCompiler.cpp: (JSC::DFG::JITCompiler::linkOSRExits): (JSC::DFG::JITCompiler::compileBody): (JSC::DFG::JITCompiler::link): * dfg/DFGJITCompiler.h: * dfg/DFGOSRExit.cpp: Added. (JSC::DFG::OSRExit::OSRExit): (JSC::DFG::OSRExit::dump): * dfg/DFGOSRExit.h: * dfg/DFGOSRExitCompiler.cpp: Added. * dfg/DFGOSRExitCompiler.h: * dfg/DFGOSRExitCompiler32_64.cpp: (JSC::DFG::OSRExitCompiler::compileExit): * dfg/DFGOSRExitCompiler64.cpp: (JSC::DFG::OSRExitCompiler::compileExit): * dfg/DFGOperations.cpp: * dfg/DFGSpeculativeJIT.cpp: * dfg/DFGSpeculativeJIT.h: (JSC::DFG::SpeculativeJIT::speculationCheck): * dfg/DFGThunks.cpp: Added. (JSC::DFG::osrExitGenerationThunkGenerator): * dfg/DFGThunks.h: Added. * jit/JITCode.h: (JSC::JITCode::dataAddressAtOffset): * runtime/JSGlobalData.h: Canonical link: https://commits.webkit.org/88351@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99787 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-10 01:08:50 +00:00
/*
2012-12-18 03:51:07 +00:00
* Copyright (C) 2012 Apple Inc. All rights reserved.
DFG OSR exit code should be lazily generated https://bugs.webkit.org/show_bug.cgi?id=71744 Reviewed by Gavin Barraclough. The OSR exit code is now generated the first time it is executed, rather than right after speculative compilation. Because most OSR exits are never taken, this should greatly reduce both code size and compilation time. This is a 1% win on SunSpider, and a 1% win on V8 when running in my harness. No change in V8 in V8's harness (due to the long runs, so compile time is not an issue) and no change in Kraken (again, long runs of small code so compile time has no measurable effect). * CMakeListsEfl.txt: * GNUmakefile.list.am: * JavaScriptCore.xcodeproj/project.pbxproj: * Target.pri: * assembler/AbstractMacroAssembler.h: * assembler/MacroAssemblerX86.h: (JSC::MacroAssemblerX86::jump): * assembler/MacroAssemblerX86_64.h: (JSC::MacroAssemblerX86_64::jump): * assembler/X86Assembler.h: (JSC::X86Assembler::jmp_m): * bytecode/CodeBlock.h: (JSC::CodeBlock::createDFGDataIfNecessary): (JSC::CodeBlock::appendDFGOSREntryData): (JSC::CodeBlock::numberOfDFGOSREntries): (JSC::CodeBlock::dfgOSREntryData): (JSC::CodeBlock::dfgOSREntryDataForBytecodeIndex): (JSC::CodeBlock::appendOSRExit): (JSC::CodeBlock::appendSpeculationRecovery): (JSC::CodeBlock::numberOfOSRExits): (JSC::CodeBlock::numberOfSpeculationRecoveries): (JSC::CodeBlock::osrExit): (JSC::CodeBlock::speculationRecovery): * dfg/DFGAssemblyHelpers.h: (JSC::DFG::AssemblyHelpers::debugCall): * dfg/DFGCorrectableJumpPoint.cpp: Added. (JSC::DFG::CorrectableJumpPoint::codeLocationForRepatch): * dfg/DFGCorrectableJumpPoint.h: Added. (JSC::DFG::CorrectableJumpPoint::CorrectableJumpPoint): (JSC::DFG::CorrectableJumpPoint::switchToLateJump): (JSC::DFG::CorrectableJumpPoint::correctInitialJump): (JSC::DFG::CorrectableJumpPoint::correctLateJump): (JSC::DFG::CorrectableJumpPoint::initialJump): (JSC::DFG::CorrectableJumpPoint::lateJump): (JSC::DFG::CorrectableJumpPoint::correctJump): (JSC::DFG::CorrectableJumpPoint::getJump): * dfg/DFGJITCompiler.cpp: (JSC::DFG::JITCompiler::linkOSRExits): (JSC::DFG::JITCompiler::compileBody): (JSC::DFG::JITCompiler::link): * dfg/DFGJITCompiler.h: * dfg/DFGOSRExit.cpp: Added. (JSC::DFG::OSRExit::OSRExit): (JSC::DFG::OSRExit::dump): * dfg/DFGOSRExit.h: * dfg/DFGOSRExitCompiler.cpp: Added. * dfg/DFGOSRExitCompiler.h: * dfg/DFGOSRExitCompiler32_64.cpp: (JSC::DFG::OSRExitCompiler::compileExit): * dfg/DFGOSRExitCompiler64.cpp: (JSC::DFG::OSRExitCompiler::compileExit): * dfg/DFGOperations.cpp: * dfg/DFGSpeculativeJIT.cpp: * dfg/DFGSpeculativeJIT.h: (JSC::DFG::SpeculativeJIT::speculationCheck): * dfg/DFGThunks.cpp: Added. (JSC::DFG::osrExitGenerationThunkGenerator): * dfg/DFGThunks.h: Added. * jit/JITCode.h: (JSC::JITCode::dataAddressAtOffset): * runtime/JSGlobalData.h: Canonical link: https://commits.webkit.org/88351@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99787 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-10 01:08:50 +00:00
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#pragma once
2012-12-18 03:51:07 +00:00
#if ENABLE(DFG_JIT)
2012-12-18 03:51:07 +00:00
#include "MacroAssembler.h"
DFG OSR exit code should be lazily generated https://bugs.webkit.org/show_bug.cgi?id=71744 Reviewed by Gavin Barraclough. The OSR exit code is now generated the first time it is executed, rather than right after speculative compilation. Because most OSR exits are never taken, this should greatly reduce both code size and compilation time. This is a 1% win on SunSpider, and a 1% win on V8 when running in my harness. No change in V8 in V8's harness (due to the long runs, so compile time is not an issue) and no change in Kraken (again, long runs of small code so compile time has no measurable effect). * CMakeListsEfl.txt: * GNUmakefile.list.am: * JavaScriptCore.xcodeproj/project.pbxproj: * Target.pri: * assembler/AbstractMacroAssembler.h: * assembler/MacroAssemblerX86.h: (JSC::MacroAssemblerX86::jump): * assembler/MacroAssemblerX86_64.h: (JSC::MacroAssemblerX86_64::jump): * assembler/X86Assembler.h: (JSC::X86Assembler::jmp_m): * bytecode/CodeBlock.h: (JSC::CodeBlock::createDFGDataIfNecessary): (JSC::CodeBlock::appendDFGOSREntryData): (JSC::CodeBlock::numberOfDFGOSREntries): (JSC::CodeBlock::dfgOSREntryData): (JSC::CodeBlock::dfgOSREntryDataForBytecodeIndex): (JSC::CodeBlock::appendOSRExit): (JSC::CodeBlock::appendSpeculationRecovery): (JSC::CodeBlock::numberOfOSRExits): (JSC::CodeBlock::numberOfSpeculationRecoveries): (JSC::CodeBlock::osrExit): (JSC::CodeBlock::speculationRecovery): * dfg/DFGAssemblyHelpers.h: (JSC::DFG::AssemblyHelpers::debugCall): * dfg/DFGCorrectableJumpPoint.cpp: Added. (JSC::DFG::CorrectableJumpPoint::codeLocationForRepatch): * dfg/DFGCorrectableJumpPoint.h: Added. (JSC::DFG::CorrectableJumpPoint::CorrectableJumpPoint): (JSC::DFG::CorrectableJumpPoint::switchToLateJump): (JSC::DFG::CorrectableJumpPoint::correctInitialJump): (JSC::DFG::CorrectableJumpPoint::correctLateJump): (JSC::DFG::CorrectableJumpPoint::initialJump): (JSC::DFG::CorrectableJumpPoint::lateJump): (JSC::DFG::CorrectableJumpPoint::correctJump): (JSC::DFG::CorrectableJumpPoint::getJump): * dfg/DFGJITCompiler.cpp: (JSC::DFG::JITCompiler::linkOSRExits): (JSC::DFG::JITCompiler::compileBody): (JSC::DFG::JITCompiler::link): * dfg/DFGJITCompiler.h: * dfg/DFGOSRExit.cpp: Added. (JSC::DFG::OSRExit::OSRExit): (JSC::DFG::OSRExit::dump): * dfg/DFGOSRExit.h: * dfg/DFGOSRExitCompiler.cpp: Added. * dfg/DFGOSRExitCompiler.h: * dfg/DFGOSRExitCompiler32_64.cpp: (JSC::DFG::OSRExitCompiler::compileExit): * dfg/DFGOSRExitCompiler64.cpp: (JSC::DFG::OSRExitCompiler::compileExit): * dfg/DFGOperations.cpp: * dfg/DFGSpeculativeJIT.cpp: * dfg/DFGSpeculativeJIT.h: (JSC::DFG::SpeculativeJIT::speculationCheck): * dfg/DFGThunks.cpp: Added. (JSC::DFG::osrExitGenerationThunkGenerator): * dfg/DFGThunks.h: Added. * jit/JITCode.h: (JSC::JITCode::dataAddressAtOffset): * runtime/JSGlobalData.h: Canonical link: https://commits.webkit.org/88351@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99787 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-10 01:08:50 +00:00
namespace JSC { namespace DFG {
DFG speculation checks that take JumpList should consolidate OSRExits https://bugs.webkit.org/show_bug.cgi?id=105401 Reviewed by Oliver Hunt. Source/JavaScriptCore: Change OSRExitCompilationInfo to always contain a JumpList, and change JumpList to be more compact. This way, a speculationCheck that takes a JumpList only has to emit one OSRExit structure, and one OSRExit landing pad. The downside is that we get less precise information about *where* we exited from. So, this also includes changes to the profiler to be more relaxed about what an ExitSite is. * assembler/AbstractMacroAssembler.h: (JumpList): * dfg/DFGJITCompiler.cpp: (JSC::DFG::JITCompiler::linkOSRExits): (JSC::DFG::JITCompiler::link): * dfg/DFGJITCompiler.h: (DFG): (JSC::DFG::JITCompiler::appendExitInfo): (JITCompiler): * dfg/DFGOSRExitCompilationInfo.h: (OSRExitCompilationInfo): * dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::speculationCheck): (JSC::DFG::SpeculativeJIT::speculationWatchpoint): (JSC::DFG::SpeculativeJIT::forwardSpeculationCheck): * profiler/ProfilerCompilation.cpp: (JSC::Profiler::Compilation::addOSRExitSite): * profiler/ProfilerCompilation.h: (Compilation): * profiler/ProfilerOSRExitSite.cpp: (JSC::Profiler::OSRExitSite::toJS): * profiler/ProfilerOSRExitSite.h: (JSC::Profiler::OSRExitSite::OSRExitSite): (JSC::Profiler::OSRExitSite::codeAddress): (OSRExitSite): Tools: Update the profiler to understand that an OSR exit may have multiple candidate exit sites. * Scripts/display-profiler-output: Canonical link: https://commits.webkit.org/123762@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@138276 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-12-20 19:14:39 +00:00
struct OSRExitCompilationInfo {
MacroAssembler::JumpList m_failureJumps;
Add InvalidationPoints to the DFG and use them for all watchpoints https://bugs.webkit.org/show_bug.cgi?id=123472 Reviewed by Mark Hahnenberg. This makes a fundamental change to how watchpoints work in the DFG. Previously, a watchpoint was an instruction whose execution semantics were something like: if (watchpoint->invalidated) exit We would implement this without any branch by using jump replacement. This is a very good optimization. But it's a bit awkward once you get a lot of watchpoints: semantically we will have lots of these branches in the code, which the compiler needs to reason about even though they don't actually result in any emitted code. Separately, we also had a mechanism for jettisoning a CodeBlock. This mechanism would be invoked if a CodeBlock exited a lot. It would ensure that a CodeBlock wouldn't be called into again, but it would do nothing for CodeBlocks that were already on the stack. This change flips jettisoning and watchpoint invalidation on their heads. Now, the jump replacement has nothing to do with watchpoints; instead it's something that happens if you ever jettison a CodeBlock. Jump replacement is now an all-or-nothing operation over all of the potential call-return safe-exit-points in a CodeBlock. We call these "InvalidationPoint"s. A watchpoint instruction is now "lowered" by having the DFG collect all of the watchpoint sets that the CodeBlock cares about, and then registering a CodeBlockJettisoningWatchpoint with all of them. That is, if the watchpoint fires, it jettisons the CodeBlock, which in turn ensures that the CodeBlock can't be called into (because the entrypoint now points to baseline code) and can't be returned into (because returning exits to baseline before the next bytecode instruction). This will allow for a sensible lowering of watchpoints to LLVM IR. It will also allow for jettison() to be used effectively for things like breakpointing and single-stepping in the debugger. Well, basically, this mechanism just takes us into the HotSpot-style world where anyone can, at any time and for any reason, request that an optimized CodeBlock is rendered immediately invalid. You can use this for many cool things, I'm sure. * CMakeLists.txt: * GNUmakefile.list.am: * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: * JavaScriptCore.xcodeproj/project.pbxproj: * assembler/AbstractMacroAssembler.h: * bytecode/CodeBlock.cpp: (JSC::CodeBlock::jettison): * bytecode/CodeBlock.h: * bytecode/CodeBlockJettisoningWatchpoint.cpp: Added. (JSC::CodeBlockJettisoningWatchpoint::fireInternal): * bytecode/CodeBlockJettisoningWatchpoint.h: Added. (JSC::CodeBlockJettisoningWatchpoint::CodeBlockJettisoningWatchpoint): * bytecode/ExitKind.cpp: (JSC::exitKindToString): * bytecode/ExitKind.h: * bytecode/ProfiledCodeBlockJettisoningWatchpoint.cpp: Added. (JSC::ProfiledCodeBlockJettisoningWatchpoint::fireInternal): * bytecode/ProfiledCodeBlockJettisoningWatchpoint.h: Added. (JSC::ProfiledCodeBlockJettisoningWatchpoint::ProfiledCodeBlockJettisoningWatchpoint): * dfg/DFGAbstractHeap.h: * dfg/DFGAbstractInterpreterInlines.h: (JSC::DFG::::executeEffects): * dfg/DFGClobberize.cpp: (JSC::DFG::writesOverlap): * dfg/DFGClobberize.h: (JSC::DFG::clobberize): (JSC::DFG::AbstractHeapOverlaps::AbstractHeapOverlaps): (JSC::DFG::AbstractHeapOverlaps::operator()): (JSC::DFG::AbstractHeapOverlaps::result): * dfg/DFGCommonData.cpp: (JSC::DFG::CommonData::invalidate): * dfg/DFGCommonData.h: (JSC::DFG::CommonData::CommonData): * dfg/DFGDesiredWatchpoints.cpp: (JSC::DFG::DesiredWatchpoints::addLazily): (JSC::DFG::DesiredWatchpoints::reallyAdd): * dfg/DFGDesiredWatchpoints.h: (JSC::DFG::WatchpointForGenericWatchpointSet::WatchpointForGenericWatchpointSet): (JSC::DFG::GenericDesiredWatchpoints::addLazily): (JSC::DFG::GenericDesiredWatchpoints::reallyAdd): (JSC::DFG::GenericDesiredWatchpoints::areStillValid): * dfg/DFGFixupPhase.cpp: (JSC::DFG::FixupPhase::fixupNode): * dfg/DFGInvalidationPointInjectionPhase.cpp: Added. (JSC::DFG::InvalidationPointInjectionPhase::InvalidationPointInjectionPhase): (JSC::DFG::InvalidationPointInjectionPhase::run): (JSC::DFG::InvalidationPointInjectionPhase::handle): (JSC::DFG::InvalidationPointInjectionPhase::insertInvalidationCheck): (JSC::DFG::performInvalidationPointInjection): * dfg/DFGInvalidationPointInjectionPhase.h: Added. * dfg/DFGJITCode.h: * dfg/DFGJITCompiler.cpp: (JSC::DFG::JITCompiler::linkOSRExits): (JSC::DFG::JITCompiler::link): * dfg/DFGJITCompiler.h: * dfg/DFGJumpReplacement.cpp: Added. (JSC::DFG::JumpReplacement::fire): * dfg/DFGJumpReplacement.h: Added. (JSC::DFG::JumpReplacement::JumpReplacement): * dfg/DFGNodeType.h: * dfg/DFGOSRExitCompilationInfo.h: * dfg/DFGOperations.cpp: * dfg/DFGPlan.cpp: (JSC::DFG::Plan::compileInThreadImpl): (JSC::DFG::Plan::reallyAdd): * dfg/DFGPredictionPropagationPhase.cpp: (JSC::DFG::PredictionPropagationPhase::propagate): * dfg/DFGSafeToExecute.h: (JSC::DFG::safeToExecute): * dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::emitInvalidationPoint): (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectEquality): (JSC::DFG::SpeculativeJIT::compileGetByValOnString): * dfg/DFGSpeculativeJIT.h: (JSC::DFG::SpeculativeJIT::masqueradesAsUndefinedWatchpointIsStillValid): (JSC::DFG::SpeculativeJIT::speculateStringObjectForStructure): * dfg/DFGSpeculativeJIT32_64.cpp: (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull): (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull): (JSC::DFG::SpeculativeJIT::compileObjectEquality): (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality): (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality): (JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot): (JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch): (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull): (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull): (JSC::DFG::SpeculativeJIT::compileObjectEquality): (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality): (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality): (JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot): (JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch): (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGWatchpointCollectionPhase.cpp: Added. (JSC::DFG::WatchpointCollectionPhase::WatchpointCollectionPhase): (JSC::DFG::WatchpointCollectionPhase::run): (JSC::DFG::WatchpointCollectionPhase::handle): (JSC::DFG::WatchpointCollectionPhase::handleEdge): (JSC::DFG::WatchpointCollectionPhase::handleMasqueradesAsUndefined): (JSC::DFG::WatchpointCollectionPhase::handleStringGetByVal): (JSC::DFG::WatchpointCollectionPhase::addLazily): (JSC::DFG::WatchpointCollectionPhase::globalObject): (JSC::DFG::performWatchpointCollection): * dfg/DFGWatchpointCollectionPhase.h: Added. * ftl/FTLCapabilities.cpp: (JSC::FTL::canCompile): * ftl/FTLLowerDFGToLLVM.cpp: (JSC::FTL::LowerDFGToLLVM::compileNode): (JSC::FTL::LowerDFGToLLVM::compileStructureTransitionWatchpoint): (JSC::FTL::LowerDFGToLLVM::compileGetByVal): (JSC::FTL::LowerDFGToLLVM::compileGlobalVarWatchpoint): (JSC::FTL::LowerDFGToLLVM::compileCompareEqConstant): (JSC::FTL::LowerDFGToLLVM::compileCompareStrictEq): (JSC::FTL::LowerDFGToLLVM::compileCompareStrictEqConstant): (JSC::FTL::LowerDFGToLLVM::compileInvalidationPoint): (JSC::FTL::LowerDFGToLLVM::equalNullOrUndefined): (JSC::FTL::LowerDFGToLLVM::speculateNonNullObject): * jit/JITOperations.cpp: * jit/JumpReplacementWatchpoint.cpp: Removed. * jit/JumpReplacementWatchpoint.h: Removed. Canonical link: https://commits.webkit.org/141672@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158304 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-10-30 19:58:08 +00:00
MacroAssembler::Label m_replacementSource;
MacroAssembler::Label m_replacementDestination;
MacroAssembler::PatchableJump m_patchableJump;
2012-12-18 03:51:07 +00:00
};
DFG OSR exit code should be lazily generated https://bugs.webkit.org/show_bug.cgi?id=71744 Reviewed by Gavin Barraclough. The OSR exit code is now generated the first time it is executed, rather than right after speculative compilation. Because most OSR exits are never taken, this should greatly reduce both code size and compilation time. This is a 1% win on SunSpider, and a 1% win on V8 when running in my harness. No change in V8 in V8's harness (due to the long runs, so compile time is not an issue) and no change in Kraken (again, long runs of small code so compile time has no measurable effect). * CMakeListsEfl.txt: * GNUmakefile.list.am: * JavaScriptCore.xcodeproj/project.pbxproj: * Target.pri: * assembler/AbstractMacroAssembler.h: * assembler/MacroAssemblerX86.h: (JSC::MacroAssemblerX86::jump): * assembler/MacroAssemblerX86_64.h: (JSC::MacroAssemblerX86_64::jump): * assembler/X86Assembler.h: (JSC::X86Assembler::jmp_m): * bytecode/CodeBlock.h: (JSC::CodeBlock::createDFGDataIfNecessary): (JSC::CodeBlock::appendDFGOSREntryData): (JSC::CodeBlock::numberOfDFGOSREntries): (JSC::CodeBlock::dfgOSREntryData): (JSC::CodeBlock::dfgOSREntryDataForBytecodeIndex): (JSC::CodeBlock::appendOSRExit): (JSC::CodeBlock::appendSpeculationRecovery): (JSC::CodeBlock::numberOfOSRExits): (JSC::CodeBlock::numberOfSpeculationRecoveries): (JSC::CodeBlock::osrExit): (JSC::CodeBlock::speculationRecovery): * dfg/DFGAssemblyHelpers.h: (JSC::DFG::AssemblyHelpers::debugCall): * dfg/DFGCorrectableJumpPoint.cpp: Added. (JSC::DFG::CorrectableJumpPoint::codeLocationForRepatch): * dfg/DFGCorrectableJumpPoint.h: Added. (JSC::DFG::CorrectableJumpPoint::CorrectableJumpPoint): (JSC::DFG::CorrectableJumpPoint::switchToLateJump): (JSC::DFG::CorrectableJumpPoint::correctInitialJump): (JSC::DFG::CorrectableJumpPoint::correctLateJump): (JSC::DFG::CorrectableJumpPoint::initialJump): (JSC::DFG::CorrectableJumpPoint::lateJump): (JSC::DFG::CorrectableJumpPoint::correctJump): (JSC::DFG::CorrectableJumpPoint::getJump): * dfg/DFGJITCompiler.cpp: (JSC::DFG::JITCompiler::linkOSRExits): (JSC::DFG::JITCompiler::compileBody): (JSC::DFG::JITCompiler::link): * dfg/DFGJITCompiler.h: * dfg/DFGOSRExit.cpp: Added. (JSC::DFG::OSRExit::OSRExit): (JSC::DFG::OSRExit::dump): * dfg/DFGOSRExit.h: * dfg/DFGOSRExitCompiler.cpp: Added. * dfg/DFGOSRExitCompiler.h: * dfg/DFGOSRExitCompiler32_64.cpp: (JSC::DFG::OSRExitCompiler::compileExit): * dfg/DFGOSRExitCompiler64.cpp: (JSC::DFG::OSRExitCompiler::compileExit): * dfg/DFGOperations.cpp: * dfg/DFGSpeculativeJIT.cpp: * dfg/DFGSpeculativeJIT.h: (JSC::DFG::SpeculativeJIT::speculationCheck): * dfg/DFGThunks.cpp: Added. (JSC::DFG::osrExitGenerationThunkGenerator): * dfg/DFGThunks.h: Added. * jit/JITCode.h: (JSC::JITCode::dataAddressAtOffset): * runtime/JSGlobalData.h: Canonical link: https://commits.webkit.org/88351@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99787 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-10 01:08:50 +00:00
} } // namespace JSC::DFG
#endif // ENABLE(DFG_JIT)