| 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 <sstream> | 5 #include <sstream> |
| 6 | 6 |
| 7 #include "src/v8.h" | 7 #include "src/v8.h" |
| 8 | 8 |
| 9 #if V8_TARGET_ARCH_X64 | 9 #if V8_TARGET_ARCH_X64 |
| 10 | 10 |
| (...skipping 1601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1612 } | 1612 } |
| 1613 LAddI* add = new(zone()) LAddI(left, right); | 1613 LAddI* add = new(zone()) LAddI(left, right); |
| 1614 bool can_overflow = instr->CheckFlag(HValue::kCanOverflow); | 1614 bool can_overflow = instr->CheckFlag(HValue::kCanOverflow); |
| 1615 LInstruction* result = use_lea ? DefineAsRegister(add) | 1615 LInstruction* result = use_lea ? DefineAsRegister(add) |
| 1616 : DefineSameAsFirst(add); | 1616 : DefineSameAsFirst(add); |
| 1617 if (can_overflow) { | 1617 if (can_overflow) { |
| 1618 result = AssignEnvironment(result); | 1618 result = AssignEnvironment(result); |
| 1619 } | 1619 } |
| 1620 return result; | 1620 return result; |
| 1621 } else if (instr->representation().IsExternal()) { | 1621 } else if (instr->representation().IsExternal()) { |
| 1622 DCHECK(instr->left()->representation().IsExternal()); | 1622 DCHECK(instr->IsConsistentExternalRepresentation()); |
| 1623 DCHECK(instr->right()->representation().IsInteger32()); | |
| 1624 DCHECK(!instr->CheckFlag(HValue::kCanOverflow)); | 1623 DCHECK(!instr->CheckFlag(HValue::kCanOverflow)); |
| 1625 bool use_lea = LAddI::UseLea(instr); | 1624 bool use_lea = LAddI::UseLea(instr); |
| 1626 LOperand* left = UseRegisterAtStart(instr->left()); | 1625 LOperand* left = UseRegisterAtStart(instr->left()); |
| 1627 HValue* right_candidate = instr->right(); | 1626 HValue* right_candidate = instr->right(); |
| 1628 LOperand* right = use_lea | 1627 LOperand* right = use_lea |
| 1629 ? UseRegisterOrConstantAtStart(right_candidate) | 1628 ? UseRegisterOrConstantAtStart(right_candidate) |
| 1630 : UseOrConstantAtStart(right_candidate); | 1629 : UseOrConstantAtStart(right_candidate); |
| 1631 LAddI* add = new(zone()) LAddI(left, right); | 1630 LAddI* add = new(zone()) LAddI(left, right); |
| 1632 LInstruction* result = use_lea | 1631 LInstruction* result = use_lea |
| 1633 ? DefineAsRegister(add) | 1632 ? DefineAsRegister(add) |
| (...skipping 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2773 LAllocateBlockContext* result = | 2772 LAllocateBlockContext* result = |
| 2774 new(zone()) LAllocateBlockContext(context, function); | 2773 new(zone()) LAllocateBlockContext(context, function); |
| 2775 return MarkAsCall(DefineFixed(result, rsi), instr); | 2774 return MarkAsCall(DefineFixed(result, rsi), instr); |
| 2776 } | 2775 } |
| 2777 | 2776 |
| 2778 | 2777 |
| 2779 } // namespace internal | 2778 } // namespace internal |
| 2780 } // namespace v8 | 2779 } // namespace v8 |
| 2781 | 2780 |
| 2782 #endif // V8_TARGET_ARCH_X64 | 2781 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |