Index: src/ia32/lithium-ia32.cc |
=================================================================== |
--- src/ia32/lithium-ia32.cc (revision 9842) |
+++ src/ia32/lithium-ia32.cc (working copy) |
@@ -820,29 +820,6 @@ |
} |
-LInstruction* LChunkBuilder::DoBit(Token::Value op, |
- HBitwiseBinaryOperation* instr) { |
- if (instr->representation().IsInteger32()) { |
- ASSERT(instr->left()->representation().IsInteger32()); |
- ASSERT(instr->right()->representation().IsInteger32()); |
- |
- LOperand* left = UseRegisterAtStart(instr->LeastConstantOperand()); |
- LOperand* right = UseOrConstantAtStart(instr->MostConstantOperand()); |
- return DefineSameAsFirst(new LBitI(op, left, right)); |
- } else { |
- ASSERT(instr->representation().IsTagged()); |
- ASSERT(instr->left()->representation().IsTagged()); |
- ASSERT(instr->right()->representation().IsTagged()); |
- |
- LOperand* context = UseFixed(instr->context(), esi); |
- LOperand* left = UseFixed(instr->left(), edx); |
- LOperand* right = UseFixed(instr->right(), eax); |
- LArithmeticT* result = new LArithmeticT(op, context, left, right); |
- return MarkAsCall(DefineFixed(result, eax), instr); |
- } |
-} |
- |
- |
LInstruction* LChunkBuilder::DoShift(Token::Value op, |
HBitwiseBinaryOperation* instr) { |
if (instr->representation().IsTagged()) { |
@@ -1278,8 +1255,25 @@ |
} |
-LInstruction* LChunkBuilder::DoBitAnd(HBitAnd* instr) { |
- return DoBit(Token::BIT_AND, instr); |
+LInstruction* LChunkBuilder::DoBitwise(HBitwise* instr) { |
+ if (instr->representation().IsInteger32()) { |
+ ASSERT(instr->left()->representation().IsInteger32()); |
+ ASSERT(instr->right()->representation().IsInteger32()); |
+ |
+ LOperand* left = UseRegisterAtStart(instr->LeastConstantOperand()); |
+ LOperand* right = UseOrConstantAtStart(instr->MostConstantOperand()); |
+ return DefineSameAsFirst(new LBitI(left, right)); |
+ } else { |
+ ASSERT(instr->representation().IsTagged()); |
+ ASSERT(instr->left()->representation().IsTagged()); |
+ ASSERT(instr->right()->representation().IsTagged()); |
+ |
+ LOperand* context = UseFixed(instr->context(), esi); |
+ LOperand* left = UseFixed(instr->left(), edx); |
+ LOperand* right = UseFixed(instr->right(), eax); |
+ LArithmeticT* result = new LArithmeticT(instr->op(), context, left, right); |
+ return MarkAsCall(DefineFixed(result, eax), instr); |
+ } |
} |
@@ -1292,16 +1286,6 @@ |
} |
-LInstruction* LChunkBuilder::DoBitOr(HBitOr* instr) { |
- return DoBit(Token::BIT_OR, instr); |
-} |
- |
- |
-LInstruction* LChunkBuilder::DoBitXor(HBitXor* instr) { |
- return DoBit(Token::BIT_XOR, instr); |
-} |
- |
- |
LInstruction* LChunkBuilder::DoDiv(HDiv* instr) { |
if (instr->representation().IsDouble()) { |
return DoArithmeticD(Token::DIV, instr); |