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

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

Issue 1714763002: X87: More simplification and unification of frame handling. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/compiler/x87/code-generator-x87.cc ('k') | src/crankshaft/x87/lithium-codegen-x87.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_X87_LITHIUM_CODEGEN_X87_H_ 5 #ifndef V8_CRANKSHAFT_X87_LITHIUM_CODEGEN_X87_H_
6 #define V8_CRANKSHAFT_X87_LITHIUM_CODEGEN_X87_H_ 6 #define V8_CRANKSHAFT_X87_LITHIUM_CODEGEN_X87_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "src/ast/scopes.h" 10 #include "src/ast/scopes.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 int LookupDestination(int block_id) const { 44 int LookupDestination(int block_id) const {
45 return chunk()->LookupDestination(block_id); 45 return chunk()->LookupDestination(block_id);
46 } 46 }
47 47
48 bool IsNextEmittedBlock(int block_id) const { 48 bool IsNextEmittedBlock(int block_id) const {
49 return LookupDestination(block_id) == GetNextEmittedBlock(); 49 return LookupDestination(block_id) == GetNextEmittedBlock();
50 } 50 }
51 51
52 bool NeedsEagerFrame() const { 52 bool NeedsEagerFrame() const {
53 return GetStackSlotCount() > 0 || 53 return HasAllocatedStackSlots() || info()->is_non_deferred_calling() ||
54 info()->is_non_deferred_calling() || 54 !info()->IsStub() || info()->requires_frame();
55 !info()->IsStub() ||
56 info()->requires_frame();
57 } 55 }
58 bool NeedsDeferredFrame() const { 56 bool NeedsDeferredFrame() const {
59 return !NeedsEagerFrame() && info()->is_deferred_calling(); 57 return !NeedsEagerFrame() && info()->is_deferred_calling();
60 } 58 }
61 59
62 // Support for converting LOperands to assembler types. 60 // Support for converting LOperands to assembler types.
63 Operand ToOperand(LOperand* op) const; 61 Operand ToOperand(LOperand* op) const;
64 Register ToRegister(LOperand* op) const; 62 Register ToRegister(LOperand* op) const;
65 X87Register ToX87Register(LOperand* op) const; 63 X87Register ToX87Register(LOperand* op) const;
66 64
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 156
159 Scope* scope() const { return scope_; } 157 Scope* scope() const { return scope_; }
160 158
161 void EmitClassOfTest(Label* if_true, 159 void EmitClassOfTest(Label* if_true,
162 Label* if_false, 160 Label* if_false,
163 Handle<String> class_name, 161 Handle<String> class_name,
164 Register input, 162 Register input,
165 Register temporary, 163 Register temporary,
166 Register temporary2); 164 Register temporary2);
167 165
168 int GetStackSlotCount() const { return chunk()->spill_slot_count(); } 166 bool HasAllocatedStackSlots() const {
167 return chunk()->HasAllocatedStackSlots();
168 }
169 int GetStackSlotCount() const { return chunk()->GetSpillSlotCount(); }
170 int GetTotalFrameSlotCount() const {
171 return chunk()->GetTotalFrameSlotCount();
172 }
169 173
170 void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code, zone()); } 174 void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code, zone()); }
171 175
172 // Code generation passes. Returns true if code generation should 176 // Code generation passes. Returns true if code generation should
173 // continue. 177 // continue.
174 void GenerateBodyInstructionPre(LInstruction* instr) override; 178 void GenerateBodyInstructionPre(LInstruction* instr) override;
175 void GenerateBodyInstructionPost(LInstruction* instr) override; 179 void GenerateBodyInstructionPost(LInstruction* instr) override;
176 bool GeneratePrologue(); 180 bool GeneratePrologue();
177 bool GenerateDeferredCode(); 181 bool GenerateDeferredCode();
178 bool GenerateJumpTable(); 182 bool GenerateJumpTable();
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 Label* external_exit_; 490 Label* external_exit_;
487 Label done_; 491 Label done_;
488 int instruction_index_; 492 int instruction_index_;
489 LCodeGen::X87Stack x87_stack_; 493 LCodeGen::X87Stack x87_stack_;
490 }; 494 };
491 495
492 } // namespace internal 496 } // namespace internal
493 } // namespace v8 497 } // namespace v8
494 498
495 #endif // V8_CRANKSHAFT_X87_LITHIUM_CODEGEN_X87_H_ 499 #endif // V8_CRANKSHAFT_X87_LITHIUM_CODEGEN_X87_H_
OLDNEW
« no previous file with comments | « src/compiler/x87/code-generator-x87.cc ('k') | src/crankshaft/x87/lithium-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698