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_IA32_LITHIUM_IA32_H_ | 5 #ifndef V8_IA32_LITHIUM_IA32_H_ |
6 #define V8_IA32_LITHIUM_IA32_H_ | 6 #define V8_IA32_LITHIUM_IA32_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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 V(DummyUse) \ | 80 V(DummyUse) \ |
81 V(FlooringDivByConstI) \ | 81 V(FlooringDivByConstI) \ |
82 V(FlooringDivByPowerOf2I) \ | 82 V(FlooringDivByPowerOf2I) \ |
83 V(FlooringDivI) \ | 83 V(FlooringDivI) \ |
84 V(ForInCacheArray) \ | 84 V(ForInCacheArray) \ |
85 V(ForInPrepareMap) \ | 85 V(ForInPrepareMap) \ |
86 V(FunctionLiteral) \ | 86 V(FunctionLiteral) \ |
87 V(GetCachedArrayIndex) \ | 87 V(GetCachedArrayIndex) \ |
88 V(Goto) \ | 88 V(Goto) \ |
89 V(HasCachedArrayIndexAndBranch) \ | 89 V(HasCachedArrayIndexAndBranch) \ |
| 90 V(HasInPrototypeChainAndBranch) \ |
90 V(HasInstanceTypeAndBranch) \ | 91 V(HasInstanceTypeAndBranch) \ |
91 V(InnerAllocatedObject) \ | 92 V(InnerAllocatedObject) \ |
92 V(InstanceOf) \ | 93 V(InstanceOf) \ |
93 V(InstanceOfKnownGlobal) \ | |
94 V(InstructionGap) \ | 94 V(InstructionGap) \ |
95 V(Integer32ToDouble) \ | 95 V(Integer32ToDouble) \ |
96 V(InvokeFunction) \ | 96 V(InvokeFunction) \ |
97 V(IsConstructCallAndBranch) \ | 97 V(IsConstructCallAndBranch) \ |
98 V(IsObjectAndBranch) \ | 98 V(IsObjectAndBranch) \ |
99 V(IsStringAndBranch) \ | 99 V(IsStringAndBranch) \ |
100 V(IsSmiAndBranch) \ | 100 V(IsSmiAndBranch) \ |
101 V(IsUndetectableAndBranch) \ | 101 V(IsUndetectableAndBranch) \ |
102 V(Label) \ | 102 V(Label) \ |
103 V(LazyBailout) \ | 103 V(LazyBailout) \ |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 LEnvironment* environment() const { return environment_; } | 229 LEnvironment* environment() const { return environment_; } |
230 bool HasEnvironment() const { return environment_ != NULL; } | 230 bool HasEnvironment() const { return environment_ != NULL; } |
231 | 231 |
232 void set_pointer_map(LPointerMap* p) { pointer_map_.set(p); } | 232 void set_pointer_map(LPointerMap* p) { pointer_map_.set(p); } |
233 LPointerMap* pointer_map() const { return pointer_map_.get(); } | 233 LPointerMap* pointer_map() const { return pointer_map_.get(); } |
234 bool HasPointerMap() const { return pointer_map_.is_set(); } | 234 bool HasPointerMap() const { return pointer_map_.is_set(); } |
235 | 235 |
236 void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; } | 236 void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; } |
237 HValue* hydrogen_value() const { return hydrogen_value_; } | 237 HValue* hydrogen_value() const { return hydrogen_value_; } |
238 | 238 |
239 virtual void SetDeferredLazyDeoptimizationEnvironment(LEnvironment* env) { } | |
240 | |
241 void MarkAsCall() { bit_field_ = IsCallBits::update(bit_field_, true); } | 239 void MarkAsCall() { bit_field_ = IsCallBits::update(bit_field_, true); } |
242 bool IsCall() const { return IsCallBits::decode(bit_field_); } | 240 bool IsCall() const { return IsCallBits::decode(bit_field_); } |
243 | 241 |
244 // Interface to the register allocator and iterators. | 242 // Interface to the register allocator and iterators. |
245 bool ClobbersTemps() const { return IsCall(); } | 243 bool ClobbersTemps() const { return IsCall(); } |
246 bool ClobbersRegisters() const { return IsCall(); } | 244 bool ClobbersRegisters() const { return IsCall(); } |
247 virtual bool ClobbersDoubleRegisters(Isolate* isolate) const { | 245 virtual bool ClobbersDoubleRegisters(Isolate* isolate) const { |
248 return IsCall(); | 246 return IsCall(); |
249 } | 247 } |
250 | 248 |
(...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1180 | 1178 |
1181 | 1179 |
1182 class LInstanceOf final : public LTemplateInstruction<1, 3, 0> { | 1180 class LInstanceOf final : public LTemplateInstruction<1, 3, 0> { |
1183 public: | 1181 public: |
1184 LInstanceOf(LOperand* context, LOperand* left, LOperand* right) { | 1182 LInstanceOf(LOperand* context, LOperand* left, LOperand* right) { |
1185 inputs_[0] = context; | 1183 inputs_[0] = context; |
1186 inputs_[1] = left; | 1184 inputs_[1] = left; |
1187 inputs_[2] = right; | 1185 inputs_[2] = right; |
1188 } | 1186 } |
1189 | 1187 |
1190 LOperand* context() { return inputs_[0]; } | 1188 LOperand* context() const { return inputs_[0]; } |
| 1189 LOperand* left() const { return inputs_[1]; } |
| 1190 LOperand* right() const { return inputs_[2]; } |
1191 | 1191 |
1192 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance-of") | 1192 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance-of") |
1193 }; | 1193 }; |
1194 | 1194 |
1195 | 1195 |
1196 class LInstanceOfKnownGlobal final : public LTemplateInstruction<1, 2, 1> { | 1196 class LHasInPrototypeChainAndBranch final : public LControlInstruction<2, 1> { |
1197 public: | 1197 public: |
1198 LInstanceOfKnownGlobal(LOperand* context, LOperand* value, LOperand* temp) { | 1198 LHasInPrototypeChainAndBranch(LOperand* object, LOperand* prototype, |
1199 inputs_[0] = context; | 1199 LOperand* scratch) { |
1200 inputs_[1] = value; | 1200 inputs_[0] = object; |
1201 temps_[0] = temp; | 1201 inputs_[1] = prototype; |
| 1202 temps_[0] = scratch; |
1202 } | 1203 } |
1203 | 1204 |
1204 LOperand* context() { return inputs_[0]; } | 1205 LOperand* object() const { return inputs_[0]; } |
1205 LOperand* value() { return inputs_[1]; } | 1206 LOperand* prototype() const { return inputs_[1]; } |
1206 LOperand* temp() { return temps_[0]; } | 1207 LOperand* scratch() const { return temps_[0]; } |
1207 | 1208 |
1208 DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal, | 1209 DECLARE_CONCRETE_INSTRUCTION(HasInPrototypeChainAndBranch, |
1209 "instance-of-known-global") | 1210 "has-in-prototype-chain-and-branch") |
1210 DECLARE_HYDROGEN_ACCESSOR(InstanceOfKnownGlobal) | 1211 DECLARE_HYDROGEN_ACCESSOR(HasInPrototypeChainAndBranch) |
1211 | |
1212 Handle<JSFunction> function() const { return hydrogen()->function(); } | |
1213 LEnvironment* GetDeferredLazyDeoptimizationEnvironment() { | |
1214 return lazy_deopt_env_; | |
1215 } | |
1216 virtual void SetDeferredLazyDeoptimizationEnvironment( | |
1217 LEnvironment* env) override { | |
1218 lazy_deopt_env_ = env; | |
1219 } | |
1220 | |
1221 private: | |
1222 LEnvironment* lazy_deopt_env_; | |
1223 }; | 1212 }; |
1224 | 1213 |
1225 | 1214 |
1226 class LBoundsCheck final : public LTemplateInstruction<0, 2, 0> { | 1215 class LBoundsCheck final : public LTemplateInstruction<0, 2, 0> { |
1227 public: | 1216 public: |
1228 LBoundsCheck(LOperand* index, LOperand* length) { | 1217 LBoundsCheck(LOperand* index, LOperand* length) { |
1229 inputs_[0] = index; | 1218 inputs_[0] = index; |
1230 inputs_[1] = length; | 1219 inputs_[1] = length; |
1231 } | 1220 } |
1232 | 1221 |
(...skipping 1683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2916 | 2905 |
2917 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2906 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2918 }; | 2907 }; |
2919 | 2908 |
2920 #undef DECLARE_HYDROGEN_ACCESSOR | 2909 #undef DECLARE_HYDROGEN_ACCESSOR |
2921 #undef DECLARE_CONCRETE_INSTRUCTION | 2910 #undef DECLARE_CONCRETE_INSTRUCTION |
2922 | 2911 |
2923 } } // namespace v8::internal | 2912 } } // namespace v8::internal |
2924 | 2913 |
2925 #endif // V8_IA32_LITHIUM_IA32_H_ | 2914 #endif // V8_IA32_LITHIUM_IA32_H_ |
OLD | NEW |