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