OLD | NEW |
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_ARM_LITHIUM_CODEGEN_ARM_H_ | 5 #ifndef V8_CRANKSHAFT_ARM_LITHIUM_CODEGEN_ARM_H_ |
6 #define V8_CRANKSHAFT_ARM_LITHIUM_CODEGEN_ARM_H_ | 6 #define V8_CRANKSHAFT_ARM_LITHIUM_CODEGEN_ARM_H_ |
7 | 7 |
8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
9 #include "src/crankshaft/arm/lithium-arm.h" | 9 #include "src/crankshaft/arm/lithium-arm.h" |
10 #include "src/crankshaft/arm/lithium-gap-resolver-arm.h" | 10 #include "src/crankshaft/arm/lithium-gap-resolver-arm.h" |
(...skipping 26 matching lines...) Expand all Loading... |
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 HasAllocatedStackSlots() || info()->is_non_deferred_calling() || | 47 return GetStackSlotCount() > 0 || |
48 !info()->IsStub() || info()->requires_frame(); | 48 info()->is_non_deferred_calling() || |
| 49 !info()->IsStub() || |
| 50 info()->requires_frame(); |
49 } | 51 } |
50 bool NeedsDeferredFrame() const { | 52 bool NeedsDeferredFrame() const { |
51 return !NeedsEagerFrame() && info()->is_deferred_calling(); | 53 return !NeedsEagerFrame() && info()->is_deferred_calling(); |
52 } | 54 } |
53 | 55 |
54 LinkRegisterStatus GetLinkRegisterState() const { | 56 LinkRegisterStatus GetLinkRegisterState() const { |
55 return frame_is_built_ ? kLRHasBeenSaved : kLRHasNotBeenSaved; | 57 return frame_is_built_ ? kLRHasBeenSaved : kLRHasNotBeenSaved; |
56 } | 58 } |
57 | 59 |
58 // Support for converting LOperands to assembler types. | 60 // Support for converting LOperands to assembler types. |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 | 146 |
145 LInstruction* GetNextInstruction(); | 147 LInstruction* GetNextInstruction(); |
146 | 148 |
147 void EmitClassOfTest(Label* if_true, | 149 void EmitClassOfTest(Label* if_true, |
148 Label* if_false, | 150 Label* if_false, |
149 Handle<String> class_name, | 151 Handle<String> class_name, |
150 Register input, | 152 Register input, |
151 Register temporary, | 153 Register temporary, |
152 Register temporary2); | 154 Register temporary2); |
153 | 155 |
154 bool HasAllocatedStackSlots() const { | 156 int GetStackSlotCount() const { return chunk()->spill_slot_count(); } |
155 return chunk()->HasAllocatedStackSlots(); | |
156 } | |
157 int GetStackSlotCount() const { return chunk()->GetSpillSlotCount(); } | |
158 int GetTotalFrameSlotCount() const { | |
159 return chunk()->GetTotalFrameSlotCount(); | |
160 } | |
161 | 157 |
162 void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code, zone()); } | 158 void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code, zone()); } |
163 | 159 |
164 void SaveCallerDoubles(); | 160 void SaveCallerDoubles(); |
165 void RestoreCallerDoubles(); | 161 void RestoreCallerDoubles(); |
166 | 162 |
167 // Code generation passes. Returns true if code generation should | 163 // Code generation passes. Returns true if code generation should |
168 // continue. | 164 // continue. |
169 void GenerateBodyInstructionPre(LInstruction* instr) override; | 165 void GenerateBodyInstructionPre(LInstruction* instr) override; |
170 bool GeneratePrologue(); | 166 bool GeneratePrologue(); |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 Label entry_; | 379 Label entry_; |
384 Label exit_; | 380 Label exit_; |
385 Label* external_exit_; | 381 Label* external_exit_; |
386 int instruction_index_; | 382 int instruction_index_; |
387 }; | 383 }; |
388 | 384 |
389 } // namespace internal | 385 } // namespace internal |
390 } // namespace v8 | 386 } // namespace v8 |
391 | 387 |
392 #endif // V8_CRANKSHAFT_ARM_LITHIUM_CODEGEN_ARM_H_ | 388 #endif // V8_CRANKSHAFT_ARM_LITHIUM_CODEGEN_ARM_H_ |
OLD | NEW |