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_X64_LITHIUM_CODEGEN_X64_H_ | 5 #ifndef V8_X64_LITHIUM_CODEGEN_X64_H_ |
6 #define V8_X64_LITHIUM_CODEGEN_X64_H_ | 6 #define V8_X64_LITHIUM_CODEGEN_X64_H_ |
7 | 7 |
8 #include "src/x64/lithium-x64.h" | 8 #include "src/x64/lithium-x64.h" |
9 | 9 |
10 #include "src/base/logging.h" | 10 #include "src/base/logging.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 // Forward declarations. | 21 // Forward declarations. |
22 class LDeferredCode; | 22 class LDeferredCode; |
23 class SafepointGenerator; | 23 class SafepointGenerator; |
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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 } | 210 } |
212 | 211 |
213 void AddToTranslation(LEnvironment* environment, | 212 void AddToTranslation(LEnvironment* environment, |
214 Translation* translation, | 213 Translation* translation, |
215 LOperand* op, | 214 LOperand* op, |
216 bool is_tagged, | 215 bool is_tagged, |
217 bool is_uint32, | 216 bool is_uint32, |
218 int* object_index_pointer, | 217 int* object_index_pointer, |
219 int* dematerialized_index_pointer); | 218 int* dematerialized_index_pointer); |
220 void PopulateDeoptimizationData(Handle<Code> code); | 219 void PopulateDeoptimizationData(Handle<Code> code); |
221 int DefineDeoptimizationLiteral(Handle<Object> literal); | |
222 | 220 |
223 void PopulateDeoptimizationLiteralsWithInlinedFunctions(); | 221 void PopulateDeoptimizationLiteralsWithInlinedFunctions(); |
224 | 222 |
225 Register ToRegister(int index) const; | 223 Register ToRegister(int index) const; |
226 XMMRegister ToDoubleRegister(int index) const; | 224 XMMRegister ToDoubleRegister(int index) const; |
227 Operand BuildFastArrayOperand( | 225 Operand BuildFastArrayOperand( |
228 LOperand* elements_pointer, | 226 LOperand* elements_pointer, |
229 LOperand* key, | 227 LOperand* key, |
230 Representation key_representation, | 228 Representation key_representation, |
231 ElementsKind elements_kind, | 229 ElementsKind elements_kind, |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 #ifdef _MSC_VER | 309 #ifdef _MSC_VER |
312 // On windows, you may not access the stack more than one page below | 310 // On windows, you may not access the stack more than one page below |
313 // the most recently mapped page. To make the allocated area randomly | 311 // the most recently mapped page. To make the allocated area randomly |
314 // accessible, we write an arbitrary value to each page in range | 312 // accessible, we write an arbitrary value to each page in range |
315 // rsp + offset - page_size .. rsp in turn. | 313 // rsp + offset - page_size .. rsp in turn. |
316 void MakeSureStackPagesMapped(int offset); | 314 void MakeSureStackPagesMapped(int offset); |
317 #endif | 315 #endif |
318 | 316 |
319 ZoneList<LEnvironment*> deoptimizations_; | 317 ZoneList<LEnvironment*> deoptimizations_; |
320 ZoneList<Deoptimizer::JumpTableEntry> jump_table_; | 318 ZoneList<Deoptimizer::JumpTableEntry> jump_table_; |
321 ZoneList<Handle<Object> > deoptimization_literals_; | |
322 int inlined_function_count_; | 319 int inlined_function_count_; |
323 Scope* const scope_; | 320 Scope* const scope_; |
324 TranslationBuffer translations_; | 321 TranslationBuffer translations_; |
325 ZoneList<LDeferredCode*> deferred_; | 322 ZoneList<LDeferredCode*> deferred_; |
326 int osr_pc_offset_; | 323 int osr_pc_offset_; |
327 bool frame_is_built_; | 324 bool frame_is_built_; |
328 | 325 |
329 // Builder that keeps track of safepoints in the code. The table | 326 // Builder that keeps track of safepoints in the code. The table |
330 // itself is emitted at the end of the generated code. | 327 // itself is emitted at the end of the generated code. |
331 SafepointTableBuilder safepoints_; | 328 SafepointTableBuilder safepoints_; |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 Label entry_; | 387 Label entry_; |
391 Label exit_; | 388 Label exit_; |
392 Label done_; | 389 Label done_; |
393 Label* external_exit_; | 390 Label* external_exit_; |
394 int instruction_index_; | 391 int instruction_index_; |
395 }; | 392 }; |
396 | 393 |
397 } } // namespace v8::internal | 394 } } // namespace v8::internal |
398 | 395 |
399 #endif // V8_X64_LITHIUM_CODEGEN_X64_H_ | 396 #endif // V8_X64_LITHIUM_CODEGEN_X64_H_ |
OLD | NEW |