Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (97106 => 97107)
--- trunk/Source/_javascript_Core/ChangeLog 2011-10-10 23:59:37 UTC (rev 97106)
+++ trunk/Source/_javascript_Core/ChangeLog 2011-10-11 00:08:54 UTC (rev 97107)
@@ -1,5 +1,29 @@
2011-10-10 Gavin Barraclough <baraclo...@apple.com>
+ Remove some unused methods from the DFG JIT.
+
+ Rubber stamped by Oliver Hunt
+
+ Thee methods were only used by the non-speculative JIT, and can be removed.
+
+ * dfg/DFGJITCodeGenerator.h:
+ * dfg/DFGJITCodeGenerator32_64.cpp:
+ * dfg/DFGJITCodeGenerator64.cpp:
+ - removed:
+ nonSpeculativeAdd
+ nonSpeculativeArithSub
+ nonSpeculativeArithMod
+ nonSpeculativeCheckHasInstance
+ nonSpeculativeInstanceOf
+ * dfg/DFGOperations.cpp:
+ * dfg/DFGOperations.h:
+ - removed:
+ operationArithMod
+ operationInstanceOf
+ operationThrowHasInstanceError
+
+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
Modified: trunk/Source/_javascript_Core/dfg/DFGJITCodeGenerator.h (97106 => 97107)
--- trunk/Source/_javascript_Core/dfg/DFGJITCodeGenerator.h 2011-10-10 23:59:37 UTC (rev 97106)
+++ trunk/Source/_javascript_Core/dfg/DFGJITCodeGenerator.h 2011-10-11 00:08:54 UTC (rev 97107)
@@ -730,36 +730,6 @@
void nonSpeculativeKnownConstantArithOp(NodeType op, NodeIndex regChild, NodeIndex immChild, bool commute);
void nonSpeculativeBasicArithOp(NodeType op, Node&);
- // Handles both ValueAdd and ArithAdd.
- void nonSpeculativeAdd(NodeType op, Node& node)
- {
- if (isInt32Constant(node.child1())) {
- nonSpeculativeKnownConstantArithOp(op, node.child2(), node.child1(), true);
- return;
- }
-
- if (isInt32Constant(node.child2())) {
- nonSpeculativeKnownConstantArithOp(op, node.child1(), node.child2(), false);
- return;
- }
-
- nonSpeculativeBasicArithOp(op, node);
- }
-
- void nonSpeculativeArithSub(Node& node)
- {
- if (isInt32Constant(node.child2())) {
- nonSpeculativeKnownConstantArithOp(ArithSub, node.child1(), node.child2(), false);
- return;
- }
-
- nonSpeculativeBasicArithOp(ArithSub, node);
- }
-
- void nonSpeculativeArithMod(Node&);
- void nonSpeculativeCheckHasInstance(Node&);
- void nonSpeculativeInstanceOf(Node&);
-
#if USE(JSVALUE64)
JITCompiler::Call cachedGetById(GPRReg baseGPR, GPRReg resultGPR, GPRReg scratchGPR, unsigned identifierNumber, JITCompiler::Jump slowPathTarget = JITCompiler::Jump(), NodeType = GetById);
void cachedPutById(GPRReg base, GPRReg value, NodeIndex valueIndex, GPRReg scratchGPR, unsigned identifierNumber, PutKind, JITCompiler::Jump slowPathTarget = JITCompiler::Jump());
Modified: trunk/Source/_javascript_Core/dfg/DFGJITCodeGenerator32_64.cpp (97106 => 97107)
--- trunk/Source/_javascript_Core/dfg/DFGJITCodeGenerator32_64.cpp 2011-10-10 23:59:37 UTC (rev 97106)
+++ trunk/Source/_javascript_Core/dfg/DFGJITCodeGenerator32_64.cpp 2011-10-11 00:08:54 UTC (rev 97107)
@@ -818,185 +818,6 @@
jsValueResult(resultTagGPR, resultPayloadGPR, m_compileIndex, UseChildrenCalledExplicitly);
}
-void JITCodeGenerator::nonSpeculativeArithMod(Node& node)
-{
- JSValueOperand op1(this, node.child1());
- JSValueOperand op2(this, node.child2());
- GPRTemporary eax(this, X86Registers::eax);
- GPRTemporary edx(this, X86Registers::edx);
-
- FPRTemporary op1Double(this);
- FPRTemporary op2Double(this);
-
- GPRReg op1TagGPR = op1.tagGPR();
- GPRReg op1PayloadGPR = op1.payloadGPR();
- GPRReg op2TagGPR = op2.tagGPR();
- GPRReg op2PayloadGPR = op2.payloadGPR();
-
- op1.use();
- op2.use();
-
- GPRReg temp2 = InvalidGPRReg;
- if (op2PayloadGPR == X86Registers::eax || op2PayloadGPR == X86Registers::edx) {
- temp2 = allocate();
- m_jit.move(op2PayloadGPR, temp2);
- op2PayloadGPR = temp2;
- }
-
- JITCompiler::JumpList done;
- JITCompiler::JumpList slow;
- JITCompiler::Jump modByZero;
-
- if (!isKnownInteger(node.child1()))
- slow.append(m_jit.branch32(MacroAssembler::NotEqual, op1TagGPR, TrustedImm32(JSValue::Int32Tag)));
- if (!isKnownInteger(node.child2()))
- slow.append(m_jit.branch32(MacroAssembler::NotEqual, op2TagGPR, TrustedImm32(JSValue::Int32Tag)));
-
- modByZero = m_jit.branchTest32(MacroAssembler::Zero, op2PayloadGPR);
-
- m_jit.move(op1PayloadGPR, eax.gpr());
- m_jit.assembler().cdq();
- m_jit.assembler().idivl_r(op2PayloadGPR);
-
- m_jit.move(TrustedImm32(JSValue::Int32Tag), X86Registers::eax);
- done.append(m_jit.jump());
-
- modByZero.link(&m_jit);
- m_jit.move(MacroAssembler::TrustedImm32(jsNumber(std::numeric_limits<double>::quiet_NaN()).tag()), X86Registers::eax);
- m_jit.move(MacroAssembler::TrustedImm32(jsNumber(std::numeric_limits<double>::quiet_NaN()).payload()), X86Registers::edx);
- done.append(m_jit.jump());
-
- if (!isKnownInteger(node.child1()) || !isKnownInteger(node.child2())) {
- slow.link(&m_jit);
- silentSpillAllRegisters(X86Registers::eax, X86Registers::edx);
- callOperation(operationArithMod, X86Registers::eax, X86Registers::edx, op1TagGPR, op1PayloadGPR, op2TagGPR, op2PayloadGPR);
- silentFillAllRegisters(X86Registers::eax, X86Registers::edx);
- }
-
- done.link(&m_jit);
-
- if (temp2 != InvalidGPRReg)
- unlock(temp2);
-
- jsValueResult(X86Registers::eax, X86Registers::edx, m_compileIndex, UseChildrenCalledExplicitly);
-}
-
-void JITCodeGenerator::nonSpeculativeCheckHasInstance(Node& node)
-{
- JSValueOperand base(this, node.child1());
- GPRTemporary structure(this);
- GPRReg baseTagReg = base.tagGPR();
- GPRReg basePayloadReg = base.payloadGPR();
- GPRReg structureReg = structure.gpr();
-
- // Check that base is a cell.
- MacroAssembler::Jump baseNotCell = m_jit.branch32(MacroAssembler::NotEqual, baseTagReg, TrustedImm32(JSValue::CellTag));
-
- // Check that base 'ImplementsHasInstance'.
- m_jit.loadPtr(MacroAssembler::Address(basePayloadReg, JSCell::structureOffset()), structureReg);
- MacroAssembler::Jump implementsHasInstance = m_jit.branchTest8(MacroAssembler::NonZero, MacroAssembler::Address(structureReg, Structure::typeInfoFlagsOffset()), MacroAssembler::TrustedImm32(ImplementsHasInstance));
-
- // At this point we always throw, so no need to preserve registers.
- baseNotCell.link(&m_jit);
- m_jit.push(baseTagReg); // tag
- m_jit.push(basePayloadReg); // payload
- m_jit.push(GPRInfo::callFrameRegister);
- // At some point we could optimize this to plant a direct jump, rather then checking
- // for an exception (operationThrowHasInstanceError always throws). Probably not worth
- // adding the extra interface to do this now, but we may also want this for op_throw.
- appendCallWithExceptionCheck(operationThrowHasInstanceError);
-
- implementsHasInstance.link(&m_jit);
- noResult(m_compileIndex);
-}
-
-void JITCodeGenerator::nonSpeculativeInstanceOf(Node& node)
-{
- // FIXME: Currently we flush all registers as the number of available registers
- // does not meet our requirement.
- flushRegisters();
- GPRTemporary value(this);
- GPRTemporary base(this);
- GPRTemporary prototype(this);
- GPRTemporary scratch(this);
-
- GPRReg valueReg = value.gpr();
- GPRReg baseReg = base.gpr();
- GPRReg prototypeReg = prototype.gpr();
- GPRReg scratchReg = scratch.gpr();
-
- use(node.child3());
- use(node.child1());
- use(node.child2());
-
- // Check that operands are cells (base is checked by CheckHasInstance, so we can just assert).
- m_jit.emitLoadTag(node.child3(), valueReg);
- MacroAssembler::Jump valueNotCell = m_jit.branch32(MacroAssembler::NotEqual, valueReg, TrustedImm32(JSValue::CellTag));
- m_jit.emitLoadTag(node.child1(), baseReg);
- m_jit.jitAssertIsCell(baseReg);
- m_jit.emitLoadTag(node.child2(), prototypeReg);
- MacroAssembler::Jump prototypeNotCell = m_jit.branch32(MacroAssembler::NotEqual, prototypeReg, TrustedImm32(JSValue::CellTag));
-
- // Check that baseVal 'ImplementsDefaultHasInstance'.
- m_jit.emitLoadPayload(node.child1(), baseReg);
- m_jit.loadPtr(MacroAssembler::Address(baseReg, JSCell::structureOffset()), scratchReg);
- MacroAssembler::Jump notDefaultHasInstance = m_jit.branchTest8(MacroAssembler::Zero, MacroAssembler::Address(scratchReg, Structure::typeInfoFlagsOffset()), TrustedImm32(ImplementsDefaultHasInstance));
-
- // Check that prototype is an object
- m_jit.emitLoadPayload(node.child2(), prototypeReg);
- m_jit.loadPtr(MacroAssembler::Address(prototypeReg, JSCell::structureOffset()), scratchReg);
- // MacroAssembler::Jump protoNotObject = m_jit.branch8(MacroAssembler::NotEqual, MacroAssembler::Address(scratchReg, Structure::typeInfoTypeOffset()), MacroAssembler::TrustedImm32(ObjectType));
- MacroAssembler::Jump protoNotObject = m_jit.branchIfNotObject(scratchReg);
-
- // Initialize scratchReg with the value being checked.
- m_jit.emitLoadPayload(node.child3(), valueReg);
- m_jit.move(valueReg, scratchReg);
-
- // Walk up the prototype chain of the value (in scratchReg), comparing to prototypeReg.
- MacroAssembler::Label loop(&m_jit);
- m_jit.loadPtr(MacroAssembler::Address(scratchReg, JSCell::structureOffset()), scratchReg);
- m_jit.load32(MacroAssembler::Address(scratchReg, Structure::prototypeOffset() + OBJECT_OFFSETOF(JSValue, u.asBits.payload)), scratchReg);
- MacroAssembler::Jump isInstance = m_jit.branch32(MacroAssembler::Equal, scratchReg, prototypeReg);
- m_jit.branchTest32(MacroAssembler::NonZero, scratchReg).linkTo(loop, &m_jit);
-
- // No match - result is false.
- m_jit.move(TrustedImm32(0), GPRInfo::returnValueGPR);
- MacroAssembler::Jump wasNotInstance = m_jit.jump();
-
- // Link to here if any checks fail that require us to try calling out to an operation to help,
- // e.g. for an API overridden HasInstance.
- valueNotCell.link(&m_jit);
- prototypeNotCell.link(&m_jit);
- notDefaultHasInstance.link(&m_jit);
- protoNotObject.link(&m_jit);
-
- // FIXME: ld/st should be reduced if carefully arranged.
- m_jit.emitLoadTag(node.child2(), prototypeReg);
- m_jit.push(prototypeReg);
- m_jit.emitLoadPayload(node.child2(), prototypeReg);
- m_jit.push(prototypeReg);
- m_jit.emitLoadTag(node.child1(), baseReg);
- m_jit.push(baseReg);
- m_jit.emitLoadPayload(node.child1(), baseReg);
- m_jit.push(baseReg);
- m_jit.emitLoadTag(node.child3(), valueReg);
- m_jit.push(valueReg);
- m_jit.emitLoadPayload(node.child3(), valueReg);
- m_jit.push(valueReg);
- m_jit.push(GPRInfo::callFrameRegister);
- appendCallWithExceptionCheck(operationInstanceOf);
- MacroAssembler::Jump wasNotDefaultHasInstance = m_jit.jump();
-
- isInstance.link(&m_jit);
- m_jit.move(TrustedImm32(1), GPRInfo::returnValueGPR);
-
- wasNotInstance.link(&m_jit);
- m_jit.move(TrustedImm32(JSValue::BooleanTag), GPRInfo::returnValueGPR2);
-
- wasNotDefaultHasInstance.link(&m_jit);
- jsValueResult(GPRInfo::returnValueGPR2, GPRInfo::returnValueGPR, m_compileIndex, UseChildrenCalledExplicitly);
-}
-
JITCompiler::Call JITCodeGenerator::cachedGetById(GPRReg basePayloadGPR, GPRReg resultTagGPR, GPRReg resultPayloadGPR, GPRReg scratchGPR, unsigned identifierNumber, JITCompiler::Jump slowPathTarget, NodeType nodeType)
{
ASSERT(nodeType == GetById || nodeType == GetMethod);
Modified: trunk/Source/_javascript_Core/dfg/DFGJITCodeGenerator64.cpp (97106 => 97107)
--- trunk/Source/_javascript_Core/dfg/DFGJITCodeGenerator64.cpp 2011-10-10 23:59:37 UTC (rev 97106)
+++ trunk/Source/_javascript_Core/dfg/DFGJITCodeGenerator64.cpp 2011-10-11 00:08:54 UTC (rev 97107)
@@ -745,218 +745,6 @@
jsValueResult(resultGPR, m_compileIndex, UseChildrenCalledExplicitly);
}
-void JITCodeGenerator::nonSpeculativeArithMod(Node& node)
-{
- JSValueOperand op1(this, node.child1());
- JSValueOperand op2(this, node.child2());
- GPRTemporary eax(this, X86Registers::eax);
- GPRTemporary edx(this, X86Registers::edx);
-
- FPRTemporary op1Double(this);
- FPRTemporary op2Double(this);
-
- GPRReg op1GPR = op1.gpr();
- GPRReg op2GPR = op2.gpr();
-
- FPRReg op1FPR = op1Double.fpr();
- FPRReg op2FPR = op2Double.fpr();
-
- op1.use();
- op2.use();
-
- GPRReg temp2 = InvalidGPRReg;
- GPRReg unboxGPR;
- if (op2GPR == X86Registers::eax || op2GPR == X86Registers::edx) {
- temp2 = allocate();
- m_jit.move(op2GPR, temp2);
- op2GPR = temp2;
- unboxGPR = temp2;
- } else if (op1GPR == X86Registers::eax)
- unboxGPR = X86Registers::edx;
- else
- unboxGPR = X86Registers::eax;
- ASSERT(unboxGPR != op1.gpr());
- ASSERT(unboxGPR != op2.gpr());
-
- JITCompiler::Jump firstOpNotInt;
- JITCompiler::Jump secondOpNotInt;
- JITCompiler::JumpList done;
- JITCompiler::Jump modByZero;
-
- if (!isKnownInteger(node.child1()))
- firstOpNotInt = m_jit.branchPtr(MacroAssembler::Below, op1GPR, GPRInfo::tagTypeNumberRegister);
- if (!isKnownInteger(node.child2()))
- secondOpNotInt = m_jit.branchPtr(MacroAssembler::Below, op2GPR, GPRInfo::tagTypeNumberRegister);
-
- modByZero = m_jit.branchTest32(MacroAssembler::Zero, op2GPR);
-
- m_jit.move(op1GPR, eax.gpr());
- m_jit.assembler().cdq();
- m_jit.assembler().idivl_r(op2GPR);
-
- m_jit.orPtr(GPRInfo::tagTypeNumberRegister, X86Registers::edx);
-
- done.append(m_jit.jump());
-
- JITCompiler::Jump gotDoubleArgs;
-
- modByZero.link(&m_jit);
-
- m_jit.move(MacroAssembler::TrustedImmPtr(JSValue::encode(jsNumber(std::numeric_limits<double>::quiet_NaN()))), X86Registers::edx);
- done.append(m_jit.jump());
-
- if (!isKnownInteger(node.child1())) {
- firstOpNotInt.link(&m_jit);
-
- JITCompiler::Jump secondOpNotInt2;
-
- if (!isKnownInteger(node.child2()))
- secondOpNotInt2 = m_jit.branchPtr(MacroAssembler::Below, op2GPR, GPRInfo::tagTypeNumberRegister);
-
- // first op is a double, second op is an int.
- m_jit.convertInt32ToDouble(op2GPR, op2FPR);
-
- if (!isKnownInteger(node.child2())) {
- JITCompiler::Jump gotSecondOp = m_jit.jump();
-
- secondOpNotInt2.link(&m_jit);
-
- // first op is a double, second op is a double.
- m_jit.move(op2GPR, unboxGPR);
- unboxDouble(unboxGPR, op2FPR);
-
- gotSecondOp.link(&m_jit);
- }
-
- m_jit.move(op1GPR, unboxGPR);
- unboxDouble(unboxGPR, op1FPR);
-
- gotDoubleArgs = m_jit.jump();
- }
-
- if (!isKnownInteger(node.child2())) {
- secondOpNotInt.link(&m_jit);
-
- // we know that the first op is an int, and the second is a double
- m_jit.convertInt32ToDouble(op1GPR, op1FPR);
- m_jit.move(op2GPR, unboxGPR);
- unboxDouble(unboxGPR, op2FPR);
- }
-
- if (!isKnownInteger(node.child1()))
- gotDoubleArgs.link(&m_jit);
-
- if (!isKnownInteger(node.child1()) || !isKnownInteger(node.child2())) {
- silentSpillAllRegisters(X86Registers::edx);
- setupTwoStubArgs<FPRInfo::argumentFPR0, FPRInfo::argumentFPR1>(op1FPR, op2FPR);
- m_jit.appendCall(fmod);
- boxDouble(FPRInfo::returnValueFPR, X86Registers::edx);
- silentFillAllRegisters(X86Registers::edx);
- }
-
- done.link(&m_jit);
-
- if (temp2 != InvalidGPRReg)
- unlock(temp2);
-
- jsValueResult(X86Registers::edx, m_compileIndex, UseChildrenCalledExplicitly);
-}
-
-void JITCodeGenerator::nonSpeculativeCheckHasInstance(Node& node)
-{
- JSValueOperand base(this, node.child1());
- GPRTemporary structure(this);
-
- GPRReg baseReg = base.gpr();
- GPRReg structureReg = structure.gpr();
-
- // Check that base is a cell.
- MacroAssembler::Jump baseNotCell = m_jit.branchTestPtr(MacroAssembler::NonZero, baseReg, GPRInfo::tagMaskRegister);
-
- // Check that base 'ImplementsHasInstance'.
- m_jit.loadPtr(MacroAssembler::Address(baseReg, JSCell::structureOffset()), structureReg);
- MacroAssembler::Jump implementsHasInstance = m_jit.branchTest8(MacroAssembler::NonZero, MacroAssembler::Address(structureReg, Structure::typeInfoFlagsOffset()), MacroAssembler::TrustedImm32(ImplementsHasInstance));
-
- // At this point we always throw, so no need to preserve registers.
- baseNotCell.link(&m_jit);
- m_jit.move(baseReg, GPRInfo::argumentGPR1);
- m_jit.move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0);
- // At some point we could optimize this to plant a direct jump, rather then checking
- // for an exception (operationThrowHasInstanceError always throws). Probably not worth
- // adding the extra interface to do this now, but we may also want this for op_throw.
- appendCallWithExceptionCheck(operationThrowHasInstanceError);
-
- implementsHasInstance.link(&m_jit);
- noResult(m_compileIndex);
-}
-
-void JITCodeGenerator::nonSpeculativeInstanceOf(Node& node)
-{
- JSValueOperand value(this, node.child1());
- JSValueOperand base(this, node.child2());
- JSValueOperand prototype(this, node.child3());
- GPRTemporary scratch(this, base);
-
- GPRReg valueReg = value.gpr();
- GPRReg baseReg = base.gpr();
- GPRReg prototypeReg = prototype.gpr();
- GPRReg scratchReg = scratch.gpr();
-
- value.use();
- base.use();
- prototype.use();
-
- // Check that operands are cells (base is checked by CheckHasInstance, so we can just assert).
- MacroAssembler::Jump valueNotCell = m_jit.branchTestPtr(MacroAssembler::NonZero, valueReg, GPRInfo::tagMaskRegister);
- m_jit.jitAssertIsCell(baseReg);
- MacroAssembler::Jump prototypeNotCell = m_jit.branchTestPtr(MacroAssembler::NonZero, prototypeReg, GPRInfo::tagMaskRegister);
-
- // Check that baseVal 'ImplementsDefaultHasInstance'.
- m_jit.loadPtr(MacroAssembler::Address(baseReg, JSCell::structureOffset()), scratchReg);
- MacroAssembler::Jump notDefaultHasInstance = m_jit.branchTest8(MacroAssembler::Zero, MacroAssembler::Address(scratchReg, Structure::typeInfoFlagsOffset()), TrustedImm32(ImplementsDefaultHasInstance));
-
- // Check that prototype is an object
- m_jit.loadPtr(MacroAssembler::Address(prototypeReg, JSCell::structureOffset()), scratchReg);
- MacroAssembler::Jump protoNotObject = m_jit.branchIfNotObject(scratchReg);
-
- // Initialize scratchReg with the value being checked.
- m_jit.move(valueReg, scratchReg);
-
- // Walk up the prototype chain of the value (in scratchReg), comparing to prototypeReg.
- MacroAssembler::Label loop(&m_jit);
- m_jit.loadPtr(MacroAssembler::Address(scratchReg, JSCell::structureOffset()), scratchReg);
- m_jit.loadPtr(MacroAssembler::Address(scratchReg, Structure::prototypeOffset()), scratchReg);
- MacroAssembler::Jump isInstance = m_jit.branchPtr(MacroAssembler::Equal, scratchReg, prototypeReg);
- m_jit.branchTestPtr(MacroAssembler::Zero, scratchReg, GPRInfo::tagMaskRegister).linkTo(loop, &m_jit);
-
- // No match - result is false.
- m_jit.move(MacroAssembler::TrustedImmPtr(JSValue::encode(jsBoolean(false))), scratchReg);
- MacroAssembler::Jump wasNotInstance = m_jit.jump();
-
- // Link to here if any checks fail that require us to try calling out to an operation to help,
- // e.g. for an API overridden HasInstance.
- valueNotCell.link(&m_jit);
- prototypeNotCell.link(&m_jit);
- notDefaultHasInstance.link(&m_jit);
- protoNotObject.link(&m_jit);
-
- silentSpillAllRegisters(scratchReg);
- setupStubArguments(valueReg, baseReg, prototypeReg);
- m_jit.move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0);
- appendCallWithExceptionCheck(operationInstanceOf);
- m_jit.move(GPRInfo::returnValueGPR, scratchReg);
- silentFillAllRegisters(scratchReg);
-
- MacroAssembler::Jump wasNotDefaultHasInstance = m_jit.jump();
-
- isInstance.link(&m_jit);
- m_jit.move(MacroAssembler::TrustedImmPtr(JSValue::encode(jsBoolean(true))), scratchReg);
-
- wasNotInstance.link(&m_jit);
- wasNotDefaultHasInstance.link(&m_jit);
- jsValueResult(scratchReg, m_compileIndex, UseChildrenCalledExplicitly);
-}
-
JITCompiler::Call JITCodeGenerator::cachedGetById(GPRReg baseGPR, GPRReg resultGPR, GPRReg scratchGPR, unsigned identifierNumber, JITCompiler::Jump slowPathTarget, NodeType nodeType)
{
ASSERT(nodeType == GetById || nodeType == GetMethod);
Modified: trunk/Source/_javascript_Core/dfg/DFGOperations.cpp (97106 => 97107)
--- trunk/Source/_javascript_Core/dfg/DFGOperations.cpp 2011-10-10 23:59:37 UTC (rev 97106)
+++ trunk/Source/_javascript_Core/dfg/DFGOperations.cpp 2011-10-11 00:08:54 UTC (rev 97107)
@@ -184,16 +184,6 @@
return JSValue::encode(jsAddSlowCase(exec, op1, op2));
}
-// 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(fmod(num1, num2)));
-}
-
static inline EncodedJSValue getByVal(ExecState* exec, JSCell* base, uint32_t index)
{
JSGlobalData* globalData = &exec->globalData();
@@ -727,32 +717,6 @@
return virtualFor(execCallee, CodeForConstruct);
}
-EncodedJSValue DFG_OPERATION operationInstanceOf(ExecState* exec, EncodedJSValue encodedValue, EncodedJSValue encodedBase, EncodedJSValue encodedPrototype)
-{
- JSValue value = JSValue::decode(encodedValue);
- JSValue base = JSValue::decode(encodedBase);
- JSValue prototype = JSValue::decode(encodedPrototype);
-
- // Otherwise CheckHasInstance should have failed.
- ASSERT(base.isCell());
- // At least one of these checks must have failed to get to the slow case.
- ASSERT(!value.isCell()
- || !prototype.isCell()
- || !prototype.isObject()
- || !base.asCell()->structure()->typeInfo().implementsDefaultHasInstance());
-
-
- // ECMA-262 15.3.5.3:
- // Throw an exception either if base is not an object, or if it does not implement 'HasInstance' (i.e. is a function).
- TypeInfo typeInfo(UnspecifiedType);
- if (!base.isObject() || !(typeInfo = asObject(base)->structure()->typeInfo()).implementsHasInstance()) {
- throwError(exec, createInvalidParamError(exec, "instanceof", base));
- return JSValue::encode(jsUndefined());
- }
-
- return JSValue::encode(jsBoolean(asObject(base)->hasInstance(exec, value, prototype)));
-}
-
EncodedJSValue DFG_OPERATION operationResolve(ExecState* exec, Identifier* propertyName)
{
ScopeChainNode* scopeChain = exec->scopeChain();
@@ -835,16 +799,6 @@
return JSValue::encode(RegExpObject::create(exec->globalData(), exec->lexicalGlobalObject(), exec->lexicalGlobalObject()->regExpStructure(), regexp));
}
-void DFG_OPERATION operationThrowHasInstanceError(ExecState* exec, EncodedJSValue encodedBase)
-{
- JSValue base = JSValue::decode(encodedBase);
-
- // We should only call this function if base is not an object, or if it does not implement 'HasInstance'.
- ASSERT(!base.isObject() || !asObject(base)->structure()->typeInfo().implementsHasInstance());
-
- throwError(exec, createInvalidParamError(exec, "instanceof", base));
-}
-
DFGHandler DFG_OPERATION lookupExceptionHandler(ExecState* exec, ReturnAddressPtr faultLocation)
{
JSValue exceptionValue = exec->exception();
Modified: trunk/Source/_javascript_Core/dfg/DFGOperations.h (97106 => 97107)
--- trunk/Source/_javascript_Core/dfg/DFGOperations.h 2011-10-10 23:59:37 UTC (rev 97106)
+++ trunk/Source/_javascript_Core/dfg/DFGOperations.h 2011-10-11 00:08:54 UTC (rev 97107)
@@ -96,7 +96,6 @@
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 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*);
@@ -104,7 +103,6 @@
EncodedJSValue DFG_OPERATION operationGetByIdProtoBuildList(ExecState*, JSCell*, Identifier*);
EncodedJSValue DFG_OPERATION operationGetByIdOptimize(ExecState*, JSCell*, Identifier*);
EncodedJSValue DFG_OPERATION operationGetMethodOptimize(ExecState*, JSCell*, Identifier*);
-EncodedJSValue DFG_OPERATION operationInstanceOf(ExecState*, EncodedJSValue value, EncodedJSValue base, EncodedJSValue prototype);
EncodedJSValue DFG_OPERATION operationResolve(ExecState*, Identifier*);
EncodedJSValue DFG_OPERATION operationResolveBase(ExecState*, Identifier*);
EncodedJSValue DFG_OPERATION operationResolveBaseStrictPut(ExecState*, Identifier*);
@@ -114,7 +112,6 @@
EncodedJSValue DFG_OPERATION operationNewArray(ExecState*, void* start, size_t);
EncodedJSValue DFG_OPERATION operationNewArrayBuffer(ExecState*, size_t, size_t);
EncodedJSValue DFG_OPERATION operationNewRegexp(ExecState*, void*);
-void DFG_OPERATION operationThrowHasInstanceError(ExecState*, EncodedJSValue base);
void DFG_OPERATION operationPutByValStrict(ExecState*, EncodedJSValue encodedBase, EncodedJSValue encodedProperty, EncodedJSValue encodedValue);
void DFG_OPERATION operationPutByValNonStrict(ExecState*, EncodedJSValue encodedBase, EncodedJSValue encodedProperty, EncodedJSValue encodedValue);
void DFG_OPERATION operationPutByValCellStrict(ExecState*, JSCell*, EncodedJSValue encodedProperty, EncodedJSValue encodedValue);