| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 1731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1742 return DefineAsRegister(new(zone()) LMapEnumLength(map)); | 1742 return DefineAsRegister(new(zone()) LMapEnumLength(map)); |
| 1743 } | 1743 } |
| 1744 | 1744 |
| 1745 | 1745 |
| 1746 LInstruction* LChunkBuilder::DoFlooringDivByPowerOf2I(HMathFloorOfDiv* instr) { | 1746 LInstruction* LChunkBuilder::DoFlooringDivByPowerOf2I(HMathFloorOfDiv* instr) { |
| 1747 ASSERT(instr->representation().IsInteger32()); | 1747 ASSERT(instr->representation().IsInteger32()); |
| 1748 ASSERT(instr->left()->representation().Equals(instr->representation())); | 1748 ASSERT(instr->left()->representation().Equals(instr->representation())); |
| 1749 ASSERT(instr->right()->representation().Equals(instr->representation())); | 1749 ASSERT(instr->right()->representation().Equals(instr->representation())); |
| 1750 LOperand* dividend = UseRegisterAtStart(instr->left()); | 1750 LOperand* dividend = UseRegisterAtStart(instr->left()); |
| 1751 int32_t divisor = instr->right()->GetInteger32Constant(); | 1751 int32_t divisor = instr->right()->GetInteger32Constant(); |
| 1752 LInstruction* result = | 1752 LInstruction* result = DefineAsRegister(new(zone()) LFlooringDivByPowerOf2I( |
| 1753 DefineSameAsFirst(new(zone()) LFlooringDivByPowerOf2I(dividend, divisor)); | 1753 dividend, divisor)); |
| 1754 bool can_deopt = | 1754 if ((instr->CheckFlag(HValue::kBailoutOnMinusZero) && divisor < 0) || |
| 1755 (instr->CheckFlag(HValue::kBailoutOnMinusZero) && divisor < 0) || | 1755 (instr->CheckFlag(HValue::kLeftCanBeMinInt) && divisor == -1)) { |
| 1756 (instr->left()->RangeCanInclude(kMinInt) && divisor == -1); | 1756 result = AssignEnvironment(result); |
| 1757 return can_deopt ? AssignEnvironment(result) : result; | 1757 } |
| 1758 return result; |
| 1758 } | 1759 } |
| 1759 | 1760 |
| 1760 | 1761 |
| 1761 LInstruction* LChunkBuilder::DoFlooringDivByConstI(HMathFloorOfDiv* instr) { | 1762 LInstruction* LChunkBuilder::DoFlooringDivByConstI(HMathFloorOfDiv* instr) { |
| 1762 ASSERT(instr->representation().IsInteger32()); | 1763 ASSERT(instr->representation().IsInteger32()); |
| 1763 ASSERT(instr->left()->representation().Equals(instr->representation())); | 1764 ASSERT(instr->left()->representation().Equals(instr->representation())); |
| 1764 ASSERT(instr->right()->representation().Equals(instr->representation())); | 1765 ASSERT(instr->right()->representation().Equals(instr->representation())); |
| 1765 LOperand* dividend = UseRegister(instr->left()); | 1766 LOperand* dividend = UseRegister(instr->left()); |
| 1766 int32_t divisor = instr->right()->GetInteger32Constant(); | 1767 int32_t divisor = instr->right()->GetInteger32Constant(); |
| 1767 LInstruction* result = | 1768 LInstruction* result = |
| (...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2562 | 2563 |
| 2563 LInstruction* LChunkBuilder::DoWrapReceiver(HWrapReceiver* instr) { | 2564 LInstruction* LChunkBuilder::DoWrapReceiver(HWrapReceiver* instr) { |
| 2564 LOperand* receiver = UseRegister(instr->receiver()); | 2565 LOperand* receiver = UseRegister(instr->receiver()); |
| 2565 LOperand* function = UseRegister(instr->function()); | 2566 LOperand* function = UseRegister(instr->function()); |
| 2566 LWrapReceiver* result = new(zone()) LWrapReceiver(receiver, function); | 2567 LWrapReceiver* result = new(zone()) LWrapReceiver(receiver, function); |
| 2567 return AssignEnvironment(DefineAsRegister(result)); | 2568 return AssignEnvironment(DefineAsRegister(result)); |
| 2568 } | 2569 } |
| 2569 | 2570 |
| 2570 | 2571 |
| 2571 } } // namespace v8::internal | 2572 } } // namespace v8::internal |
| OLD | NEW |