[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75
ggaren at apple.com
ggaren at apple.com
Thu Oct 29 20:36:16 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit 02c34fca6f29bb377336f4d059dac35348912144
Author: ggaren at apple.com <ggaren at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Sep 29 20:28:00 2009 +0000
Standardized an optimization for adding non-numbers.
Patch by Geoffrey Garen <ggaren at apple.com> on 2009-09-29
Reviewed by Sam Weinig.
SunSpider says maybe a tiny speedup.
* jit/JITArithmetic.cpp:
(JSC::JIT::emit_op_add):
(JSC::JIT::emitSlow_op_add):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48895 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 1c25d2e..3c59bca 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,5 +1,17 @@
2009-09-29 Geoffrey Garen <ggaren at apple.com>
+ Reviewed by Sam Weinig.
+
+ Standardized an optimization for adding non-numbers.
+
+ SunSpider says maybe a tiny speedup.
+
+ * jit/JITArithmetic.cpp:
+ (JSC::JIT::emit_op_add):
+ (JSC::JIT::emitSlow_op_add):
+
+2009-09-29 Geoffrey Garen <ggaren at apple.com>
+
Windows build fix: export a new symbol.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
diff --git a/JavaScriptCore/jit/JITArithmetic.cpp b/JavaScriptCore/jit/JITArithmetic.cpp
index dcadc64..babe2ea 100644
--- a/JavaScriptCore/jit/JITArithmetic.cpp
+++ b/JavaScriptCore/jit/JITArithmetic.cpp
@@ -566,6 +566,14 @@ void JIT::emit_op_add(Instruction* currentInstruction)
unsigned op2 = currentInstruction[3].u.operand;
OperandTypes types = OperandTypes::fromInt(currentInstruction[4].u.operand);
+ if (!types.first().mightBeNumber() || !types.second().mightBeNumber()) {
+ JITStubCall stubCall(this, cti_op_add);
+ stubCall.addArgument(op1);
+ stubCall.addArgument(op2);
+ stubCall.call(dst);
+ return;
+ }
+
JumpList notInt32Op1;
JumpList notInt32Op2;
@@ -630,6 +638,9 @@ void JIT::emitSlow_op_add(Instruction* currentInstruction, Vector<SlowCaseEntry>
unsigned op2 = currentInstruction[3].u.operand;
OperandTypes types = OperandTypes::fromInt(currentInstruction[4].u.operand);
+ if (!types.first().mightBeNumber() || !types.second().mightBeNumber())
+ return;
+
unsigned op;
int32_t constant;
if (getOperandConstantImmediateInt(op1, op2, op, constant)) {
@@ -2026,6 +2037,10 @@ void JIT::emitSlow_op_add(Instruction* currentInstruction, Vector<SlowCaseEntry>
unsigned result = currentInstruction[1].u.operand;
unsigned op1 = currentInstruction[2].u.operand;
unsigned op2 = currentInstruction[3].u.operand;
+ OperandTypes types = OperandTypes::fromInt(currentInstruction[4].u.operand);
+
+ if (!types.first().mightBeNumber() || !types.second().mightBeNumber())
+ return;
if (isOperandConstantImmediateInt(op1) || isOperandConstantImmediateInt(op2)) {
linkSlowCase(iter);
@@ -2383,6 +2398,14 @@ void JIT::emit_op_add(Instruction* currentInstruction)
unsigned op1 = currentInstruction[2].u.operand;
unsigned op2 = currentInstruction[3].u.operand;
+ if (!types.first().mightBeNumber() || !types.second().mightBeNumber()) {
+ JITStubCall stubCall(this, cti_op_add);
+ stubCall.addArgument(op1);
+ stubCall.addArgument(op2);
+ stubCall.call(dst);
+ return;
+ }
+
if (isOperandConstantImmediateInt(op1)) {
emitGetVirtualRegister(op2, regT0);
emitJumpSlowCaseIfNotImmediateInteger(regT0);
@@ -2414,6 +2437,9 @@ void JIT::emitSlow_op_add(Instruction* currentInstruction, Vector<SlowCaseEntry>
unsigned op1 = currentInstruction[2].u.operand;
unsigned op2 = currentInstruction[3].u.operand;
+ if (!types.first().mightBeNumber() || !types.second().mightBeNumber())
+ return;
+
if (isOperandConstantImmediateInt(op1)) {
Jump notImm = getSlowCase(iter);
linkSlowCase(iter);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list