Commit da4645e1 authored by fpizlo@apple.com's avatar fpizlo@apple.com

Unreviewed, revert http://trac.webkit.org/changeset/156235. It won't work on Windows.

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Target.pri:
* bytecode/CallLinkInfo.cpp:
(JSC::CallLinkInfo::unlink):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::resetStubInternal):
* bytecode/StructureStubInfo.h:
* dfg/DFGCallArrayAllocatorSlowPathGenerator.h:
(JSC::DFG::CallArrayAllocatorSlowPathGenerator::CallArrayAllocatorSlowPathGenerator):
(JSC::DFG::CallArrayAllocatorWithVariableSizeSlowPathGenerator::CallArrayAllocatorWithVariableSizeSlowPathGenerator):
* dfg/DFGJITCompiler.h:
* dfg/DFGOSRExitCompiler.h:
* dfg/DFGOperations.cpp:
(JSC::DFG::operationPutByValInternal):
* dfg/DFGOperations.h:
(JSC::DFG::operationNewTypedArrayWithSizeForType):
(JSC::DFG::operationNewTypedArrayWithOneArgumentForType):
* dfg/DFGRegisterSet.h: Added.
(JSC::DFG::RegisterSet::RegisterSet):
(JSC::DFG::RegisterSet::asPOD):
(JSC::DFG::RegisterSet::copyInfo):
(JSC::DFG::RegisterSet::set):
(JSC::DFG::RegisterSet::setGPRByIndex):
(JSC::DFG::RegisterSet::clear):
(JSC::DFG::RegisterSet::get):
(JSC::DFG::RegisterSet::getGPRByIndex):
(JSC::DFG::RegisterSet::getFreeGPR):
(JSC::DFG::RegisterSet::setFPRByIndex):
(JSC::DFG::RegisterSet::getFPRByIndex):
(JSC::DFG::RegisterSet::setByIndex):
(JSC::DFG::RegisterSet::getByIndex):
(JSC::DFG::RegisterSet::numberOfSetGPRs):
(JSC::DFG::RegisterSet::numberOfSetFPRs):
(JSC::DFG::RegisterSet::numberOfSetRegisters):
(JSC::DFG::RegisterSet::setBit):
(JSC::DFG::RegisterSet::clearBit):
(JSC::DFG::RegisterSet::getBit):
* dfg/DFGRepatch.cpp: Added.
(JSC::DFG::repatchCall):
(JSC::DFG::repatchByIdSelfAccess):
(JSC::DFG::addStructureTransitionCheck):
(JSC::DFG::replaceWithJump):
(JSC::DFG::emitRestoreScratch):
(JSC::DFG::linkRestoreScratch):
(JSC::DFG::generateProtoChainAccessStub):
(JSC::DFG::tryCacheGetByID):
(JSC::DFG::repatchGetByID):
(JSC::DFG::getPolymorphicStructureList):
(JSC::DFG::patchJumpToGetByIdStub):
(JSC::DFG::tryBuildGetByIDList):
(JSC::DFG::buildGetByIDList):
(JSC::DFG::appropriateGenericPutByIdFunction):
(JSC::DFG::appropriateListBuildingPutByIdFunction):
(JSC::DFG::emitPutReplaceStub):
(JSC::DFG::emitPutTransitionStub):
(JSC::DFG::tryCachePutByID):
(JSC::DFG::repatchPutByID):
(JSC::DFG::tryBuildPutByIdList):
(JSC::DFG::buildPutByIdList):
(JSC::DFG::tryRepatchIn):
(JSC::DFG::repatchIn):
(JSC::DFG::linkSlowFor):
(JSC::DFG::linkFor):
(JSC::DFG::linkClosureCall):
(JSC::DFG::resetGetByID):
(JSC::DFG::resetPutByID):
(JSC::DFG::resetIn):
* dfg/DFGRepatch.h: Added.
(JSC::DFG::resetGetByID):
(JSC::DFG::resetPutByID):
(JSC::DFG::resetIn):
* dfg/DFGScratchRegisterAllocator.h: Added.
(JSC::DFG::ScratchRegisterAllocator::ScratchRegisterAllocator):
(JSC::DFG::ScratchRegisterAllocator::lock):
(JSC::DFG::ScratchRegisterAllocator::allocateScratch):
(JSC::DFG::ScratchRegisterAllocator::allocateScratchGPR):
(JSC::DFG::ScratchRegisterAllocator::allocateScratchFPR):
(JSC::DFG::ScratchRegisterAllocator::didReuseRegisters):
(JSC::DFG::ScratchRegisterAllocator::preserveReusedRegistersByPushing):
(JSC::DFG::ScratchRegisterAllocator::restoreReusedRegistersByPopping):
(JSC::DFG::ScratchRegisterAllocator::desiredScratchBufferSize):
(JSC::DFG::ScratchRegisterAllocator::preserveUsedRegistersToScratchBuffer):
(JSC::DFG::ScratchRegisterAllocator::restoreUsedRegistersFromScratchBuffer):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::writeBarrier):
(JSC::DFG::SpeculativeJIT::nonSpeculativeCompare):
(JSC::DFG::SpeculativeJIT::compilePeepHoleBranch):
(JSC::DFG::SpeculativeJIT::compare):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::callOperation):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::cachedPutById):
(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranch):
(JSC::DFG::CompareAndBoxBooleanSlowPathGenerator::CompareAndBoxBooleanSlowPathGenerator):
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompare):
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::cachedPutById):
(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranch):
(JSC::DFG::CompareAndBoxBooleanSlowPathGenerator::CompareAndBoxBooleanSlowPathGenerator):
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompare):
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGThunks.cpp:
(JSC::DFG::emitPointerValidation):
(JSC::DFG::throwExceptionFromCallSlowPathGenerator):
(JSC::DFG::slowPathFor):
(JSC::DFG::linkForThunkGenerator):
(JSC::DFG::linkCallThunkGenerator):
(JSC::DFG::linkConstructThunkGenerator):
(JSC::DFG::linkClosureCallThunkGenerator):
(JSC::DFG::virtualForThunkGenerator):
(JSC::DFG::virtualCallThunkGenerator):
(JSC::DFG::virtualConstructThunkGenerator):
* dfg/DFGThunks.h:
* ftl/FTLIntrinsicRepository.h:
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileCallOrConstruct):
* ftl/FTLOSRExitCompiler.h:
* jit/AssemblyHelpers.h:
* jit/JIT.cpp:
(JSC::JIT::linkFor):
(JSC::JIT::linkSlowCall):
* jit/JITCall.cpp:
(JSC::JIT::compileCallEvalSlowCase):
(JSC::JIT::compileOpCallSlowCase):
(JSC::JIT::privateCompileClosureCall):
* jit/JITCall32_64.cpp:
(JSC::JIT::compileCallEvalSlowCase):
(JSC::JIT::compileOpCallSlowCase):
(JSC::JIT::privateCompileClosureCall):
* jit/JITOperationWrappers.h: Removed.
* jit/JITOperations.cpp: Removed.
* jit/JITOperations.h: Removed.
* jit/RegisterSet.h: Removed.
* jit/Repatch.cpp: Removed.
* jit/Repatch.h: Removed.
* jit/ScratchRegisterAllocator.h: Removed.
* jit/ThunkGenerators.cpp:
(JSC::generateSlowCaseFor):
(JSC::linkForGenerator):
(JSC::linkCallGenerator):
(JSC::linkConstructGenerator):
(JSC::linkClosureCallGenerator):
(JSC::virtualForGenerator):
(JSC::virtualCallGenerator):
(JSC::virtualConstructGenerator):
* jit/ThunkGenerators.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156237 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 4b747fff
......@@ -145,6 +145,7 @@ set(JavaScriptCore_SOURCES
dfg/DFGPlan.cpp
dfg/DFGPredictionInjectionPhase.cpp
dfg/DFGPredictionPropagationPhase.cpp
dfg/DFGRepatch.cpp
dfg/DFGSSAConversionPhase.cpp
dfg/DFGSpeculativeJIT.cpp
dfg/DFGSpeculativeJIT32_64.cpp
......@@ -223,7 +224,6 @@ set(JavaScriptCore_SOURCES
jit/JITExceptions.cpp
jit/JITOpcodes.cpp
jit/JITOpcodes32_64.cpp
jit/JITOperations.cpp
jit/JITPropertyAccess.cpp
jit/JITPropertyAccess32_64.cpp
jit/JITStubRoutine.cpp
......@@ -231,7 +231,6 @@ set(JavaScriptCore_SOURCES
jit/JITThunks.cpp
jit/JITToDFGDeferredCompilationCallback.cpp
jit/JumpReplacementWatchpoint.cpp
jit/Repatch.cpp
jit/ThunkGenerators.cpp
parser/Lexer.cpp
......
2013-09-21 Filip Pizlo <fpizlo@apple.com>
Unreviewed, revert http://trac.webkit.org/changeset/156235. It won't work on Windows.
* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Target.pri:
* bytecode/CallLinkInfo.cpp:
(JSC::CallLinkInfo::unlink):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::resetStubInternal):
* bytecode/StructureStubInfo.h:
* dfg/DFGCallArrayAllocatorSlowPathGenerator.h:
(JSC::DFG::CallArrayAllocatorSlowPathGenerator::CallArrayAllocatorSlowPathGenerator):
(JSC::DFG::CallArrayAllocatorWithVariableSizeSlowPathGenerator::CallArrayAllocatorWithVariableSizeSlowPathGenerator):
* dfg/DFGJITCompiler.h:
* dfg/DFGOSRExitCompiler.h:
* dfg/DFGOperations.cpp:
(JSC::DFG::operationPutByValInternal):
* dfg/DFGOperations.h:
(JSC::DFG::operationNewTypedArrayWithSizeForType):
(JSC::DFG::operationNewTypedArrayWithOneArgumentForType):
* dfg/DFGRegisterSet.h: Added.
(JSC::DFG::RegisterSet::RegisterSet):
(JSC::DFG::RegisterSet::asPOD):
(JSC::DFG::RegisterSet::copyInfo):
(JSC::DFG::RegisterSet::set):
(JSC::DFG::RegisterSet::setGPRByIndex):
(JSC::DFG::RegisterSet::clear):
(JSC::DFG::RegisterSet::get):
(JSC::DFG::RegisterSet::getGPRByIndex):
(JSC::DFG::RegisterSet::getFreeGPR):
(JSC::DFG::RegisterSet::setFPRByIndex):
(JSC::DFG::RegisterSet::getFPRByIndex):
(JSC::DFG::RegisterSet::setByIndex):
(JSC::DFG::RegisterSet::getByIndex):
(JSC::DFG::RegisterSet::numberOfSetGPRs):
(JSC::DFG::RegisterSet::numberOfSetFPRs):
(JSC::DFG::RegisterSet::numberOfSetRegisters):
(JSC::DFG::RegisterSet::setBit):
(JSC::DFG::RegisterSet::clearBit):
(JSC::DFG::RegisterSet::getBit):
* dfg/DFGRepatch.cpp: Added.
(JSC::DFG::repatchCall):
(JSC::DFG::repatchByIdSelfAccess):
(JSC::DFG::addStructureTransitionCheck):
(JSC::DFG::replaceWithJump):
(JSC::DFG::emitRestoreScratch):
(JSC::DFG::linkRestoreScratch):
(JSC::DFG::generateProtoChainAccessStub):
(JSC::DFG::tryCacheGetByID):
(JSC::DFG::repatchGetByID):
(JSC::DFG::getPolymorphicStructureList):
(JSC::DFG::patchJumpToGetByIdStub):
(JSC::DFG::tryBuildGetByIDList):
(JSC::DFG::buildGetByIDList):
(JSC::DFG::appropriateGenericPutByIdFunction):
(JSC::DFG::appropriateListBuildingPutByIdFunction):
(JSC::DFG::emitPutReplaceStub):
(JSC::DFG::emitPutTransitionStub):
(JSC::DFG::tryCachePutByID):
(JSC::DFG::repatchPutByID):
(JSC::DFG::tryBuildPutByIdList):
(JSC::DFG::buildPutByIdList):
(JSC::DFG::tryRepatchIn):
(JSC::DFG::repatchIn):
(JSC::DFG::linkSlowFor):
(JSC::DFG::linkFor):
(JSC::DFG::linkClosureCall):
(JSC::DFG::resetGetByID):
(JSC::DFG::resetPutByID):
(JSC::DFG::resetIn):
* dfg/DFGRepatch.h: Added.
(JSC::DFG::resetGetByID):
(JSC::DFG::resetPutByID):
(JSC::DFG::resetIn):
* dfg/DFGScratchRegisterAllocator.h: Added.
(JSC::DFG::ScratchRegisterAllocator::ScratchRegisterAllocator):
(JSC::DFG::ScratchRegisterAllocator::lock):
(JSC::DFG::ScratchRegisterAllocator::allocateScratch):
(JSC::DFG::ScratchRegisterAllocator::allocateScratchGPR):
(JSC::DFG::ScratchRegisterAllocator::allocateScratchFPR):
(JSC::DFG::ScratchRegisterAllocator::didReuseRegisters):
(JSC::DFG::ScratchRegisterAllocator::preserveReusedRegistersByPushing):
(JSC::DFG::ScratchRegisterAllocator::restoreReusedRegistersByPopping):
(JSC::DFG::ScratchRegisterAllocator::desiredScratchBufferSize):
(JSC::DFG::ScratchRegisterAllocator::preserveUsedRegistersToScratchBuffer):
(JSC::DFG::ScratchRegisterAllocator::restoreUsedRegistersFromScratchBuffer):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::writeBarrier):
(JSC::DFG::SpeculativeJIT::nonSpeculativeCompare):
(JSC::DFG::SpeculativeJIT::compilePeepHoleBranch):
(JSC::DFG::SpeculativeJIT::compare):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::callOperation):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::cachedPutById):
(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranch):
(JSC::DFG::CompareAndBoxBooleanSlowPathGenerator::CompareAndBoxBooleanSlowPathGenerator):
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompare):
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::cachedPutById):
(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranch):
(JSC::DFG::CompareAndBoxBooleanSlowPathGenerator::CompareAndBoxBooleanSlowPathGenerator):
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompare):
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGThunks.cpp:
(JSC::DFG::emitPointerValidation):
(JSC::DFG::throwExceptionFromCallSlowPathGenerator):
(JSC::DFG::slowPathFor):
(JSC::DFG::linkForThunkGenerator):
(JSC::DFG::linkCallThunkGenerator):
(JSC::DFG::linkConstructThunkGenerator):
(JSC::DFG::linkClosureCallThunkGenerator):
(JSC::DFG::virtualForThunkGenerator):
(JSC::DFG::virtualCallThunkGenerator):
(JSC::DFG::virtualConstructThunkGenerator):
* dfg/DFGThunks.h:
* ftl/FTLIntrinsicRepository.h:
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileCallOrConstruct):
* ftl/FTLOSRExitCompiler.h:
* jit/AssemblyHelpers.h:
* jit/JIT.cpp:
(JSC::JIT::linkFor):
(JSC::JIT::linkSlowCall):
* jit/JITCall.cpp:
(JSC::JIT::compileCallEvalSlowCase):
(JSC::JIT::compileOpCallSlowCase):
(JSC::JIT::privateCompileClosureCall):
* jit/JITCall32_64.cpp:
(JSC::JIT::compileCallEvalSlowCase):
(JSC::JIT::compileOpCallSlowCase):
(JSC::JIT::privateCompileClosureCall):
* jit/JITOperationWrappers.h: Removed.
* jit/JITOperations.cpp: Removed.
* jit/JITOperations.h: Removed.
* jit/RegisterSet.h: Removed.
* jit/Repatch.cpp: Removed.
* jit/Repatch.h: Removed.
* jit/ScratchRegisterAllocator.h: Removed.
* jit/ThunkGenerators.cpp:
(JSC::generateSlowCaseFor):
(JSC::linkForGenerator):
(JSC::linkCallGenerator):
(JSC::linkConstructGenerator):
(JSC::linkClosureCallGenerator):
(JSC::virtualForGenerator):
(JSC::virtualCallGenerator):
(JSC::virtualConstructGenerator):
* jit/ThunkGenerators.h:
2013-09-21 Filip Pizlo <fpizlo@apple.com>
Move DFG inline caching logic into jit/
......@@ -337,9 +337,13 @@ javascriptcore_sources += \
Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp \
Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.h \
Source/JavaScriptCore/dfg/DFGRegisterBank.h \
Source/JavaScriptCore/dfg/DFGRegisterSet.h \
Source/JavaScriptCore/dfg/DFGRepatch.cpp \
Source/JavaScriptCore/dfg/DFGRepatch.h \
Source/JavaScriptCore/dfg/DFGSafeToExecute.h \
Source/JavaScriptCore/dfg/DFGSaneStringGetByValSlowPathGenerator.h \
Source/JavaScriptCore/dfg/DFGScoreBoard.h \
Source/JavaScriptCore/dfg/DFGScratchRegisterAllocator.h \
Source/JavaScriptCore/dfg/DFGSilentRegisterSavePlan.h \
Source/JavaScriptCore/dfg/DFGSlowPathGenerator.h \
Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp \
......@@ -626,9 +630,6 @@ javascriptcore_sources += \
Source/JavaScriptCore/jit/JITInlines.h \
Source/JavaScriptCore/jit/JITOpcodes32_64.cpp \
Source/JavaScriptCore/jit/JITOpcodes.cpp \
Source/JavaScriptCore/jit/JITOperationWrappers.h \
Source/JavaScriptCore/jit/JITOperations.cpp \
Source/JavaScriptCore/jit/JITOperations.h \
Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp \
Source/JavaScriptCore/jit/JITPropertyAccess.cpp \
Source/JavaScriptCore/jit/JITStubCall.h \
......@@ -651,9 +652,6 @@ javascriptcore_sources += \
Source/JavaScriptCore/jit/JSInterfaceJIT.h \
Source/JavaScriptCore/jit/JumpReplacementWatchpoint.cpp \
Source/JavaScriptCore/jit/JumpReplacementWatchpoint.h \
Source/JavaScriptCore/jit/Repatch.cpp \
Source/JavaScriptCore/jit/Repatch.h \
Source/JavaScriptCore/jit/ScratchRegisterAllocator.h \
Source/JavaScriptCore/jit/SlowPathCall.h \
Source/JavaScriptCore/jit/SpecializedThunkJIT.h \
Source/JavaScriptCore/jit/ThunkGenerator.h \
......
......@@ -377,7 +377,6 @@
<ClCompile Include="..\jit\JITExceptions.cpp" />
<ClCompile Include="..\jit\JITOpcodes.cpp" />
<ClCompile Include="..\jit\JITOpcodes32_64.cpp" />
<ClCompile Include="..\jit\JITOperations.cpp" />
<ClCompile Include="..\jit\JITPropertyAccess.cpp" />
<ClCompile Include="..\jit\JITPropertyAccess32_64.cpp" />
<ClCompile Include="..\jit\JITStubRoutine.cpp" />
......@@ -385,7 +384,6 @@
<ClCompile Include="..\jit\JITThunks.cpp" />
<ClCompile Include="..\jit\JITToDFGDeferredCompilationCallback.cpp" />
<ClCompile Include="..\jit\JumpReplacementWatchpoint.cpp" />
<ClCompile Include="..\jit\Repatch.cpp" />
<ClCompile Include="..\jit\ThunkGenerators.cpp" />
<ClCompile Include="..\llint\LLIntCLoop.cpp" />
<ClCompile Include="..\llint\LLIntData.cpp" />
......@@ -769,8 +767,6 @@
<ClInclude Include="..\jit\JITDisassembler.h" />
<ClInclude Include="..\jit\JITExceptions.h" />
<ClInclude Include="..\jit\JITInlines.h" />
<ClInclude Include="..\jit\JITOperationWrappers.h" />
<ClInclude Include="..\jit\JITOperations.h" />
<ClInclude Include="..\jit\JITStubCall.h" />
<ClInclude Include="..\jit\JITStubRoutine.h" />
<ClInclude Include="..\jit\JITStubs.h" />
......@@ -782,9 +778,6 @@
<ClInclude Include="..\jit\JITWriteBarrier.h" />
<ClInclude Include="..\jit\JSInterfaceJIT.h" />
<ClInclude Include="..\jit\JumpReplacementWatchpoint.h" />
<ClInclude Include="..\jit\RegisterSet.h" />
<ClInclude Include="..\jit\Repatch.h" />
<ClInclude Include="..\jit\ScratchRegisterAllocator.h" />
<ClInclude Include="..\jit\SpecializedThunkJIT.h" />
<ClInclude Include="..\jit\ThunkGenerator.h" />
<ClInclude Include="..\jit\ThunkGenerators.h" />
......
......@@ -182,6 +182,7 @@ SOURCES += \
dfg/DFGPlan.cpp \
dfg/DFGPredictionPropagationPhase.cpp \
dfg/DFGPredictionInjectionPhase.cpp \
dfg/DFGRepatch.cpp \
dfg/DFGSSAConversionPhase.cpp \
dfg/DFGSpeculativeJIT.cpp \
dfg/DFGSpeculativeJIT32_64.cpp \
......@@ -220,7 +221,6 @@ SOURCES += \
jit/JITExceptions.cpp \
jit/JITOpcodes.cpp \
jit/JITOpcodes32_64.cpp \
jit/JITOperations.cpp \
jit/JITPropertyAccess.cpp \
jit/JITPropertyAccess32_64.cpp \
jit/JITStubRoutine.cpp \
......@@ -228,7 +228,6 @@ SOURCES += \
jit/JITThunks.cpp \
jit/JITToDFGDeferredCompilationCallback.cpp \
jit/JumpReplacementWatchpoint.cpp \
jit/Repatch.cpp \
jit/ThunkGenerators.cpp \
llint/LLIntCLoop.cpp \
llint/LLIntData.cpp \
......
......@@ -40,12 +40,12 @@ void CallLinkInfo::unlink(VM& vm, RepatchBuffer& repatchBuffer)
repatchBuffer.revertJumpReplacementToBranchPtrWithPatch(RepatchBuffer::startOfBranchPtrWithPatchOnRegister(hotPathBegin), static_cast<MacroAssembler::RegisterID>(calleeGPR), 0);
if (isDFG) {
#if ENABLE(DFG_JIT)
repatchBuffer.relink(callReturnLocation, (callType == Construct ? vm.getCTIStub(linkConstructThunkGenerator) : vm.getCTIStub(linkCallThunkGenerator)).code());
repatchBuffer.relink(callReturnLocation, (callType == Construct ? vm.getCTIStub(DFG::linkConstructThunkGenerator) : vm.getCTIStub(DFG::linkCallThunkGenerator)).code());
#else
RELEASE_ASSERT_NOT_REACHED();
#endif
} else
repatchBuffer.relink(callReturnLocation, callType == Construct ? vm.getCTIStub(oldStyleLinkConstructGenerator).code() : vm.getCTIStub(oldStyleLinkCallGenerator).code());
repatchBuffer.relink(callReturnLocation, callType == Construct ? vm.getCTIStub(linkConstructGenerator).code() : vm.getCTIStub(linkCallGenerator).code());
hasSeenShouldRepatch = false;
callee.clear();
stub.clear();
......
......@@ -36,6 +36,7 @@
#include "DFGCommon.h"
#include "DFGDriver.h"
#include "DFGNode.h"
#include "DFGRepatch.h"
#include "DFGWorklist.h"
#include "Debugger.h"
#include "Interpreter.h"
......@@ -50,7 +51,6 @@
#include "PolymorphicPutByIdList.h"
#include "ReduceWhitespace.h"
#include "RepatchBuffer.h"
#include "Repatch.h"
#include "SlotVisitorInlines.h"
#include <stdio.h>
#include <wtf/CommaPrinter.h>
......@@ -2382,12 +2382,12 @@ void CodeBlock::resetStubInternal(RepatchBuffer& repatchBuffer, StructureStubInf
break;
case JITCode::DFGJIT:
if (isGetByIdAccess(accessType))
resetGetByID(repatchBuffer, stubInfo);
DFG::resetGetByID(repatchBuffer, stubInfo);
else if (isPutByIdAccess(accessType))
resetPutByID(repatchBuffer, stubInfo);
DFG::resetPutByID(repatchBuffer, stubInfo);
else {
RELEASE_ASSERT(isInAccess(accessType));
resetIn(repatchBuffer, stubInfo);
DFG::resetIn(repatchBuffer, stubInfo);
}
break;
default:
......
......@@ -31,12 +31,12 @@
#if ENABLE(JIT)
#include "CodeOrigin.h"
#include "DFGRegisterSet.h"
#include "Instruction.h"
#include "JITStubRoutine.h"
#include "MacroAssembler.h"
#include "Opcode.h"
#include "PolymorphicAccessStructureList.h"
#include "RegisterSet.h"
#include "Structure.h"
#include "StructureStubClearingWatchpoint.h"
#include <wtf/OwnPtr.h>
......@@ -231,7 +231,7 @@ struct StructureStubInfo {
int8_t valueTagGPR;
#endif
int8_t valueGPR;
RegisterSetPOD usedRegisters;
DFG::RegisterSetPOD usedRegisters;
int32_t deltaCallToDone;
int32_t deltaCallToStorageLoad;
int32_t deltaCallToStructCheck;
......
......@@ -40,7 +40,7 @@ namespace JSC { namespace DFG {
class CallArrayAllocatorSlowPathGenerator : public JumpingSlowPathGenerator<MacroAssembler::JumpList> {
public:
CallArrayAllocatorSlowPathGenerator(
MacroAssembler::JumpList from, SpeculativeJIT* jit, P_JITOperation_EStZ function,
MacroAssembler::JumpList from, SpeculativeJIT* jit, P_DFGOperation_EStZ function,
GPRReg resultGPR, GPRReg storageGPR, Structure* structure, size_t size)
: JumpingSlowPathGenerator<MacroAssembler::JumpList>(from, jit)
, m_function(function)
......@@ -68,7 +68,7 @@ protected:
}
private:
P_JITOperation_EStZ m_function;
P_DFGOperation_EStZ m_function;
GPRReg m_resultGPR;
GPRReg m_storageGPR;
Structure* m_structure;
......@@ -79,7 +79,7 @@ private:
class CallArrayAllocatorWithVariableSizeSlowPathGenerator : public JumpingSlowPathGenerator<MacroAssembler::JumpList> {
public:
CallArrayAllocatorWithVariableSizeSlowPathGenerator(
MacroAssembler::JumpList from, SpeculativeJIT* jit, P_JITOperation_EStZ function,
MacroAssembler::JumpList from, SpeculativeJIT* jit, P_DFGOperation_EStZ function,
GPRReg resultGPR, Structure* contiguousStructure, Structure* arrayStorageStructure, GPRReg sizeGPR)
: JumpingSlowPathGenerator<MacroAssembler::JumpList>(from, jit)
, m_function(function)
......@@ -112,7 +112,7 @@ protected:
}
private:
P_JITOperation_EStZ m_function;
P_DFGOperation_EStZ m_function;
GPRReg m_resultGPR;
Structure* m_contiguousStructure;
Structure* m_arrayStorageStructure;
......
......@@ -36,12 +36,12 @@
#include "DFGJITCode.h"
#include "DFGOSRExitCompilationInfo.h"
#include "DFGRegisterBank.h"
#include "DFGRegisterSet.h"
#include "FPRInfo.h"
#include "GPRInfo.h"
#include "JITCode.h"
#include "LinkBuffer.h"
#include "MacroAssembler.h"
#include "RegisterSet.h"
namespace JSC {
......
......@@ -76,7 +76,7 @@ private:
};
extern "C" {
void JIT_OPERATION compileOSRExit(ExecState*) WTF_INTERNAL;
void DFG_OPERATION compileOSRExit(ExecState*) WTF_INTERNAL;
}
} } // namespace JSC::DFG
......
This diff is collapsed.
This diff is collapsed.
......@@ -23,18 +23,18 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef RegisterSet_h
#define RegisterSet_h
#ifndef DFGRegisterSet_h
#define DFGRegisterSet_h
#include <wtf/Platform.h>
#if ENABLE(JIT)
#if ENABLE(DFG_JIT)
#include "FPRInfo.h"
#include "GPRInfo.h"
#include <wtf/Bitmap.h>
namespace JSC {
namespace JSC { namespace DFG {
static const unsigned totalNumberOfRegisters =
GPRInfo::numberOfRegisters + FPRInfo::numberOfRegisters;
......@@ -197,11 +197,11 @@ private:
RegisterSetPOD m_set;
};
} // namespace JSC
} } // namespace JSC::DFG
#else // ENABLE(JIT) -> so if JIT is disabled
#else // ENABLE(DFG_JIT) -> so if DFG is disabled
namespace JSC {
namespace JSC { namespace DFG {
// Define RegisterSetPOD to something that is a POD, but is otherwise useless,
// to make it easier to refer to this type in code that may be compiled when
......@@ -209,9 +209,9 @@ namespace JSC {
struct RegisterSetPOD { };
} // namespace JSC
} } // namespace JSC::DFG
#endif // ENABLE(JIT)
#endif // ENABLE(DFG_JIT)
#endif // RegisterSet_h
#endif // DFGRegisterSet_h
......@@ -23,17 +23,17 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef Repatch_h
#define Repatch_h
#ifndef DFGRepatch_h
#define DFGRepatch_h
#include <wtf/Platform.h>
#if ENABLE(JIT)
#if ENABLE(DFG_JIT)
#include "CCallHelpers.h"
#include "JITOperations.h"
#include "DFGJITCompiler.h"
#include "DFGOperations.h"
namespace JSC {
namespace JSC { namespace DFG {
void repatchGetByID(ExecState*, JSValue, const Identifier&, const PropertySlot&, StructureStubInfo&);
void buildGetByIDList(ExecState*, JSValue, const Identifier&, const PropertySlot&, StructureStubInfo&);
......@@ -48,9 +48,9 @@ void resetGetByID(RepatchBuffer&, StructureStubInfo&);
void resetPutByID(RepatchBuffer&, StructureStubInfo&);
void resetIn(RepatchBuffer&, StructureStubInfo&);
} // namespace JSC
} } // namespace JSC::DFG
#else // ENABLE(JIT)
#else // ENABLE(DFG_JIT)
#include <wtf/Assertions.h>
......@@ -59,11 +59,13 @@ namespace JSC {
class RepatchBuffer;
struct StructureStubInfo;
namespace DFG {
inline NO_RETURN_DUE_TO_CRASH void resetGetByID(RepatchBuffer&, StructureStubInfo&) { RELEASE_ASSERT_NOT_REACHED(); }
inline NO_RETURN_DUE_TO_CRASH void resetPutByID(RepatchBuffer&, StructureStubInfo&) { RELEASE_ASSERT_NOT_REACHED(); }
inline NO_RETURN void resetIn(RepatchBuffer&, StructureStubInfo&) { RELEASE_ASSERT_NOT_REACHED(); }
} // namespace JSC
} } // namespace JSC::DFG
#endif // ENABLE(JIT)
#endif // Repatch_h
#endif // ENABLE(DFG_JIT)
#endif // DFGRepatch_h
......@@ -23,17 +23,17 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef ScratchRegisterAllocator_h
#define ScratchRegisterAllocator_h
#ifndef DFGScratchRegisterAllocator_h
#define DFGScratchRegisterAllocator_h
#include <wtf/Platform.h>
#if ENABLE(JIT)
#if ENABLE(DFG_JIT)
#include "DFGRegisterSet.h"
#include "MacroAssembler.h"
#include "RegisterSet.h"
namespace JSC {
namespace JSC { namespace DFG {
// This class provides a low-level register allocator for use in stubs.
......@@ -194,9 +194,9 @@ private:
bool m_didReuseRegisters;
};
} // namespace JSC
} } // namespace JSC::DFG
#endif // ENABLE(JIT)
#endif // ENABLE(DFG_JIT)
#endif // ScratchRegisterAllocator_h
#endif // DFGScratchRegisterAllocator_h
......@@ -895,6 +895,22 @@ void SpeculativeJIT::useChildren(Node* node)
}
}
void SpeculativeJIT::writeBarrier(MacroAssembler& jit, GPRReg owner, GPRReg scratch1, GPRReg scratch2, WriteBarrierUseKind useKind)
{
UNUSED_PARAM(jit);
UNUSED_PARAM(owner);
UNUSED_PARAM(scratch1);
UNUSED_PARAM(scratch2);
UNUSED_PARAM(useKind);
ASSERT(owner != scratch1);
ASSERT(owner != scratch2);
ASSERT(scratch1 != scratch2);
#if ENABLE(WRITE_BARRIER_PROFILING)
JITCompiler::emitCount(jit, WriteBarrierCounters::jitCounterFor(useKind));
#endif
}
void SpeculativeJIT::writeBarrier(GPRReg ownerGPR, GPRReg valueGPR, Edge valueUse, WriteBarrierUseKind useKind, GPRReg scratch1, GPRReg scratch2)
{
UNUSED_PARAM(ownerGPR);
......@@ -1001,7 +1017,7 @@ void SpeculativeJIT::compileIn(Node* node)
#endif
}
bool SpeculativeJIT::nonSpeculativeCompare(Node* node, MacroAssembler::RelationalCondition cond, S_JITOperation_EJJ helperFunction)
bool SpeculativeJIT::nonSpeculativeCompare(Node* node, MacroAssembler::RelationalCondition cond, S_DFGOperation_EJJ helperFunction)
{
unsigned branchIndexInBlock = detectPeepHoleBranch();
if (branchIndexInBlock != UINT_MAX) {
......@@ -1449,7 +1465,7 @@ void SpeculativeJIT::compilePeepHoleInt32Branch(Node* node, Node* branchNode, JI
}
// Returns true if the compare is fused with a subsequent branch.
bool SpeculativeJIT::compilePeepHoleBranch(Node* node, MacroAssembler::RelationalCondition condition, MacroAssembler::DoubleCondition doubleCondition, S_JITOperation_EJJ operation)
bool SpeculativeJIT::compilePeepHoleBranch(Node* node, MacroAssembler::RelationalCondition condition, MacroAssembler::DoubleCondition doubleCondition, S_DFGOperation_EJJ operation)
{
// Fused compare & branch.
unsigned branchIndexInBlock = detectPeepHoleBranch();
......@@ -3826,7 +3842,7 @@ void SpeculativeJIT::compileArithMod(Node* node)
}
// Returns true if the compare is fused with a subsequent branch.
bool SpeculativeJIT::compare(Node* node, MacroAssembler::RelationalCondition condition, MacroAssembler::DoubleCondition doubleCondition, S_JITOperation_EJJ operation)
bool SpeculativeJIT::compare(Node* node, MacroAssembler::RelationalCondition condition, MacroAssembler::DoubleCondition doubleCondition, S_DFGOperation_EJJ operation)
{
if (compilePeepHoleBranch(node, condition, doubleCondition, operation))
return true;
......
......@@ -32,7 +32,6 @@
#include "ArrayPrototype.h"
#include "DFGAbstractInterpreterInlines.h"
#include "DFGCallArrayAllocatorSlowPathGenerator.h"
#include "DFGOperations.h"
#include "DFGSlowPathGenerator.h"
#include "JSActivation.h"
#include "ObjectPrototype.h"
......@@ -262,7 +261,7 @@ void SpeculativeJIT::cachedPutById(CodeOrigin codeOrigin, GPRReg basePayloadGPR,
JITCompiler::DataLabel32 payloadStoreWithPatch = m_jit.store32WithAddressOffsetPatch(valuePayloadGPR, JITCompiler::Address(scratchGPR, OBJECT_OFFSETOF(EncodedValueDescriptor, asBits.payload)));
JITCompiler::Label doneLabel = m_jit.label();
V_JITOperation_EJCI optimizedCall;
V_DFGOperation_EJCI optimizedCall;
if (m_jit.strictModeFor(m_currentNode->codeOrigin)) {
if (putKind == Direct)
optimizedCall = operationPutByIdDirectStrictOptimize;
......@@ -441,7 +440,7 @@ bool SpeculativeJIT::nonSpeculativeCompareNull(Node* node, Edge operand, bool in
return false;
}
void SpeculativeJIT::nonSpeculativePeepholeBranch(Node* node, Node* branchNode, MacroAssembler::RelationalCondition cond, S_JITOperation_EJJ helperFunction)
void SpeculativeJIT::nonSpeculativePeepholeBranch(Node* node, Node* branchNode, MacroAssembler::RelationalCondition cond, S_DFGOperation_EJJ helperFunction)
{
BasicBlock* taken = branchNode->takenBlock();
BasicBlock* notTaken = branchNode->notTakenBlock();
......@@ -513,13 +512,13 @@ void SpeculativeJIT::nonSpeculativePeepholeBranch(Node* node, Node* branchNode,
template<typename JumpType>
class CompareAndBoxBooleanSlowPathGenerator
: public CallSlowPathGenerator<JumpType, S_JITOperation_EJJ, GPRReg> {
: public CallSlowPathGenerator<JumpType, S_DFGOperation_EJJ, GPRReg> {
public:
CompareAndBoxBooleanSlowPathGenerator(
JumpType from, SpeculativeJIT* jit,
S_JITOperation_EJJ function, GPRReg result, GPRReg arg1Tag, GPRReg arg1Payload,
S_DFGOperation_EJJ function, GPRReg result, GPRReg arg1Tag, GPRReg arg1Payload,
GPRReg arg2Tag, GPRReg arg2Payload)
: CallSlowPathGenerator<JumpType, S_JITOperation_EJJ, GPRReg>(
: CallSlowPathGenerator<JumpType, S_DFGOperation_EJJ, GPRReg>(
from, jit, function, NeedToSpill, result)
, m_arg1Tag(arg1Tag)
, m_arg1Payload(arg1Payload)
......@@ -547,7 +546,7 @@ private:
GPRReg m_arg2Payload;
};
void SpeculativeJIT::nonSpeculativeNonPeepholeCompare(Node* node, MacroAssembler::RelationalCondition cond, S_JITOperation_EJJ helperFunction)
void SpeculativeJIT::nonSpeculativeNonPeepholeCompare(Node* node, MacroAssembler::RelationalCondition cond, S_DFGOperation_EJJ helperFunction)
{
JSValueOperand arg1(this, node->child1());
JSValueOperand arg2(this, node->child2());
......@@ -3612,7 +3611,7 @@ void SpeculativeJIT::compile(Node* node)
TrustedImm32(FinalObjectType)));
m_jit.move(thisValuePayloadGPR, tempGPR);
m_jit.move(thisValueTagGPR, tempTagGPR);
J_JITOperation_EJ function;
J_DFGOperation_EJ function;
if (m_jit.graph().executableFor(node->codeOrigin)->isStrictMode())
function = operationToThisStrict;
else
......
......@@ -32,7 +32,6 @@
#include "ArrayPrototype.h"
#include "DFGAbstractInterpreterInlines.h"
#include "DFGCallArrayAllocatorSlowPathGenerator.h"
#include "DFGOperations.h"
#include "DFGSlowPathGenerator.h"
#include "JSCJSValueInlines.h"
#include "ObjectPrototype.h"
......@@ -254,7 +253,7 @@ void SpeculativeJIT::cachedPutById(CodeOrigin codeOrigin, GPRReg baseGPR, GPRReg
JITCompiler::Label doneLabel = m_jit.label();