Baseline JIT should use the DFG GetById IC
https://bugs.webkit.org/show_bug.cgi?id=122861
Reviewed by Oliver Hunt.
This mostly just kills a ton of code.
Note that this doesn't yet do all of the simplifications that can be done, but it does
kill dead code. I'll have another change to simplify StructureStubInfo's unions and such.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::resetStubInternal):
* jit/JIT.cpp:
(JSC::PropertyStubCompilationInfo::copyToStubInfo):
* jit/JIT.h:
(JSC::PropertyStubCompilationInfo::PropertyStubCompilationInfo):
* jit/JITInlines.h:
(JSC::JIT::appendCallWithExceptionCheckSetJSValueResultWithProfile):
(JSC::JIT::callOperation):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::compileGetByIdHotPath):
(JSC::JIT::emitSlow_op_get_by_id):
(JSC::JIT::emitSlow_op_get_from_scope):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::compileGetByIdHotPath):
(JSC::JIT::emitSlow_op_get_by_id):
(JSC::JIT::emitSlow_op_get_from_scope):
* jit/JITStubs.cpp:
* jit/JITStubs.h:
* jit/Repatch.cpp:
(JSC::repatchGetByID):
(JSC::buildGetByIDList):
* jit/ThunkGenerators.cpp:
* jit/ThunkGenerators.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157480 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/JavaScriptCore/jit/JITInlines.h b/Source/JavaScriptCore/jit/JITInlines.h
index 39ae407..fcc1214 100644
--- a/Source/JavaScriptCore/jit/JITInlines.h
+++ b/Source/JavaScriptCore/jit/JITInlines.h
@@ -231,6 +231,18 @@
return call;
}
+ALWAYS_INLINE MacroAssembler::Call JIT::appendCallWithExceptionCheckSetJSValueResultWithProfile(const FunctionPtr& function, int dst)
+{
+ MacroAssembler::Call call = appendCallWithExceptionCheck(function);
+ emitValueProfilingSite(regT4);
+#if USE(JSVALUE64)
+ emitPutVirtualRegister(dst, returnValueRegister);
+#else
+ emitStore(dst, returnValue2Register, returnValueRegister);
+#endif
+ return call;
+}
+
ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(C_JITOperation_E operation)
{
setupArgumentsExecState();
@@ -268,6 +280,12 @@
setupArgumentsWithExecState(regOp1, regOp2, TrustedImmPtr(uid));
return appendCallWithExceptionCheck(operation);
}
+
+ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(JIT::WithProfileTag, J_JITOperation_EJI operation, int dst, GPRReg arg1, StringImpl* uid)
+{
+ setupArgumentsWithExecState(arg1, TrustedImmPtr(uid));
+ return appendCallWithExceptionCheckSetJSValueResultWithProfile(operation, dst);
+}
#endif
ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(J_JITOperation_E operation, int dst)
@@ -324,10 +342,10 @@
return appendCallWithExceptionCheckSetJSValueResult(operation, dst);
}
-ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(J_JITOperation_EPc operation, int dst, Instruction* bytecodePC)
+ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(WithProfileTag, J_JITOperation_EPc operation, int dst, Instruction* bytecodePC)
{
setupArgumentsWithExecState(TrustedImmPtr(bytecodePC));
- return appendCallWithExceptionCheckSetJSValueResult(operation, dst);
+ return appendCallWithExceptionCheckSetJSValueResultWithProfile(operation, dst);
}
ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(J_JITOperation_EZ operation, int dst, int32_t arg)
@@ -492,6 +510,12 @@
return appendCallWithExceptionCheckSetJSValueResult(operation, dst);
}
+ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(JIT::WithProfileTag, J_JITOperation_EJI operation, int dst, GPRReg arg1Tag, GPRReg arg1Payload, StringImpl* uid)
+{
+ setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1Payload, arg1Tag, TrustedImmPtr(uid));
+ return appendCallWithExceptionCheckSetJSValueResultWithProfile(operation, dst);
+}
+
ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(J_JITOperation_EJIdc operation, int dst, GPRReg arg1Tag, GPRReg arg1Payload, const Identifier* arg2)
{
setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1Payload, arg1Tag, TrustedImmPtr(arg2));