OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 #include "src/hydrogen-osr.h" | 9 #include "src/hydrogen-osr.h" |
10 #include "src/lithium-inl.h" | 10 #include "src/lithium-inl.h" |
(...skipping 1614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1625 LOperand* left = UseRegisterAtStart(instr->BetterLeftOperand()); | 1625 LOperand* left = UseRegisterAtStart(instr->BetterLeftOperand()); |
1626 LOperand* right = UseOrConstantAtStart(instr->BetterRightOperand()); | 1626 LOperand* right = UseOrConstantAtStart(instr->BetterRightOperand()); |
1627 LAddI* add = new (zone()) LAddI(left, right); | 1627 LAddI* add = new (zone()) LAddI(left, right); |
1628 LInstruction* result = DefineAsRegister(add); | 1628 LInstruction* result = DefineAsRegister(add); |
1629 if (instr->CheckFlag(HValue::kCanOverflow)) { | 1629 if (instr->CheckFlag(HValue::kCanOverflow)) { |
1630 result = AssignEnvironment(result); | 1630 result = AssignEnvironment(result); |
1631 } | 1631 } |
1632 return result; | 1632 return result; |
1633 } else if (instr->representation().IsExternal()) { | 1633 } else if (instr->representation().IsExternal()) { |
1634 DCHECK(instr->left()->representation().IsExternal()); | 1634 DCHECK(instr->left()->representation().IsExternal()); |
1635 DCHECK(instr->right()->representation().IsInteger32()); | 1635 DCHECK(instr->right()->representation().IsInteger32() || |
| 1636 instr->right()->representation().IsTagged()); |
1636 DCHECK(!instr->CheckFlag(HValue::kCanOverflow)); | 1637 DCHECK(!instr->CheckFlag(HValue::kCanOverflow)); |
1637 LOperand* left = UseRegisterAtStart(instr->left()); | 1638 LOperand* left = UseRegisterAtStart(instr->left()); |
1638 LOperand* right = UseOrConstantAtStart(instr->right()); | 1639 LOperand* right = UseOrConstantAtStart(instr->right()); |
1639 LAddI* add = new (zone()) LAddI(left, right); | 1640 LAddI* add = new (zone()) LAddI(left, right); |
1640 LInstruction* result = DefineAsRegister(add); | 1641 LInstruction* result = DefineAsRegister(add); |
1641 return result; | 1642 return result; |
1642 } else if (instr->representation().IsDouble()) { | 1643 } else if (instr->representation().IsDouble()) { |
1643 return DoArithmeticD(Token::ADD, instr); | 1644 return DoArithmeticD(Token::ADD, instr); |
1644 } else { | 1645 } else { |
1645 return DoArithmeticT(Token::ADD, instr); | 1646 return DoArithmeticT(Token::ADD, instr); |
(...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2638 LInstruction* LChunkBuilder::DoAllocateBlockContext( | 2639 LInstruction* LChunkBuilder::DoAllocateBlockContext( |
2639 HAllocateBlockContext* instr) { | 2640 HAllocateBlockContext* instr) { |
2640 LOperand* context = UseFixed(instr->context(), cp); | 2641 LOperand* context = UseFixed(instr->context(), cp); |
2641 LOperand* function = UseRegisterAtStart(instr->function()); | 2642 LOperand* function = UseRegisterAtStart(instr->function()); |
2642 LAllocateBlockContext* result = | 2643 LAllocateBlockContext* result = |
2643 new (zone()) LAllocateBlockContext(context, function); | 2644 new (zone()) LAllocateBlockContext(context, function); |
2644 return MarkAsCall(DefineFixed(result, cp), instr); | 2645 return MarkAsCall(DefineFixed(result, cp), instr); |
2645 } | 2646 } |
2646 } // namespace internal | 2647 } // namespace internal |
2647 } // namespace v8 | 2648 } // namespace v8 |
OLD | NEW |