OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X87 | 7 #if V8_TARGET_ARCH_X87 |
8 | 8 |
9 #include "src/hydrogen-osr.h" | 9 #include "src/hydrogen-osr.h" |
10 #include "src/lithium-allocator-inl.h" | 10 #include "src/lithium-allocator-inl.h" |
(...skipping 1433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1444 | 1444 |
1445 | 1445 |
1446 LInstruction* LChunkBuilder::DoModByPowerOf2I(HMod* instr) { | 1446 LInstruction* LChunkBuilder::DoModByPowerOf2I(HMod* instr) { |
1447 ASSERT(instr->representation().IsSmiOrInteger32()); | 1447 ASSERT(instr->representation().IsSmiOrInteger32()); |
1448 ASSERT(instr->left()->representation().Equals(instr->representation())); | 1448 ASSERT(instr->left()->representation().Equals(instr->representation())); |
1449 ASSERT(instr->right()->representation().Equals(instr->representation())); | 1449 ASSERT(instr->right()->representation().Equals(instr->representation())); |
1450 LOperand* dividend = UseRegisterAtStart(instr->left()); | 1450 LOperand* dividend = UseRegisterAtStart(instr->left()); |
1451 int32_t divisor = instr->right()->GetInteger32Constant(); | 1451 int32_t divisor = instr->right()->GetInteger32Constant(); |
1452 LInstruction* result = DefineSameAsFirst(new(zone()) LModByPowerOf2I( | 1452 LInstruction* result = DefineSameAsFirst(new(zone()) LModByPowerOf2I( |
1453 dividend, divisor)); | 1453 dividend, divisor)); |
1454 if (instr->CheckFlag(HValue::kBailoutOnMinusZero)) { | 1454 if (instr->CheckFlag(HValue::kLeftCanBeNegative) && |
| 1455 instr->CheckFlag(HValue::kBailoutOnMinusZero)) { |
1455 result = AssignEnvironment(result); | 1456 result = AssignEnvironment(result); |
1456 } | 1457 } |
1457 return result; | 1458 return result; |
1458 } | 1459 } |
1459 | 1460 |
1460 | 1461 |
1461 LInstruction* LChunkBuilder::DoModByConstI(HMod* instr) { | 1462 LInstruction* LChunkBuilder::DoModByConstI(HMod* instr) { |
1462 ASSERT(instr->representation().IsSmiOrInteger32()); | 1463 ASSERT(instr->representation().IsSmiOrInteger32()); |
1463 ASSERT(instr->left()->representation().Equals(instr->representation())); | 1464 ASSERT(instr->left()->representation().Equals(instr->representation())); |
1464 ASSERT(instr->right()->representation().Equals(instr->representation())); | 1465 ASSERT(instr->right()->representation().Equals(instr->representation())); |
(...skipping 1209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2674 LOperand* function = UseRegisterAtStart(instr->function()); | 2675 LOperand* function = UseRegisterAtStart(instr->function()); |
2675 LAllocateBlockContext* result = | 2676 LAllocateBlockContext* result = |
2676 new(zone()) LAllocateBlockContext(context, function); | 2677 new(zone()) LAllocateBlockContext(context, function); |
2677 return MarkAsCall(DefineFixed(result, esi), instr); | 2678 return MarkAsCall(DefineFixed(result, esi), instr); |
2678 } | 2679 } |
2679 | 2680 |
2680 | 2681 |
2681 } } // namespace v8::internal | 2682 } } // namespace v8::internal |
2682 | 2683 |
2683 #endif // V8_TARGET_ARCH_X87 | 2684 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |