| 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_ARM_LITHIUM_CODEGEN_ARM_H_ | 5 #ifndef V8_ARM_LITHIUM_CODEGEN_ARM_H_ |
| 6 #define V8_ARM_LITHIUM_CODEGEN_ARM_H_ | 6 #define V8_ARM_LITHIUM_CODEGEN_ARM_H_ |
| 7 | 7 |
| 8 #include "src/arm/lithium-arm.h" | 8 #include "src/arm/lithium-arm.h" |
| 9 | 9 |
| 10 #include "src/arm/lithium-gap-resolver-arm.h" | 10 #include "src/arm/lithium-gap-resolver-arm.h" |
| 11 #include "src/deoptimizer.h" | 11 #include "src/deoptimizer.h" |
| 12 #include "src/lithium-codegen.h" | 12 #include "src/lithium-codegen.h" |
| 13 #include "src/safepoint-table.h" | 13 #include "src/safepoint-table.h" |
| 14 #include "src/scopes.h" | 14 #include "src/scopes.h" |
| 15 #include "src/utils.h" | 15 #include "src/utils.h" |
| 16 | 16 |
| 17 namespace v8 { | 17 namespace v8 { |
| 18 namespace internal { | 18 namespace internal { |
| 19 | 19 |
| 20 // Forward declarations. | 20 // Forward declarations. |
| 21 class LDeferredCode; | 21 class LDeferredCode; |
| 22 class SafepointGenerator; | 22 class SafepointGenerator; |
| 23 | 23 |
| 24 class LCodeGen: public LCodeGenBase { | 24 class LCodeGen: public LCodeGenBase { |
| 25 public: | 25 public: |
| 26 LCodeGen(LChunk* chunk, MacroAssembler* assembler, CompilationInfo* info) | 26 LCodeGen(LChunk* chunk, MacroAssembler* assembler, CompilationInfo* info) |
| 27 : LCodeGenBase(chunk, assembler, info), | 27 : LCodeGenBase(chunk, assembler, info), |
| 28 deoptimizations_(4, info->zone()), | 28 deoptimizations_(4, info->zone()), |
| 29 jump_table_(4, info->zone()), | 29 jump_table_(4, info->zone()), |
| 30 deoptimization_literals_(8, info->zone()), | |
| 31 inlined_function_count_(0), | 30 inlined_function_count_(0), |
| 32 scope_(info->scope()), | 31 scope_(info->scope()), |
| 33 translations_(info->zone()), | 32 translations_(info->zone()), |
| 34 deferred_(8, info->zone()), | 33 deferred_(8, info->zone()), |
| 35 osr_pc_offset_(-1), | 34 osr_pc_offset_(-1), |
| 36 frame_is_built_(false), | 35 frame_is_built_(false), |
| 37 safepoints_(info->zone()), | 36 safepoints_(info->zone()), |
| 38 resolver_(this), | 37 resolver_(this), |
| 39 expected_safepoint_kind_(Safepoint::kSimple) { | 38 expected_safepoint_kind_(Safepoint::kSimple) { |
| 40 PopulateDeoptimizationLiteralsWithInlinedFunctions(); | 39 PopulateDeoptimizationLiteralsWithInlinedFunctions(); |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 Deoptimizer::DeoptReason deopt_reason); | 234 Deoptimizer::DeoptReason deopt_reason); |
| 236 | 235 |
| 237 void AddToTranslation(LEnvironment* environment, | 236 void AddToTranslation(LEnvironment* environment, |
| 238 Translation* translation, | 237 Translation* translation, |
| 239 LOperand* op, | 238 LOperand* op, |
| 240 bool is_tagged, | 239 bool is_tagged, |
| 241 bool is_uint32, | 240 bool is_uint32, |
| 242 int* object_index_pointer, | 241 int* object_index_pointer, |
| 243 int* dematerialized_index_pointer); | 242 int* dematerialized_index_pointer); |
| 244 void PopulateDeoptimizationData(Handle<Code> code); | 243 void PopulateDeoptimizationData(Handle<Code> code); |
| 245 int DefineDeoptimizationLiteral(Handle<Object> literal); | |
| 246 | 244 |
| 247 void PopulateDeoptimizationLiteralsWithInlinedFunctions(); | 245 void PopulateDeoptimizationLiteralsWithInlinedFunctions(); |
| 248 | 246 |
| 249 Register ToRegister(int index) const; | 247 Register ToRegister(int index) const; |
| 250 DwVfpRegister ToDoubleRegister(int index) const; | 248 DwVfpRegister ToDoubleRegister(int index) const; |
| 251 | 249 |
| 252 MemOperand BuildSeqStringOperand(Register string, | 250 MemOperand BuildSeqStringOperand(Register string, |
| 253 LOperand* index, | 251 LOperand* index, |
| 254 String::Encoding encoding); | 252 String::Encoding encoding); |
| 255 | 253 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 void DoLoadKeyedFixedArray(LLoadKeyed* instr); | 319 void DoLoadKeyedFixedArray(LLoadKeyed* instr); |
| 322 void DoStoreKeyedExternalArray(LStoreKeyed* instr); | 320 void DoStoreKeyedExternalArray(LStoreKeyed* instr); |
| 323 void DoStoreKeyedFixedDoubleArray(LStoreKeyed* instr); | 321 void DoStoreKeyedFixedDoubleArray(LStoreKeyed* instr); |
| 324 void DoStoreKeyedFixedArray(LStoreKeyed* instr); | 322 void DoStoreKeyedFixedArray(LStoreKeyed* instr); |
| 325 | 323 |
| 326 template <class T> | 324 template <class T> |
| 327 void EmitVectorLoadICRegisters(T* instr); | 325 void EmitVectorLoadICRegisters(T* instr); |
| 328 | 326 |
| 329 ZoneList<LEnvironment*> deoptimizations_; | 327 ZoneList<LEnvironment*> deoptimizations_; |
| 330 ZoneList<Deoptimizer::JumpTableEntry> jump_table_; | 328 ZoneList<Deoptimizer::JumpTableEntry> jump_table_; |
| 331 ZoneList<Handle<Object> > deoptimization_literals_; | |
| 332 int inlined_function_count_; | 329 int inlined_function_count_; |
| 333 Scope* const scope_; | 330 Scope* const scope_; |
| 334 TranslationBuffer translations_; | 331 TranslationBuffer translations_; |
| 335 ZoneList<LDeferredCode*> deferred_; | 332 ZoneList<LDeferredCode*> deferred_; |
| 336 int osr_pc_offset_; | 333 int osr_pc_offset_; |
| 337 bool frame_is_built_; | 334 bool frame_is_built_; |
| 338 | 335 |
| 339 // Builder that keeps track of safepoints in the code. The table | 336 // Builder that keeps track of safepoints in the code. The table |
| 340 // itself is emitted at the end of the generated code. | 337 // itself is emitted at the end of the generated code. |
| 341 SafepointTableBuilder safepoints_; | 338 SafepointTableBuilder safepoints_; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 LCodeGen* codegen_; | 395 LCodeGen* codegen_; |
| 399 Label entry_; | 396 Label entry_; |
| 400 Label exit_; | 397 Label exit_; |
| 401 Label* external_exit_; | 398 Label* external_exit_; |
| 402 int instruction_index_; | 399 int instruction_index_; |
| 403 }; | 400 }; |
| 404 | 401 |
| 405 } } // namespace v8::internal | 402 } } // namespace v8::internal |
| 406 | 403 |
| 407 #endif // V8_ARM_LITHIUM_CODEGEN_ARM_H_ | 404 #endif // V8_ARM_LITHIUM_CODEGEN_ARM_H_ |
| OLD | NEW |