Changeset 225519 in webkit
- Timestamp:
- Dec 4, 2017 11:51:33 PM (6 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r225507 r225519 1 2017-12-04 JF Bastien <jfbastien@apple.com> 2 3 Math: don't redundantly check for exceptions, just release scope 4 https://bugs.webkit.org/show_bug.cgi?id=180395 5 6 Rubber stamped by Mark Lam. 7 8 Two of the exceptions checks could just have been exception scope 9 releases before the return, which is ever-so-slightly more 10 efficient. The same technically applies where we have loops over 11 parameters, but doing the scope release there isn't really more 12 efficient and is way harder to read. 13 14 * runtime/MathObject.cpp: 15 (JSC::mathProtoFuncATan2): 16 (JSC::mathProtoFuncPow): 17 1 18 2017-12-04 David Quesada <david_quesada@apple.com> 2 19 -
trunk/Source/JavaScriptCore/runtime/MathObject.cpp
r225443 r225519 154 154 double arg0 = exec->argument(0).toNumber(exec); 155 155 RETURN_IF_EXCEPTION(scope, encodedJSValue()); 156 scope.release(); 156 157 double arg1 = exec->argument(1).toNumber(exec); 157 RETURN_IF_EXCEPTION(scope, encodedJSValue());158 158 return JSValue::encode(jsDoubleNumber(atan2(arg0, arg1))); 159 159 } … … 266 266 double arg = exec->argument(0).toNumber(exec); 267 267 RETURN_IF_EXCEPTION(scope, encodedJSValue()); 268 scope.release(); 268 269 double arg2 = exec->argument(1).toNumber(exec); 269 RETURN_IF_EXCEPTION(scope, encodedJSValue());270 270 271 271 return JSValue::encode(JSValue(operationMathPow(arg, arg2)));
Note: See TracChangeset
for help on using the changeset viewer.