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/mips/lithium-gap-resolver-mips.h" | 10 #include "src/mips/lithium-gap-resolver-mips.h" |
11 #include "src/mips/lithium-mips.h" | 11 #include "src/mips/lithium-mips.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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 Register src1 = zero_reg, const Operand& src2 = Operand(zero_reg)); | 232 Register src1 = zero_reg, const Operand& src2 = Operand(zero_reg)); |
234 | 233 |
235 void AddToTranslation(LEnvironment* environment, | 234 void AddToTranslation(LEnvironment* environment, |
236 Translation* translation, | 235 Translation* translation, |
237 LOperand* op, | 236 LOperand* op, |
238 bool is_tagged, | 237 bool is_tagged, |
239 bool is_uint32, | 238 bool is_uint32, |
240 int* object_index_pointer, | 239 int* object_index_pointer, |
241 int* dematerialized_index_pointer); | 240 int* dematerialized_index_pointer); |
242 void PopulateDeoptimizationData(Handle<Code> code); | 241 void PopulateDeoptimizationData(Handle<Code> code); |
243 int DefineDeoptimizationLiteral(Handle<Object> literal); | |
244 | 242 |
245 void PopulateDeoptimizationLiteralsWithInlinedFunctions(); | 243 void PopulateDeoptimizationLiteralsWithInlinedFunctions(); |
246 | 244 |
247 Register ToRegister(int index) const; | 245 Register ToRegister(int index) const; |
248 DoubleRegister ToDoubleRegister(int index) const; | 246 DoubleRegister ToDoubleRegister(int index) const; |
249 | 247 |
250 MemOperand BuildSeqStringOperand(Register string, | 248 MemOperand BuildSeqStringOperand(Register string, |
251 LOperand* index, | 249 LOperand* index, |
252 String::Encoding encoding); | 250 String::Encoding encoding); |
253 | 251 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 void DoLoadKeyedFixedArray(LLoadKeyed* instr); | 350 void DoLoadKeyedFixedArray(LLoadKeyed* instr); |
353 void DoStoreKeyedExternalArray(LStoreKeyed* instr); | 351 void DoStoreKeyedExternalArray(LStoreKeyed* instr); |
354 void DoStoreKeyedFixedDoubleArray(LStoreKeyed* instr); | 352 void DoStoreKeyedFixedDoubleArray(LStoreKeyed* instr); |
355 void DoStoreKeyedFixedArray(LStoreKeyed* instr); | 353 void DoStoreKeyedFixedArray(LStoreKeyed* instr); |
356 | 354 |
357 template <class T> | 355 template <class T> |
358 void EmitVectorLoadICRegisters(T* instr); | 356 void EmitVectorLoadICRegisters(T* instr); |
359 | 357 |
360 ZoneList<LEnvironment*> deoptimizations_; | 358 ZoneList<LEnvironment*> deoptimizations_; |
361 ZoneList<Deoptimizer::JumpTableEntry> jump_table_; | 359 ZoneList<Deoptimizer::JumpTableEntry> jump_table_; |
362 ZoneList<Handle<Object> > deoptimization_literals_; | |
363 int inlined_function_count_; | 360 int inlined_function_count_; |
364 Scope* const scope_; | 361 Scope* const scope_; |
365 TranslationBuffer translations_; | 362 TranslationBuffer translations_; |
366 ZoneList<LDeferredCode*> deferred_; | 363 ZoneList<LDeferredCode*> deferred_; |
367 int osr_pc_offset_; | 364 int osr_pc_offset_; |
368 bool frame_is_built_; | 365 bool frame_is_built_; |
369 | 366 |
370 // Builder that keeps track of safepoints in the code. The table | 367 // Builder that keeps track of safepoints in the code. The table |
371 // itself is emitted at the end of the generated code. | 368 // itself is emitted at the end of the generated code. |
372 SafepointTableBuilder safepoints_; | 369 SafepointTableBuilder safepoints_; |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 LCodeGen* codegen_; | 431 LCodeGen* codegen_; |
435 Label entry_; | 432 Label entry_; |
436 Label exit_; | 433 Label exit_; |
437 Label* external_exit_; | 434 Label* external_exit_; |
438 int instruction_index_; | 435 int instruction_index_; |
439 }; | 436 }; |
440 | 437 |
441 } } // namespace v8::internal | 438 } } // namespace v8::internal |
442 | 439 |
443 #endif // V8_MIPS_LITHIUM_CODEGEN_MIPS_H_ | 440 #endif // V8_MIPS_LITHIUM_CODEGEN_MIPS_H_ |
OLD | NEW |