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 1611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1622 LInstruction* result = use_lea | 1622 LInstruction* result = use_lea |
1623 ? DefineAsRegister(add) | 1623 ? DefineAsRegister(add) |
1624 : DefineSameAsFirst(add); | 1624 : DefineSameAsFirst(add); |
1625 if (can_overflow) { | 1625 if (can_overflow) { |
1626 result = AssignEnvironment(result); | 1626 result = AssignEnvironment(result); |
1627 } | 1627 } |
1628 return result; | 1628 return result; |
1629 } else if (instr->representation().IsDouble()) { | 1629 } else if (instr->representation().IsDouble()) { |
1630 return DoArithmeticD(Token::ADD, instr); | 1630 return DoArithmeticD(Token::ADD, instr); |
1631 } else if (instr->representation().IsExternal()) { | 1631 } else if (instr->representation().IsExternal()) { |
1632 DCHECK(instr->left()->representation().IsExternal()); | 1632 DCHECK(instr->IsConsistentExternalRepresentation()); |
1633 DCHECK(instr->right()->representation().IsInteger32()); | |
1634 DCHECK(!instr->CheckFlag(HValue::kCanOverflow)); | 1633 DCHECK(!instr->CheckFlag(HValue::kCanOverflow)); |
1635 bool use_lea = LAddI::UseLea(instr); | 1634 bool use_lea = LAddI::UseLea(instr); |
1636 LOperand* left = UseRegisterAtStart(instr->left()); | 1635 LOperand* left = UseRegisterAtStart(instr->left()); |
1637 HValue* right_candidate = instr->right(); | 1636 HValue* right_candidate = instr->right(); |
1638 LOperand* right = use_lea | 1637 LOperand* right = use_lea |
1639 ? UseRegisterOrConstantAtStart(right_candidate) | 1638 ? UseRegisterOrConstantAtStart(right_candidate) |
1640 : UseOrConstantAtStart(right_candidate); | 1639 : UseOrConstantAtStart(right_candidate); |
1641 LAddI* add = new(zone()) LAddI(left, right); | 1640 LAddI* add = new(zone()) LAddI(left, right); |
1642 LInstruction* result = use_lea | 1641 LInstruction* result = use_lea |
1643 ? DefineAsRegister(add) | 1642 ? DefineAsRegister(add) |
(...skipping 1145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2789 LAllocateBlockContext* result = | 2788 LAllocateBlockContext* result = |
2790 new(zone()) LAllocateBlockContext(context, function); | 2789 new(zone()) LAllocateBlockContext(context, function); |
2791 return MarkAsCall(DefineFixed(result, esi), instr); | 2790 return MarkAsCall(DefineFixed(result, esi), instr); |
2792 } | 2791 } |
2793 | 2792 |
2794 | 2793 |
2795 } // namespace internal | 2794 } // namespace internal |
2796 } // namespace v8 | 2795 } // namespace v8 |
2797 | 2796 |
2798 #endif // V8_TARGET_ARCH_IA32 | 2797 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |