OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC_LITHIUM_CODEGEN_PPC_H_ | 5 #ifndef V8_CRANKSHAFT_PPC_LITHIUM_CODEGEN_PPC_H_ |
6 #define V8_CRANKSHAFT_PPC_LITHIUM_CODEGEN_PPC_H_ | 6 #define V8_CRANKSHAFT_PPC_LITHIUM_CODEGEN_PPC_H_ |
7 | 7 |
8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
9 #include "src/crankshaft/lithium-codegen.h" | 9 #include "src/crankshaft/lithium-codegen.h" |
10 #include "src/crankshaft/ppc/lithium-gap-resolver-ppc.h" | 10 #include "src/crankshaft/ppc/lithium-gap-resolver-ppc.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 || info()->is_non_deferred_calling() || | 47 return HasAllocatedStackSlots() || info()->is_non_deferred_calling() || |
48 !info()->IsStub() || info()->requires_frame(); | 48 !info()->IsStub() || info()->requires_frame(); |
49 } | 49 } |
50 bool NeedsDeferredFrame() const { | 50 bool NeedsDeferredFrame() const { |
51 return !NeedsEagerFrame() && info()->is_deferred_calling(); | 51 return !NeedsEagerFrame() && info()->is_deferred_calling(); |
52 } | 52 } |
53 | 53 |
54 LinkRegisterStatus GetLinkRegisterState() const { | 54 LinkRegisterStatus GetLinkRegisterState() const { |
55 return frame_is_built_ ? kLRHasBeenSaved : kLRHasNotBeenSaved; | 55 return frame_is_built_ ? kLRHasBeenSaved : kLRHasNotBeenSaved; |
56 } | 56 } |
57 | 57 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 | 134 |
135 Register scratch0() { return kLithiumScratch; } | 135 Register scratch0() { return kLithiumScratch; } |
136 DoubleRegister double_scratch0() { return kScratchDoubleReg; } | 136 DoubleRegister double_scratch0() { return kScratchDoubleReg; } |
137 | 137 |
138 LInstruction* GetNextInstruction(); | 138 LInstruction* GetNextInstruction(); |
139 | 139 |
140 void EmitClassOfTest(Label* if_true, Label* if_false, | 140 void EmitClassOfTest(Label* if_true, Label* if_false, |
141 Handle<String> class_name, Register input, | 141 Handle<String> class_name, Register input, |
142 Register temporary, Register temporary2); | 142 Register temporary, Register temporary2); |
143 | 143 |
144 int GetStackSlotCount() const { return chunk()->spill_slot_count(); } | 144 bool HasAllocatedStackSlots() const { |
| 145 return chunk()->HasAllocatedStackSlots(); |
| 146 } |
| 147 int GetStackSlotCount() const { return chunk()->GetSpillSlotCount(); } |
| 148 int GetTotalFrameSlotCount() const { |
| 149 return chunk()->GetTotalFrameSlotCount(); |
| 150 } |
145 | 151 |
146 void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code, zone()); } | 152 void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code, zone()); } |
147 | 153 |
148 void SaveCallerDoubles(); | 154 void SaveCallerDoubles(); |
149 void RestoreCallerDoubles(); | 155 void RestoreCallerDoubles(); |
150 | 156 |
151 // Code generation passes. Returns true if code generation should | 157 // Code generation passes. Returns true if code generation should |
152 // continue. | 158 // continue. |
153 void GenerateBodyInstructionPre(LInstruction* instr) override; | 159 void GenerateBodyInstructionPre(LInstruction* instr) override; |
154 bool GeneratePrologue(); | 160 bool GeneratePrologue(); |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 LCodeGen* codegen_; | 350 LCodeGen* codegen_; |
345 Label entry_; | 351 Label entry_; |
346 Label exit_; | 352 Label exit_; |
347 Label* external_exit_; | 353 Label* external_exit_; |
348 int instruction_index_; | 354 int instruction_index_; |
349 }; | 355 }; |
350 } // namespace internal | 356 } // namespace internal |
351 } // namespace v8 | 357 } // namespace v8 |
352 | 358 |
353 #endif // V8_CRANKSHAFT_PPC_LITHIUM_CODEGEN_PPC_H_ | 359 #endif // V8_CRANKSHAFT_PPC_LITHIUM_CODEGEN_PPC_H_ |
OLD | NEW |