| 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_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 Loading... |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |