Title: [225519] trunk/Source/_javascript_Core
- Revision
- 225519
- Author
- [email protected]
- Date
- 2017-12-04 23:51:33 -0800 (Mon, 04 Dec 2017)
Log Message
Math: don't redundantly check for exceptions, just release scope
https://bugs.webkit.org/show_bug.cgi?id=180395
Rubber stamped by Mark Lam.
Two of the exceptions checks could just have been exception scope
releases before the return, which is ever-so-slightly more
efficient. The same technically applies where we have loops over
parameters, but doing the scope release there isn't really more
efficient and is way harder to read.
* runtime/MathObject.cpp:
(JSC::mathProtoFuncATan2):
(JSC::mathProtoFuncPow):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (225518 => 225519)
--- trunk/Source/_javascript_Core/ChangeLog 2017-12-05 06:25:56 UTC (rev 225518)
+++ trunk/Source/_javascript_Core/ChangeLog 2017-12-05 07:51:33 UTC (rev 225519)
@@ -1,3 +1,20 @@
+2017-12-04 JF Bastien <[email protected]>
+
+ Math: don't redundantly check for exceptions, just release scope
+ https://bugs.webkit.org/show_bug.cgi?id=180395
+
+ Rubber stamped by Mark Lam.
+
+ Two of the exceptions checks could just have been exception scope
+ releases before the return, which is ever-so-slightly more
+ efficient. The same technically applies where we have loops over
+ parameters, but doing the scope release there isn't really more
+ efficient and is way harder to read.
+
+ * runtime/MathObject.cpp:
+ (JSC::mathProtoFuncATan2):
+ (JSC::mathProtoFuncPow):
+
2017-12-04 David Quesada <[email protected]>
Add a class for parsing application manifests
Modified: trunk/Source/_javascript_Core/runtime/MathObject.cpp (225518 => 225519)
--- trunk/Source/_javascript_Core/runtime/MathObject.cpp 2017-12-05 06:25:56 UTC (rev 225518)
+++ trunk/Source/_javascript_Core/runtime/MathObject.cpp 2017-12-05 07:51:33 UTC (rev 225519)
@@ -153,8 +153,8 @@
auto scope = DECLARE_THROW_SCOPE(vm);
double arg0 = exec->argument(0).toNumber(exec);
RETURN_IF_EXCEPTION(scope, encodedJSValue());
+ scope.release();
double arg1 = exec->argument(1).toNumber(exec);
- RETURN_IF_EXCEPTION(scope, encodedJSValue());
return JSValue::encode(jsDoubleNumber(atan2(arg0, arg1)));
}
@@ -265,8 +265,8 @@
double arg = exec->argument(0).toNumber(exec);
RETURN_IF_EXCEPTION(scope, encodedJSValue());
+ scope.release();
double arg2 = exec->argument(1).toNumber(exec);
- RETURN_IF_EXCEPTION(scope, encodedJSValue());
return JSValue::encode(JSValue(operationMathPow(arg, arg2)));
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes