OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 V(InstanceOfKnownGlobal) \ | 109 V(InstanceOfKnownGlobal) \ |
110 V(InstanceSize) \ | 110 V(InstanceSize) \ |
111 V(InstructionGap) \ | 111 V(InstructionGap) \ |
112 V(Integer32ToDouble) \ | 112 V(Integer32ToDouble) \ |
113 V(Integer32ToSmi) \ | 113 V(Integer32ToSmi) \ |
114 V(InvokeFunction) \ | 114 V(InvokeFunction) \ |
115 V(IsConstructCallAndBranch) \ | 115 V(IsConstructCallAndBranch) \ |
116 V(IsObjectAndBranch) \ | 116 V(IsObjectAndBranch) \ |
117 V(IsStringAndBranch) \ | 117 V(IsStringAndBranch) \ |
118 V(IsSmiAndBranch) \ | 118 V(IsSmiAndBranch) \ |
| 119 V(IsNumberAndBranch) \ |
119 V(IsUndetectableAndBranch) \ | 120 V(IsUndetectableAndBranch) \ |
120 V(Label) \ | 121 V(Label) \ |
121 V(LazyBailout) \ | 122 V(LazyBailout) \ |
122 V(LoadContextSlot) \ | 123 V(LoadContextSlot) \ |
123 V(LoadExternalArrayPointer) \ | 124 V(LoadExternalArrayPointer) \ |
124 V(LoadFieldByIndex) \ | 125 V(LoadFieldByIndex) \ |
125 V(LoadFunctionPrototype) \ | 126 V(LoadFunctionPrototype) \ |
126 V(LoadGlobalCell) \ | 127 V(LoadGlobalCell) \ |
127 V(LoadGlobalGeneric) \ | 128 V(LoadGlobalGeneric) \ |
128 V(LoadKeyed) \ | 129 V(LoadKeyed) \ |
(...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
914 | 915 |
915 LOperand* value() { return inputs_[0]; } | 916 LOperand* value() { return inputs_[0]; } |
916 LOperand* temp() { return temps_[0]; } | 917 LOperand* temp() { return temps_[0]; } |
917 | 918 |
918 DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch") | 919 DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch") |
919 | 920 |
920 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 921 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
921 }; | 922 }; |
922 | 923 |
923 | 924 |
| 925 class LIsNumberAndBranch V8_FINAL : public LControlInstruction<1, 0> { |
| 926 public: |
| 927 explicit LIsNumberAndBranch(LOperand* value) { |
| 928 inputs_[0] = value; |
| 929 } |
| 930 |
| 931 LOperand* value() { return inputs_[0]; } |
| 932 |
| 933 DECLARE_CONCRETE_INSTRUCTION(IsNumberAndBranch, "is-number-and-branch") |
| 934 DECLARE_HYDROGEN_ACCESSOR(IsNumberAndBranch) |
| 935 }; |
| 936 |
| 937 |
924 class LIsStringAndBranch V8_FINAL : public LControlInstruction<1, 1> { | 938 class LIsStringAndBranch V8_FINAL : public LControlInstruction<1, 1> { |
925 public: | 939 public: |
926 LIsStringAndBranch(LOperand* value, LOperand* temp) { | 940 LIsStringAndBranch(LOperand* value, LOperand* temp) { |
927 inputs_[0] = value; | 941 inputs_[0] = value; |
928 temps_[0] = temp; | 942 temps_[0] = temp; |
929 } | 943 } |
930 | 944 |
931 LOperand* value() { return inputs_[0]; } | 945 LOperand* value() { return inputs_[0]; } |
932 LOperand* temp() { return temps_[0]; } | 946 LOperand* temp() { return temps_[0]; } |
933 | 947 |
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1613 } | 1627 } |
1614 LOperand* elements() { return inputs_[0]; } | 1628 LOperand* elements() { return inputs_[0]; } |
1615 LOperand* key() { return inputs_[1]; } | 1629 LOperand* key() { return inputs_[1]; } |
1616 ElementsKind elements_kind() const { | 1630 ElementsKind elements_kind() const { |
1617 return hydrogen()->elements_kind(); | 1631 return hydrogen()->elements_kind(); |
1618 } | 1632 } |
1619 bool is_external() const { | 1633 bool is_external() const { |
1620 return hydrogen()->is_external(); | 1634 return hydrogen()->is_external(); |
1621 } | 1635 } |
1622 | 1636 |
| 1637 virtual bool ClobbersDoubleRegisters() const V8_OVERRIDE { |
| 1638 return !CpuFeatures::IsSupported(SSE2) && |
| 1639 !IsDoubleOrFloatElementsKind(hydrogen()->elements_kind()); |
| 1640 } |
| 1641 |
1623 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed") | 1642 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed") |
1624 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed) | 1643 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed) |
1625 | 1644 |
1626 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 1645 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
1627 uint32_t additional_index() const { return hydrogen()->index_offset(); } | 1646 uint32_t additional_index() const { return hydrogen()->index_offset(); } |
1628 bool key_is_smi() { | 1647 bool key_is_smi() { |
1629 return hydrogen()->key()->representation().IsTagged(); | 1648 return hydrogen()->key()->representation().IsTagged(); |
1630 } | 1649 } |
1631 }; | 1650 }; |
1632 | 1651 |
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2163 public: | 2182 public: |
2164 LTaggedToI(LOperand* value, LOperand* temp) { | 2183 LTaggedToI(LOperand* value, LOperand* temp) { |
2165 inputs_[0] = value; | 2184 inputs_[0] = value; |
2166 temps_[0] = temp; | 2185 temps_[0] = temp; |
2167 } | 2186 } |
2168 | 2187 |
2169 LOperand* value() { return inputs_[0]; } | 2188 LOperand* value() { return inputs_[0]; } |
2170 LOperand* temp() { return temps_[0]; } | 2189 LOperand* temp() { return temps_[0]; } |
2171 | 2190 |
2172 DECLARE_CONCRETE_INSTRUCTION(TaggedToI, "tagged-to-i") | 2191 DECLARE_CONCRETE_INSTRUCTION(TaggedToI, "tagged-to-i") |
2173 DECLARE_HYDROGEN_ACCESSOR(Change) | 2192 DECLARE_HYDROGEN_ACCESSOR(UnaryOperation) |
2174 | 2193 |
2175 bool truncating() { return hydrogen()->CanTruncateToInt32(); } | 2194 bool truncating() { return hydrogen()->CanTruncateToInt32(); } |
2176 }; | 2195 }; |
2177 | 2196 |
2178 | 2197 |
2179 class LSmiTag V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 2198 class LSmiTag V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
2180 public: | 2199 public: |
2181 explicit LSmiTag(LOperand* value) { | 2200 explicit LSmiTag(LOperand* value) { |
2182 inputs_[0] = value; | 2201 inputs_[0] = value; |
2183 } | 2202 } |
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2881 int* argument_index_accumulator, | 2900 int* argument_index_accumulator, |
2882 ZoneList<HValue*>* objects_to_materialize); | 2901 ZoneList<HValue*>* objects_to_materialize); |
2883 | 2902 |
2884 void VisitInstruction(HInstruction* current); | 2903 void VisitInstruction(HInstruction* current); |
2885 | 2904 |
2886 void DoBasicBlock(HBasicBlock* block, HBasicBlock* next_block); | 2905 void DoBasicBlock(HBasicBlock* block, HBasicBlock* next_block); |
2887 LInstruction* DoShift(Token::Value op, HBitwiseBinaryOperation* instr); | 2906 LInstruction* DoShift(Token::Value op, HBitwiseBinaryOperation* instr); |
2888 LInstruction* DoArithmeticD(Token::Value op, | 2907 LInstruction* DoArithmeticD(Token::Value op, |
2889 HArithmeticBinaryOperation* instr); | 2908 HArithmeticBinaryOperation* instr); |
2890 LInstruction* DoArithmeticT(Token::Value op, | 2909 LInstruction* DoArithmeticT(Token::Value op, |
2891 HBinaryOperation* instr); | 2910 HArithmeticBinaryOperation* instr); |
2892 | 2911 |
2893 LOperand* GetStoreKeyedValueOperand(HStoreKeyed* instr); | 2912 LOperand* GetStoreKeyedValueOperand(HStoreKeyed* instr); |
2894 | 2913 |
2895 LPlatformChunk* chunk_; | 2914 LPlatformChunk* chunk_; |
2896 CompilationInfo* info_; | 2915 CompilationInfo* info_; |
2897 HGraph* const graph_; | 2916 HGraph* const graph_; |
2898 Zone* zone_; | 2917 Zone* zone_; |
2899 Status status_; | 2918 Status status_; |
2900 HInstruction* current_instruction_; | 2919 HInstruction* current_instruction_; |
2901 HBasicBlock* current_block_; | 2920 HBasicBlock* current_block_; |
2902 HBasicBlock* next_block_; | 2921 HBasicBlock* next_block_; |
2903 int argument_count_; | 2922 int argument_count_; |
2904 LAllocator* allocator_; | 2923 LAllocator* allocator_; |
2905 int position_; | 2924 int position_; |
2906 LInstruction* instruction_pending_deoptimization_environment_; | 2925 LInstruction* instruction_pending_deoptimization_environment_; |
2907 BailoutId pending_deoptimization_ast_id_; | 2926 BailoutId pending_deoptimization_ast_id_; |
2908 | 2927 |
2909 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2928 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2910 }; | 2929 }; |
2911 | 2930 |
2912 #undef DECLARE_HYDROGEN_ACCESSOR | 2931 #undef DECLARE_HYDROGEN_ACCESSOR |
2913 #undef DECLARE_CONCRETE_INSTRUCTION | 2932 #undef DECLARE_CONCRETE_INSTRUCTION |
2914 | 2933 |
2915 } } // namespace v8::internal | 2934 } } // namespace v8::internal |
2916 | 2935 |
2917 #endif // V8_IA32_LITHIUM_IA32_H_ | 2936 #endif // V8_IA32_LITHIUM_IA32_H_ |
OLD | NEW |