OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 22 matching lines...) Expand all Loading... |
33 #include "checks.h" | 33 #include "checks.h" |
34 #include "deoptimizer.h" | 34 #include "deoptimizer.h" |
35 #include "safepoint-table.h" | 35 #include "safepoint-table.h" |
36 #include "scopes.h" | 36 #include "scopes.h" |
37 | 37 |
38 namespace v8 { | 38 namespace v8 { |
39 namespace internal { | 39 namespace internal { |
40 | 40 |
41 // Forward declarations. | 41 // Forward declarations. |
42 class LDeferredCode; | 42 class LDeferredCode; |
| 43 class LGapNode; |
43 class SafepointGenerator; | 44 class SafepointGenerator; |
44 | 45 |
| 46 class LGapResolver BASE_EMBEDDED { |
| 47 public: |
| 48 LGapResolver(); |
| 49 const ZoneList<LMoveOperands>* Resolve(const ZoneList<LMoveOperands>* moves, |
| 50 LOperand* marker_operand); |
| 51 |
| 52 private: |
| 53 LGapNode* LookupNode(LOperand* operand); |
| 54 bool CanReach(LGapNode* a, LGapNode* b, int visited_id); |
| 55 bool CanReach(LGapNode* a, LGapNode* b); |
| 56 void RegisterMove(LMoveOperands move); |
| 57 void AddResultMove(LOperand* from, LOperand* to); |
| 58 void AddResultMove(LGapNode* from, LGapNode* to); |
| 59 void ResolveCycle(LGapNode* start, LOperand* marker_operand); |
| 60 |
| 61 ZoneList<LGapNode*> nodes_; |
| 62 ZoneList<LGapNode*> identified_cycles_; |
| 63 ZoneList<LMoveOperands> result_; |
| 64 int next_visited_id_; |
| 65 }; |
| 66 |
| 67 |
45 class LCodeGen BASE_EMBEDDED { | 68 class LCodeGen BASE_EMBEDDED { |
46 public: | 69 public: |
47 LCodeGen(LChunk* chunk, MacroAssembler* assembler, CompilationInfo* info) | 70 LCodeGen(LChunk* chunk, MacroAssembler* assembler, CompilationInfo* info) |
48 : chunk_(chunk), | 71 : chunk_(chunk), |
49 masm_(assembler), | 72 masm_(assembler), |
50 info_(info), | 73 info_(info), |
51 current_block_(-1), | 74 current_block_(-1), |
52 current_instruction_(-1), | 75 current_instruction_(-1), |
53 instructions_(chunk->instructions()), | 76 instructions_(chunk->instructions()), |
54 deoptimizations_(4), | 77 deoptimizations_(4), |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 private: | 285 private: |
263 LCodeGen* codegen_; | 286 LCodeGen* codegen_; |
264 Label entry_; | 287 Label entry_; |
265 Label exit_; | 288 Label exit_; |
266 Label* external_exit_; | 289 Label* external_exit_; |
267 }; | 290 }; |
268 | 291 |
269 } } // namespace v8::internal | 292 } } // namespace v8::internal |
270 | 293 |
271 #endif // V8_X64_LITHIUM_CODEGEN_X64_H_ | 294 #endif // V8_X64_LITHIUM_CODEGEN_X64_H_ |
OLD | NEW |