Title: [158281] trunk/Source/_javascript_Core
- Revision
- 158281
- Author
- commit-qu...@webkit.org
- Date
- 2013-10-30 10:47:32 -0700 (Wed, 30 Oct 2013)
Log Message
Add result caching for Math.cos
https://bugs.webkit.org/show_bug.cgi?id=123255
Patch by Iago Toral Quiroga <ito...@igalia.com> on 2013-10-30
Reviewed by Brent Fulgham.
* runtime/MathObject.cpp:
(JSC::mathProtoFuncCos):
* runtime/VM.h:
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (158280 => 158281)
--- trunk/Source/_javascript_Core/ChangeLog 2013-10-30 17:44:59 UTC (rev 158280)
+++ trunk/Source/_javascript_Core/ChangeLog 2013-10-30 17:47:32 UTC (rev 158281)
@@ -1,3 +1,14 @@
+2013-10-30 Iago Toral Quiroga <ito...@igalia.com>
+
+ Add result caching for Math.cos
+ https://bugs.webkit.org/show_bug.cgi?id=123255
+
+ Reviewed by Brent Fulgham.
+
+ * runtime/MathObject.cpp:
+ (JSC::mathProtoFuncCos):
+ * runtime/VM.h:
+
2013-10-30 Alex Christensen <achristen...@webkit.org>
Disabled JIT on Win64.
Modified: trunk/Source/_javascript_Core/runtime/MathObject.cpp (158280 => 158281)
--- trunk/Source/_javascript_Core/runtime/MathObject.cpp 2013-10-30 17:44:59 UTC (rev 158280)
+++ trunk/Source/_javascript_Core/runtime/MathObject.cpp 2013-10-30 17:47:32 UTC (rev 158281)
@@ -136,7 +136,7 @@
EncodedJSValue JSC_HOST_CALL mathProtoFuncCos(ExecState* exec)
{
- return JSValue::encode(jsDoubleNumber(cos(exec->argument(0).toNumber(exec))));
+ return JSValue::encode(exec->vm().cachedCos(exec->argument(0).toNumber(exec)));
}
EncodedJSValue JSC_HOST_CALL mathProtoFuncExp(ExecState* exec)
Modified: trunk/Source/_javascript_Core/runtime/VM.h (158280 => 158281)
--- trunk/Source/_javascript_Core/runtime/VM.h 2013-10-30 17:44:59 UTC (rev 158280)
+++ trunk/Source/_javascript_Core/runtime/VM.h 2013-10-30 17:47:32 UTC (rev 158281)
@@ -420,6 +420,7 @@
ThreadIdentifier exclusiveThread;
CachedTranscendentalFunction<std::sin> cachedSin;
+ CachedTranscendentalFunction<std::cos> cachedCos;
JS_EXPORT_PRIVATE void resetDateCache();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes