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

Side by Side Diff: src/crankshaft/mips/lithium-codegen-mips.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/lithium.cc ('k') | src/crankshaft/mips/lithium-codegen-mips.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_MIPS_LITHIUM_CODEGEN_MIPS_H_ 5 #ifndef V8_CRANKSHAFT_MIPS_LITHIUM_CODEGEN_MIPS_H_
6 #define V8_CRANKSHAFT_MIPS_LITHIUM_CODEGEN_MIPS_H_ 6 #define V8_CRANKSHAFT_MIPS_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/mips/lithium-gap-resolver-mips.h" 10 #include "src/crankshaft/mips/lithium-gap-resolver-mips.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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 144
147 LInstruction* GetNextInstruction(); 145 LInstruction* GetNextInstruction();
148 146
149 void EmitClassOfTest(Label* if_true, 147 void EmitClassOfTest(Label* if_true,
150 Label* if_false, 148 Label* if_false,
151 Handle<String> class_name, 149 Handle<String> class_name,
152 Register input, 150 Register input,
153 Register temporary, 151 Register temporary,
154 Register temporary2); 152 Register temporary2);
155 153
156 int GetStackSlotCount() const { return chunk()->spill_slot_count(); } 154 bool HasAllocatedStackSlots() const {
155 return chunk()->HasAllocatedStackSlots();
156 }
157 int GetStackSlotCount() const { return chunk()->GetSpillSlotCount(); }
158 int GetTotalFrameSlotCount() const {
159 return chunk()->GetTotalFrameSlotCount();
160 }
157 161
158 void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code, zone()); } 162 void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code, zone()); }
159 163
160 void SaveCallerDoubles(); 164 void SaveCallerDoubles();
161 void RestoreCallerDoubles(); 165 void RestoreCallerDoubles();
162 166
163 // Code generation passes. Returns true if code generation should 167 // Code generation passes. Returns true if code generation should
164 // continue. 168 // continue.
165 void GenerateBodyInstructionPre(LInstruction* instr) override; 169 void GenerateBodyInstructionPre(LInstruction* instr) override;
166 bool GeneratePrologue(); 170 bool GeneratePrologue();
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 Label entry_; 417 Label entry_;
414 Label exit_; 418 Label exit_;
415 Label* external_exit_; 419 Label* external_exit_;
416 int instruction_index_; 420 int instruction_index_;
417 }; 421 };
418 422
419 } // namespace internal 423 } // namespace internal
420 } // namespace v8 424 } // namespace v8
421 425
422 #endif // V8_CRANKSHAFT_MIPS_LITHIUM_CODEGEN_MIPS_H_ 426 #endif // V8_CRANKSHAFT_MIPS_LITHIUM_CODEGEN_MIPS_H_
OLDNEW
« no previous file with comments | « src/crankshaft/lithium.cc ('k') | src/crankshaft/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698