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

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

Issue 1702593002: More simplification and unification of frame handling (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix arm64 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
« no previous file with comments | « src/crankshaft/mips/lithium-mips.cc ('k') | src/crankshaft/mips64/lithium-codegen-mips64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_MIPS64_LITHIUM_CODEGEN_MIPS_H_ 5 #ifndef V8_CRANKSHAFT_MIPS64_LITHIUM_CODEGEN_MIPS_H_
6 #define V8_CRANKSHAFT_MIPS64_LITHIUM_CODEGEN_MIPS_H_ 6 #define V8_CRANKSHAFT_MIPS64_LITHIUM_CODEGEN_MIPS_H_
7 7
8 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 #include "src/crankshaft/lithium-codegen.h" 9 #include "src/crankshaft/lithium-codegen.h"
10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h"
(...skipping 26 matching lines...) Expand all
37 37
38 int LookupDestination(int block_id) const { 38 int LookupDestination(int block_id) const {
39 return chunk()->LookupDestination(block_id); 39 return chunk()->LookupDestination(block_id);
40 } 40 }
41 41
42 bool IsNextEmittedBlock(int block_id) const { 42 bool IsNextEmittedBlock(int block_id) const {
43 return LookupDestination(block_id) == GetNextEmittedBlock(); 43 return LookupDestination(block_id) == GetNextEmittedBlock();
44 } 44 }
45 45
46 bool NeedsEagerFrame() const { 46 bool NeedsEagerFrame() const {
47 return GetStackSlotCount() > 0 || 47 return HasAllocatedStackSlots() || info()->is_non_deferred_calling() ||
48 info()->is_non_deferred_calling() || 48 !info()->IsStub() || info()->requires_frame();
49 !info()->IsStub() ||
50 info()->requires_frame();
51 } 49 }
52 bool NeedsDeferredFrame() const { 50 bool NeedsDeferredFrame() const {
53 return !NeedsEagerFrame() && info()->is_deferred_calling(); 51 return !NeedsEagerFrame() && info()->is_deferred_calling();
54 } 52 }
55 53
56 RAStatus GetRAState() const { 54 RAStatus GetRAState() const {
57 return frame_is_built_ ? kRAHasBeenSaved : kRAHasNotBeenSaved; 55 return frame_is_built_ ? kRAHasBeenSaved : kRAHasNotBeenSaved;
58 } 56 }
59 57
60 // Support for converting LOperands to assembler types. 58 // Support for converting LOperands to assembler types.
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 146
149 LInstruction* GetNextInstruction(); 147 LInstruction* GetNextInstruction();
150 148
151 void EmitClassOfTest(Label* if_true, 149 void EmitClassOfTest(Label* if_true,
152 Label* if_false, 150 Label* if_false,
153 Handle<String> class_name, 151 Handle<String> class_name,
154 Register input, 152 Register input,
155 Register temporary, 153 Register temporary,
156 Register temporary2); 154 Register temporary2);
157 155
158 int GetStackSlotCount() const { return chunk()->spill_slot_count(); } 156 bool HasAllocatedStackSlots() const {
157 return chunk()->HasAllocatedStackSlots();
158 }
159 int GetStackSlotCount() const { return chunk()->GetSpillSlotCount(); }
160 int GetTotalFrameSlotCount() const {
161 return chunk()->GetTotalFrameSlotCount();
162 }
159 163
160 void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code, zone()); } 164 void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code, zone()); }
161 165
162 void SaveCallerDoubles(); 166 void SaveCallerDoubles();
163 void RestoreCallerDoubles(); 167 void RestoreCallerDoubles();
164 168
165 // Code generation passes. Returns true if code generation should 169 // Code generation passes. Returns true if code generation should
166 // continue. 170 // continue.
167 void GenerateBodyInstructionPre(LInstruction* instr) override; 171 void GenerateBodyInstructionPre(LInstruction* instr) override;
168 bool GeneratePrologue(); 172 bool GeneratePrologue();
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 Label entry_; 420 Label entry_;
417 Label exit_; 421 Label exit_;
418 Label* external_exit_; 422 Label* external_exit_;
419 int instruction_index_; 423 int instruction_index_;
420 }; 424 };
421 425
422 } // namespace internal 426 } // namespace internal
423 } // namespace v8 427 } // namespace v8
424 428
425 #endif // V8_CRANKSHAFT_MIPS64_LITHIUM_CODEGEN_MIPS_H_ 429 #endif // V8_CRANKSHAFT_MIPS64_LITHIUM_CODEGEN_MIPS_H_
OLDNEW
« no previous file with comments | « src/crankshaft/mips/lithium-mips.cc ('k') | src/crankshaft/mips64/lithium-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698