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

Side by Side Diff: src/crankshaft/x64/lithium-codegen-x64.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 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 GetStackSlotCount() > 0 || 48 return HasAllocatedStackSlots() || info()->is_non_deferred_calling() ||
49 info()->is_non_deferred_calling() || 49 !info()->IsStub() || info()->requires_frame();
50 !info()->IsStub() ||
51 info()->requires_frame();
52 } 50 }
53 bool NeedsDeferredFrame() const { 51 bool NeedsDeferredFrame() const {
54 return !NeedsEagerFrame() && info()->is_deferred_calling(); 52 return !NeedsEagerFrame() && info()->is_deferred_calling();
55 } 53 }
56 54
57 // Support for converting LOperands to assembler types. 55 // Support for converting LOperands to assembler types.
58 Register ToRegister(LOperand* op) const; 56 Register ToRegister(LOperand* op) const;
59 XMMRegister ToDoubleRegister(LOperand* op) const; 57 XMMRegister ToDoubleRegister(LOperand* op) const;
60 bool IsInteger32Constant(LConstantOperand* op) const; 58 bool IsInteger32Constant(LConstantOperand* op) const;
61 bool IsExternalConstant(LConstantOperand* op) const; 59 bool IsExternalConstant(LConstantOperand* op) const;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 119
122 XMMRegister double_scratch0() const { return xmm0; } 120 XMMRegister double_scratch0() const { return xmm0; }
123 121
124 void EmitClassOfTest(Label* if_true, 122 void EmitClassOfTest(Label* if_true,
125 Label* if_false, 123 Label* if_false,
126 Handle<String> class_name, 124 Handle<String> class_name,
127 Register input, 125 Register input,
128 Register temporary, 126 Register temporary,
129 Register scratch); 127 Register scratch);
130 128
131 int GetStackSlotCount() const { return chunk()->spill_slot_count(); } 129 bool HasAllocatedStackSlots() const {
130 return chunk()->HasAllocatedStackSlots();
131 }
132 int GetStackSlotCount() const { return chunk()->GetSpillSlotCount(); }
133 int GetTotalFrameSlotCount() const {
134 return chunk()->GetTotalFrameSlotCount();
135 }
132 136
133 void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code, zone()); } 137 void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code, zone()); }
134 138
135 139
136 void SaveCallerDoubles(); 140 void SaveCallerDoubles();
137 void RestoreCallerDoubles(); 141 void RestoreCallerDoubles();
138 142
139 // Code generation passes. Returns true if code generation should 143 // Code generation passes. Returns true if code generation should
140 // continue. 144 // continue.
141 void GenerateBodyInstructionPre(LInstruction* instr) override; 145 void GenerateBodyInstructionPre(LInstruction* instr) override;
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 Label exit_; 378 Label exit_;
375 Label done_; 379 Label done_;
376 Label* external_exit_; 380 Label* external_exit_;
377 int instruction_index_; 381 int instruction_index_;
378 }; 382 };
379 383
380 } // namespace internal 384 } // namespace internal
381 } // namespace v8 385 } // namespace v8
382 386
383 #endif // V8_CRANKSHAFT_X64_LITHIUM_CODEGEN_X64_H_ 387 #endif // V8_CRANKSHAFT_X64_LITHIUM_CODEGEN_X64_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698