| 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_ARM_LITHIUM_ARM_H_ | 5 #ifndef V8_ARM_LITHIUM_ARM_H_ |
| 6 #define V8_ARM_LITHIUM_ARM_H_ | 6 #define V8_ARM_LITHIUM_ARM_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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 LEnvironment* environment() const { return environment_; } | 228 LEnvironment* environment() const { return environment_; } |
| 229 bool HasEnvironment() const { return environment_ != NULL; } | 229 bool HasEnvironment() const { return environment_ != NULL; } |
| 230 | 230 |
| 231 void set_pointer_map(LPointerMap* p) { pointer_map_.set(p); } | 231 void set_pointer_map(LPointerMap* p) { pointer_map_.set(p); } |
| 232 LPointerMap* pointer_map() const { return pointer_map_.get(); } | 232 LPointerMap* pointer_map() const { return pointer_map_.get(); } |
| 233 bool HasPointerMap() const { return pointer_map_.is_set(); } | 233 bool HasPointerMap() const { return pointer_map_.is_set(); } |
| 234 | 234 |
| 235 void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; } | 235 void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; } |
| 236 HValue* hydrogen_value() const { return hydrogen_value_; } | 236 HValue* hydrogen_value() const { return hydrogen_value_; } |
| 237 | 237 |
| 238 virtual void SetDeferredLazyDeoptimizationEnvironment(LEnvironment* env) { } | |
| 239 | |
| 240 void MarkAsCall() { bit_field_ = IsCallBits::update(bit_field_, true); } | 238 void MarkAsCall() { bit_field_ = IsCallBits::update(bit_field_, true); } |
| 241 bool IsCall() const { return IsCallBits::decode(bit_field_); } | 239 bool IsCall() const { return IsCallBits::decode(bit_field_); } |
| 242 | 240 |
| 243 // Interface to the register allocator and iterators. | 241 // Interface to the register allocator and iterators. |
| 244 bool ClobbersTemps() const { return IsCall(); } | 242 bool ClobbersTemps() const { return IsCall(); } |
| 245 bool ClobbersRegisters() const { return IsCall(); } | 243 bool ClobbersRegisters() const { return IsCall(); } |
| 246 virtual bool ClobbersDoubleRegisters(Isolate* isolate) const { | 244 virtual bool ClobbersDoubleRegisters(Isolate* isolate) const { |
| 247 return IsCall(); | 245 return IsCall(); |
| 248 } | 246 } |
| 249 | 247 |
| (...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1185 | 1183 |
| 1186 | 1184 |
| 1187 class LInstanceOf final : public LTemplateInstruction<1, 3, 0> { | 1185 class LInstanceOf final : public LTemplateInstruction<1, 3, 0> { |
| 1188 public: | 1186 public: |
| 1189 LInstanceOf(LOperand* context, LOperand* left, LOperand* right) { | 1187 LInstanceOf(LOperand* context, LOperand* left, LOperand* right) { |
| 1190 inputs_[0] = context; | 1188 inputs_[0] = context; |
| 1191 inputs_[1] = left; | 1189 inputs_[1] = left; |
| 1192 inputs_[2] = right; | 1190 inputs_[2] = right; |
| 1193 } | 1191 } |
| 1194 | 1192 |
| 1195 LOperand* context() { return inputs_[0]; } | 1193 LOperand* context() const { return inputs_[0]; } |
| 1196 LOperand* left() { return inputs_[1]; } | 1194 LOperand* left() const { return inputs_[1]; } |
| 1197 LOperand* right() { return inputs_[2]; } | 1195 LOperand* right() const { return inputs_[2]; } |
| 1198 | 1196 |
| 1199 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance-of") | 1197 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance-of") |
| 1200 }; | 1198 }; |
| 1201 | 1199 |
| 1202 | 1200 |
| 1203 class LInstanceOfKnownGlobal final : public LTemplateInstruction<1, 2, 1> { | 1201 class LHasInPrototypeChainAndBranch final : public LControlInstruction<2, 0> { |
| 1204 public: | 1202 public: |
| 1205 LInstanceOfKnownGlobal(LOperand* context, LOperand* value, LOperand* temp) { | 1203 LHasInPrototypeChainAndBranch(LOperand* object, LOperand* prototype) { |
| 1206 inputs_[0] = context; | 1204 inputs_[0] = object; |
| 1207 inputs_[1] = value; | 1205 inputs_[1] = prototype; |
| 1208 temps_[0] = temp; | |
| 1209 } | 1206 } |
| 1210 | 1207 |
| 1211 LOperand* context() { return inputs_[0]; } | 1208 LOperand* object() const { return inputs_[0]; } |
| 1212 LOperand* value() { return inputs_[1]; } | 1209 LOperand* prototype() const { return inputs_[1]; } |
| 1213 LOperand* temp() { return temps_[0]; } | |
| 1214 | 1210 |
| 1215 DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal, | 1211 DECLARE_CONCRETE_INSTRUCTION(HasInPrototypeChainAndBranch, |
| 1216 "instance-of-known-global") | 1212 "has-in-prototype-chain-and-branch") |
| 1217 DECLARE_HYDROGEN_ACCESSOR(InstanceOfKnownGlobal) | 1213 DECLARE_HYDROGEN_ACCESSOR(HasInPrototypeChainAndBranch) |
| 1218 | |
| 1219 Handle<JSFunction> function() const { return hydrogen()->function(); } | |
| 1220 LEnvironment* GetDeferredLazyDeoptimizationEnvironment() { | |
| 1221 return lazy_deopt_env_; | |
| 1222 } | |
| 1223 virtual void SetDeferredLazyDeoptimizationEnvironment( | |
| 1224 LEnvironment* env) override { | |
| 1225 lazy_deopt_env_ = env; | |
| 1226 } | |
| 1227 | |
| 1228 private: | |
| 1229 LEnvironment* lazy_deopt_env_; | |
| 1230 }; | 1214 }; |
| 1231 | 1215 |
| 1232 | 1216 |
| 1233 class LBoundsCheck final : public LTemplateInstruction<0, 2, 0> { | 1217 class LBoundsCheck final : public LTemplateInstruction<0, 2, 0> { |
| 1234 public: | 1218 public: |
| 1235 LBoundsCheck(LOperand* index, LOperand* length) { | 1219 LBoundsCheck(LOperand* index, LOperand* length) { |
| 1236 inputs_[0] = index; | 1220 inputs_[0] = index; |
| 1237 inputs_[1] = length; | 1221 inputs_[1] = length; |
| 1238 } | 1222 } |
| 1239 | 1223 |
| (...skipping 1682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2922 | 2906 |
| 2923 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2907 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
| 2924 }; | 2908 }; |
| 2925 | 2909 |
| 2926 #undef DECLARE_HYDROGEN_ACCESSOR | 2910 #undef DECLARE_HYDROGEN_ACCESSOR |
| 2927 #undef DECLARE_CONCRETE_INSTRUCTION | 2911 #undef DECLARE_CONCRETE_INSTRUCTION |
| 2928 | 2912 |
| 2929 } } // namespace v8::internal | 2913 } } // namespace v8::internal |
| 2930 | 2914 |
| 2931 #endif // V8_ARM_LITHIUM_ARM_H_ | 2915 #endif // V8_ARM_LITHIUM_ARM_H_ |
| OLD | NEW |