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 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 LinkRegisterStatus GetLinkRegisterState() const { | 54 LinkRegisterStatus GetLinkRegisterState() const { |
57 return frame_is_built_ ? kLRHasBeenSaved : kLRHasNotBeenSaved; | 55 return frame_is_built_ ? kLRHasBeenSaved : kLRHasNotBeenSaved; |
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 Loading... |
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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 Label entry_; | 383 Label entry_; |
380 Label exit_; | 384 Label exit_; |
381 Label* external_exit_; | 385 Label* external_exit_; |
382 int instruction_index_; | 386 int instruction_index_; |
383 }; | 387 }; |
384 | 388 |
385 } // namespace internal | 389 } // namespace internal |
386 } // namespace v8 | 390 } // namespace v8 |
387 | 391 |
388 #endif // V8_CRANKSHAFT_ARM_LITHIUM_CODEGEN_ARM_H_ | 392 #endif // V8_CRANKSHAFT_ARM_LITHIUM_CODEGEN_ARM_H_ |
OLD | NEW |