Commit 9e0801c3 authored by titzer@chromium.org's avatar titzer@chromium.org

Translate NumberDivide/NumberModulus operators to Int32Div, Int32Mod in representation-change.h.

R=mstarzinger@chromium.org
BUG=

Review URL: https://codereview.chromium.org/597083002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24171 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 72dcfab2
......@@ -26,8 +26,6 @@ class ChangeLowering FINAL : public Reducer {
virtual Reduction Reduce(Node* node) OVERRIDE;
private:
enum Signedness { kSigned, kUnsigned };
Node* HeapNumberValueIndexConstant();
Node* SmiMaxValueConstant();
Node* SmiShiftBitsConstant();
......
......@@ -443,7 +443,6 @@ Reduction MachineOperatorReducer::Reduce(Node* node) {
if (m.IsChangeFloat32ToFloat64()) return Replace(m.node()->InputAt(0));
break;
}
// TODO(turbofan): strength-reduce and fold floating point operations.
default:
break;
}
......
......@@ -235,6 +235,12 @@ class RepresentationChanger {
return machine()->Int32Add();
case IrOpcode::kNumberSubtract:
return machine()->Int32Sub();
case IrOpcode::kNumberMultiply:
return machine()->Int32Mul();
case IrOpcode::kNumberDivide:
return machine()->Int32Div();
case IrOpcode::kNumberModulus:
return machine()->Int32Mod();
case IrOpcode::kNumberEqual:
return machine()->Word32Equal();
case IrOpcode::kNumberLessThan:
......@@ -253,6 +259,12 @@ class RepresentationChanger {
return machine()->Int32Add();
case IrOpcode::kNumberSubtract:
return machine()->Int32Sub();
case IrOpcode::kNumberMultiply:
return machine()->Int32Mul();
case IrOpcode::kNumberDivide:
return machine()->Int32UDiv();
case IrOpcode::kNumberModulus:
return machine()->Int32UMod();
case IrOpcode::kNumberEqual:
return machine()->Word32Equal();
case IrOpcode::kNumberLessThan:
......
......@@ -769,6 +769,9 @@ enum MinusZeroMode {
};
enum Signedness { kSigned, kUnsigned };
enum FunctionKind {
kNormalFunction = 0,
kArrowFunction = 1,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment