Title: [97105] trunk/Source/_javascript_Core
Revision
97105
Author
barraclo...@apple.com
Date
2011-10-10 16:56:58 -0700 (Mon, 10 Oct 2011)

Log Message

Switch most calls in DFGJITCodeGenerator to use callOperation.
https://bugs.webkit.org/show_bug.cgi?id=69802

Reviewed by Oliver Hunt.

Compares, add, mod are the easy cases.

* dfg/DFGJITCodeGenerator.h:
(JSC::DFG::callOperation):
* dfg/DFGJITCodeGenerator32_64.cpp:
(JSC::DFG::JITCodeGenerator::nonSpeculativeKnownConstantArithOp):
(JSC::DFG::JITCodeGenerator::nonSpeculativeBasicArithOp):
(JSC::DFG::JITCodeGenerator::nonSpeculativeArithMod):
(JSC::DFG::JITCodeGenerator::nonSpeculativePeepholeBranch):
(JSC::DFG::JITCodeGenerator::nonSpeculativeNonPeepholeCompare):
(JSC::DFG::JITCodeGenerator::nonSpeculativePeepholeStrictEq):
(JSC::DFG::JITCodeGenerator::nonSpeculativeNonPeepholeStrictEq):
* dfg/DFGJITCodeGenerator64.cpp:
(JSC::DFG::JITCodeGenerator::nonSpeculativeKnownConstantArithOp):
(JSC::DFG::JITCodeGenerator::nonSpeculativeBasicArithOp):
(JSC::DFG::JITCodeGenerator::nonSpeculativePeepholeBranch):
(JSC::DFG::JITCodeGenerator::nonSpeculativeNonPeepholeCompare):
(JSC::DFG::JITCodeGenerator::nonSpeculativePeepholeStrictEq):
(JSC::DFG::JITCodeGenerator::nonSpeculativeNonPeepholeStrictEq):
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (97104 => 97105)


--- trunk/Source/_javascript_Core/ChangeLog	2011-10-10 23:34:14 UTC (rev 97104)
+++ trunk/Source/_javascript_Core/ChangeLog	2011-10-10 23:56:58 UTC (rev 97105)
@@ -1,5 +1,34 @@
 2011-10-10  Gavin Barraclough  <baraclo...@apple.com>
 
+        Switch most calls in DFGJITCodeGenerator to use callOperation.
+        https://bugs.webkit.org/show_bug.cgi?id=69802
+
+        Reviewed by Oliver Hunt.
+
+        Compares, add, mod are the easy cases.
+
+        * dfg/DFGJITCodeGenerator.h:
+        (JSC::DFG::callOperation):
+        * dfg/DFGJITCodeGenerator32_64.cpp:
+        (JSC::DFG::JITCodeGenerator::nonSpeculativeKnownConstantArithOp):
+        (JSC::DFG::JITCodeGenerator::nonSpeculativeBasicArithOp):
+        (JSC::DFG::JITCodeGenerator::nonSpeculativeArithMod):
+        (JSC::DFG::JITCodeGenerator::nonSpeculativePeepholeBranch):
+        (JSC::DFG::JITCodeGenerator::nonSpeculativeNonPeepholeCompare):
+        (JSC::DFG::JITCodeGenerator::nonSpeculativePeepholeStrictEq):
+        (JSC::DFG::JITCodeGenerator::nonSpeculativeNonPeepholeStrictEq):
+        * dfg/DFGJITCodeGenerator64.cpp:
+        (JSC::DFG::JITCodeGenerator::nonSpeculativeKnownConstantArithOp):
+        (JSC::DFG::JITCodeGenerator::nonSpeculativeBasicArithOp):
+        (JSC::DFG::JITCodeGenerator::nonSpeculativePeepholeBranch):
+        (JSC::DFG::JITCodeGenerator::nonSpeculativeNonPeepholeCompare):
+        (JSC::DFG::JITCodeGenerator::nonSpeculativePeepholeStrictEq):
+        (JSC::DFG::JITCodeGenerator::nonSpeculativeNonPeepholeStrictEq):
+        * dfg/DFGOperations.cpp:
+        * dfg/DFGOperations.h:
+
+2011-10-10  Gavin Barraclough  <baraclo...@apple.com>
+
         DFG: Switch GetById / PutById to use callOperation
         https://bugs.webkit.org/show_bug.cgi?id=69795
 

Modified: trunk/Source/_javascript_Core/dfg/DFGJITCodeGenerator.h (97104 => 97105)


--- trunk/Source/_javascript_Core/dfg/DFGJITCodeGenerator.h	2011-10-10 23:34:14 UTC (rev 97104)
+++ trunk/Source/_javascript_Core/dfg/DFGJITCodeGenerator.h	2011-10-10 23:56:58 UTC (rev 97105)
@@ -1149,6 +1149,22 @@
 
         return appendCallWithExceptionCheckSetResult(operation, result);
     }
+    JITCompiler::Call callOperation(J_DFGOperation_EJJ operation, GPRReg result, GPRReg arg1, MacroAssembler::Imm32 imm)
+    {
+        m_jit.move(arg1, GPRInfo::argumentGPR1);
+        m_jit.move(MacroAssembler::ImmPtr(static_cast<const void*>(JSValue::encode(jsNumber(imm.m_value)))), GPRInfo::argumentGPR2);
+        m_jit.move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0);
+
+        return appendCallWithExceptionCheckSetResult(operation, result);
+    }
+    JITCompiler::Call callOperation(J_DFGOperation_EJJ operation, GPRReg result, MacroAssembler::Imm32 imm, GPRReg arg2)
+    {
+        m_jit.move(MacroAssembler::ImmPtr(static_cast<const void*>(JSValue::encode(jsNumber(imm.m_value)))), GPRInfo::argumentGPR1);
+        m_jit.move(arg2, GPRInfo::argumentGPR2);
+        m_jit.move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0);
+
+        return appendCallWithExceptionCheckSetResult(operation, result);
+    }
     JITCompiler::Call callOperation(J_DFGOperation_ECJ operation, GPRReg result, GPRReg arg1, GPRReg arg2)
     {
         setupStubArguments(arg1, arg2);
@@ -1349,6 +1365,26 @@
 
         return appendCallWithExceptionCheckSetResult(operation, resultTag, resultPayload);
     }
+    JITCompiler::Call callOperation(J_DFGOperation_EJJ operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1Tag, GPRReg arg1Payload, MacroAssembler::Imm32 imm)
+    {
+        m_jit.push(MacroAssembler::TrustedImm32(JSValue::Int32Tag));
+        m_jit.push(imm);
+        m_jit.push(arg1Tag);
+        m_jit.push(arg1Payload);
+        m_jit.push(GPRInfo::callFrameRegister);
+
+        return appendCallWithExceptionCheckSetResult(operation, resultTag, resultPayload);
+    }
+    JITCompiler::Call callOperation(J_DFGOperation_EJJ operation, GPRReg resultTag, GPRReg resultPayload, MacroAssembler::Imm32 imm, GPRReg arg2Tag, GPRReg arg2Payload)
+    {
+        m_jit.push(arg2Tag);
+        m_jit.push(arg2Payload);
+        m_jit.push(MacroAssembler::TrustedImm32(JSValue::Int32Tag));
+        m_jit.push(imm);
+        m_jit.push(GPRInfo::callFrameRegister);
+
+        return appendCallWithExceptionCheckSetResult(operation, resultTag, resultPayload);
+    }
     JITCompiler::Call callOperation(J_DFGOperation_ECJ operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1, GPRReg arg2Tag, GPRReg arg2Payload)
     {
         m_jit.push(arg2Tag);

Modified: trunk/Source/_javascript_Core/dfg/DFGJITCodeGenerator32_64.cpp (97104 => 97105)


--- trunk/Source/_javascript_Core/dfg/DFGJITCodeGenerator32_64.cpp	2011-10-10 23:34:14 UTC (rev 97104)
+++ trunk/Source/_javascript_Core/dfg/DFGJITCodeGenerator32_64.cpp	2011-10-10 23:56:58 UTC (rev 97105)
@@ -569,18 +569,10 @@
         notInt.link(&m_jit);
             
         silentSpillAllRegisters(resultTagGPR, resultPayloadGPR);
-        if (commute) {
-            m_jit.push(regArgTagGPR);
-            m_jit.push(regArgPayloadGPR);
-            m_jit.push(MacroAssembler::Imm32(imm));
-        } else {
-            m_jit.push(MacroAssembler::Imm32(imm));
-            m_jit.push(regArgTagGPR);
-            m_jit.push(regArgPayloadGPR);
-        }
-        m_jit.push(GPRInfo::callFrameRegister);
-        appendCallWithExceptionCheck(operationValueAddNotNumber);
-        setupResults(resultTagGPR, resultPayloadGPR);
+        if (commute)
+            callOperation(operationValueAddNotNumber, resultTagGPR, resultPayloadGPR, MacroAssembler::Imm32(imm), regArgTagGPR, regArgPayloadGPR);
+        else
+            callOperation(operationValueAddNotNumber, resultTagGPR, resultPayloadGPR, regArgTagGPR, regArgPayloadGPR, MacroAssembler::Imm32(imm));
         silentFillAllRegisters(resultTagGPR, resultPayloadGPR);
             
         doneCaseWasNumber.link(&m_jit);
@@ -813,13 +805,7 @@
         notNumbers.link(&m_jit);
             
         silentSpillAllRegisters(resultTagGPR, resultPayloadGPR);
-        m_jit.push(arg2TagGPR);
-        m_jit.push(arg2PayloadGPR);
-        m_jit.push(arg1TagGPR);
-        m_jit.push(arg1PayloadGPR);
-        m_jit.push(GPRInfo::callFrameRegister);
-        appendCallWithExceptionCheck(operationValueAddNotNumber);
-        setupResults(resultTagGPR, resultPayloadGPR);
+        callOperation(operationValueAddNotNumber, resultTagGPR, resultPayloadGPR, arg1TagGPR, arg1PayloadGPR, arg2TagGPR, arg2PayloadGPR);
         silentFillAllRegisters(resultTagGPR, resultPayloadGPR);
 
         doneCaseWasNumber.link(&m_jit);
@@ -883,13 +869,7 @@
     if (!isKnownInteger(node.child1()) || !isKnownInteger(node.child2())) {
         slow.link(&m_jit);
         silentSpillAllRegisters(X86Registers::eax, X86Registers::edx);
-        m_jit.push(op2TagGPR);
-        m_jit.push(op2PayloadGPR);
-        m_jit.push(op1TagGPR);
-        m_jit.push(op1PayloadGPR);
-        m_jit.push(GPRInfo::callFrameRegister);
-        appendCallWithExceptionCheck(operationArithMod);
-        setupResults(X86Registers::eax, X86Registers::edx);
+        callOperation(operationArithMod, X86Registers::eax, X86Registers::edx, op1TagGPR, op1PayloadGPR, op2TagGPR, op2PayloadGPR);
         silentFillAllRegisters(X86Registers::eax, X86Registers::edx);
     }
         
@@ -1264,8 +1244,8 @@
         arg2.use();
 
         flushRegisters();
-
         callOperation(helperFunction, resultGPR, arg1TagGPR, arg1PayloadGPR, arg2TagGPR, arg2PayloadGPR);
+
         addBranch(m_jit.branchTest8(callResultCondition, resultGPR), taken);
     } else {
         GPRTemporary result(this);
@@ -1287,13 +1267,7 @@
             slowPath.link(&m_jit);
     
             silentSpillAllRegisters(resultGPR);
-            m_jit.push(arg2TagGPR);
-            m_jit.push(arg2PayloadGPR);
-            m_jit.push(arg1TagGPR);
-            m_jit.push(arg1PayloadGPR);
-            m_jit.push(GPRInfo::callFrameRegister);
-            appendCallWithExceptionCheck(helperFunction);
-            m_jit.move(GPRInfo::returnValueGPR, resultGPR);
+            callOperation(helperFunction, resultGPR, arg1TagGPR, arg1PayloadGPR, arg2TagGPR, arg2PayloadGPR);
             silentFillAllRegisters(resultGPR);
         
             addBranch(m_jit.branchTest8(callResultCondition, resultGPR), taken);
@@ -1325,7 +1299,6 @@
         arg2.use();
 
         flushRegisters();
-        
         callOperation(helperFunction, resultPayloadGPR, arg1TagGPR, arg1PayloadGPR, arg2TagGPR, arg2PayloadGPR);
         
         m_jit.move(TrustedImm32(JSValue::BooleanTag), resultTagGPR);
@@ -1352,13 +1325,7 @@
             slowPath.link(&m_jit);
         
             silentSpillAllRegisters(resultTagGPR, resultPayloadGPR);
-            m_jit.push(arg2TagGPR);
-            m_jit.push(arg2PayloadGPR);
-            m_jit.push(arg1TagGPR);
-            m_jit.push(arg1PayloadGPR);
-            m_jit.push(GPRInfo::callFrameRegister);
-            appendCallWithExceptionCheck(helperFunction);
-            m_jit.move(GPRInfo::returnValueGPR, resultPayloadGPR);
+            callOperation(helperFunction, resultPayloadGPR, arg1TagGPR, arg1PayloadGPR, arg2TagGPR, arg2PayloadGPR);
             silentFillAllRegisters(resultTagGPR, resultPayloadGPR);
         
             m_jit.andPtr(TrustedImm32(1), resultPayloadGPR);
@@ -1405,13 +1372,7 @@
         addBranch(m_jit.branchPtr(JITCompiler::Equal, arg1PayloadGPR, arg2PayloadGPR), invert ? notTaken : taken);
         
         silentSpillAllRegisters(resultPayloadGPR);
-        m_jit.push(arg2TagGPR);
-        m_jit.push(arg2PayloadGPR);
-        m_jit.push(arg1TagGPR);
-        m_jit.push(arg1PayloadGPR);
-        m_jit.push(GPRInfo::callFrameRegister);
-        appendCallWithExceptionCheck(operationCompareStrictEqCell);
-        m_jit.move(GPRInfo::returnValueGPR, resultPayloadGPR);
+        callOperation(operationCompareStrictEqCell, resultPayloadGPR, arg1TagGPR, arg1PayloadGPR, arg2TagGPR, arg2PayloadGPR);
         silentFillAllRegisters(resultPayloadGPR);
         
         addBranch(m_jit.branchTest8(invert ? JITCompiler::NonZero : JITCompiler::Zero, resultPayloadGPR), taken);
@@ -1419,13 +1380,7 @@
         // FIXME: Add fast paths for twoCells, number etc.
 
         silentSpillAllRegisters(resultPayloadGPR);
-        m_jit.push(arg2TagGPR);
-        m_jit.push(arg2PayloadGPR);
-        m_jit.push(arg1TagGPR);
-        m_jit.push(arg1PayloadGPR);
-        m_jit.push(GPRInfo::callFrameRegister);
-        appendCallWithExceptionCheck(operationCompareStrictEq);
-        m_jit.move(GPRInfo::returnValueGPR, resultPayloadGPR);
+        callOperation(operationCompareStrictEq, resultPayloadGPR, arg1TagGPR, arg1PayloadGPR, arg2TagGPR, arg2PayloadGPR);
         silentFillAllRegisters(resultPayloadGPR);
         
         addBranch(m_jit.branchTest8(invert ? JITCompiler::Zero : JITCompiler::NonZero, resultPayloadGPR), taken);
@@ -1463,13 +1418,7 @@
         notEqualCase.link(&m_jit);
         
         silentSpillAllRegisters(resultTagGPR, resultPayloadGPR);
-        m_jit.push(arg2TagGPR);
-        m_jit.push(arg2PayloadGPR);
-        m_jit.push(arg1TagGPR);
-        m_jit.push(arg1PayloadGPR);
-        m_jit.push(GPRInfo::callFrameRegister);
-        appendCallWithExceptionCheck(operationCompareStrictEqCell);
-        m_jit.move(GPRInfo::returnValueGPR, resultPayloadGPR);
+        callOperation(operationCompareStrictEqCell, resultPayloadGPR, arg1TagGPR, arg1PayloadGPR, arg2TagGPR, arg2PayloadGPR);
         silentFillAllRegisters(resultTagGPR, resultPayloadGPR);
         
         m_jit.andPtr(JITCompiler::TrustedImm32(1), resultPayloadGPR);
@@ -1479,13 +1428,7 @@
         // FIXME: Add fast paths.
 
         silentSpillAllRegisters(resultTagGPR, resultPayloadGPR);
-        m_jit.push(arg2TagGPR);
-        m_jit.push(arg2PayloadGPR);
-        m_jit.push(arg1TagGPR);
-        m_jit.push(arg1PayloadGPR);
-        m_jit.push(GPRInfo::callFrameRegister);
-        appendCallWithExceptionCheck(operationCompareStrictEq);
-        m_jit.move(GPRInfo::returnValueGPR, resultPayloadGPR);
+        callOperation(operationCompareStrictEq, resultPayloadGPR, arg1TagGPR, arg1PayloadGPR, arg2TagGPR, arg2PayloadGPR);
         silentFillAllRegisters(resultTagGPR, resultPayloadGPR);
         
         m_jit.andPtr(JITCompiler::TrustedImm32(1), resultPayloadGPR);

Modified: trunk/Source/_javascript_Core/dfg/DFGJITCodeGenerator64.cpp (97104 => 97105)


--- trunk/Source/_javascript_Core/dfg/DFGJITCodeGenerator64.cpp	2011-10-10 23:34:14 UTC (rev 97104)
+++ trunk/Source/_javascript_Core/dfg/DFGJITCodeGenerator64.cpp	2011-10-10 23:56:58 UTC (rev 97105)
@@ -554,16 +554,10 @@
         notNumber.link(&m_jit);
             
         silentSpillAllRegisters(resultGPR);
-        if (commute) {
-            m_jit.move(regArgGPR, GPRInfo::argumentGPR2);
-            m_jit.move(MacroAssembler::ImmPtr(static_cast<const void*>(JSValue::encode(jsNumber(imm)))), GPRInfo::argumentGPR1);
-        } else {
-            m_jit.move(regArgGPR, GPRInfo::argumentGPR1);
-            m_jit.move(MacroAssembler::ImmPtr(static_cast<const void*>(JSValue::encode(jsNumber(imm)))), GPRInfo::argumentGPR2);
-        }
-        m_jit.move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0);
-        appendCallWithExceptionCheck(operationValueAddNotNumber);
-        m_jit.move(GPRInfo::returnValueGPR, resultGPR);
+        if (commute)
+            callOperation(operationValueAddNotNumber, resultGPR, MacroAssembler::Imm32(imm), regArgGPR);
+        else
+            callOperation(operationValueAddNotNumber, resultGPR, regArgGPR, MacroAssembler::Imm32(imm));
         silentFillAllRegisters(resultGPR);
             
         doneCaseWasNumber.link(&m_jit);
@@ -738,10 +732,7 @@
         notNumbers.link(&m_jit);
             
         silentSpillAllRegisters(resultGPR);
-        setupStubArguments(arg1GPR, arg2GPR);
-        m_jit.move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0);
-        appendCallWithExceptionCheck(operationValueAddNotNumber);
-        m_jit.move(GPRInfo::returnValueGPR, resultGPR);
+        callOperation(operationValueAddNotNumber, resultGPR, arg1GPR, arg2GPR);
         silentFillAllRegisters(resultGPR);
 
         doneCaseWasNumber.link(&m_jit);
@@ -1204,8 +1195,8 @@
         arg2.use();
     
         flushRegisters();
-
         callOperation(helperFunction, resultGPR, arg1GPR, arg2GPR);
+
         addBranch(m_jit.branchTest8(callResultCondition, resultGPR), taken);
     } else {
         GPRTemporary result(this, arg2);
@@ -1227,10 +1218,7 @@
             slowPath.link(&m_jit);
     
             silentSpillAllRegisters(resultGPR);
-            setupStubArguments(arg1GPR, arg2GPR);
-            m_jit.move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0);
-            appendCallWithExceptionCheck(helperFunction);
-            m_jit.move(GPRInfo::returnValueGPR, resultGPR);
+            callOperation(helperFunction, resultGPR, arg1GPR, arg2GPR);
             silentFillAllRegisters(resultGPR);
         
             addBranch(m_jit.branchTest8(callResultCondition, resultGPR), taken);
@@ -1258,7 +1246,6 @@
         arg2.use();
     
         flushRegisters();
-        
         callOperation(helperFunction, resultGPR, arg1GPR, arg2GPR);
         
         m_jit.or32(TrustedImm32(ValueFalse), resultGPR);
@@ -1283,10 +1270,7 @@
             slowPath.link(&m_jit);
         
             silentSpillAllRegisters(resultGPR);
-            setupStubArguments(arg1GPR, arg2GPR);
-            m_jit.move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0);
-            appendCallWithExceptionCheck(helperFunction);
-            m_jit.move(GPRInfo::returnValueGPR, resultGPR);
+            callOperation(helperFunction, resultGPR, arg1GPR, arg2GPR);
             silentFillAllRegisters(resultGPR);
         
             m_jit.andPtr(TrustedImm32(1), resultGPR);
@@ -1332,10 +1316,7 @@
         addBranch(m_jit.branchPtr(JITCompiler::Equal, arg1GPR, arg2GPR), invert ? notTaken : taken);
         
         silentSpillAllRegisters(resultGPR);
-        setupStubArguments(arg1GPR, arg2GPR);
-        m_jit.move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0);
-        appendCallWithExceptionCheck(operationCompareStrictEqCell);
-        m_jit.move(GPRInfo::returnValueGPR, resultGPR);
+        callOperation(operationCompareStrictEqCell, resultGPR, arg1GPR, arg2GPR);
         silentFillAllRegisters(resultGPR);
         
         addBranch(m_jit.branchTest8(invert ? JITCompiler::NonZero : JITCompiler::Zero, resultGPR), taken);
@@ -1355,10 +1336,7 @@
         numberCase.link(&m_jit);
         
         silentSpillAllRegisters(resultGPR);
-        setupStubArguments(arg1GPR, arg2GPR);
-        m_jit.move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0);
-        appendCallWithExceptionCheck(operationCompareStrictEq);
-        m_jit.move(GPRInfo::returnValueGPR, resultGPR);
+        callOperation(operationCompareStrictEq, resultGPR, arg1GPR, arg2GPR);
         silentFillAllRegisters(resultGPR);
         
         addBranch(m_jit.branchTest8(invert ? JITCompiler::Zero : JITCompiler::NonZero, resultGPR), taken);
@@ -1393,10 +1371,7 @@
         notEqualCase.link(&m_jit);
         
         silentSpillAllRegisters(resultGPR);
-        setupStubArguments(arg1GPR, arg2GPR);
-        m_jit.move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0);
-        appendCallWithExceptionCheck(operationCompareStrictEqCell);
-        m_jit.move(GPRInfo::returnValueGPR, resultGPR);
+        callOperation(operationCompareStrictEqCell, resultGPR, arg1GPR, arg2GPR);
         silentFillAllRegisters(resultGPR);
         
         m_jit.andPtr(JITCompiler::TrustedImm32(1), resultGPR);
@@ -1425,10 +1400,7 @@
         notEqualCase.link(&m_jit);
         
         silentSpillAllRegisters(resultGPR);
-        setupStubArguments(arg1GPR, arg2GPR);
-        m_jit.move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0);
-        appendCallWithExceptionCheck(operationCompareStrictEq);
-        m_jit.move(GPRInfo::returnValueGPR, resultGPR);
+        callOperation(operationCompareStrictEq, resultGPR, arg1GPR, arg2GPR);
         silentFillAllRegisters(resultGPR);
         
         m_jit.andPtr(JITCompiler::TrustedImm32(1), resultGPR);

Modified: trunk/Source/_javascript_Core/dfg/DFGOperations.cpp (97104 => 97105)


--- trunk/Source/_javascript_Core/dfg/DFGOperations.cpp	2011-10-10 23:34:14 UTC (rev 97104)
+++ trunk/Source/_javascript_Core/dfg/DFGOperations.cpp	2011-10-10 23:56:58 UTC (rev 97105)
@@ -184,38 +184,13 @@
     return JSValue::encode(jsAddSlowCase(exec, op1, op2));
 }
 
-EncodedJSValue DFG_OPERATION operationArithAdd(EncodedJSValue encodedOp1, EncodedJSValue encodedOp2)
+// FIMXE: This method is deprecated, we should switch the 32_64 DFG JIT over to call fmod directly!
+// ExecState* isn't really required, but passed to save adding a J_DFGOperation_JJ type, since this
+// does not have long to live!
+EncodedJSValue DFG_OPERATION operationArithMod(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2)
 {
     double num1 = JSValue::decode(encodedOp1).asNumber();
     double num2 = JSValue::decode(encodedOp2).asNumber();
-    return JSValue::encode(jsNumber(num1 + num2));
-}
-
-EncodedJSValue DFG_OPERATION operationArithSub(EncodedJSValue encodedOp1, EncodedJSValue encodedOp2)
-{
-    double num1 = JSValue::decode(encodedOp1).asNumber();
-    double num2 = JSValue::decode(encodedOp2).asNumber();
-    return JSValue::encode(jsNumber(num1 - num2));
-}
-
-EncodedJSValue DFG_OPERATION operationArithMul(EncodedJSValue encodedOp1, EncodedJSValue encodedOp2)
-{
-    double num1 = JSValue::decode(encodedOp1).asNumber();
-    double num2 = JSValue::decode(encodedOp2).asNumber();
-    return JSValue::encode(jsNumber(num1 * num2));
-}
-
-EncodedJSValue DFG_OPERATION operationArithDiv(EncodedJSValue encodedOp1, EncodedJSValue encodedOp2)
-{
-    double num1 = JSValue::decode(encodedOp1).asNumber();
-    double num2 = JSValue::decode(encodedOp2).asNumber();
-    return JSValue::encode(jsNumber(num1 / num2));
-}
-
-EncodedJSValue DFG_OPERATION operationArithMod(EncodedJSValue encodedOp1, EncodedJSValue encodedOp2)
-{
-    double num1 = JSValue::decode(encodedOp1).asNumber();
-    double num2 = JSValue::decode(encodedOp2).asNumber();
     return JSValue::encode(jsNumber(fmod(num1, num2)));
 }
 

Modified: trunk/Source/_javascript_Core/dfg/DFGOperations.h (97104 => 97105)


--- trunk/Source/_javascript_Core/dfg/DFGOperations.h	2011-10-10 23:34:14 UTC (rev 97104)
+++ trunk/Source/_javascript_Core/dfg/DFGOperations.h	2011-10-10 23:56:58 UTC (rev 97105)
@@ -96,11 +96,7 @@
 EncodedJSValue DFG_OPERATION operationConvertThis(ExecState*, EncodedJSValue encodedOp1);
 EncodedJSValue DFG_OPERATION operationValueAdd(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2);
 EncodedJSValue DFG_OPERATION operationValueAddNotNumber(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2);
-EncodedJSValue DFG_OPERATION operationArithAdd(EncodedJSValue encodedOp1, EncodedJSValue encodedOp2);
-EncodedJSValue DFG_OPERATION operationArithSub(EncodedJSValue encodedOp1, EncodedJSValue encodedOp2);
-EncodedJSValue DFG_OPERATION operationArithMul(EncodedJSValue encodedOp1, EncodedJSValue encodedOp2);
-EncodedJSValue DFG_OPERATION operationArithDiv(EncodedJSValue encodedOp1, EncodedJSValue encodedOp2);
-EncodedJSValue DFG_OPERATION operationArithMod(EncodedJSValue encodedOp1, EncodedJSValue encodedOp2);
+EncodedJSValue DFG_OPERATION operationArithMod(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2);
 EncodedJSValue DFG_OPERATION operationGetByVal(ExecState*, EncodedJSValue encodedBase, EncodedJSValue encodedProperty);
 EncodedJSValue DFG_OPERATION operationGetByValCell(ExecState*, JSCell*, EncodedJSValue encodedProperty);
 EncodedJSValue DFG_OPERATION operationGetById(ExecState*, JSCell*, Identifier*);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to