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

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

Issue 1707703002: Revert of 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/crankshaft/mips64/lithium-mips64.cc ('k') | src/crankshaft/x64/lithium-codegen-x64.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_X64_LITHIUM_CODEGEN_X64_H_ 5 #ifndef V8_CRANKSHAFT_X64_LITHIUM_CODEGEN_X64_H_
6 #define V8_CRANKSHAFT_X64_LITHIUM_CODEGEN_X64_H_ 6 #define V8_CRANKSHAFT_X64_LITHIUM_CODEGEN_X64_H_
7 7
8 8
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/base/logging.h" 10 #include "src/base/logging.h"
(...skipping 27 matching lines...) Expand all
38 38
39 int LookupDestination(int block_id) const { 39 int LookupDestination(int block_id) const {
40 return chunk()->LookupDestination(block_id); 40 return chunk()->LookupDestination(block_id);
41 } 41 }
42 42
43 bool IsNextEmittedBlock(int block_id) const { 43 bool IsNextEmittedBlock(int block_id) const {
44 return LookupDestination(block_id) == GetNextEmittedBlock(); 44 return LookupDestination(block_id) == GetNextEmittedBlock();
45 } 45 }
46 46
47 bool NeedsEagerFrame() const { 47 bool NeedsEagerFrame() const {
48 return HasAllocatedStackSlots() || info()->is_non_deferred_calling() || 48 return GetStackSlotCount() > 0 ||
49 !info()->IsStub() || info()->requires_frame(); 49 info()->is_non_deferred_calling() ||
50 !info()->IsStub() ||
51 info()->requires_frame();
50 } 52 }
51 bool NeedsDeferredFrame() const { 53 bool NeedsDeferredFrame() const {
52 return !NeedsEagerFrame() && info()->is_deferred_calling(); 54 return !NeedsEagerFrame() && info()->is_deferred_calling();
53 } 55 }
54 56
55 // Support for converting LOperands to assembler types. 57 // Support for converting LOperands to assembler types.
56 Register ToRegister(LOperand* op) const; 58 Register ToRegister(LOperand* op) const;
57 XMMRegister ToDoubleRegister(LOperand* op) const; 59 XMMRegister ToDoubleRegister(LOperand* op) const;
58 bool IsInteger32Constant(LConstantOperand* op) const; 60 bool IsInteger32Constant(LConstantOperand* op) const;
59 bool IsExternalConstant(LConstantOperand* op) const; 61 bool IsExternalConstant(LConstantOperand* op) const;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 121
120 XMMRegister double_scratch0() const { return xmm0; } 122 XMMRegister double_scratch0() const { return xmm0; }
121 123
122 void EmitClassOfTest(Label* if_true, 124 void EmitClassOfTest(Label* if_true,
123 Label* if_false, 125 Label* if_false,
124 Handle<String> class_name, 126 Handle<String> class_name,
125 Register input, 127 Register input,
126 Register temporary, 128 Register temporary,
127 Register scratch); 129 Register scratch);
128 130
129 bool HasAllocatedStackSlots() const { 131 int GetStackSlotCount() const { return chunk()->spill_slot_count(); }
130 return chunk()->HasAllocatedStackSlots();
131 }
132 int GetStackSlotCount() const { return chunk()->GetSpillSlotCount(); }
133 int GetTotalFrameSlotCount() const {
134 return chunk()->GetTotalFrameSlotCount();
135 }
136 132
137 void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code, zone()); } 133 void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code, zone()); }
138 134
139 135
140 void SaveCallerDoubles(); 136 void SaveCallerDoubles();
141 void RestoreCallerDoubles(); 137 void RestoreCallerDoubles();
142 138
143 // Code generation passes. Returns true if code generation should 139 // Code generation passes. Returns true if code generation should
144 // continue. 140 // continue.
145 void GenerateBodyInstructionPre(LInstruction* instr) override; 141 void GenerateBodyInstructionPre(LInstruction* instr) override;
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 Label exit_; 374 Label exit_;
379 Label done_; 375 Label done_;
380 Label* external_exit_; 376 Label* external_exit_;
381 int instruction_index_; 377 int instruction_index_;
382 }; 378 };
383 379
384 } // namespace internal 380 } // namespace internal
385 } // namespace v8 381 } // namespace v8
386 382
387 #endif // V8_CRANKSHAFT_X64_LITHIUM_CODEGEN_X64_H_ 383 #endif // V8_CRANKSHAFT_X64_LITHIUM_CODEGEN_X64_H_
OLDNEW
« no previous file with comments | « src/crankshaft/mips64/lithium-mips64.cc ('k') | src/crankshaft/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698