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_CRANKSHAFT_IA32_LITHIUM_IA32_H_ | 5 #ifndef V8_CRANKSHAFT_IA32_LITHIUM_IA32_H_ |
6 #define V8_CRANKSHAFT_IA32_LITHIUM_IA32_H_ | 6 #define V8_CRANKSHAFT_IA32_LITHIUM_IA32_H_ |
7 | 7 |
8 #include "src/crankshaft/hydrogen.h" | 8 #include "src/crankshaft/hydrogen.h" |
9 #include "src/crankshaft/lithium.h" | 9 #include "src/crankshaft/lithium.h" |
10 #include "src/crankshaft/lithium-allocator.h" | 10 #include "src/crankshaft/lithium-allocator.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 V(InvokeFunction) \ | 86 V(InvokeFunction) \ |
87 V(IsStringAndBranch) \ | 87 V(IsStringAndBranch) \ |
88 V(IsSmiAndBranch) \ | 88 V(IsSmiAndBranch) \ |
89 V(IsUndetectableAndBranch) \ | 89 V(IsUndetectableAndBranch) \ |
90 V(Label) \ | 90 V(Label) \ |
91 V(LazyBailout) \ | 91 V(LazyBailout) \ |
92 V(LoadContextSlot) \ | 92 V(LoadContextSlot) \ |
93 V(LoadFieldByIndex) \ | 93 V(LoadFieldByIndex) \ |
94 V(LoadFunctionPrototype) \ | 94 V(LoadFunctionPrototype) \ |
95 V(LoadKeyed) \ | 95 V(LoadKeyed) \ |
96 V(LoadKeyedGeneric) \ | |
97 V(LoadNamedField) \ | 96 V(LoadNamedField) \ |
98 V(LoadRoot) \ | 97 V(LoadRoot) \ |
99 V(MathAbs) \ | 98 V(MathAbs) \ |
100 V(MathClz32) \ | 99 V(MathClz32) \ |
101 V(MathCos) \ | 100 V(MathCos) \ |
102 V(MathExp) \ | 101 V(MathExp) \ |
103 V(MathFloorD) \ | 102 V(MathFloorD) \ |
104 V(MathFloorI) \ | 103 V(MathFloorI) \ |
105 V(MathFround) \ | 104 V(MathFround) \ |
106 V(MathLog) \ | 105 V(MathLog) \ |
(...skipping 1441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1548 ElementsKind elements_kind) { | 1547 ElementsKind elements_kind) { |
1549 // Operations that require the key to be divided by two to be converted into | 1548 // Operations that require the key to be divided by two to be converted into |
1550 // an index cannot fold the scale operation into a load and need an extra | 1549 // an index cannot fold the scale operation into a load and need an extra |
1551 // temp register to do the work. | 1550 // temp register to do the work. |
1552 return key_representation.IsSmi() && | 1551 return key_representation.IsSmi() && |
1553 (elements_kind == UINT8_ELEMENTS || elements_kind == INT8_ELEMENTS || | 1552 (elements_kind == UINT8_ELEMENTS || elements_kind == INT8_ELEMENTS || |
1554 elements_kind == UINT8_CLAMPED_ELEMENTS); | 1553 elements_kind == UINT8_CLAMPED_ELEMENTS); |
1555 } | 1554 } |
1556 | 1555 |
1557 | 1556 |
1558 class LLoadKeyedGeneric final : public LTemplateInstruction<1, 3, 1> { | |
1559 public: | |
1560 LLoadKeyedGeneric(LOperand* context, LOperand* obj, LOperand* key, | |
1561 LOperand* vector) { | |
1562 inputs_[0] = context; | |
1563 inputs_[1] = obj; | |
1564 inputs_[2] = key; | |
1565 temps_[0] = vector; | |
1566 } | |
1567 | |
1568 LOperand* context() { return inputs_[0]; } | |
1569 LOperand* object() { return inputs_[1]; } | |
1570 LOperand* key() { return inputs_[2]; } | |
1571 LOperand* temp_vector() { return temps_[0]; } | |
1572 | |
1573 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric, "load-keyed-generic") | |
1574 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedGeneric) | |
1575 }; | |
1576 | |
1577 class LLoadContextSlot final : public LTemplateInstruction<1, 1, 0> { | 1557 class LLoadContextSlot final : public LTemplateInstruction<1, 1, 0> { |
1578 public: | 1558 public: |
1579 explicit LLoadContextSlot(LOperand* context) { | 1559 explicit LLoadContextSlot(LOperand* context) { |
1580 inputs_[0] = context; | 1560 inputs_[0] = context; |
1581 } | 1561 } |
1582 | 1562 |
1583 LOperand* context() { return inputs_[0]; } | 1563 LOperand* context() { return inputs_[0]; } |
1584 | 1564 |
1585 DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot, "load-context-slot") | 1565 DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot, "load-context-slot") |
1586 DECLARE_HYDROGEN_ACCESSOR(LoadContextSlot) | 1566 DECLARE_HYDROGEN_ACCESSOR(LoadContextSlot) |
(...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2556 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2536 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2557 }; | 2537 }; |
2558 | 2538 |
2559 #undef DECLARE_HYDROGEN_ACCESSOR | 2539 #undef DECLARE_HYDROGEN_ACCESSOR |
2560 #undef DECLARE_CONCRETE_INSTRUCTION | 2540 #undef DECLARE_CONCRETE_INSTRUCTION |
2561 | 2541 |
2562 } // namespace internal | 2542 } // namespace internal |
2563 } // namespace v8 | 2543 } // namespace v8 |
2564 | 2544 |
2565 #endif // V8_CRANKSHAFT_IA32_LITHIUM_IA32_H_ | 2545 #endif // V8_CRANKSHAFT_IA32_LITHIUM_IA32_H_ |
OLD | NEW |