Modified: trunk/Source/_javascript_Core/ChangeLog (288398 => 288399)
--- trunk/Source/_javascript_Core/ChangeLog 2022-01-22 02:22:29 UTC (rev 288398)
+++ trunk/Source/_javascript_Core/ChangeLog 2022-01-22 03:03:00 UTC (rev 288399)
@@ -1,3 +1,15 @@
+2022-01-21 Yusuke Suzuki <ysuz...@apple.com>
+
+ Unreviewed, follow-up after r288066
+ https://bugs.webkit.org/show_bug.cgi?id=235271
+
+ * runtime/DatePrototype.cpp:
+ (JSC::applyToNumberToOtherwiseIgnoredArguments):
+ (JSC::fillStructuresUsingDateArgs):
+ (JSC::setNewValueFromTimeArgs):
+ (JSC::setNewValueFromDateArgs):
+ (JSC::applyToNumbersToTrashedArguments): Deleted.
+
2022-01-21 Mike Gorse <mgo...@suse.com>
Build failure with g++ 12: std::exchange undefined
Modified: trunk/Source/_javascript_Core/runtime/DatePrototype.cpp (288398 => 288399)
--- trunk/Source/_javascript_Core/runtime/DatePrototype.cpp 2022-01-22 02:22:29 UTC (rev 288398)
+++ trunk/Source/_javascript_Core/runtime/DatePrototype.cpp 2022-01-22 03:03:00 UTC (rev 288399)
@@ -110,7 +110,7 @@
}
-static void applyToNumbersToTrashedArguments(JSGlobalObject* globalObject, CallFrame* callFrame, unsigned maxArgs)
+static void applyToNumberToOtherwiseIgnoredArguments(JSGlobalObject* globalObject, CallFrame* callFrame, unsigned maxArgs)
{
VM& vm = globalObject->vm();
auto scope = DECLARE_THROW_SCOPE(vm);
@@ -188,7 +188,7 @@
if (maxArgs >= 3 && idx < numArgs) {
double years = callFrame->uncheckedArgument(idx++).toIntegerPreserveNaN(globalObject);
RETURN_IF_EXCEPTION(scope, false);
- ok = (ok && std::isfinite(years));
+ ok = ok && std::isfinite(years);
t->setYear(toInt32(years));
}
// months
@@ -195,7 +195,7 @@
if (maxArgs >= 2 && idx < numArgs) {
double months = callFrame->uncheckedArgument(idx++).toIntegerPreserveNaN(globalObject);
RETURN_IF_EXCEPTION(scope, false);
- ok = (ok && std::isfinite(months));
+ ok = ok && std::isfinite(months);
t->setMonth(toInt32(months));
}
// days
@@ -202,7 +202,7 @@
if (idx < numArgs) {
double days = callFrame->uncheckedArgument(idx++).toIntegerPreserveNaN(globalObject);
RETURN_IF_EXCEPTION(scope, false);
- ok = (ok && std::isfinite(days));
+ ok = ok && std::isfinite(days);
t->setMonthDay(0);
*ms += days * msPerDay;
}
@@ -679,7 +679,7 @@
double milli = thisDateObj->internalNumber();
if (!callFrame->argumentCount() || std::isnan(milli)) {
- applyToNumbersToTrashedArguments(globalObject, callFrame, numArgsToUse);
+ applyToNumberToOtherwiseIgnoredArguments(globalObject, callFrame, numArgsToUse);
RETURN_IF_EXCEPTION(scope, { });
thisDateObj->setInternalNumber(PNaN);
return JSValue::encode(jsNaN());
@@ -692,7 +692,7 @@
? thisDateObj->gregorianDateTimeUTC(cache)
: thisDateObj->gregorianDateTime(cache);
if (!other) {
- applyToNumbersToTrashedArguments(globalObject, callFrame, numArgsToUse);
+ applyToNumberToOtherwiseIgnoredArguments(globalObject, callFrame, numArgsToUse);
RETURN_IF_EXCEPTION(scope, { });
return JSValue::encode(jsNaN());
}
@@ -723,7 +723,7 @@
return throwVMTypeError(globalObject, scope);
if (!callFrame->argumentCount()) {
- applyToNumbersToTrashedArguments(globalObject, callFrame, numArgsToUse);
+ applyToNumberToOtherwiseIgnoredArguments(globalObject, callFrame, numArgsToUse);
RETURN_IF_EXCEPTION(scope, { });
thisDateObj->setInternalNumber(PNaN);
return JSValue::encode(jsNaN());
@@ -741,7 +741,7 @@
? thisDateObj->gregorianDateTimeUTC(cache)
: thisDateObj->gregorianDateTime(cache);
if (!other) {
- applyToNumbersToTrashedArguments(globalObject, callFrame, numArgsToUse);
+ applyToNumberToOtherwiseIgnoredArguments(globalObject, callFrame, numArgsToUse);
RETURN_IF_EXCEPTION(scope, { });
return JSValue::encode(jsNaN());
}