| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1664 ASSERT(instr->left()->representation().Equals(instr->representation())); | 1664 ASSERT(instr->left()->representation().Equals(instr->representation())); |
| 1665 ASSERT(instr->right()->representation().Equals(instr->representation())); | 1665 ASSERT(instr->right()->representation().Equals(instr->representation())); |
| 1666 LOperand* left = UseRegisterAtStart(instr->BetterLeftOperand()); | 1666 LOperand* left = UseRegisterAtStart(instr->BetterLeftOperand()); |
| 1667 LOperand* right = UseOrConstantAtStart(instr->BetterRightOperand()); | 1667 LOperand* right = UseOrConstantAtStart(instr->BetterRightOperand()); |
| 1668 LAddI* add = new(zone()) LAddI(left, right); | 1668 LAddI* add = new(zone()) LAddI(left, right); |
| 1669 LInstruction* result = DefineAsRegister(add); | 1669 LInstruction* result = DefineAsRegister(add); |
| 1670 if (instr->CheckFlag(HValue::kCanOverflow)) { | 1670 if (instr->CheckFlag(HValue::kCanOverflow)) { |
| 1671 result = AssignEnvironment(result); | 1671 result = AssignEnvironment(result); |
| 1672 } | 1672 } |
| 1673 return result; | 1673 return result; |
| 1674 } else if (instr->representation().IsExternal()) { |
| 1675 ASSERT(instr->left()->representation().IsExternal()); |
| 1676 ASSERT(instr->right()->representation().IsInteger32()); |
| 1677 ASSERT(!instr->CheckFlag(HValue::kCanOverflow)); |
| 1678 LOperand* left = UseRegisterAtStart(instr->left()); |
| 1679 LOperand* right = UseOrConstantAtStart(instr->right()); |
| 1680 LAddI* add = new(zone()) LAddI(left, right); |
| 1681 LInstruction* result = DefineAsRegister(add); |
| 1682 return result; |
| 1674 } else if (instr->representation().IsDouble()) { | 1683 } else if (instr->representation().IsDouble()) { |
| 1675 if (instr->left()->IsMul()) { | 1684 if (instr->left()->IsMul()) { |
| 1676 return DoMultiplyAdd(HMul::cast(instr->left()), instr->right()); | 1685 return DoMultiplyAdd(HMul::cast(instr->left()), instr->right()); |
| 1677 } | 1686 } |
| 1678 | 1687 |
| 1679 if (instr->right()->IsMul()) { | 1688 if (instr->right()->IsMul()) { |
| 1680 ASSERT(!instr->left()->IsMul()); | 1689 ASSERT(!instr->left()->IsMul()); |
| 1681 return DoMultiplyAdd(HMul::cast(instr->right()), instr->left()); | 1690 return DoMultiplyAdd(HMul::cast(instr->right()), instr->left()); |
| 1682 } | 1691 } |
| 1683 | 1692 |
| (...skipping 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2687 | 2696 |
| 2688 | 2697 |
| 2689 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2698 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2690 LOperand* object = UseRegister(instr->object()); | 2699 LOperand* object = UseRegister(instr->object()); |
| 2691 LOperand* index = UseRegister(instr->index()); | 2700 LOperand* index = UseRegister(instr->index()); |
| 2692 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2701 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
| 2693 } | 2702 } |
| 2694 | 2703 |
| 2695 | 2704 |
| 2696 } } // namespace v8::internal | 2705 } } // namespace v8::internal |
| OLD | NEW |