| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64_LITHIUM_ARM64_H_ | 5 #ifndef V8_CRANKSHAFT_ARM64_LITHIUM_ARM64_H_ |
| 6 #define V8_CRANKSHAFT_ARM64_LITHIUM_ARM64_H_ | 6 #define V8_CRANKSHAFT_ARM64_LITHIUM_ARM64_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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 void MarkAsCall() { bit_field_ = IsCallBits::update(bit_field_, true); } | 235 void MarkAsCall() { bit_field_ = IsCallBits::update(bit_field_, true); } |
| 236 bool IsCall() const { return IsCallBits::decode(bit_field_); } | 236 bool IsCall() const { return IsCallBits::decode(bit_field_); } |
| 237 | 237 |
| 238 void MarkAsTailCall() { |
| 239 bit_field_ = IsTailCallBits::update(bit_field_, true); |
| 240 } |
| 241 bool IsTailCall() const { return IsTailCallBits::decode(bit_field_); } |
| 242 |
| 238 // Interface to the register allocator and iterators. | 243 // Interface to the register allocator and iterators. |
| 239 bool ClobbersTemps() const { return IsCall(); } | 244 bool ClobbersTemps() const { return IsCall(); } |
| 240 bool ClobbersRegisters() const { return IsCall(); } | 245 bool ClobbersRegisters() const { return IsCall(); } |
| 241 virtual bool ClobbersDoubleRegisters(Isolate* isolate) const { | 246 virtual bool ClobbersDoubleRegisters(Isolate* isolate) const { |
| 242 return IsCall(); | 247 return IsCall(); |
| 243 } | 248 } |
| 244 bool IsMarkedAsCall() const { return IsCall(); } | 249 bool IsMarkedAsCall() const { return IsCall(); } |
| 245 | 250 |
| 246 virtual bool HasResult() const = 0; | 251 virtual bool HasResult() const = 0; |
| 247 virtual LOperand* result() const = 0; | 252 virtual LOperand* result() const = 0; |
| 248 | 253 |
| 249 virtual int InputCount() = 0; | 254 virtual int InputCount() = 0; |
| 250 virtual LOperand* InputAt(int i) = 0; | 255 virtual LOperand* InputAt(int i) = 0; |
| 251 virtual int TempCount() = 0; | 256 virtual int TempCount() = 0; |
| 252 virtual LOperand* TempAt(int i) = 0; | 257 virtual LOperand* TempAt(int i) = 0; |
| 253 | 258 |
| 254 LOperand* FirstInput() { return InputAt(0); } | 259 LOperand* FirstInput() { return InputAt(0); } |
| 255 LOperand* Output() { return HasResult() ? result() : NULL; } | 260 LOperand* Output() { return HasResult() ? result() : NULL; } |
| 256 | 261 |
| 257 virtual bool HasInterestingComment(LCodeGen* gen) const { return true; } | 262 virtual bool HasInterestingComment(LCodeGen* gen) const { return true; } |
| 258 | 263 |
| 259 #ifdef DEBUG | 264 #ifdef DEBUG |
| 260 void VerifyCall(); | 265 void VerifyCall(); |
| 261 #endif | 266 #endif |
| 262 | 267 |
| 263 private: | 268 private: |
| 264 class IsCallBits: public BitField<bool, 0, 1> {}; | 269 class IsCallBits: public BitField<bool, 0, 1> {}; |
| 270 class IsTailCallBits : public BitField<bool, IsCallBits::kNext, 1> {}; |
| 265 | 271 |
| 266 LEnvironment* environment_; | 272 LEnvironment* environment_; |
| 267 SetOncePointer<LPointerMap> pointer_map_; | 273 SetOncePointer<LPointerMap> pointer_map_; |
| 268 HValue* hydrogen_value_; | 274 HValue* hydrogen_value_; |
| 269 int32_t bit_field_; | 275 int32_t bit_field_; |
| 270 }; | 276 }; |
| 271 | 277 |
| 272 | 278 |
| 273 // R = number of result operands (0 or 1). | 279 // R = number of result operands (0 or 1). |
| 274 template<int R> | 280 template<int R> |
| (...skipping 2755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3030 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 3036 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
| 3031 }; | 3037 }; |
| 3032 | 3038 |
| 3033 #undef DECLARE_HYDROGEN_ACCESSOR | 3039 #undef DECLARE_HYDROGEN_ACCESSOR |
| 3034 #undef DECLARE_CONCRETE_INSTRUCTION | 3040 #undef DECLARE_CONCRETE_INSTRUCTION |
| 3035 | 3041 |
| 3036 } // namespace internal | 3042 } // namespace internal |
| 3037 } // namespace v8 | 3043 } // namespace v8 |
| 3038 | 3044 |
| 3039 #endif // V8_CRANKSHAFT_ARM64_LITHIUM_ARM64_H_ | 3045 #endif // V8_CRANKSHAFT_ARM64_LITHIUM_ARM64_H_ |
| OLD | NEW |