Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (156123 => 156124)
--- trunk/Source/_javascript_Core/ChangeLog 2013-09-19 22:23:39 UTC (rev 156123)
+++ trunk/Source/_javascript_Core/ChangeLog 2013-09-19 22:27:50 UTC (rev 156124)
@@ -1,5 +1,37 @@
2013-09-19 Filip Pizlo <[email protected]>
+ Remove some of the tautologies in DFGRepatch function naming.
+
+ Rubber stamped by Mark Hahnenberg.
+
+ For example change DFG::dfgLinkFor() to be DFG::linkFor().
+
+ * bytecode/CodeBlock.cpp:
+ (JSC::CodeBlock::resetStubInternal):
+ * dfg/DFGOperations.cpp:
+ * dfg/DFGRepatch.cpp:
+ (JSC::DFG::repatchCall):
+ (JSC::DFG::repatchByIdSelfAccess):
+ (JSC::DFG::tryCacheGetByID):
+ (JSC::DFG::repatchGetByID):
+ (JSC::DFG::buildGetByIDList):
+ (JSC::DFG::tryCachePutByID):
+ (JSC::DFG::repatchPutByID):
+ (JSC::DFG::buildPutByIdList):
+ (JSC::DFG::repatchIn):
+ (JSC::DFG::linkFor):
+ (JSC::DFG::linkSlowFor):
+ (JSC::DFG::linkClosureCall):
+ (JSC::DFG::resetGetByID):
+ (JSC::DFG::resetPutByID):
+ (JSC::DFG::resetIn):
+ * dfg/DFGRepatch.h:
+ (JSC::DFG::resetGetByID):
+ (JSC::DFG::resetPutByID):
+ (JSC::DFG::resetIn):
+
+2013-09-19 Filip Pizlo <[email protected]>
+
Unreviewed, fix Windows build. ScratchBuffer should always be available regardless of
ENABLE_DFG_JIT.
Modified: trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp (156123 => 156124)
--- trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp 2013-09-19 22:23:39 UTC (rev 156123)
+++ trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp 2013-09-19 22:27:50 UTC (rev 156124)
@@ -2382,12 +2382,12 @@
break;
case JITCode::DFGJIT:
if (isGetByIdAccess(accessType))
- DFG::dfgResetGetByID(repatchBuffer, stubInfo);
+ DFG::resetGetByID(repatchBuffer, stubInfo);
else if (isPutByIdAccess(accessType))
- DFG::dfgResetPutByID(repatchBuffer, stubInfo);
+ DFG::resetPutByID(repatchBuffer, stubInfo);
else {
RELEASE_ASSERT(isInAccess(accessType));
- DFG::dfgResetIn(repatchBuffer, stubInfo);
+ DFG::resetIn(repatchBuffer, stubInfo);
}
break;
default:
Modified: trunk/Source/_javascript_Core/dfg/DFGOperations.cpp (156123 => 156124)
--- trunk/Source/_javascript_Core/dfg/DFGOperations.cpp 2013-09-19 22:23:39 UTC (rev 156123)
+++ trunk/Source/_javascript_Core/dfg/DFGOperations.cpp 2013-09-19 22:27:50 UTC (rev 156124)
@@ -654,7 +654,7 @@
JSValue result = baseValue.get(exec, ident, slot);
if (accessType == static_cast<AccessType>(stubInfo.accessType))
- dfgBuildGetByIDList(exec, baseValue, ident, slot, stubInfo);
+ buildGetByIDList(exec, baseValue, ident, slot, stubInfo);
return JSValue::encode(result);
}
@@ -675,7 +675,7 @@
if (accessType == static_cast<AccessType>(stubInfo.accessType)) {
if (stubInfo.seen)
- dfgRepatchGetByID(exec, baseValue, ident, slot, stubInfo);
+ repatchGetByID(exec, baseValue, ident, slot, stubInfo);
else
stubInfo.seen = true;
}
@@ -704,7 +704,7 @@
RELEASE_ASSERT(accessType == stubInfo.accessType);
if (stubInfo.seen)
- dfgRepatchIn(exec, base, ident, result, slot, stubInfo);
+ repatchIn(exec, base, ident, result, slot, stubInfo);
else
stubInfo.seen = true;
@@ -973,7 +973,7 @@
return;
if (stubInfo.seen)
- dfgRepatchPutByID(exec, baseValue, ident, slot, stubInfo, NotDirect);
+ repatchPutByID(exec, baseValue, ident, slot, stubInfo, NotDirect);
else
stubInfo.seen = true;
}
@@ -998,7 +998,7 @@
return;
if (stubInfo.seen)
- dfgRepatchPutByID(exec, baseValue, ident, slot, stubInfo, NotDirect);
+ repatchPutByID(exec, baseValue, ident, slot, stubInfo, NotDirect);
else
stubInfo.seen = true;
}
@@ -1023,7 +1023,7 @@
return;
if (stubInfo.seen)
- dfgRepatchPutByID(exec, base, ident, slot, stubInfo, Direct);
+ repatchPutByID(exec, base, ident, slot, stubInfo, Direct);
else
stubInfo.seen = true;
}
@@ -1048,7 +1048,7 @@
return;
if (stubInfo.seen)
- dfgRepatchPutByID(exec, base, ident, slot, stubInfo, Direct);
+ repatchPutByID(exec, base, ident, slot, stubInfo, Direct);
else
stubInfo.seen = true;
}
@@ -1072,7 +1072,7 @@
if (accessType != static_cast<AccessType>(stubInfo.accessType))
return;
- dfgBuildPutByIdList(exec, baseValue, ident, slot, stubInfo, NotDirect);
+ buildPutByIdList(exec, baseValue, ident, slot, stubInfo, NotDirect);
}
V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(operationPutByIdNonStrictBuildList);
@@ -1094,7 +1094,7 @@
if (accessType != static_cast<AccessType>(stubInfo.accessType))
return;
- dfgBuildPutByIdList(exec, baseValue, ident, slot, stubInfo, NotDirect);
+ buildPutByIdList(exec, baseValue, ident, slot, stubInfo, NotDirect);
}
V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(operationPutByIdDirectStrictBuildList);
@@ -1116,7 +1116,7 @@
if (accessType != static_cast<AccessType>(stubInfo.accessType))
return;
- dfgBuildPutByIdList(exec, base, ident, slot, stubInfo, Direct);
+ buildPutByIdList(exec, base, ident, slot, stubInfo, Direct);
}
V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(operationPutByIdDirectNonStrictBuildList);
@@ -1138,7 +1138,7 @@
if (accessType != static_cast<AccessType>(stubInfo.accessType))
return;
- dfgBuildPutByIdList(exec, base, ident, slot, stubInfo, Direct);
+ buildPutByIdList(exec, base, ident, slot, stubInfo, Direct);
}
size_t DFG_OPERATION operationCompareLess(ExecState* exec, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2)
@@ -1310,7 +1310,7 @@
if (!callLinkInfo.seenOnce())
callLinkInfo.setSeen();
else
- dfgLinkFor(execCallee, callLinkInfo, codeBlock, callee, codePtr, kind);
+ linkFor(execCallee, callLinkInfo, codeBlock, callee, codePtr, kind);
return reinterpret_cast<char*>(codePtr.executableAddress());
}
@@ -1380,7 +1380,7 @@
return false;
}
- dfgLinkClosureCall(
+ linkClosureCall(
execCallee, callLinkInfo, codeBlock,
callee->structure(), callee->executable(), codePtr);
@@ -1394,7 +1394,7 @@
CallLinkInfo& callLinkInfo = execCallee->callerFrame()->codeBlock()->getCallLinkInfo(execCallee->returnPC());
if (!attemptToOptimizeClosureCall(execCallee, calleeAsFunctionCell, callLinkInfo))
- dfgLinkSlowFor(execCallee, callLinkInfo, CodeForCall);
+ linkSlowFor(execCallee, callLinkInfo, CodeForCall);
return result;
}
Modified: trunk/Source/_javascript_Core/dfg/DFGRepatch.cpp (156123 => 156124)
--- trunk/Source/_javascript_Core/dfg/DFGRepatch.cpp 2013-09-19 22:23:39 UTC (rev 156123)
+++ trunk/Source/_javascript_Core/dfg/DFGRepatch.cpp 2013-09-19 22:27:50 UTC (rev 156124)
@@ -43,13 +43,13 @@
namespace JSC { namespace DFG {
-static void dfgRepatchCall(CodeBlock* codeblock, CodeLocationCall call, FunctionPtr newCalleeFunction)
+static void repatchCall(CodeBlock* codeblock, CodeLocationCall call, FunctionPtr newCalleeFunction)
{
RepatchBuffer repatchBuffer(codeblock);
repatchBuffer.relink(call, newCalleeFunction);
}
-static void dfgRepatchByIdSelfAccess(CodeBlock* codeBlock, StructureStubInfo& stubInfo, Structure* structure, PropertyOffset offset, const FunctionPtr &slowPathFunction, bool compact)
+static void repatchByIdSelfAccess(CodeBlock* codeBlock, StructureStubInfo& stubInfo, Structure* structure, PropertyOffset offset, const FunctionPtr &slowPathFunction, bool compact)
{
RepatchBuffer repatchBuffer(codeBlock);
@@ -326,11 +326,11 @@
if (slot.slotBase() == baseValue) {
if (!slot.isCacheableValue()
|| !MacroAssembler::isCompactPtrAlignedAddressOffset(maxOffsetRelativeToPatchedStorage(slot.cachedOffset()))) {
- dfgRepatchCall(codeBlock, stubInfo.callReturnLocation, operationGetByIdBuildList);
+ repatchCall(codeBlock, stubInfo.callReturnLocation, operationGetByIdBuildList);
return true;
}
- dfgRepatchByIdSelfAccess(codeBlock, stubInfo, structure, slot.cachedOffset(), operationGetByIdBuildList, true);
+ repatchByIdSelfAccess(codeBlock, stubInfo, structure, slot.cachedOffset(), operationGetByIdBuildList, true);
stubInfo.initGetByIdSelf(*vm, codeBlock->ownerExecutable(), structure);
return true;
}
@@ -359,11 +359,11 @@
return true;
}
-void dfgRepatchGetByID(ExecState* exec, JSValue baseValue, const Identifier& propertyName, const PropertySlot& slot, StructureStubInfo& stubInfo)
+void repatchGetByID(ExecState* exec, JSValue baseValue, const Identifier& propertyName, const PropertySlot& slot, StructureStubInfo& stubInfo)
{
bool cached = tryCacheGetByID(exec, baseValue, propertyName, slot, stubInfo);
if (!cached)
- dfgRepatchCall(exec->codeBlock(), stubInfo.callReturnLocation, operationGetById);
+ repatchCall(exec->codeBlock(), stubInfo.callReturnLocation, operationGetById);
}
static bool getPolymorphicStructureList(
@@ -599,11 +599,11 @@
return listIndex < (POLYMORPHIC_LIST_CACHE_SIZE - 1);
}
-void dfgBuildGetByIDList(ExecState* exec, JSValue baseValue, const Identifier& propertyName, const PropertySlot& slot, StructureStubInfo& stubInfo)
+void buildGetByIDList(ExecState* exec, JSValue baseValue, const Identifier& propertyName, const PropertySlot& slot, StructureStubInfo& stubInfo)
{
bool dontChangeCall = tryBuildGetByIDList(exec, baseValue, propertyName, slot, stubInfo);
if (!dontChangeCall)
- dfgRepatchCall(exec->codeBlock(), stubInfo.callReturnLocation, operationGetById);
+ repatchCall(exec->codeBlock(), stubInfo.callReturnLocation, operationGetById);
}
static V_DFGOperation_EJCI appropriateGenericPutByIdFunction(const PutPropertySlot &slot, PutKind putKind)
@@ -991,7 +991,7 @@
return true;
}
- dfgRepatchByIdSelfAccess(codeBlock, stubInfo, structure, slot.cachedOffset(), appropriateListBuildingPutByIdFunction(slot, putKind), false);
+ repatchByIdSelfAccess(codeBlock, stubInfo, structure, slot.cachedOffset(), appropriateListBuildingPutByIdFunction(slot, putKind), false);
stubInfo.initPutByIdReplace(*vm, codeBlock->ownerExecutable(), structure);
return true;
}
@@ -999,11 +999,11 @@
return false;
}
-void dfgRepatchPutByID(ExecState* exec, JSValue baseValue, const Identifier& propertyName, const PutPropertySlot& slot, StructureStubInfo& stubInfo, PutKind putKind)
+void repatchPutByID(ExecState* exec, JSValue baseValue, const Identifier& propertyName, const PutPropertySlot& slot, StructureStubInfo& stubInfo, PutKind putKind)
{
bool cached = tryCachePutByID(exec, baseValue, propertyName, slot, stubInfo, putKind);
if (!cached)
- dfgRepatchCall(exec->codeBlock(), stubInfo.callReturnLocation, appropriateGenericPutByIdFunction(slot, putKind));
+ repatchCall(exec->codeBlock(), stubInfo.callReturnLocation, appropriateGenericPutByIdFunction(slot, putKind));
}
static bool tryBuildPutByIdList(ExecState* exec, JSValue baseValue, const Identifier& propertyName, const PutPropertySlot& slot, StructureStubInfo& stubInfo, PutKind putKind)
@@ -1092,11 +1092,11 @@
return false;
}
-void dfgBuildPutByIdList(ExecState* exec, JSValue baseValue, const Identifier& propertyName, const PutPropertySlot& slot, StructureStubInfo& stubInfo, PutKind putKind)
+void buildPutByIdList(ExecState* exec, JSValue baseValue, const Identifier& propertyName, const PutPropertySlot& slot, StructureStubInfo& stubInfo, PutKind putKind)
{
bool cached = tryBuildPutByIdList(exec, baseValue, propertyName, slot, stubInfo, putKind);
if (!cached)
- dfgRepatchCall(exec->codeBlock(), stubInfo.callReturnLocation, appropriateGenericPutByIdFunction(slot, putKind));
+ repatchCall(exec->codeBlock(), stubInfo.callReturnLocation, appropriateGenericPutByIdFunction(slot, putKind));
}
static bool tryRepatchIn(
@@ -1206,13 +1206,13 @@
return listIndex < (POLYMORPHIC_LIST_CACHE_SIZE - 1);
}
-void dfgRepatchIn(
+void repatchIn(
ExecState* exec, JSCell* base, const Identifier& ident, bool wasFound,
const PropertySlot& slot, StructureStubInfo& stubInfo)
{
if (tryRepatchIn(exec, base, ident, wasFound, slot, stubInfo))
return;
- dfgRepatchCall(exec->codeBlock(), stubInfo.callReturnLocation, operationIn);
+ repatchCall(exec->codeBlock(), stubInfo.callReturnLocation, operationIn);
}
static void linkSlowFor(RepatchBuffer& repatchBuffer, VM* vm, CallLinkInfo& callLinkInfo, CodeSpecializationKind kind)
@@ -1225,7 +1225,7 @@
repatchBuffer.relink(callLinkInfo.callReturnLocation, vm->getCTIStub(virtualConstructThunkGenerator).code());
}
-void dfgLinkFor(ExecState* exec, CallLinkInfo& callLinkInfo, CodeBlock* calleeCodeBlock, JSFunction* callee, MacroAssemblerCodePtr codePtr, CodeSpecializationKind kind)
+void linkFor(ExecState* exec, CallLinkInfo& callLinkInfo, CodeBlock* calleeCodeBlock, JSFunction* callee, MacroAssemblerCodePtr codePtr, CodeSpecializationKind kind)
{
ASSERT(!callLinkInfo.stub);
@@ -1255,7 +1255,7 @@
linkSlowFor(repatchBuffer, vm, callLinkInfo, CodeForConstruct);
}
-void dfgLinkSlowFor(ExecState* exec, CallLinkInfo& callLinkInfo, CodeSpecializationKind kind)
+void linkSlowFor(ExecState* exec, CallLinkInfo& callLinkInfo, CodeSpecializationKind kind)
{
CodeBlock* callerCodeBlock = exec->callerFrame()->codeBlock();
VM* vm = callerCodeBlock->vm();
@@ -1265,7 +1265,7 @@
linkSlowFor(repatchBuffer, vm, callLinkInfo, kind);
}
-void dfgLinkClosureCall(ExecState* exec, CallLinkInfo& callLinkInfo, CodeBlock* calleeCodeBlock, Structure* structure, ExecutableBase* executable, MacroAssemblerCodePtr codePtr)
+void linkClosureCall(ExecState* exec, CallLinkInfo& callLinkInfo, CodeBlock* calleeCodeBlock, Structure* structure, ExecutableBase* executable, MacroAssemblerCodePtr codePtr)
{
ASSERT(!callLinkInfo.stub);
@@ -1353,7 +1353,7 @@
ASSERT(!calleeCodeBlock || calleeCodeBlock->isIncomingCallAlreadyLinked(&callLinkInfo));
}
-void dfgResetGetByID(RepatchBuffer& repatchBuffer, StructureStubInfo& stubInfo)
+void resetGetByID(RepatchBuffer& repatchBuffer, StructureStubInfo& stubInfo)
{
repatchBuffer.relink(stubInfo.callReturnLocation, operationGetByIdOptimize);
CodeLocationDataLabelPtr structureLabel = stubInfo.callReturnLocation.dataLabelPtrAtOffset(-(intptr_t)stubInfo.patch.dfg.deltaCheckImmToCall);
@@ -1375,7 +1375,7 @@
repatchBuffer.relink(stubInfo.callReturnLocation.jumpAtOffset(stubInfo.patch.dfg.deltaCallToStructCheck), stubInfo.callReturnLocation.labelAtOffset(stubInfo.patch.dfg.deltaCallToSlowCase));
}
-void dfgResetPutByID(RepatchBuffer& repatchBuffer, StructureStubInfo& stubInfo)
+void resetPutByID(RepatchBuffer& repatchBuffer, StructureStubInfo& stubInfo)
{
V_DFGOperation_EJCI unoptimizedFunction = bitwise_cast<V_DFGOperation_EJCI>(MacroAssembler::readCallTarget(stubInfo.callReturnLocation).executableAddress());
V_DFGOperation_EJCI optimizedFunction;
@@ -1409,7 +1409,7 @@
repatchBuffer.relink(stubInfo.callReturnLocation.jumpAtOffset(stubInfo.patch.dfg.deltaCallToStructCheck), stubInfo.callReturnLocation.labelAtOffset(stubInfo.patch.dfg.deltaCallToSlowCase));
}
-void dfgResetIn(RepatchBuffer& repatchBuffer, StructureStubInfo& stubInfo)
+void resetIn(RepatchBuffer& repatchBuffer, StructureStubInfo& stubInfo)
{
repatchBuffer.relink(stubInfo.hotPathBegin.jumpAtOffset(0), stubInfo.callReturnLocation.labelAtOffset(stubInfo.patch.dfg.deltaCallToSlowCase));
}
Modified: trunk/Source/_javascript_Core/dfg/DFGRepatch.h (156123 => 156124)
--- trunk/Source/_javascript_Core/dfg/DFGRepatch.h 2013-09-19 22:23:39 UTC (rev 156123)
+++ trunk/Source/_javascript_Core/dfg/DFGRepatch.h 2013-09-19 22:27:50 UTC (rev 156124)
@@ -35,18 +35,18 @@
namespace JSC { namespace DFG {
-void dfgRepatchGetByID(ExecState*, JSValue, const Identifier&, const PropertySlot&, StructureStubInfo&);
-void dfgBuildGetByIDList(ExecState*, JSValue, const Identifier&, const PropertySlot&, StructureStubInfo&);
-void dfgBuildGetByIDProtoList(ExecState*, JSValue, const Identifier&, const PropertySlot&, StructureStubInfo&);
-void dfgRepatchPutByID(ExecState*, JSValue, const Identifier&, const PutPropertySlot&, StructureStubInfo&, PutKind);
-void dfgBuildPutByIdList(ExecState*, JSValue, const Identifier&, const PutPropertySlot&, StructureStubInfo&, PutKind);
-void dfgRepatchIn(ExecState*, JSCell*, const Identifier&, bool wasFound, const PropertySlot&, StructureStubInfo&);
-void dfgLinkFor(ExecState*, CallLinkInfo&, CodeBlock*, JSFunction* callee, MacroAssemblerCodePtr, CodeSpecializationKind);
-void dfgLinkSlowFor(ExecState*, CallLinkInfo&, CodeSpecializationKind);
-void dfgLinkClosureCall(ExecState*, CallLinkInfo&, CodeBlock*, Structure*, ExecutableBase*, MacroAssemblerCodePtr);
-void dfgResetGetByID(RepatchBuffer&, StructureStubInfo&);
-void dfgResetPutByID(RepatchBuffer&, StructureStubInfo&);
-void dfgResetIn(RepatchBuffer&, StructureStubInfo&);
+void repatchGetByID(ExecState*, JSValue, const Identifier&, const PropertySlot&, StructureStubInfo&);
+void buildGetByIDList(ExecState*, JSValue, const Identifier&, const PropertySlot&, StructureStubInfo&);
+void buildGetByIDProtoList(ExecState*, JSValue, const Identifier&, const PropertySlot&, StructureStubInfo&);
+void repatchPutByID(ExecState*, JSValue, const Identifier&, const PutPropertySlot&, StructureStubInfo&, PutKind);
+void buildPutByIdList(ExecState*, JSValue, const Identifier&, const PutPropertySlot&, StructureStubInfo&, PutKind);
+void repatchIn(ExecState*, JSCell*, const Identifier&, bool wasFound, const PropertySlot&, StructureStubInfo&);
+void linkFor(ExecState*, CallLinkInfo&, CodeBlock*, JSFunction* callee, MacroAssemblerCodePtr, CodeSpecializationKind);
+void linkSlowFor(ExecState*, CallLinkInfo&, CodeSpecializationKind);
+void linkClosureCall(ExecState*, CallLinkInfo&, CodeBlock*, Structure*, ExecutableBase*, MacroAssemblerCodePtr);
+void resetGetByID(RepatchBuffer&, StructureStubInfo&);
+void resetPutByID(RepatchBuffer&, StructureStubInfo&);
+void resetIn(RepatchBuffer&, StructureStubInfo&);
} } // namespace JSC::DFG
@@ -61,9 +61,9 @@
namespace DFG {
-inline NO_RETURN_DUE_TO_CRASH void dfgResetGetByID(RepatchBuffer&, StructureStubInfo&) { RELEASE_ASSERT_NOT_REACHED(); }
-inline NO_RETURN_DUE_TO_CRASH void dfgResetPutByID(RepatchBuffer&, StructureStubInfo&) { RELEASE_ASSERT_NOT_REACHED(); }
-inline NO_RETURN void dfgResetIn(RepatchBuffer&, StructureStubInfo&) { RELEASE_ASSERT_NOT_REACHED(); }
+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::DFG