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