Skip to content

Commit

Permalink
[JSC] Remove ValueProfile from tail calls
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=259471
rdar://112820068

Reviewed by Keith Miller.

This patch removes ValueProfile from tail calls since they are never used effectively (because of tail calls!).

* Source/JavaScriptCore/bytecode/BytecodeList.rb:
* Source/JavaScriptCore/bytecode/CodeBlock.cpp:
(JSC::CodeBlock::finishCreation):
* Source/JavaScriptCore/bytecode/Opcode.h:
* Source/JavaScriptCore/jit/JITCall.cpp:
(JSC::JIT::compileOpCall):
* Source/JavaScriptCore/llint/LowLevelInterpreter.asm:
* Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm:
* Source/JavaScriptCore/llint/LowLevelInterpreter64.asm:

Canonical link: https://commits.webkit.org/266328@main
  • Loading branch information
Constellation committed Jul 26, 2023
1 parent aeb697f commit 92d9b98
Show file tree
Hide file tree
Showing 36 changed files with 162 additions and 97 deletions.
1 change: 1 addition & 0 deletions JSTests/stress/arith-abs-on-various-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ function testAllTypesCall() {
throw "Failed testAllTypesCall for input " + testCaseInput[0] + " expected " + testCaseInput[1] + " got " + output;
}
}
// Because DoubleRep has three UseKinds we could pick before getting to the generic version
if (numberOfDFGCompiles(opaqueAllTypesAbs) > 3)
throw "We should have detected abs() was polymorphic and generated a generic version.";
}
Expand Down
3 changes: 2 additions & 1 deletion JSTests/stress/arith-acos-on-various-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ function testAllTypesCall() {
throw "Failed testAllTypesCall for input " + testCaseInput[0] + " expected " + testCaseInput[1] + " got " + output;
}
}
if (numberOfDFGCompiles(opaqueAllTypesACos) > 2)
// Because DoubleRep has three UseKinds we could pick before getting to the generic version
if (numberOfDFGCompiles(opaqueAllTypesACos) > 3)
throw "We should have detected acos() was polymorphic and generated a generic version.";
}
testAllTypesCall();
Expand Down
3 changes: 2 additions & 1 deletion JSTests/stress/arith-acosh-on-various-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ function testAllTypesCall() {
throw "Failed testAllTypesCall for input " + testCaseInput[0] + " expected " + testCaseInput[1] + " got " + output;
}
}
if (numberOfDFGCompiles(opaqueAllTypesACosh) > 2)
// Because DoubleRep has three UseKinds we could pick before getting to the generic version
if (numberOfDFGCompiles(opaqueAllTypesACosh) > 3)
throw "We should have detected acosh() was polymorphic and generated a generic version.";
}
testAllTypesCall();
Expand Down
3 changes: 2 additions & 1 deletion JSTests/stress/arith-asin-on-various-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ function testAllTypesCall() {
throw "Failed testAllTypesCall for input " + testCaseInput[0] + " expected " + testCaseInput[1] + " got " + output;
}
}
if (numberOfDFGCompiles(opaqueAllTypesASin) > 2)
// Because DoubleRep has three UseKinds we could pick before getting to the generic version
if (numberOfDFGCompiles(opaqueAllTypesASin) > 3)
throw "We should have detected asin() was polymorphic and generated a generic version.";
}
testAllTypesCall();
Expand Down
3 changes: 2 additions & 1 deletion JSTests/stress/arith-asinh-on-various-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ function testAllTypesCall() {
throw "Failed testAllTypesCall for input " + testCaseInput[0] + " expected " + testCaseInput[1] + " got " + output;
}
}
if (numberOfDFGCompiles(opaqueAllTypesASinh) > 2)
// Because DoubleRep has three UseKinds we could pick before getting to the generic version
if (numberOfDFGCompiles(opaqueAllTypesASinh) > 3)
throw "We should have detected asinh() was polymorphic and generated a generic version.";
}
testAllTypesCall();
Expand Down
3 changes: 2 additions & 1 deletion JSTests/stress/arith-atan-on-various-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ function testAllTypesCall() {
throw "Failed testAllTypesCall for input " + testCaseInput[0] + " expected " + testCaseInput[1] + " got " + output;
}
}
if (numberOfDFGCompiles(opaqueAllTypesATan) > 2)
// Because DoubleRep has three UseKinds we could pick before getting to the generic version
if (numberOfDFGCompiles(opaqueAllTypesATan) > 3)
throw "We should have detected atan() was polymorphic and generated a generic version.";
}
testAllTypesCall();
Expand Down
3 changes: 2 additions & 1 deletion JSTests/stress/arith-atanh-on-various-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ function testAllTypesCall() {
throw "Failed testAllTypesCall for input " + testCaseInput[0] + " expected " + testCaseInput[1] + " got " + output;
}
}
if (numberOfDFGCompiles(opaqueAllTypesATanh) > 2)
// Because DoubleRep has three UseKinds we could pick before getting to the generic version
if (numberOfDFGCompiles(opaqueAllTypesATanh) > 3)
throw "We should have detected atanh() was polymorphic and generated a generic version.";
}
testAllTypesCall();
Expand Down
3 changes: 2 additions & 1 deletion JSTests/stress/arith-cbrt-on-various-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ function testAllTypesCall() {
throw "Failed testAllTypesCall for input " + testCaseInput[0] + " expected " + testCaseInput[1] + " got " + output;
}
}
if (numberOfDFGCompiles(opaqueAllTypesCbrt) > 2)
// Because DoubleRep has three UseKinds we could pick before getting to the generic version
if (numberOfDFGCompiles(opaqueAllTypesCbrt) > 3)
throw "We should have detected cbrt() was polymorphic and generated a generic version.";
}
testAllTypesCall();
Expand Down
2 changes: 2 additions & 0 deletions JSTests/stress/arith-ceil-on-various-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ function testAllTypesCall() {
throw "Failed testAllTypesCall for input " + testCaseInput[0] + " expected " + testCaseInput[1] + " got " + output;
}
}
// Because DoubleRep has three UseKinds we could pick before getting to the generic version
if (numberOfDFGCompiles(opaqueAllTypesCeil) > 3)
throw "We should have detected ceil() was polymorphic and generated a generic version.";
}
Expand All @@ -111,6 +112,7 @@ function testAllTypesWithoutNegativeZeroCall() {
throw "Failed testAllTypesWithoutNegativeZeroCall for input " + testCaseInput[0] + " expected " + testCaseInput[1] + " got " + output;
}
}
// Because DoubleRep has three UseKinds we could pick before getting to the generic version
if (numberOfDFGCompiles(opaqueAllTypesCeil) > 3)
throw "We should have detected ceil() was polymorphic and generated a generic version.";
}
Expand Down
3 changes: 2 additions & 1 deletion JSTests/stress/arith-clz32-on-various-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ function testAllTypesCall() {
throw "Failed testAllTypesCall for input " + testCaseInput[0] + " expected " + testCaseInput[1] + " got " + output;
}
}
if (numberOfDFGCompiles(opaqueAllTypesClz32) > 2)
// Because DoubleRep has three UseKinds we could pick before getting to the generic version
if (numberOfDFGCompiles(opaqueAllTypesClz32) > 3)
throw "We should have detected clz32() was polymorphic and generated a generic version.";
}
testAllTypesCall();
Expand Down
3 changes: 2 additions & 1 deletion JSTests/stress/arith-cos-on-various-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ function testAllTypesCall() {
throw "Failed testAllTypesCall for input " + testCaseInput[0] + " expected " + testCaseInput[1] + " got " + output;
}
}
if (numberOfDFGCompiles(opaqueAllTypesCos) > 2)
// Because DoubleRep has three UseKinds we could pick before getting to the generic version
if (numberOfDFGCompiles(opaqueAllTypesCos) > 3)
throw "We should have detected cos() was polymorphic and generated a generic version.";
}
testAllTypesCall();
Expand Down
3 changes: 2 additions & 1 deletion JSTests/stress/arith-cosh-on-various-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ function testAllTypesCall() {
throw "Failed testAllTypesCall for input " + testCaseInput[0] + " expected " + testCaseInput[1] + " got " + output;
}
}
if (numberOfDFGCompiles(opaqueAllTypesCosh) > 2)
// Because DoubleRep has three UseKinds we could pick before getting to the generic version
if (numberOfDFGCompiles(opaqueAllTypesCosh) > 3)
throw "We should have detected cosh() was polymorphic and generated a generic version.";
}
testAllTypesCall();
Expand Down
3 changes: 2 additions & 1 deletion JSTests/stress/arith-expm1-on-various-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ function testAllTypesCall() {
throw "Failed testAllTypesCall for input " + testCaseInput[0] + " expected " + testCaseInput[1] + " got " + output;
}
}
if (numberOfDFGCompiles(opaqueAllTypesExpm1) > 2)
// Because DoubleRep has three UseKinds we could pick before getting to the generic version
if (numberOfDFGCompiles(opaqueAllTypesExpm1) > 3)
throw "We should have detected expm1() was polymorphic and generated a generic version.";
}
testAllTypesCall();
Expand Down
1 change: 1 addition & 0 deletions JSTests/stress/arith-floor-on-various-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ function testAllTypesCall() {
throw "Failed testAllTypesCall for input " + testCaseInput[0] + " expected " + testCaseInput[1] + " got " + output;
}
}
// Because DoubleRep has three UseKinds we could pick before getting to the generic version
if (numberOfDFGCompiles(opaqueAllTypesFloor) > 3)
throw "We should have detected floor() was polymorphic and generated a generic version.";
}
Expand Down
3 changes: 2 additions & 1 deletion JSTests/stress/arith-fround-on-various-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ function testAllTypesCall() {
throw "Failed testAllTypesCall for input " + testCaseInput[0] + " expected " + testCaseInput[1] + " got " + output;
}
}
if (numberOfDFGCompiles(opaqueAllTypesFround) > 2)
// Because DoubleRep has three UseKinds we could pick before getting to the generic version
if (numberOfDFGCompiles(opaqueAllTypesFround) > 3)
throw "We should have detected fround() was polymorphic and generated a generic version.";
}
testAllTypesCall();
Expand Down
3 changes: 2 additions & 1 deletion JSTests/stress/arith-log-on-various-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ function testAllTypesCall() {
throw "Failed testAllTypesCall for input " + testCaseInput[0] + " expected " + testCaseInput[1] + " got " + output;
}
}
if (numberOfDFGCompiles(opaqueAllTypesLog) > 2)
// Because DoubleRep has three UseKinds we could pick before getting to the generic version
if (numberOfDFGCompiles(opaqueAllTypesLog) > 3)
throw "We should have detected log() was polymorphic and generated a generic version.";
}
testAllTypesCall();
Expand Down
3 changes: 2 additions & 1 deletion JSTests/stress/arith-log10-on-various-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ function testAllTypesCall() {
throw "Failed testAllTypesCall for input " + testCaseInput[0] + " expected " + testCaseInput[1] + " got " + output;
}
}
if (numberOfDFGCompiles(opaqueAllTypesLog10) > 2)
// Because DoubleRep has three UseKinds we could pick before getting to the generic version
if (numberOfDFGCompiles(opaqueAllTypesLog10) > 3)
throw "We should have detected log10() was polymorphic and generated a generic version.";
}
testAllTypesCall();
Expand Down
3 changes: 2 additions & 1 deletion JSTests/stress/arith-log2-on-various-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ function testAllTypesCall() {
throw "Failed testAllTypesCall for input " + testCaseInput[0] + " expected " + testCaseInput[1] + " got " + output;
}
}
if (numberOfDFGCompiles(opaqueAllTypesLog2) > 2)
// Because DoubleRep has three UseKinds we could pick before getting to the generic version
if (numberOfDFGCompiles(opaqueAllTypesLog2) > 3)
throw "We should have detected log2() was polymorphic and generated a generic version.";
}
testAllTypesCall();
Expand Down
1 change: 1 addition & 0 deletions JSTests/stress/arith-negate-on-various-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ function testAllTypesCall() {
throw "Failed testAllTypesCall for input " + testCaseInput[0] + " expected " + testCaseInput[1] + " got " + output;
}
}
// Because DoubleRep has three UseKinds we could pick before getting to the generic version
if (numberOfDFGCompiles(opaqueAllTypesNegate) > 3)
throw "We should have detected negate was polymorphic and generated a generic version.";
}
Expand Down
2 changes: 2 additions & 0 deletions JSTests/stress/arith-round-on-various-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ function testAllTypesCall() {
throw "Failed testAllTypesCall for input " + testCaseInput[0] + " expected " + testCaseInput[1] + " got " + output;
}
}
// Because DoubleRep has three UseKinds we could pick before getting to the generic version
if (numberOfDFGCompiles(opaqueAllTypesRound) > 3)
throw "We should have detected round() was polymorphic and generated a generic version.";
}
Expand All @@ -111,6 +112,7 @@ function testAllTypesWithoutNegativeZeroCall() {
throw "Failed testAllTypesWithoutNegativeZeroCall for input " + testCaseInput[0] + " expected " + testCaseInput[1] + " got " + output;
}
}
// Because DoubleRep has three UseKinds we could pick before getting to the generic version
if (numberOfDFGCompiles(opaqueAllTypesRound) > 3)
throw "We should have detected round() was polymorphic and generated a generic version.";
}
Expand Down
3 changes: 2 additions & 1 deletion JSTests/stress/arith-sin-on-various-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ function testAllTypesCall() {
throw "Failed testAllTypesCall for input " + testCaseInput[0] + " expected " + testCaseInput[1] + " got " + output;
}
}
if (numberOfDFGCompiles(opaqueAllTypesSin) > 2)
// Because DoubleRep has three UseKinds we could pick before getting to the generic version
if (numberOfDFGCompiles(opaqueAllTypesSin) > 3)
throw "We should have detected sin() was polymorphic and generated a generic version.";
}
testAllTypesCall();
Expand Down
3 changes: 2 additions & 1 deletion JSTests/stress/arith-sinh-on-various-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ function testAllTypesCall() {
throw "Failed testAllTypesCall for input " + testCaseInput[0] + " expected " + testCaseInput[1] + " got " + output;
}
}
if (numberOfDFGCompiles(opaqueAllTypesSinh) > 2)
// Because DoubleRep has three UseKinds we could pick before getting to the generic version
if (numberOfDFGCompiles(opaqueAllTypesSinh) > 3)
throw "We should have detected sinh() was polymorphic and generated a generic version.";
}
testAllTypesCall();
Expand Down
3 changes: 2 additions & 1 deletion JSTests/stress/arith-sqrt-on-various-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ function testAllTypesCall() {
throw "Failed testAllTypesCall for input " + testCaseInput[0] + " expected " + testCaseInput[1] + " got " + output;
}
}
if (numberOfDFGCompiles(opaqueAllTypesSqrt) > 2)
// Because DoubleRep has three UseKinds we could pick before getting to the generic version
if (numberOfDFGCompiles(opaqueAllTypesSqrt) > 3)
throw "We should have detected sqrt() was polymorphic and generated a generic version.";
}
testAllTypesCall();
Expand Down
3 changes: 2 additions & 1 deletion JSTests/stress/arith-tan-on-various-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ function testAllTypesCall() {
throw "Failed testAllTypesCall for input " + testCaseInput[0] + " expected " + testCaseInput[1] + " got " + output;
}
}
if (numberOfDFGCompiles(opaqueAllTypesTan) > 2)
// Because DoubleRep has three UseKinds we could pick before getting to the generic version
if (numberOfDFGCompiles(opaqueAllTypesTan) > 3)
throw "We should have detected tan() was polymorphic and generated a generic version.";
}
testAllTypesCall();
Expand Down
3 changes: 2 additions & 1 deletion JSTests/stress/arith-tanh-on-various-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ function testAllTypesCall() {
throw "Failed testAllTypesCall for input " + testCaseInput[0] + " expected " + testCaseInput[1] + " got " + output;
}
}
if (numberOfDFGCompiles(opaqueAllTypesTanh) > 2)
// Because DoubleRep has three UseKinds we could pick before getting to the generic version
if (numberOfDFGCompiles(opaqueAllTypesTanh) > 3)
throw "We should have detected tanh() was polymorphic and generated a generic version.";
}
testAllTypesCall();
Expand Down
2 changes: 2 additions & 0 deletions JSTests/stress/arith-trunc-on-various-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ function testAllTypesCall() {
throw "Failed testAllTypesCall for input " + testCaseInput[0] + " expected " + testCaseInput[1] + " got " + output;
}
}
// Because DoubleRep has three UseKinds we could pick before getting to the generic version
if (numberOfDFGCompiles(opaqueAllTypesTrunc) > 3)
throw "We should have detected trunc() was polymorphic and generated a generic version.";
}
Expand All @@ -111,6 +112,7 @@ function testAllTypesWithoutNegativeZeroCall() {
throw "Failed testAllTypesWithoutNegativeZeroCall for input " + testCaseInput[0] + " expected " + testCaseInput[1] + " got " + output;
}
}
// Because DoubleRep has three UseKinds we could pick before getting to the generic version
if (numberOfDFGCompiles(opaqueAllTypesTrunc) > 3)
throw "We should have detected trunc() was polymorphic and generated a generic version.";
}
Expand Down
3 changes: 0 additions & 3 deletions Source/JavaScriptCore/bytecode/BytecodeList.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@
},
metadata: {
callLinkInfo: BaselineCallLinkInfo,
profile: ValueProfile,
},
tmps: {
argCountIncludingThis: unsigned
Expand Down Expand Up @@ -302,7 +301,6 @@
metadata: {
callLinkInfo: BaselineCallLinkInfo,
arrayProfile: ArrayProfile,
profile: ValueProfile,
}

op :call_direct_eval,
Expand Down Expand Up @@ -331,7 +329,6 @@
},
metadata: {
callLinkInfo: BaselineCallLinkInfo,
profile: ValueProfile,
}

op_group :CreateInternalFieldObjectOp,
Expand Down
6 changes: 3 additions & 3 deletions Source/JavaScriptCore/bytecode/CodeBlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -523,14 +523,14 @@ bool CodeBlock::finishCreation(VM& vm, ScriptExecutable* ownerExecutable, Unlink
LINK(OpProfileControlFlow)

LINK(OpCall, callLinkInfo, profile)
LINK(OpTailCall, callLinkInfo, profile)
LINK(OpTailCall, callLinkInfo)
LINK(OpCallDirectEval, callLinkInfo, profile)
LINK(OpConstruct, callLinkInfo, profile)
LINK(OpIteratorOpen, callLinkInfo)
LINK(OpIteratorNext, callLinkInfo)
LINK(OpCallVarargs, callLinkInfo, profile)
LINK(OpTailCallVarargs, callLinkInfo, profile)
LINK(OpTailCallForwardArguments, callLinkInfo, profile)
LINK(OpTailCallVarargs, callLinkInfo)
LINK(OpTailCallForwardArguments, callLinkInfo)
LINK(OpConstructVarargs, callLinkInfo, profile)

case op_new_array_with_species: {
Expand Down
2 changes: 1 addition & 1 deletion Source/JavaScriptCore/bytecode/CodeBlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ class CodeBlock : public JSCell {
return result;
}

ValueProfile* tryGetValueProfileForBytecodeIndex(BytecodeIndex);
ValueProfile& valueProfileForBytecodeIndex(BytecodeIndex);
SpeculatedType valueProfilePredictionForBytecodeIndex(const ConcurrentJSLocker&, BytecodeIndex);

Expand Down Expand Up @@ -905,7 +906,6 @@ class CodeBlock : public JSCell {

unsigned numberOfNonArgumentValueProfiles() { return totalNumberOfValueProfiles() - numberOfArgumentValueProfiles(); }
unsigned totalNumberOfValueProfiles() { return m_unlinkedCode->numberOfValueProfiles(); }
ValueProfile* tryGetValueProfileForBytecodeIndex(BytecodeIndex);

Seconds timeSinceCreation()
{
Expand Down
3 changes: 0 additions & 3 deletions Source/JavaScriptCore/bytecode/Opcode.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,6 @@ static constexpr unsigned bitWidthForMaxBytecodeStructLength = WTF::getMSBSetCon

#define FOR_EACH_OPCODE_WITH_VALUE_PROFILE(macro) \
macro(OpCallVarargs) \
macro(OpTailCallVarargs) \
macro(OpTailCallForwardArguments) \
macro(OpConstructVarargs) \
macro(OpGetByVal) \
macro(OpEnumeratorGetByVal) \
Expand All @@ -119,7 +117,6 @@ static constexpr unsigned bitWidthForMaxBytecodeStructLength = WTF::getMSBSetCon
macro(OpGetInternalField) \
macro(OpToThis) \
macro(OpCall) \
macro(OpTailCall) \
macro(OpCallDirectEval) \
macro(OpConstruct) \
macro(OpGetFromScope) \
Expand Down
28 changes: 26 additions & 2 deletions Source/JavaScriptCore/dfg/DFGGraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1751,8 +1751,32 @@ MethodOfGettingAValueProfile Graph::methodOfGettingAValueProfileFor(Node* curren
return MethodOfGettingAValueProfile::lazyOperandValueProfile(node->origin.semantic, node->operand());
}

if (node->hasHeapPrediction())
return MethodOfGettingAValueProfile::bytecodeValueProfile(node->origin.semantic);
if (node->hasHeapPrediction()) {
auto instruction = profiledBlock->instructions().at(node->origin.semantic.bytecodeIndex());
OpcodeID opcodeID = instruction->opcodeID();
switch (opcodeID) {
case op_tail_call:
case op_tail_call_varargs:
case op_tail_call_forward_arguments: {
InlineCallFrame* inlineCallFrame = node->origin.semantic.inlineCallFrame();
if (!inlineCallFrame)
return { }; // TailCall in the outermost function.

CodeOrigin* codeOrigin = inlineCallFrame->getCallerSkippingTailCalls();
if (!codeOrigin)
return { };

CodeBlock* callerBlock = baselineCodeBlockFor(*codeOrigin);
auto* valueProfile = callerBlock->tryGetValueProfileForBytecodeIndex(codeOrigin->bytecodeIndex());
if (!valueProfile)
return { };

return MethodOfGettingAValueProfile::bytecodeValueProfile(*codeOrigin);
}
default:
return MethodOfGettingAValueProfile::bytecodeValueProfile(node->origin.semantic);
}
}

if (profiledBlock->hasBaselineJITProfiling()) {
if (profiledBlock->binaryArithProfileForBytecodeIndex(node->origin.semantic.bytecodeIndex()))
Expand Down
1 change: 0 additions & 1 deletion Source/JavaScriptCore/dfg/DFGNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -1902,7 +1902,6 @@ struct Node {
bool hasHeapPrediction()
{
switch (op()) {
case ArithAbs:
case ArithRound:
case ArithFloor:
case ArithCeil:
Expand Down
Loading

0 comments on commit 92d9b98

Please sign in to comment.