OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64_LITHIUM_CODEGEN_ARM64_H_ | 5 #ifndef V8_ARM64_LITHIUM_CODEGEN_ARM64_H_ |
6 #define V8_ARM64_LITHIUM_CODEGEN_ARM64_H_ | 6 #define V8_ARM64_LITHIUM_CODEGEN_ARM64_H_ |
7 | 7 |
8 #include "src/arm64/lithium-arm64.h" | 8 #include "src/arm64/lithium-arm64.h" |
9 | 9 |
10 #include "src/arm64/lithium-gap-resolver-arm64.h" | 10 #include "src/arm64/lithium-gap-resolver-arm64.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 class LDeferredCode; | 21 class LDeferredCode; |
22 class SafepointGenerator; | 22 class SafepointGenerator; |
23 class BranchGenerator; | 23 class BranchGenerator; |
24 | 24 |
25 class LCodeGen: public LCodeGenBase { | 25 class LCodeGen: public LCodeGenBase { |
26 public: | 26 public: |
27 LCodeGen(LChunk* chunk, MacroAssembler* assembler, CompilationInfo* info) | 27 LCodeGen(LChunk* chunk, MacroAssembler* assembler, CompilationInfo* info) |
28 : LCodeGenBase(chunk, assembler, info), | 28 : LCodeGenBase(chunk, assembler, info), |
29 deoptimizations_(4, info->zone()), | 29 deoptimizations_(4, info->zone()), |
30 jump_table_(4, info->zone()), | 30 jump_table_(4, info->zone()), |
31 deoptimization_literals_(8, info->zone()), | |
32 inlined_function_count_(0), | 31 inlined_function_count_(0), |
33 scope_(info->scope()), | 32 scope_(info->scope()), |
34 translations_(info->zone()), | 33 translations_(info->zone()), |
35 deferred_(8, info->zone()), | 34 deferred_(8, info->zone()), |
36 osr_pc_offset_(-1), | 35 osr_pc_offset_(-1), |
37 frame_is_built_(false), | 36 frame_is_built_(false), |
38 safepoints_(info->zone()), | 37 safepoints_(info->zone()), |
39 resolver_(this), | 38 resolver_(this), |
40 expected_safepoint_kind_(Safepoint::kSimple) { | 39 expected_safepoint_kind_(Safepoint::kSimple) { |
41 PopulateDeoptimizationLiteralsWithInlinedFunctions(); | 40 PopulateDeoptimizationLiteralsWithInlinedFunctions(); |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 | 190 |
192 template <class T> | 191 template <class T> |
193 void EmitVectorLoadICRegisters(T* instr); | 192 void EmitVectorLoadICRegisters(T* instr); |
194 | 193 |
195 // Emits optimized code for %_IsString(x). Preserves input register. | 194 // Emits optimized code for %_IsString(x). Preserves input register. |
196 // Returns the condition on which a final split to | 195 // Returns the condition on which a final split to |
197 // true and false label should be made, to optimize fallthrough. | 196 // true and false label should be made, to optimize fallthrough. |
198 Condition EmitIsString(Register input, Register temp1, Label* is_not_string, | 197 Condition EmitIsString(Register input, Register temp1, Label* is_not_string, |
199 SmiCheck check_needed); | 198 SmiCheck check_needed); |
200 | 199 |
201 int DefineDeoptimizationLiteral(Handle<Object> literal); | |
202 void PopulateDeoptimizationData(Handle<Code> code); | 200 void PopulateDeoptimizationData(Handle<Code> code); |
203 void PopulateDeoptimizationLiteralsWithInlinedFunctions(); | 201 void PopulateDeoptimizationLiteralsWithInlinedFunctions(); |
204 | 202 |
205 MemOperand BuildSeqStringOperand(Register string, | 203 MemOperand BuildSeqStringOperand(Register string, |
206 Register temp, | 204 Register temp, |
207 LOperand* index, | 205 LOperand* index, |
208 String::Encoding encoding); | 206 String::Encoding encoding); |
209 void DeoptimizeBranch(LInstruction* instr, | 207 void DeoptimizeBranch(LInstruction* instr, |
210 Deoptimizer::DeoptReason deopt_reason, | 208 Deoptimizer::DeoptReason deopt_reason, |
211 BranchType branch_type, Register reg = NoReg, | 209 BranchType branch_type, Register reg = NoReg, |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 void RecordSafepointWithRegisters(LPointerMap* pointers, | 333 void RecordSafepointWithRegisters(LPointerMap* pointers, |
336 int arguments, | 334 int arguments, |
337 Safepoint::DeoptMode mode); | 335 Safepoint::DeoptMode mode); |
338 void RecordSafepointWithLazyDeopt(LInstruction* instr, | 336 void RecordSafepointWithLazyDeopt(LInstruction* instr, |
339 SafepointMode safepoint_mode); | 337 SafepointMode safepoint_mode); |
340 | 338 |
341 void EnsureSpaceForLazyDeopt(int space_needed) override; | 339 void EnsureSpaceForLazyDeopt(int space_needed) override; |
342 | 340 |
343 ZoneList<LEnvironment*> deoptimizations_; | 341 ZoneList<LEnvironment*> deoptimizations_; |
344 ZoneList<Deoptimizer::JumpTableEntry*> jump_table_; | 342 ZoneList<Deoptimizer::JumpTableEntry*> jump_table_; |
345 ZoneList<Handle<Object> > deoptimization_literals_; | |
346 int inlined_function_count_; | 343 int inlined_function_count_; |
347 Scope* const scope_; | 344 Scope* const scope_; |
348 TranslationBuffer translations_; | 345 TranslationBuffer translations_; |
349 ZoneList<LDeferredCode*> deferred_; | 346 ZoneList<LDeferredCode*> deferred_; |
350 int osr_pc_offset_; | 347 int osr_pc_offset_; |
351 bool frame_is_built_; | 348 bool frame_is_built_; |
352 | 349 |
353 // Builder that keeps track of safepoints in the code. The table itself is | 350 // Builder that keeps track of safepoints in the code. The table itself is |
354 // emitted at the end of the generated code. | 351 // emitted at the end of the generated code. |
355 SafepointTableBuilder safepoints_; | 352 SafepointTableBuilder safepoints_; |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 | 443 |
447 protected: | 444 protected: |
448 MacroAssembler* masm() const { return codegen_->masm(); } | 445 MacroAssembler* masm() const { return codegen_->masm(); } |
449 | 446 |
450 LCodeGen* codegen_; | 447 LCodeGen* codegen_; |
451 }; | 448 }; |
452 | 449 |
453 } } // namespace v8::internal | 450 } } // namespace v8::internal |
454 | 451 |
455 #endif // V8_ARM64_LITHIUM_CODEGEN_ARM64_H_ | 452 #endif // V8_ARM64_LITHIUM_CODEGEN_ARM64_H_ |
OLD | NEW |