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_MIPS_LITHIUM_CODEGEN_MIPS_H_ | 5 #ifndef V8_MIPS_LITHIUM_CODEGEN_MIPS_H_ |
6 #define V8_MIPS_LITHIUM_CODEGEN_MIPS_H_ | 6 #define V8_MIPS_LITHIUM_CODEGEN_MIPS_H_ |
7 | 7 |
8 #include "src/deoptimizer.h" | 8 #include "src/deoptimizer.h" |
9 #include "src/lithium-codegen.h" | 9 #include "src/lithium-codegen.h" |
10 #include "src/mips64/lithium-gap-resolver-mips64.h" | 10 #include "src/mips64/lithium-gap-resolver-mips64.h" |
11 #include "src/mips64/lithium-mips64.h" | 11 #include "src/mips64/lithium-mips64.h" |
12 #include "src/safepoint-table.h" | 12 #include "src/safepoint-table.h" |
13 #include "src/scopes.h" | 13 #include "src/scopes.h" |
14 #include "src/utils.h" | 14 #include "src/utils.h" |
15 | 15 |
16 namespace v8 { | 16 namespace v8 { |
17 namespace internal { | 17 namespace internal { |
18 | 18 |
19 // Forward declarations. | 19 // Forward declarations. |
20 class LDeferredCode; | 20 class LDeferredCode; |
21 class SafepointGenerator; | 21 class SafepointGenerator; |
22 | 22 |
23 class LCodeGen: public LCodeGenBase { | 23 class LCodeGen: public LCodeGenBase { |
24 public: | 24 public: |
25 LCodeGen(LChunk* chunk, MacroAssembler* assembler, CompilationInfo* info) | 25 LCodeGen(LChunk* chunk, MacroAssembler* assembler, CompilationInfo* info) |
26 : LCodeGenBase(chunk, assembler, info), | 26 : LCodeGenBase(chunk, assembler, info), |
27 deoptimizations_(4, info->zone()), | 27 deoptimizations_(4, info->zone()), |
28 jump_table_(4, info->zone()), | 28 jump_table_(4, info->zone()), |
29 deoptimization_literals_(8, info->zone()), | |
30 inlined_function_count_(0), | 29 inlined_function_count_(0), |
31 scope_(info->scope()), | 30 scope_(info->scope()), |
32 translations_(info->zone()), | 31 translations_(info->zone()), |
33 deferred_(8, info->zone()), | 32 deferred_(8, info->zone()), |
34 osr_pc_offset_(-1), | 33 osr_pc_offset_(-1), |
35 frame_is_built_(false), | 34 frame_is_built_(false), |
36 safepoints_(info->zone()), | 35 safepoints_(info->zone()), |
37 resolver_(this), | 36 resolver_(this), |
38 expected_safepoint_kind_(Safepoint::kSimple) { | 37 expected_safepoint_kind_(Safepoint::kSimple) { |
39 PopulateDeoptimizationLiteralsWithInlinedFunctions(); | 38 PopulateDeoptimizationLiteralsWithInlinedFunctions(); |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 Register src1 = zero_reg, const Operand& src2 = Operand(zero_reg)); | 233 Register src1 = zero_reg, const Operand& src2 = Operand(zero_reg)); |
235 | 234 |
236 void AddToTranslation(LEnvironment* environment, | 235 void AddToTranslation(LEnvironment* environment, |
237 Translation* translation, | 236 Translation* translation, |
238 LOperand* op, | 237 LOperand* op, |
239 bool is_tagged, | 238 bool is_tagged, |
240 bool is_uint32, | 239 bool is_uint32, |
241 int* object_index_pointer, | 240 int* object_index_pointer, |
242 int* dematerialized_index_pointer); | 241 int* dematerialized_index_pointer); |
243 void PopulateDeoptimizationData(Handle<Code> code); | 242 void PopulateDeoptimizationData(Handle<Code> code); |
244 int DefineDeoptimizationLiteral(Handle<Object> literal); | |
245 | 243 |
246 void PopulateDeoptimizationLiteralsWithInlinedFunctions(); | 244 void PopulateDeoptimizationLiteralsWithInlinedFunctions(); |
247 | 245 |
248 Register ToRegister(int index) const; | 246 Register ToRegister(int index) const; |
249 DoubleRegister ToDoubleRegister(int index) const; | 247 DoubleRegister ToDoubleRegister(int index) const; |
250 | 248 |
251 MemOperand BuildSeqStringOperand(Register string, | 249 MemOperand BuildSeqStringOperand(Register string, |
252 LOperand* index, | 250 LOperand* index, |
253 String::Encoding encoding); | 251 String::Encoding encoding); |
254 | 252 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 void DoLoadKeyedFixedArray(LLoadKeyed* instr); | 351 void DoLoadKeyedFixedArray(LLoadKeyed* instr); |
354 void DoStoreKeyedExternalArray(LStoreKeyed* instr); | 352 void DoStoreKeyedExternalArray(LStoreKeyed* instr); |
355 void DoStoreKeyedFixedDoubleArray(LStoreKeyed* instr); | 353 void DoStoreKeyedFixedDoubleArray(LStoreKeyed* instr); |
356 void DoStoreKeyedFixedArray(LStoreKeyed* instr); | 354 void DoStoreKeyedFixedArray(LStoreKeyed* instr); |
357 | 355 |
358 template <class T> | 356 template <class T> |
359 void EmitVectorLoadICRegisters(T* instr); | 357 void EmitVectorLoadICRegisters(T* instr); |
360 | 358 |
361 ZoneList<LEnvironment*> deoptimizations_; | 359 ZoneList<LEnvironment*> deoptimizations_; |
362 ZoneList<Deoptimizer::JumpTableEntry*> jump_table_; | 360 ZoneList<Deoptimizer::JumpTableEntry*> jump_table_; |
363 ZoneList<Handle<Object> > deoptimization_literals_; | |
364 int inlined_function_count_; | 361 int inlined_function_count_; |
365 Scope* const scope_; | 362 Scope* const scope_; |
366 TranslationBuffer translations_; | 363 TranslationBuffer translations_; |
367 ZoneList<LDeferredCode*> deferred_; | 364 ZoneList<LDeferredCode*> deferred_; |
368 int osr_pc_offset_; | 365 int osr_pc_offset_; |
369 bool frame_is_built_; | 366 bool frame_is_built_; |
370 | 367 |
371 // Builder that keeps track of safepoints in the code. The table | 368 // Builder that keeps track of safepoints in the code. The table |
372 // itself is emitted at the end of the generated code. | 369 // itself is emitted at the end of the generated code. |
373 SafepointTableBuilder safepoints_; | 370 SafepointTableBuilder safepoints_; |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 LCodeGen* codegen_; | 432 LCodeGen* codegen_; |
436 Label entry_; | 433 Label entry_; |
437 Label exit_; | 434 Label exit_; |
438 Label* external_exit_; | 435 Label* external_exit_; |
439 int instruction_index_; | 436 int instruction_index_; |
440 }; | 437 }; |
441 | 438 |
442 } } // namespace v8::internal | 439 } } // namespace v8::internal |
443 | 440 |
444 #endif // V8_MIPS_LITHIUM_CODEGEN_MIPS_H_ | 441 #endif // V8_MIPS_LITHIUM_CODEGEN_MIPS_H_ |
OLD | NEW |