OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 deopt_jump_table_(4, info->zone()), | 51 deopt_jump_table_(4, info->zone()), |
52 deoptimization_literals_(8, info->zone()), | 52 deoptimization_literals_(8, info->zone()), |
53 inlined_function_count_(0), | 53 inlined_function_count_(0), |
54 scope_(info->scope()), | 54 scope_(info->scope()), |
55 translations_(info->zone()), | 55 translations_(info->zone()), |
56 deferred_(8, info->zone()), | 56 deferred_(8, info->zone()), |
57 osr_pc_offset_(-1), | 57 osr_pc_offset_(-1), |
58 frame_is_built_(false), | 58 frame_is_built_(false), |
59 safepoints_(info->zone()), | 59 safepoints_(info->zone()), |
60 resolver_(this), | 60 resolver_(this), |
61 expected_safepoint_kind_(Safepoint::kSimple), | 61 expected_safepoint_kind_(Safepoint::kSimple) { |
62 old_position_(RelocInfo::kNoPosition) { | |
63 PopulateDeoptimizationLiteralsWithInlinedFunctions(); | 62 PopulateDeoptimizationLiteralsWithInlinedFunctions(); |
64 } | 63 } |
65 | 64 |
66 | 65 |
67 int LookupDestination(int block_id) const { | 66 int LookupDestination(int block_id) const { |
68 return chunk()->LookupDestination(block_id); | 67 return chunk()->LookupDestination(block_id); |
69 } | 68 } |
70 | 69 |
71 bool IsNextEmittedBlock(int block_id) const { | 70 bool IsNextEmittedBlock(int block_id) const { |
72 return LookupDestination(block_id) == GetNextEmittedBlock(); | 71 return LookupDestination(block_id) == GetNextEmittedBlock(); |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 int arguments, | 287 int arguments, |
289 Safepoint::DeoptMode mode); | 288 Safepoint::DeoptMode mode); |
290 void RecordSafepoint(LPointerMap* pointers, Safepoint::DeoptMode mode); | 289 void RecordSafepoint(LPointerMap* pointers, Safepoint::DeoptMode mode); |
291 void RecordSafepoint(Safepoint::DeoptMode mode); | 290 void RecordSafepoint(Safepoint::DeoptMode mode); |
292 void RecordSafepointWithRegisters(LPointerMap* pointers, | 291 void RecordSafepointWithRegisters(LPointerMap* pointers, |
293 int arguments, | 292 int arguments, |
294 Safepoint::DeoptMode mode); | 293 Safepoint::DeoptMode mode); |
295 void RecordSafepointWithRegistersAndDoubles(LPointerMap* pointers, | 294 void RecordSafepointWithRegistersAndDoubles(LPointerMap* pointers, |
296 int arguments, | 295 int arguments, |
297 Safepoint::DeoptMode mode); | 296 Safepoint::DeoptMode mode); |
298 void RecordPosition(int position); | 297 |
299 void RecordAndUpdatePosition(int position) V8_OVERRIDE; | 298 void RecordAndWritePosition(int position) V8_OVERRIDE; |
300 | 299 |
301 static Condition TokenToCondition(Token::Value op, bool is_unsigned); | 300 static Condition TokenToCondition(Token::Value op, bool is_unsigned); |
302 void EmitGoto(int block); | 301 void EmitGoto(int block); |
303 template<class InstrType> | 302 template<class InstrType> |
304 void EmitBranch(InstrType instr, | 303 void EmitBranch(InstrType instr, |
305 Condition condition, | 304 Condition condition, |
306 Register src1, | 305 Register src1, |
307 const Operand& src2); | 306 const Operand& src2); |
308 template<class InstrType> | 307 template<class InstrType> |
309 void EmitBranchF(InstrType instr, | 308 void EmitBranchF(InstrType instr, |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 | 394 |
396 // Builder that keeps track of safepoints in the code. The table | 395 // Builder that keeps track of safepoints in the code. The table |
397 // itself is emitted at the end of the generated code. | 396 // itself is emitted at the end of the generated code. |
398 SafepointTableBuilder safepoints_; | 397 SafepointTableBuilder safepoints_; |
399 | 398 |
400 // Compiler from a set of parallel moves to a sequential list of moves. | 399 // Compiler from a set of parallel moves to a sequential list of moves. |
401 LGapResolver resolver_; | 400 LGapResolver resolver_; |
402 | 401 |
403 Safepoint::Kind expected_safepoint_kind_; | 402 Safepoint::Kind expected_safepoint_kind_; |
404 | 403 |
405 int old_position_; | |
406 | |
407 class PushSafepointRegistersScope V8_FINAL BASE_EMBEDDED { | 404 class PushSafepointRegistersScope V8_FINAL BASE_EMBEDDED { |
408 public: | 405 public: |
409 PushSafepointRegistersScope(LCodeGen* codegen, | 406 PushSafepointRegistersScope(LCodeGen* codegen, |
410 Safepoint::Kind kind) | 407 Safepoint::Kind kind) |
411 : codegen_(codegen) { | 408 : codegen_(codegen) { |
412 ASSERT(codegen_->info()->is_calling()); | 409 ASSERT(codegen_->info()->is_calling()); |
413 ASSERT(codegen_->expected_safepoint_kind_ == Safepoint::kSimple); | 410 ASSERT(codegen_->expected_safepoint_kind_ == Safepoint::kSimple); |
414 codegen_->expected_safepoint_kind_ = kind; | 411 codegen_->expected_safepoint_kind_ = kind; |
415 | 412 |
416 switch (codegen_->expected_safepoint_kind_) { | 413 switch (codegen_->expected_safepoint_kind_) { |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 LCodeGen* codegen_; | 475 LCodeGen* codegen_; |
479 Label entry_; | 476 Label entry_; |
480 Label exit_; | 477 Label exit_; |
481 Label* external_exit_; | 478 Label* external_exit_; |
482 int instruction_index_; | 479 int instruction_index_; |
483 }; | 480 }; |
484 | 481 |
485 } } // namespace v8::internal | 482 } } // namespace v8::internal |
486 | 483 |
487 #endif // V8_MIPS_LITHIUM_CODEGEN_MIPS_H_ | 484 #endif // V8_MIPS_LITHIUM_CODEGEN_MIPS_H_ |
OLD | NEW |