if (auto* string = tryGetAtomStringConstant(src1)) {
emitStringConstantFastPath(regT1, regT0, string);
return;
}
if (auto* string = tryGetAtomStringConstant(src2)) {
emitStringConstantFastPath(regT0, regT1, string);
return;
}
#if USE(BIGINT32)
/* At a high level we do (assuming 'type' to be StrictEq):
If (left is Double || right is Double)
goto slowPath;
result = (left == right);
if (result)
goto done;
if (left is Cell || right is Cell)
goto slowPath;
done:
return result;
*/
// This fragment implements (left is Double || right is Double), with a single branch instead of the 4 that would be naively required if we used branchIfInt32/branchIfNumber
// The trick is that if a JSValue is an Int32, then adding 1<<49 to it will make it overflow, leaving all high bits at 0
// If it is not a number at all, then 1<<49 will be its only high bit set
if (auto* string = tryGetAtomStringConstant(src1)) {
emitStringConstantFastPath(regT1, regT0, string);
return;
}
if (auto* string = tryGetAtomStringConstant(src2)) {
emitStringConstantFastPath(regT0, regT1, string);
return;
}
#if USE(BIGINT32)
/* At a high level we do (assuming 'type' to be StrictEq):
If (left is Double || right is Double)
goto slowPath;
if (left == right)
goto taken;
if (left is Cell || right is Cell)
goto slowPath;
goto notTaken;
*/
// This fragment implements (left is Double || right is Double), with a single branch instead of the 4 that would be naively required if we used branchIfInt32/branchIfNumber
// The trick is that if a JSValue is an Int32, then adding 1<<49 to it will make it overflow, leaving all high bits at 0
// If it is not a number at all, then 1<<49 will be its only high bit set