| 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_CODEGEN_ARM64_H_ | 5 #ifndef V8_CRANKSHAFT_ARM64_LITHIUM_CODEGEN_ARM64_H_ |
| 6 #define V8_CRANKSHAFT_ARM64_LITHIUM_CODEGEN_ARM64_H_ | 6 #define V8_CRANKSHAFT_ARM64_LITHIUM_CODEGEN_ARM64_H_ |
| 7 | 7 |
| 8 #include "src/crankshaft/arm64/lithium-arm64.h" | 8 #include "src/crankshaft/arm64/lithium-arm64.h" |
| 9 | 9 |
| 10 #include "src/ast/scopes.h" | 10 #include "src/ast/scopes.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 | 42 |
| 43 int LookupDestination(int block_id) const { | 43 int LookupDestination(int block_id) const { |
| 44 return chunk()->LookupDestination(block_id); | 44 return chunk()->LookupDestination(block_id); |
| 45 } | 45 } |
| 46 | 46 |
| 47 bool IsNextEmittedBlock(int block_id) const { | 47 bool IsNextEmittedBlock(int block_id) const { |
| 48 return LookupDestination(block_id) == GetNextEmittedBlock(); | 48 return LookupDestination(block_id) == GetNextEmittedBlock(); |
| 49 } | 49 } |
| 50 | 50 |
| 51 bool NeedsEagerFrame() const { | 51 bool NeedsEagerFrame() const { |
| 52 return HasAllocatedStackSlots() || info()->is_non_deferred_calling() || | 52 return GetStackSlotCount() > 0 || |
| 53 !info()->IsStub() || info()->requires_frame(); | 53 info()->is_non_deferred_calling() || |
| 54 !info()->IsStub() || |
| 55 info()->requires_frame(); |
| 54 } | 56 } |
| 55 bool NeedsDeferredFrame() const { | 57 bool NeedsDeferredFrame() const { |
| 56 return !NeedsEagerFrame() && info()->is_deferred_calling(); | 58 return !NeedsEagerFrame() && info()->is_deferred_calling(); |
| 57 } | 59 } |
| 58 | 60 |
| 59 LinkRegisterStatus GetLinkRegisterState() const { | 61 LinkRegisterStatus GetLinkRegisterState() const { |
| 60 return frame_is_built_ ? kLRHasBeenSaved : kLRHasNotBeenSaved; | 62 return frame_is_built_ ? kLRHasBeenSaved : kLRHasNotBeenSaved; |
| 61 } | 63 } |
| 62 | 64 |
| 63 // Try to generate code for the entire chunk, but it may fail if the | 65 // Try to generate code for the entire chunk, but it may fail if the |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 Register elements, | 246 Register elements, |
| 245 Register key, | 247 Register key, |
| 246 bool key_is_tagged, | 248 bool key_is_tagged, |
| 247 ElementsKind elements_kind, | 249 ElementsKind elements_kind, |
| 248 Representation representation, | 250 Representation representation, |
| 249 int base_offset); | 251 int base_offset); |
| 250 | 252 |
| 251 void RegisterEnvironmentForDeoptimization(LEnvironment* environment, | 253 void RegisterEnvironmentForDeoptimization(LEnvironment* environment, |
| 252 Safepoint::DeoptMode mode); | 254 Safepoint::DeoptMode mode); |
| 253 | 255 |
| 254 bool HasAllocatedStackSlots() const { | 256 int GetStackSlotCount() const { return chunk()->spill_slot_count(); } |
| 255 return chunk()->HasAllocatedStackSlots(); | |
| 256 } | |
| 257 int GetStackSlotCount() const { return chunk()->GetSpillSlotCount(); } | |
| 258 int GetTotalFrameSlotCount() const { | |
| 259 return chunk()->GetTotalFrameSlotCount(); | |
| 260 } | |
| 261 | 257 |
| 262 void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code, zone()); } | 258 void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code, zone()); } |
| 263 | 259 |
| 264 // Emit frame translation commands for an environment. | 260 // Emit frame translation commands for an environment. |
| 265 void WriteTranslation(LEnvironment* environment, Translation* translation); | 261 void WriteTranslation(LEnvironment* environment, Translation* translation); |
| 266 | 262 |
| 267 void AddToTranslation(LEnvironment* environment, | 263 void AddToTranslation(LEnvironment* environment, |
| 268 Translation* translation, | 264 Translation* translation, |
| 269 LOperand* op, | 265 LOperand* op, |
| 270 bool is_tagged, | 266 bool is_tagged, |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 protected: | 451 protected: |
| 456 MacroAssembler* masm() const { return codegen_->masm(); } | 452 MacroAssembler* masm() const { return codegen_->masm(); } |
| 457 | 453 |
| 458 LCodeGen* codegen_; | 454 LCodeGen* codegen_; |
| 459 }; | 455 }; |
| 460 | 456 |
| 461 } // namespace internal | 457 } // namespace internal |
| 462 } // namespace v8 | 458 } // namespace v8 |
| 463 | 459 |
| 464 #endif // V8_CRANKSHAFT_ARM64_LITHIUM_CODEGEN_ARM64_H_ | 460 #endif // V8_CRANKSHAFT_ARM64_LITHIUM_CODEGEN_ARM64_H_ |
| OLD | NEW |