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_MIPS_LITHIUM_MIPS_H_ | 5 #ifndef V8_MIPS_LITHIUM_MIPS_H_ |
6 #define V8_MIPS_LITHIUM_MIPS_H_ | 6 #define V8_MIPS_LITHIUM_MIPS_H_ |
7 | 7 |
8 #include "src/hydrogen.h" | 8 #include "src/hydrogen.h" |
9 #include "src/lithium.h" | 9 #include "src/lithium.h" |
10 #include "src/lithium-allocator.h" | 10 #include "src/lithium-allocator.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 V(DummyUse) \ | 76 V(DummyUse) \ |
77 V(FlooringDivByConstI) \ | 77 V(FlooringDivByConstI) \ |
78 V(FlooringDivByPowerOf2I) \ | 78 V(FlooringDivByPowerOf2I) \ |
79 V(FlooringDivI) \ | 79 V(FlooringDivI) \ |
80 V(ForInCacheArray) \ | 80 V(ForInCacheArray) \ |
81 V(ForInPrepareMap) \ | 81 V(ForInPrepareMap) \ |
82 V(FunctionLiteral) \ | 82 V(FunctionLiteral) \ |
83 V(GetCachedArrayIndex) \ | 83 V(GetCachedArrayIndex) \ |
84 V(Goto) \ | 84 V(Goto) \ |
85 V(HasCachedArrayIndexAndBranch) \ | 85 V(HasCachedArrayIndexAndBranch) \ |
| 86 V(HasInPrototypeChainAndBranch) \ |
86 V(HasInstanceTypeAndBranch) \ | 87 V(HasInstanceTypeAndBranch) \ |
87 V(InnerAllocatedObject) \ | 88 V(InnerAllocatedObject) \ |
88 V(InstanceOf) \ | 89 V(InstanceOf) \ |
89 V(InstanceOfKnownGlobal) \ | |
90 V(InstructionGap) \ | 90 V(InstructionGap) \ |
91 V(Integer32ToDouble) \ | 91 V(Integer32ToDouble) \ |
92 V(InvokeFunction) \ | 92 V(InvokeFunction) \ |
93 V(IsConstructCallAndBranch) \ | 93 V(IsConstructCallAndBranch) \ |
94 V(IsObjectAndBranch) \ | 94 V(IsObjectAndBranch) \ |
95 V(IsStringAndBranch) \ | 95 V(IsStringAndBranch) \ |
96 V(IsSmiAndBranch) \ | 96 V(IsSmiAndBranch) \ |
97 V(IsUndetectableAndBranch) \ | 97 V(IsUndetectableAndBranch) \ |
98 V(Label) \ | 98 V(Label) \ |
99 V(LazyBailout) \ | 99 V(LazyBailout) \ |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 LEnvironment* environment() const { return environment_; } | 225 LEnvironment* environment() const { return environment_; } |
226 bool HasEnvironment() const { return environment_ != NULL; } | 226 bool HasEnvironment() const { return environment_ != NULL; } |
227 | 227 |
228 void set_pointer_map(LPointerMap* p) { pointer_map_.set(p); } | 228 void set_pointer_map(LPointerMap* p) { pointer_map_.set(p); } |
229 LPointerMap* pointer_map() const { return pointer_map_.get(); } | 229 LPointerMap* pointer_map() const { return pointer_map_.get(); } |
230 bool HasPointerMap() const { return pointer_map_.is_set(); } | 230 bool HasPointerMap() const { return pointer_map_.is_set(); } |
231 | 231 |
232 void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; } | 232 void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; } |
233 HValue* hydrogen_value() const { return hydrogen_value_; } | 233 HValue* hydrogen_value() const { return hydrogen_value_; } |
234 | 234 |
235 virtual void SetDeferredLazyDeoptimizationEnvironment(LEnvironment* env) { } | |
236 | |
237 void MarkAsCall() { bit_field_ = IsCallBits::update(bit_field_, true); } | 235 void MarkAsCall() { bit_field_ = IsCallBits::update(bit_field_, true); } |
238 bool IsCall() const { return IsCallBits::decode(bit_field_); } | 236 bool IsCall() const { return IsCallBits::decode(bit_field_); } |
239 | 237 |
240 // Interface to the register allocator and iterators. | 238 // Interface to the register allocator and iterators. |
241 bool ClobbersTemps() const { return IsCall(); } | 239 bool ClobbersTemps() const { return IsCall(); } |
242 bool ClobbersRegisters() const { return IsCall(); } | 240 bool ClobbersRegisters() const { return IsCall(); } |
243 virtual bool ClobbersDoubleRegisters(Isolate* isolate) const { | 241 virtual bool ClobbersDoubleRegisters(Isolate* isolate) const { |
244 return IsCall(); | 242 return IsCall(); |
245 } | 243 } |
246 | 244 |
(...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1163 | 1161 |
1164 | 1162 |
1165 class LInstanceOf final : public LTemplateInstruction<1, 3, 0> { | 1163 class LInstanceOf final : public LTemplateInstruction<1, 3, 0> { |
1166 public: | 1164 public: |
1167 LInstanceOf(LOperand* context, LOperand* left, LOperand* right) { | 1165 LInstanceOf(LOperand* context, LOperand* left, LOperand* right) { |
1168 inputs_[0] = context; | 1166 inputs_[0] = context; |
1169 inputs_[1] = left; | 1167 inputs_[1] = left; |
1170 inputs_[2] = right; | 1168 inputs_[2] = right; |
1171 } | 1169 } |
1172 | 1170 |
1173 LOperand* context() { return inputs_[0]; } | 1171 LOperand* context() const { return inputs_[0]; } |
1174 LOperand* left() { return inputs_[1]; } | 1172 LOperand* left() const { return inputs_[1]; } |
1175 LOperand* right() { return inputs_[2]; } | 1173 LOperand* right() const { return inputs_[2]; } |
1176 | 1174 |
1177 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance-of") | 1175 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance-of") |
1178 }; | 1176 }; |
1179 | 1177 |
1180 | 1178 |
1181 class LInstanceOfKnownGlobal final : public LTemplateInstruction<1, 2, 1> { | 1179 class LHasInPrototypeChainAndBranch final : public LControlInstruction<2, 0> { |
1182 public: | 1180 public: |
1183 LInstanceOfKnownGlobal(LOperand* context, LOperand* value, LOperand* temp) { | 1181 LHasInPrototypeChainAndBranch(LOperand* object, LOperand* prototype) { |
1184 inputs_[0] = context; | 1182 inputs_[0] = object; |
1185 inputs_[1] = value; | 1183 inputs_[1] = prototype; |
1186 temps_[0] = temp; | |
1187 } | 1184 } |
1188 | 1185 |
1189 LOperand* context() { return inputs_[0]; } | 1186 LOperand* object() const { return inputs_[0]; } |
1190 LOperand* value() { return inputs_[1]; } | 1187 LOperand* prototype() const { return inputs_[1]; } |
1191 LOperand* temp() { return temps_[0]; } | |
1192 | 1188 |
1193 DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal, | 1189 DECLARE_CONCRETE_INSTRUCTION(HasInPrototypeChainAndBranch, |
1194 "instance-of-known-global") | 1190 "has-in-prototype-chain-and-branch") |
1195 DECLARE_HYDROGEN_ACCESSOR(InstanceOfKnownGlobal) | 1191 DECLARE_HYDROGEN_ACCESSOR(HasInPrototypeChainAndBranch) |
1196 | |
1197 Handle<JSFunction> function() const { return hydrogen()->function(); } | |
1198 LEnvironment* GetDeferredLazyDeoptimizationEnvironment() { | |
1199 return lazy_deopt_env_; | |
1200 } | |
1201 virtual void SetDeferredLazyDeoptimizationEnvironment( | |
1202 LEnvironment* env) override { | |
1203 lazy_deopt_env_ = env; | |
1204 } | |
1205 | |
1206 private: | |
1207 LEnvironment* lazy_deopt_env_; | |
1208 }; | 1192 }; |
1209 | 1193 |
1210 | 1194 |
1211 class LBoundsCheck final : public LTemplateInstruction<0, 2, 0> { | 1195 class LBoundsCheck final : public LTemplateInstruction<0, 2, 0> { |
1212 public: | 1196 public: |
1213 LBoundsCheck(LOperand* index, LOperand* length) { | 1197 LBoundsCheck(LOperand* index, LOperand* length) { |
1214 inputs_[0] = index; | 1198 inputs_[0] = index; |
1215 inputs_[1] = length; | 1199 inputs_[1] = length; |
1216 } | 1200 } |
1217 | 1201 |
(...skipping 1662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2880 | 2864 |
2881 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2865 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2882 }; | 2866 }; |
2883 | 2867 |
2884 #undef DECLARE_HYDROGEN_ACCESSOR | 2868 #undef DECLARE_HYDROGEN_ACCESSOR |
2885 #undef DECLARE_CONCRETE_INSTRUCTION | 2869 #undef DECLARE_CONCRETE_INSTRUCTION |
2886 | 2870 |
2887 } } // namespace v8::internal | 2871 } } // namespace v8::internal |
2888 | 2872 |
2889 #endif // V8_MIPS_LITHIUM_MIPS_H_ | 2873 #endif // V8_MIPS_LITHIUM_MIPS_H_ |
OLD | NEW |