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

Move CCallHelpers and AssemblyHelpers into jit/ and have JSInterfaceJIT use them

https://bugs.webkit.org/show_bug.cgi?id=121637

Rubber stamped by Michael Saboff.
        
Also moved GPRInfo/FPRInfo into jit/. Rolling back in after fixing JIT-only build
and tests.

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Target.pri:
* bytecode/ValueRecovery.h:
(JSC::ValueRecovery::dumpInContext):
* dfg/DFGAssemblyHelpers.cpp: Removed.
* dfg/DFGAssemblyHelpers.h: Removed.
* dfg/DFGBinarySwitch.h:
* dfg/DFGByteCodeParser.cpp:
* dfg/DFGCCallHelpers.h: Removed.
* dfg/DFGDisassembler.cpp:
* dfg/DFGFPRInfo.h: Removed.
* dfg/DFGGPRInfo.h: Removed.
* dfg/DFGGraph.cpp:
* dfg/DFGGraph.h:
* dfg/DFGJITCompiler.h:
* dfg/DFGOSRExit.cpp:
* dfg/DFGOSRExit.h:
* dfg/DFGOSRExitCompiler.h:
* dfg/DFGOSRExitCompilerCommon.h:
* dfg/DFGRegisterBank.h:
* dfg/DFGRegisterSet.h:
* dfg/DFGRepatch.cpp:
* dfg/DFGSilentRegisterSavePlan.h:
* dfg/DFGThunks.cpp:
* dfg/DFGVariableEvent.cpp:
* ftl/FTLCArgumentGetter.h:
(JSC::FTL::CArgumentGetter::CArgumentGetter):
(JSC::FTL::CArgumentGetter::loadNext8):
(JSC::FTL::CArgumentGetter::loadNext32):
(JSC::FTL::CArgumentGetter::loadNext64):
(JSC::FTL::CArgumentGetter::loadNextPtr):
(JSC::FTL::CArgumentGetter::loadNextDouble):
* ftl/FTLCompile.cpp:
* ftl/FTLExitThunkGenerator.h:
* ftl/FTLLink.cpp:
* ftl/FTLThunks.cpp:
* jit/AssemblyHelpers.cpp: Copied from Source/JavaScriptCore/dfg/DFGAssemblyHelpers.cpp.
* jit/AssemblyHelpers.h: Copied from Source/JavaScriptCore/dfg/DFGAssemblyHelpers.h.
(JSC::AssemblyHelpers::AssemblyHelpers):
(JSC::AssemblyHelpers::debugCall):
* jit/CCallHelpers.h: Copied from Source/JavaScriptCore/dfg/DFGCCallHelpers.h.
* jit/FPRInfo.h: Copied from Source/JavaScriptCore/dfg/DFGFPRInfo.h.
(WTF::printInternal):
* jit/GPRInfo.h: Copied from Source/JavaScriptCore/dfg/DFGGPRInfo.h.
(WTF::printInternal):
* jit/JIT.cpp:
(JSC::JIT::JIT):
* jit/JIT.h:
* jit/JITPropertyAccess.cpp:
(JSC::JIT::stringGetByValStubGenerator):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::stringGetByValStubGenerator):
* jit/JSInterfaceJIT.h:
(JSC::JSInterfaceJIT::JSInterfaceJIT):
* jit/SpecializedThunkJIT.h:
(JSC::SpecializedThunkJIT::SpecializedThunkJIT):
(JSC::SpecializedThunkJIT::finalize):
* jit/ThunkGenerators.cpp:
(JSC::linkForGenerator):
(JSC::virtualForGenerator):
(JSC::stringLengthTrampolineGenerator):
(JSC::nativeForGenerator):
(JSC::arityFixup):
(JSC::charCodeAtThunkGenerator):
(JSC::charAtThunkGenerator):
(JSC::fromCharCodeThunkGenerator):
(JSC::sqrtThunkGenerator):
(JSC::floorThunkGenerator):
(JSC::ceilThunkGenerator):
(JSC::roundThunkGenerator):
(JSC::expThunkGenerator):
(JSC::logThunkGenerator):
(JSC::absThunkGenerator):
(JSC::powThunkGenerator):
(JSC::imulThunkGenerator):
* llint/LLIntThunks.cpp:
(JSC::LLInt::generateThunkWithJumpTo):
* runtime/JSCJSValue.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156184 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent ceb3ebe2
......@@ -80,7 +80,6 @@ set(JavaScriptCore_SOURCES
dfg/DFGAbstractValue.cpp
dfg/DFGArgumentsSimplificationPhase.cpp
dfg/DFGArrayMode.cpp
dfg/DFGAssemblyHelpers.cpp
dfg/DFGAtTailAbstractState.cpp
dfg/DFGBackwardsPropagationPhase.cpp
dfg/DFGBasicBlock.cpp
......@@ -209,6 +208,7 @@ set(JavaScriptCore_SOURCES
interpreter/StackVisitor.cpp
interpreter/VMInspector.cpp
jit/AssemblyHelpers.cpp
jit/ClosureCallStubRoutine.cpp
jit/ExecutableAllocator.cpp
jit/ExecutableAllocatorFixedVMPool.cpp
......
2013-09-19 Filip Pizlo <fpizlo@apple.com>
Move CCallHelpers and AssemblyHelpers into jit/ and have JSInterfaceJIT use them
https://bugs.webkit.org/show_bug.cgi?id=121637
Rubber stamped by Michael Saboff.
Also moved GPRInfo/FPRInfo into jit/. Rolling back in after fixing JIT-only build
and tests.
* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Target.pri:
* bytecode/ValueRecovery.h:
(JSC::ValueRecovery::dumpInContext):
* dfg/DFGAssemblyHelpers.cpp: Removed.
* dfg/DFGAssemblyHelpers.h: Removed.
* dfg/DFGBinarySwitch.h:
* dfg/DFGByteCodeParser.cpp:
* dfg/DFGCCallHelpers.h: Removed.
* dfg/DFGDisassembler.cpp:
* dfg/DFGFPRInfo.h: Removed.
* dfg/DFGGPRInfo.h: Removed.
* dfg/DFGGraph.cpp:
* dfg/DFGGraph.h:
* dfg/DFGJITCompiler.h:
* dfg/DFGOSRExit.cpp:
* dfg/DFGOSRExit.h:
* dfg/DFGOSRExitCompiler.h:
* dfg/DFGOSRExitCompilerCommon.h:
* dfg/DFGRegisterBank.h:
* dfg/DFGRegisterSet.h:
* dfg/DFGRepatch.cpp:
* dfg/DFGSilentRegisterSavePlan.h:
* dfg/DFGThunks.cpp:
* dfg/DFGVariableEvent.cpp:
* ftl/FTLCArgumentGetter.h:
(JSC::FTL::CArgumentGetter::CArgumentGetter):
(JSC::FTL::CArgumentGetter::loadNext8):
(JSC::FTL::CArgumentGetter::loadNext32):
(JSC::FTL::CArgumentGetter::loadNext64):
(JSC::FTL::CArgumentGetter::loadNextPtr):
(JSC::FTL::CArgumentGetter::loadNextDouble):
* ftl/FTLCompile.cpp:
* ftl/FTLExitThunkGenerator.h:
* ftl/FTLLink.cpp:
* ftl/FTLThunks.cpp:
* jit/AssemblyHelpers.cpp: Copied from Source/JavaScriptCore/dfg/DFGAssemblyHelpers.cpp.
* jit/AssemblyHelpers.h: Copied from Source/JavaScriptCore/dfg/DFGAssemblyHelpers.h.
(JSC::AssemblyHelpers::AssemblyHelpers):
(JSC::AssemblyHelpers::debugCall):
* jit/CCallHelpers.h: Copied from Source/JavaScriptCore/dfg/DFGCCallHelpers.h.
* jit/FPRInfo.h: Copied from Source/JavaScriptCore/dfg/DFGFPRInfo.h.
(WTF::printInternal):
* jit/GPRInfo.h: Copied from Source/JavaScriptCore/dfg/DFGGPRInfo.h.
(WTF::printInternal):
* jit/JIT.cpp:
(JSC::JIT::JIT):
* jit/JIT.h:
* jit/JITPropertyAccess.cpp:
(JSC::JIT::stringGetByValStubGenerator):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::stringGetByValStubGenerator):
* jit/JSInterfaceJIT.h:
(JSC::JSInterfaceJIT::JSInterfaceJIT):
* jit/SpecializedThunkJIT.h:
(JSC::SpecializedThunkJIT::SpecializedThunkJIT):
(JSC::SpecializedThunkJIT::finalize):
* jit/ThunkGenerators.cpp:
(JSC::linkForGenerator):
(JSC::virtualForGenerator):
(JSC::stringLengthTrampolineGenerator):
(JSC::nativeForGenerator):
(JSC::arityFixup):
(JSC::charCodeAtThunkGenerator):
(JSC::charAtThunkGenerator):
(JSC::fromCharCodeThunkGenerator):
(JSC::sqrtThunkGenerator):
(JSC::floorThunkGenerator):
(JSC::ceilThunkGenerator):
(JSC::roundThunkGenerator):
(JSC::expThunkGenerator):
(JSC::logThunkGenerator):
(JSC::absThunkGenerator):
(JSC::powThunkGenerator):
(JSC::imulThunkGenerator):
* llint/LLIntThunks.cpp:
(JSC::LLInt::generateThunkWithJumpTo):
* runtime/JSCJSValue.h:
2013-09-20 Allan Sandfeld Jensen <allan.jensen@digia.com>
Inline method exported
......
......@@ -192,8 +192,6 @@ javascriptcore_sources += \
Source/JavaScriptCore/dfg/DFGArrayMode.cpp \
Source/JavaScriptCore/dfg/DFGArrayMode.h \
Source/JavaScriptCore/dfg/DFGArrayifySlowPathGenerator.h \
Source/JavaScriptCore/dfg/DFGAssemblyHelpers.cpp \
Source/JavaScriptCore/dfg/DFGAssemblyHelpers.h \
Source/JavaScriptCore/dfg/DFGAtTailAbstractState.cpp \
Source/JavaScriptCore/dfg/DFGAtTailAbstractState.h \
Source/JavaScriptCore/dfg/DFGBackwardsPropagationPhase.cpp \
......@@ -208,7 +206,6 @@ javascriptcore_sources += \
Source/JavaScriptCore/dfg/DFGBranchDirection.h \
Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp \
Source/JavaScriptCore/dfg/DFGByteCodeParser.h \
Source/JavaScriptCore/dfg/DFGCCallHelpers.h \
Source/JavaScriptCore/dfg/DFGCFGSimplificationPhase.cpp \
Source/JavaScriptCore/dfg/DFGCFGSimplificationPhase.h \
Source/JavaScriptCore/dfg/DFGCallArrayAllocatorSlowPathGenerator.h \
......@@ -261,7 +258,6 @@ javascriptcore_sources += \
Source/JavaScriptCore/dfg/DFGEdge.h \
Source/JavaScriptCore/dfg/DFGEdgeDominates.h \
Source/JavaScriptCore/dfg/DFGEdgeUsesStructure.h \
Source/JavaScriptCore/dfg/DFGFPRInfo.h \
Source/JavaScriptCore/dfg/DFGFailedFinalizer.cpp \
Source/JavaScriptCore/dfg/DFGFailedFinalizer.h \
Source/JavaScriptCore/dfg/DFGFiltrationResult.h \
......@@ -274,7 +270,6 @@ javascriptcore_sources += \
Source/JavaScriptCore/dfg/DFGFlushLivenessAnalysisPhase.cpp \
Source/JavaScriptCore/dfg/DFGFlushLivenessAnalysisPhase.h \
Source/JavaScriptCore/dfg/DFGGenerationInfo.h \
Source/JavaScriptCore/dfg/DFGGPRInfo.h \
Source/JavaScriptCore/dfg/DFGGenerationInfo.h \
Source/JavaScriptCore/dfg/DFGGraph.cpp \
Source/JavaScriptCore/dfg/DFGGraph.h \
......@@ -604,14 +599,19 @@ javascriptcore_sources += \
Source/JavaScriptCore/interpreter/VMInspector.cpp \
Source/JavaScriptCore/interpreter/VMInspector.h \
Source/JavaScriptCore/JavaScriptCorePrefix.h \
Source/JavaScriptCore/jit/AssemblyHelpers.cpp \
Source/JavaScriptCore/jit/AssemblyHelpers.h \
Source/JavaScriptCore/jit/CCallHelpers.h \
Source/JavaScriptCore/jit/CompactJITCodeMap.h \
Source/JavaScriptCore/jit/ClosureCallStubRoutine.cpp \
Source/JavaScriptCore/jit/ClosureCallStubRoutine.h \
Source/JavaScriptCore/jit/ExecutableAllocator.cpp \
Source/JavaScriptCore/jit/ExecutableAllocator.h \
Source/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp \
Source/JavaScriptCore/jit/FPRInfo.h \
Source/JavaScriptCore/jit/GCAwareJITStubRoutine.cpp \
Source/JavaScriptCore/jit/GCAwareJITStubRoutine.h \
Source/JavaScriptCore/jit/GPRInfo.h \
Source/JavaScriptCore/jit/HostCallReturnValue.cpp \
Source/JavaScriptCore/jit/HostCallReturnValue.h \
Source/JavaScriptCore/jit/JITArithmetic32_64.cpp \
......
......@@ -362,6 +362,7 @@
<ClCompile Include="..\interpreter\JSStack.cpp" />
<ClCompile Include="..\interpreter\StackVisitor.cpp" />
<ClCompile Include="..\interpreter\VMInspector.cpp" />
<ClCompile Include="..\jit\AssemblyHelpers.cpp" />
<ClCompile Include="..\jit\ClosureCallStubRoutine.cpp" />
<ClCompile Include="..\jit\ExecutableAllocator.cpp" />
<ClCompile Include="..\jit\GCAwareJITStubRoutine.cpp" />
......@@ -751,10 +752,14 @@
<ClInclude Include="..\interpreter\Register.h" />
<ClInclude Include="..\interpreter\StackVisitor.h" />
<ClInclude Include="..\interpreter\VMInspector.h" />
<ClInclude Include="..\jit\AssemblyHelpers.h" />
<ClInclude Include="..\jit\CCallHelpers.h" />
<ClInclude Include="..\jit\ClosureCallStubRoutine.h" />
<ClInclude Include="..\jit\CompactJITCodeMap.h" />
<ClInclude Include="..\jit\ExecutableAllocator.h" />
<ClInclude Include="..\jit\FPRInfo.h" />
<ClInclude Include="..\jit\GCAwareJITStubRoutine.h" />
<ClInclude Include="..\jit\GPRInfo.h" />
<ClInclude Include="..\jit\HostCallReturnValue.h" />
<ClInclude Include="..\jit\JIT.h" />
<ClInclude Include="..\jit\JITCode.h" />
......
......@@ -117,7 +117,6 @@ SOURCES += \
dfg/DFGAbstractValue.cpp \
dfg/DFGArgumentsSimplificationPhase.cpp \
dfg/DFGArrayMode.cpp \
dfg/DFGAssemblyHelpers.cpp \
dfg/DFGAtTailAbstractState.cpp \
dfg/DFGBackwardsPropagationPhase.cpp \
dfg/DFGBasicBlock.cpp \
......@@ -206,6 +205,7 @@ SOURCES += \
interpreter/Interpreter.cpp \
interpreter/JSStack.cpp \
interpreter/StackVisitor.cpp \
jit/AssemblyHelpers.cpp \
jit/ClosureCallStubRoutine.cpp \
jit/ExecutableAllocatorFixedVMPool.cpp \
jit/ExecutableAllocator.cpp \
......
......@@ -2209,7 +2209,6 @@ void CodeBlock::visitWeakReferences(SlotVisitor& visitor)
void CodeBlock::finalizeUnconditionally()
{
#if ENABLE(LLINT)
Interpreter* interpreter = m_vm->interpreter;
if (JITCode::couldBeInterpreted(jitType())) {
const Vector<unsigned>& propertyAccessInstructions = m_unlinkedCode->propertyAccessInstructions();
......@@ -2263,6 +2262,7 @@ void CodeBlock::finalizeUnconditionally()
}
}
#if ENABLE(LLINT)
for (unsigned i = 0; i < m_llintCallLinkInfos.size(); ++i) {
if (m_llintCallLinkInfos[i].isLinked() && !Heap::isMarked(m_llintCallLinkInfos[i].callee.get())) {
if (Options::verboseOSR())
......@@ -2272,8 +2272,8 @@ void CodeBlock::finalizeUnconditionally()
if (!!m_llintCallLinkInfos[i].lastSeenCallee && !Heap::isMarked(m_llintCallLinkInfos[i].lastSeenCallee.get()))
m_llintCallLinkInfos[i].lastSeenCallee.clear();
}
}
#endif // ENABLE(LLINT)
}
#if ENABLE(DFG_JIT)
// Check if we're not live. If we are, then jettison.
......@@ -2451,14 +2451,19 @@ CodeBlock* CodeBlock::baselineVersion()
return this;
#if ENABLE(JIT)
CodeBlock* result = replacement();
if (!result) {
// This can happen if we're creating the original CodeBlock for an executable.
// Assume that we're the baseline CodeBlock.
ASSERT(jitType() == JITCode::None);
return this;
}
while (result->alternative())
result = result->alternative();
RELEASE_ASSERT(result);
RELEASE_ASSERT(JITCode::isBaselineCode(result->jitType()));
return result;
#else
RELEASE_ASSERT_NOT_REACHED();
return 0;
return this;
#endif
}
......
......@@ -194,7 +194,7 @@ public:
CallLinkInfo& getCallLinkInfo(unsigned bytecodeIndex)
{
ASSERT(JITCode::isBaselineCode(jitType()));
ASSERT(!JITCode::isOptimizingJIT(jitType()));
return *(binarySearch<CallLinkInfo, unsigned>(m_callLinkInfos, m_callLinkInfos.size(), bytecodeIndex, getCallLinkInfoBytecodeIndex));
}
#endif // ENABLE(JIT)
......
......@@ -27,6 +27,8 @@
#define ValueRecovery_h
#include "DataFormat.h"
#include "GPRInfo.h"
#include "FPRInfo.h"
#include "JSCJSValue.h"
#include "MacroAssembler.h"
#include "VirtualRegister.h"
......@@ -323,29 +325,29 @@ public:
out.printf("(double)");
return;
case InGPR:
out.printf("%%r%d", gpr());
out.print(gpr());
return;
case UnboxedInt32InGPR:
out.printf("int32(%%r%d)", gpr());
out.print("int32(", gpr(), ")");
return;
case UnboxedInt52InGPR:
out.printf("int52(%%r%d)", gpr());
out.print("int53(", gpr(), ")");
return;
case UnboxedStrictInt52InGPR:
out.printf("strictInt52(%%r%d)", gpr());
out.print("strictInt52(", gpr(), ")");
return;
case UnboxedBooleanInGPR:
out.printf("bool(%%r%d)", gpr());
out.print("bool(", gpr(), ")");
return;
case UInt32InGPR:
out.printf("uint32(%%r%d)", gpr());
out.print("uint32(", gpr(), ")");
return;
case InFPR:
out.printf("%%fr%d", fpr());
out.print(fpr());
return;
#if USE(JSVALUE32_64)
case InPair:
out.printf("pair(%%r%d, %%r%d)", tagGPR(), payloadGPR());
out.print("pair(", tagGPR(), ", ", payloadGPR(), ")");
return;
#endif
case DisplacedInJSStack:
......
......@@ -30,7 +30,7 @@
#if ENABLE(DFG_JIT)
#include "DFGGPRInfo.h"
#include "GPRInfo.h"
#include "MacroAssembler.h"
namespace JSC { namespace DFG {
......
......@@ -34,6 +34,7 @@
#include "CodeBlockWithJITType.h"
#include "DFGArrayMode.h"
#include "DFGCapabilities.h"
#include "DFGJITCode.h"
#include "GetByIdStatus.h"
#include "Operations.h"
#include "PreciseJumpTargets.h"
......
......@@ -30,6 +30,7 @@
#include "CodeBlockWithJITType.h"
#include "DFGGraph.h"
#include "DFGJITCode.h"
#include <wtf/StdLibExtras.h>
namespace JSC { namespace DFG {
......
......@@ -29,6 +29,7 @@
#include "CodeBlock.h"
#include "CodeBlockWithJITType.h"
#include "DFGClobberSet.h"
#include "DFGJITCode.h"
#include "DFGVariableAccessDataDump.h"
#include "FunctionExecutableDump.h"
#include "OperandsInlines.h"
......
......@@ -30,9 +30,9 @@
#if ENABLE(DFG_JIT)
#include "AssemblyHelpers.h"
#include "CodeBlock.h"
#include "DFGArgumentPosition.h"
#include "DFGAssemblyHelpers.h"
#include "DFGBasicBlock.h"
#include "DFGDominators.h"
#include "DFGLongLivedState.h"
......
......@@ -28,17 +28,17 @@
#if ENABLE(DFG_JIT)
#include "CCallHelpers.h"
#include "CallFrameInlines.h"
#include "CodeBlock.h"
#include "DFGCCallHelpers.h"
#include "DFGDisassembler.h"
#include "DFGFPRInfo.h"
#include "DFGGPRInfo.h"
#include "DFGGraph.h"
#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"
......
......@@ -28,7 +28,7 @@
#if ENABLE(DFG_JIT)
#include "DFGAssemblyHelpers.h"
#include "AssemblyHelpers.h"
#include "DFGGraph.h"
#include "DFGSpeculativeJIT.h"
#include "JSCellInlines.h"
......
......@@ -33,9 +33,9 @@
#include "CodeOrigin.h"
#include "DFGCommon.h"
#include "DFGExitProfile.h"
#include "DFGGPRInfo.h"
#include "DFGOSRExitBase.h"
#include "DFGValueRecoveryOverride.h"
#include "GPRInfo.h"
#include "MacroAssembler.h"
#include "MethodOfGettingAValueProfile.h"
#include "Operands.h"
......
......@@ -30,8 +30,8 @@
#if ENABLE(DFG_JIT)
#include "DFGAssemblyHelpers.h"
#include "DFGCCallHelpers.h"
#include "AssemblyHelpers.h"
#include "CCallHelpers.h"
#include "DFGOSRExit.h"
#include "DFGOperations.h"
......
......@@ -30,7 +30,7 @@
#if ENABLE(DFG_JIT)
#include "DFGCCallHelpers.h"
#include "CCallHelpers.h"
#include "DFGOSRExit.h"
namespace JSC { namespace DFG {
......
......@@ -29,6 +29,8 @@
#if ENABLE(DFG_JIT)
#include "DFGCommon.h"
#include "FPRInfo.h"
#include "GPRInfo.h"
namespace JSC { namespace DFG {
......@@ -358,6 +360,9 @@ private:
MapEntry m_data[NUM_REGS];
};
typedef RegisterBank<GPRInfo>::iterator gpr_iterator;
typedef RegisterBank<FPRInfo>::iterator fpr_iterator;
} } // namespace JSC::DFG
#endif
......
......@@ -30,8 +30,8 @@
#if ENABLE(DFG_JIT)
#include "DFGFPRInfo.h"
#include "DFGGPRInfo.h"
#include "FPRInfo.h"
#include "GPRInfo.h"
#include <wtf/Bitmap.h>
namespace JSC { namespace DFG {
......
......@@ -28,8 +28,8 @@
#if ENABLE(DFG_JIT)
#include "CCallHelpers.h"
#include "CallFrameInlines.h"
#include "DFGCCallHelpers.h"
#include "DFGScratchRegisterAllocator.h"
#include "DFGSpeculativeJIT.h"
#include "DFGThunks.h"
......
......@@ -31,8 +31,8 @@
#if ENABLE(DFG_JIT)
#include "DFGCommon.h"
#include "DFGFPRInfo.h"
#include "DFGGPRInfo.h"
#include "FPRInfo.h"
#include "GPRInfo.h"
namespace JSC { namespace DFG {
......
......@@ -28,10 +28,10 @@
#if ENABLE(DFG_JIT)
#include "DFGCCallHelpers.h"
#include "DFGFPRInfo.h"
#include "DFGGPRInfo.h"
#include "CCallHelpers.h"
#include "DFGOSRExitCompiler.h"
#include "FPRInfo.h"
#include "GPRInfo.h"
#include "MacroAssembler.h"
namespace JSC { namespace DFG {
......
......@@ -28,8 +28,8 @@
#if ENABLE(DFG_JIT)
#include "DFGFPRInfo.h"
#include "DFGGPRInfo.h"
#include "FPRInfo.h"
#include "GPRInfo.h"
namespace JSC { namespace DFG {
......
......@@ -30,7 +30,7 @@
#if ENABLE(FTL_JIT)
#include "DFGAssemblyHelpers.h"
#include "AssemblyHelpers.h"
#include "FTLValueFormat.h"
namespace JSC { namespace FTL {
......@@ -53,7 +53,7 @@ public:
// Peek offset is the number of things on the stack below the first argument.
// It will be 1 if you haven't pushed or popped after the call; i.e. the only
// thing is the return address.
CArgumentGetter(DFG::AssemblyHelpers& jit, int peekOffset = 1)
CArgumentGetter(AssemblyHelpers& jit, int peekOffset = 1)
: m_jit(jit)
, m_peekOffset(peekOffset)
, m_gprArgumentIndex(0)
......@@ -62,52 +62,52 @@ public:
{
}
void loadNext8(DFG::GPRReg destination)
void loadNext8(GPRReg destination)
{
ASSERT(!isArgumentRegister<DFG::GPRInfo>(destination));
if (m_gprArgumentIndex < DFG::GPRInfo::numberOfArgumentRegisters) {
m_jit.move(DFG::GPRInfo::toArgumentRegister(m_gprArgumentIndex++), destination);
ASSERT(!isArgumentRegister<GPRInfo>(destination));
if (m_gprArgumentIndex < GPRInfo::numberOfArgumentRegisters) {
m_jit.move(GPRInfo::toArgumentRegister(m_gprArgumentIndex++), destination);
return;
}
m_jit.load8(nextAddress(), destination);
}
void loadNext32(DFG::GPRReg destination)
void loadNext32(GPRReg destination)
{
ASSERT(!isArgumentRegister<DFG::GPRInfo>(destination));
if (m_gprArgumentIndex < DFG::GPRInfo::numberOfArgumentRegisters) {
m_jit.move(DFG::GPRInfo::toArgumentRegister(m_gprArgumentIndex++), destination);
ASSERT(!isArgumentRegister<GPRInfo>(destination));
if (m_gprArgumentIndex < GPRInfo::numberOfArgumentRegisters) {
m_jit.move(GPRInfo::toArgumentRegister(m_gprArgumentIndex++), destination);
return;
}
m_jit.load32(nextAddress(), destination);
}
void loadNext64(DFG::GPRReg destination)
void loadNext64(GPRReg destination)
{
ASSERT(!isArgumentRegister<DFG::GPRInfo>(destination));
if (m_gprArgumentIndex < DFG::GPRInfo::numberOfArgumentRegisters) {
m_jit.move(DFG::GPRInfo::toArgumentRegister(m_gprArgumentIndex++), destination);
ASSERT(!isArgumentRegister<GPRInfo>(destination));
if (m_gprArgumentIndex < GPRInfo::numberOfArgumentRegisters) {
m_jit.move(GPRInfo::toArgumentRegister(m_gprArgumentIndex++), destination);
return;
}
m_jit.load64(nextAddress(), destination);
}
void loadNextPtr(DFG::GPRReg destination)
void loadNextPtr(GPRReg destination)
{
loadNext64(destination);
}
void loadNextDouble(DFG::FPRReg destination)
void loadNextDouble(FPRReg destination)
{
ASSERT(
!isArgumentRegister<DFG::FPRInfo>(destination)
|| destination == DFG::FPRInfo::argumentFPR0);
!isArgumentRegister<FPRInfo>(destination)
|| destination == FPRInfo::argumentFPR0);
if (m_fprArgumentIndex < DFG::FPRInfo::numberOfArgumentRegisters) {
m_jit.moveDouble(DFG::FPRInfo::toArgumentRegister(m_fprArgumentIndex++), destination);
if (m_fprArgumentIndex < FPRInfo::numberOfArgumentRegisters) {
m_jit.moveDouble(FPRInfo::toArgumentRegister(m_fprArgumentIndex++), destination);
return;
}
......@@ -115,8 +115,8 @@ public:
}
void loadNextAndBox(
ValueFormat, DFG::GPRReg destination,
DFG::GPRReg scratch1 = InvalidGPRReg, DFG::GPRReg scratch2 = InvalidGPRReg);
ValueFormat, GPRReg destination,
GPRReg scratch1 = InvalidGPRReg, GPRReg scratch2 = InvalidGPRReg);
private:
MacroAssembler::Address nextAddress()
......@@ -126,7 +126,7 @@ private:
(m_peekOffset + m_stackArgumentIndex++) * sizeof(void*));
}
DFG::AssemblyHelpers& m_jit;
AssemblyHelpers& m_jit;
unsigned m_peekOffset;
unsigned m_gprArgumentIndex;
unsigned m_fprArgumentIndex;
......
......@@ -29,7 +29,7 @@
#if ENABLE(FTL_JIT)
#include "CodeBlockWithJITType.h"
#include "DFGCCallHelpers.h"
#include "CCallHelpers.h"
#include "DFGCommon.h"
#include "Disassembler.h"
#include "FTLJITCode.h"
......
......@@ -30,14 +30,14 @@
#if ENABLE(FTL_JIT)
#include "DFGCCallHelpers.h"
#include "CCallHelpers.h"
namespace JSC { namespace FTL {
class State;
struct OSRExitCompilationInfo;
class ExitThunkGenerator : public DFG::CCallHelpers {
class ExitThunkGenerator : public CCallHelpers {
public:
ExitThunkGenerator(State& state);
~ExitThunkGenerator();
......
......@@ -28,9 +28,9 @@
#if ENABLE(FTL_JIT)
#include "CCallHelpers.h"
#include "CallFrameInlines.h"
#include "CodeBlockWithJITType.h"
#include "DFGCCallHelpers.h"
#include "DFGCommon.h"
#include "FTLJITCode.h"
#include "JITStubs.h"
......
......@@ -28,9 +28,9 @@
#if ENABLE(FTL_JIT)
#include "DFGGPRInfo.h"
#include "DFGFPRInfo.h"
#include "FPRInfo.h"
#include "FTLOSRExitCompiler.h"
#include "GPRInfo.h"
#include "LinkBuffer.h"
#include "MacroAssembler.h"
......
/*
* Copyright (C) 2011 Apple Inc. All rights reserved.
* Copyright (C) 2011, 2013 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
......@@ -24,11 +24,11 @@
*/
#include "config.h"
#include "DFGAssemblyHelpers.h"