| 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_IA32 | 9 #if V8_TARGET_ARCH_IA32 |
| 10 | 10 |
| (...skipping 1598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1609 ? DefineAsRegister(add) | 1609 ? DefineAsRegister(add) |
| 1610 : DefineSameAsFirst(add); | 1610 : DefineSameAsFirst(add); |
| 1611 if (can_overflow) { | 1611 if (can_overflow) { |
| 1612 result = AssignEnvironment(result); | 1612 result = AssignEnvironment(result); |
| 1613 } | 1613 } |
| 1614 return result; | 1614 return result; |
| 1615 } else if (instr->representation().IsDouble()) { | 1615 } else if (instr->representation().IsDouble()) { |
| 1616 return DoArithmeticD(Token::ADD, instr); | 1616 return DoArithmeticD(Token::ADD, instr); |
| 1617 } else if (instr->representation().IsExternal()) { | 1617 } else if (instr->representation().IsExternal()) { |
| 1618 DCHECK(instr->left()->representation().IsExternal()); | 1618 DCHECK(instr->left()->representation().IsExternal()); |
| 1619 DCHECK(instr->right()->representation().IsInteger32()); | 1619 DCHECK(instr->right()->representation().IsInteger32() || |
| 1620 instr->right()->representation().IsTagged()); |
| 1620 DCHECK(!instr->CheckFlag(HValue::kCanOverflow)); | 1621 DCHECK(!instr->CheckFlag(HValue::kCanOverflow)); |
| 1621 bool use_lea = LAddI::UseLea(instr); | 1622 bool use_lea = LAddI::UseLea(instr); |
| 1622 LOperand* left = UseRegisterAtStart(instr->left()); | 1623 LOperand* left = UseRegisterAtStart(instr->left()); |
| 1623 HValue* right_candidate = instr->right(); | 1624 HValue* right_candidate = instr->right(); |
| 1624 LOperand* right = use_lea | 1625 LOperand* right = use_lea |
| 1625 ? UseRegisterOrConstantAtStart(right_candidate) | 1626 ? UseRegisterOrConstantAtStart(right_candidate) |
| 1626 : UseOrConstantAtStart(right_candidate); | 1627 : UseOrConstantAtStart(right_candidate); |
| 1627 LAddI* add = new(zone()) LAddI(left, right); | 1628 LAddI* add = new(zone()) LAddI(left, right); |
| 1628 LInstruction* result = use_lea | 1629 LInstruction* result = use_lea |
| 1629 ? DefineAsRegister(add) | 1630 ? DefineAsRegister(add) |
| (...skipping 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2753 LAllocateBlockContext* result = | 2754 LAllocateBlockContext* result = |
| 2754 new(zone()) LAllocateBlockContext(context, function); | 2755 new(zone()) LAllocateBlockContext(context, function); |
| 2755 return MarkAsCall(DefineFixed(result, esi), instr); | 2756 return MarkAsCall(DefineFixed(result, esi), instr); |
| 2756 } | 2757 } |
| 2757 | 2758 |
| 2758 | 2759 |
| 2759 } // namespace internal | 2760 } // namespace internal |
| 2760 } // namespace v8 | 2761 } // namespace v8 |
| 2761 | 2762 |
| 2762 #endif // V8_TARGET_ARCH_IA32 | 2763 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |