Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Side by Side Diff: src/crankshaft/arm64/lithium-codegen-arm64.h

Issue 1702593002: More simplification and unification of frame handling (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Platform ports Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 GetStackSlotCount() > 0 || 52 return HasAllocatedStackSlots() || info()->is_non_deferred_calling() ||
53 info()->is_non_deferred_calling() || 53 !info()->IsStub() || info()->requires_frame();
54 !info()->IsStub() ||
55 info()->requires_frame();
56 } 54 }
57 bool NeedsDeferredFrame() const { 55 bool NeedsDeferredFrame() const {
58 return !NeedsEagerFrame() && info()->is_deferred_calling(); 56 return !NeedsEagerFrame() && info()->is_deferred_calling();
59 } 57 }
60 58
61 LinkRegisterStatus GetLinkRegisterState() const { 59 LinkRegisterStatus GetLinkRegisterState() const {
62 return frame_is_built_ ? kLRHasBeenSaved : kLRHasNotBeenSaved; 60 return frame_is_built_ ? kLRHasBeenSaved : kLRHasNotBeenSaved;
63 } 61 }
64 62
65 // Try to generate code for the entire chunk, but it may fail if the 63 // 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
246 Register elements, 244 Register elements,
247 Register key, 245 Register key,
248 bool key_is_tagged, 246 bool key_is_tagged,
249 ElementsKind elements_kind, 247 ElementsKind elements_kind,
250 Representation representation, 248 Representation representation,
251 int base_offset); 249 int base_offset);
252 250
253 void RegisterEnvironmentForDeoptimization(LEnvironment* environment, 251 void RegisterEnvironmentForDeoptimization(LEnvironment* environment,
254 Safepoint::DeoptMode mode); 252 Safepoint::DeoptMode mode);
255 253
256 int GetStackSlotCount() const { return chunk()->spill_slot_count(); } 254 bool HasAllocatedStackSlots() const {
255 return chunk()->HasAllocatedStackSlots();
256 }
257 int GetStackSlotCount() const { return chunk()->GetSpillSlotCount(); }
258 int GetTotalFrameSlotCount() const {
259 return chunk()->GetTotalFrameSlotCount();
260 }
257 261
258 void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code, zone()); } 262 void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code, zone()); }
259 263
260 // Emit frame translation commands for an environment. 264 // Emit frame translation commands for an environment.
261 void WriteTranslation(LEnvironment* environment, Translation* translation); 265 void WriteTranslation(LEnvironment* environment, Translation* translation);
262 266
263 void AddToTranslation(LEnvironment* environment, 267 void AddToTranslation(LEnvironment* environment,
264 Translation* translation, 268 Translation* translation,
265 LOperand* op, 269 LOperand* op,
266 bool is_tagged, 270 bool is_tagged,
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 protected: 455 protected:
452 MacroAssembler* masm() const { return codegen_->masm(); } 456 MacroAssembler* masm() const { return codegen_->masm(); }
453 457
454 LCodeGen* codegen_; 458 LCodeGen* codegen_;
455 }; 459 };
456 460
457 } // namespace internal 461 } // namespace internal
458 } // namespace v8 462 } // namespace v8
459 463
460 #endif // V8_CRANKSHAFT_ARM64_LITHIUM_CODEGEN_ARM64_H_ 464 #endif // V8_CRANKSHAFT_ARM64_LITHIUM_CODEGEN_ARM64_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698