[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
andreas.kling at nokia.com
andreas.kling at nokia.com
Wed Dec 22 12:19:17 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit e13e51534f21680fd1cadafa77e6a4782163977b
Author: andreas.kling at nokia.com <andreas.kling at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Aug 19 05:56:30 2010 +0000
2010-08-18 Andreas Kling <andreas.kling at nokia.com>
Reviewed by Geoffrey Garen.
REGRESSION(r58469): Math.pow() always returns double-backed JSValue which is extremely slow as array subscript
https://bugs.webkit.org/show_bug.cgi?id=43742
Add codegen for pow() to return Int32 values when possible.
* jit/ThunkGenerators.cpp:
(JSC::powThunkGenerator):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65653 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 1c7f689..a704d2f 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,15 @@
+2010-08-18 Andreas Kling <andreas.kling at nokia.com>
+
+ Reviewed by Geoffrey Garen.
+
+ REGRESSION(r58469): Math.pow() always returns double-backed JSValue which is extremely slow as array subscript
+ https://bugs.webkit.org/show_bug.cgi?id=43742
+
+ Add codegen for pow() to return Int32 values when possible.
+
+ * jit/ThunkGenerators.cpp:
+ (JSC::powThunkGenerator):
+
2010-08-18 Gabor Loki <loki at webkit.org>
Reviewed by Gavin Barraclough.
diff --git a/JavaScriptCore/jit/ThunkGenerators.cpp b/JavaScriptCore/jit/ThunkGenerators.cpp
index 20857cb..4c7a354 100644
--- a/JavaScriptCore/jit/ThunkGenerators.cpp
+++ b/JavaScriptCore/jit/ThunkGenerators.cpp
@@ -134,7 +134,14 @@ MacroAssemblerCodePtr powThunkGenerator(JSGlobalData* globalData, ExecutablePool
jit.branchTest32(MacroAssembler::NonZero, SpecializedThunkJIT::regT0).linkTo(startLoop, &jit);
exponentIsZero.link(&jit);
- jit.returnDouble(SpecializedThunkJIT::fpRegT1);
+
+ {
+ SpecializedThunkJIT::JumpList doubleResult;
+ jit.branchConvertDoubleToInt32(SpecializedThunkJIT::fpRegT1, SpecializedThunkJIT::regT0, doubleResult, SpecializedThunkJIT::fpRegT0);
+ jit.returnInt32(SpecializedThunkJIT::regT0);
+ doubleResult.link(&jit);
+ jit.returnDouble(SpecializedThunkJIT::fpRegT1);
+ }
if (jit.supportsFloatingPointSqrt()) {
nonIntExponent.link(&jit);
@@ -144,6 +151,11 @@ MacroAssemblerCodePtr powThunkGenerator(JSGlobalData* globalData, ExecutablePool
jit.appendFailure(jit.branchDouble(MacroAssembler::DoubleNotEqualOrUnordered, SpecializedThunkJIT::fpRegT2, SpecializedThunkJIT::fpRegT3));
jit.sqrtDouble(SpecializedThunkJIT::fpRegT0, SpecializedThunkJIT::fpRegT0);
jit.divDouble(SpecializedThunkJIT::fpRegT0, SpecializedThunkJIT::fpRegT1);
+
+ SpecializedThunkJIT::JumpList doubleResult;
+ jit.branchConvertDoubleToInt32(SpecializedThunkJIT::fpRegT1, SpecializedThunkJIT::regT0, doubleResult, SpecializedThunkJIT::fpRegT0);
+ jit.returnInt32(SpecializedThunkJIT::regT0);
+ doubleResult.link(&jit);
jit.returnDouble(SpecializedThunkJIT::fpRegT1);
} else
jit.appendFailure(nonIntExponent);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list