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_X87 | 9 #if V8_TARGET_ARCH_X87 |
10 | 10 |
(...skipping 1608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1619 ? DefineAsRegister(add) | 1619 ? DefineAsRegister(add) |
1620 : DefineSameAsFirst(add); | 1620 : DefineSameAsFirst(add); |
1621 if (can_overflow) { | 1621 if (can_overflow) { |
1622 result = AssignEnvironment(result); | 1622 result = AssignEnvironment(result); |
1623 } | 1623 } |
1624 return result; | 1624 return result; |
1625 } else if (instr->representation().IsDouble()) { | 1625 } else if (instr->representation().IsDouble()) { |
1626 return DoArithmeticD(Token::ADD, instr); | 1626 return DoArithmeticD(Token::ADD, instr); |
1627 } else if (instr->representation().IsExternal()) { | 1627 } else if (instr->representation().IsExternal()) { |
1628 DCHECK(instr->left()->representation().IsExternal()); | 1628 DCHECK(instr->left()->representation().IsExternal()); |
1629 DCHECK(instr->right()->representation().IsInteger32()); | 1629 DCHECK(instr->right()->representation().IsInteger32() || |
| 1630 instr->right()->representation().IsTagged()); |
1630 DCHECK(!instr->CheckFlag(HValue::kCanOverflow)); | 1631 DCHECK(!instr->CheckFlag(HValue::kCanOverflow)); |
1631 bool use_lea = LAddI::UseLea(instr); | 1632 bool use_lea = LAddI::UseLea(instr); |
1632 LOperand* left = UseRegisterAtStart(instr->left()); | 1633 LOperand* left = UseRegisterAtStart(instr->left()); |
1633 HValue* right_candidate = instr->right(); | 1634 HValue* right_candidate = instr->right(); |
1634 LOperand* right = use_lea | 1635 LOperand* right = use_lea |
1635 ? UseRegisterOrConstantAtStart(right_candidate) | 1636 ? UseRegisterOrConstantAtStart(right_candidate) |
1636 : UseOrConstantAtStart(right_candidate); | 1637 : UseOrConstantAtStart(right_candidate); |
1637 LAddI* add = new(zone()) LAddI(left, right); | 1638 LAddI* add = new(zone()) LAddI(left, right); |
1638 LInstruction* result = use_lea | 1639 LInstruction* result = use_lea |
1639 ? DefineAsRegister(add) | 1640 ? DefineAsRegister(add) |
(...skipping 1117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2757 LAllocateBlockContext* result = | 2758 LAllocateBlockContext* result = |
2758 new(zone()) LAllocateBlockContext(context, function); | 2759 new(zone()) LAllocateBlockContext(context, function); |
2759 return MarkAsCall(DefineFixed(result, esi), instr); | 2760 return MarkAsCall(DefineFixed(result, esi), instr); |
2760 } | 2761 } |
2761 | 2762 |
2762 | 2763 |
2763 } // namespace internal | 2764 } // namespace internal |
2764 } // namespace v8 | 2765 } // namespace v8 |
2765 | 2766 |
2766 #endif // V8_TARGET_ARCH_X87 | 2767 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |