| 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 #ifndef V8_X64_LITHIUM_X64_H_ | 5 #ifndef V8_X64_LITHIUM_X64_H_ |
| 6 #define V8_X64_LITHIUM_X64_H_ | 6 #define V8_X64_LITHIUM_X64_H_ |
| 7 | 7 |
| 8 #include "src/hydrogen.h" | 8 #include "src/hydrogen.h" |
| 9 #include "src/lithium-allocator.h" | 9 #include "src/lithium-allocator.h" |
| 10 #include "src/lithium.h" | 10 #include "src/lithium.h" |
| (...skipping 1590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1601 | 1601 |
| 1602 class LLoadRoot V8_FINAL : public LTemplateInstruction<1, 0, 0> { | 1602 class LLoadRoot V8_FINAL : public LTemplateInstruction<1, 0, 0> { |
| 1603 public: | 1603 public: |
| 1604 DECLARE_CONCRETE_INSTRUCTION(LoadRoot, "load-root") | 1604 DECLARE_CONCRETE_INSTRUCTION(LoadRoot, "load-root") |
| 1605 DECLARE_HYDROGEN_ACCESSOR(LoadRoot) | 1605 DECLARE_HYDROGEN_ACCESSOR(LoadRoot) |
| 1606 | 1606 |
| 1607 Heap::RootListIndex index() const { return hydrogen()->index(); } | 1607 Heap::RootListIndex index() const { return hydrogen()->index(); } |
| 1608 }; | 1608 }; |
| 1609 | 1609 |
| 1610 | 1610 |
| 1611 inline static bool ExternalArrayOpRequiresTemp( |
| 1612 Representation key_representation, |
| 1613 ElementsKind elements_kind) { |
| 1614 // Operations that require the key to be divided by two to be converted into |
| 1615 // an index cannot fold the scale operation into a load and need an extra |
| 1616 // temp register to do the work. |
| 1617 return SmiValuesAre31Bits() && key_representation.IsSmi() && |
| 1618 (elements_kind == EXTERNAL_INT8_ELEMENTS || |
| 1619 elements_kind == EXTERNAL_UINT8_ELEMENTS || |
| 1620 elements_kind == EXTERNAL_UINT8_CLAMPED_ELEMENTS || |
| 1621 elements_kind == UINT8_ELEMENTS || |
| 1622 elements_kind == INT8_ELEMENTS || |
| 1623 elements_kind == UINT8_CLAMPED_ELEMENTS); |
| 1624 } |
| 1625 |
| 1626 |
| 1611 class LLoadKeyed V8_FINAL : public LTemplateInstruction<1, 2, 0> { | 1627 class LLoadKeyed V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
| 1612 public: | 1628 public: |
| 1613 LLoadKeyed(LOperand* elements, LOperand* key) { | 1629 LLoadKeyed(LOperand* elements, LOperand* key) { |
| 1614 inputs_[0] = elements; | 1630 inputs_[0] = elements; |
| 1615 inputs_[1] = key; | 1631 inputs_[1] = key; |
| 1616 } | 1632 } |
| 1617 | 1633 |
| 1618 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed") | 1634 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed") |
| 1619 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed) | 1635 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed) |
| 1620 | 1636 |
| (...skipping 1222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2843 | 2859 |
| 2844 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2860 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
| 2845 }; | 2861 }; |
| 2846 | 2862 |
| 2847 #undef DECLARE_HYDROGEN_ACCESSOR | 2863 #undef DECLARE_HYDROGEN_ACCESSOR |
| 2848 #undef DECLARE_CONCRETE_INSTRUCTION | 2864 #undef DECLARE_CONCRETE_INSTRUCTION |
| 2849 | 2865 |
| 2850 } } // namespace v8::int | 2866 } } // namespace v8::int |
| 2851 | 2867 |
| 2852 #endif // V8_X64_LITHIUM_X64_H_ | 2868 #endif // V8_X64_LITHIUM_X64_H_ |
| OLD | NEW |