| OLD | NEW |
| 1 // Copyright 2010 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 |
| 11 // with the distribution. | 11 // with the distribution. |
| (...skipping 11 matching lines...) Expand all Loading... |
| 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | 27 |
| 28 #ifndef V8_ARM_LITHIUM_ARM_H_ | 28 #ifndef V8_ARM_LITHIUM_ARM_H_ |
| 29 #define V8_ARM_LITHIUM_ARM_H_ | 29 #define V8_ARM_LITHIUM_ARM_H_ |
| 30 | 30 |
| 31 #include "hydrogen.h" | 31 #include "hydrogen.h" |
| 32 #include "lithium-allocator.h" | 32 #include "lithium-allocator.h" |
| 33 #include "lithium.h" |
| 33 #include "safepoint-table.h" | 34 #include "safepoint-table.h" |
| 34 | 35 |
| 35 namespace v8 { | 36 namespace v8 { |
| 36 namespace internal { | 37 namespace internal { |
| 37 | 38 |
| 38 // Forward declarations. | 39 // Forward declarations. |
| 39 class LCodeGen; | 40 class LCodeGen; |
| 40 class LEnvironment; | 41 class LEnvironment; |
| 41 class Translation; | 42 class Translation; |
| 42 | 43 |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 | 325 |
| 325 private: | 326 private: |
| 326 SetOncePointer<LEnvironment> environment_; | 327 SetOncePointer<LEnvironment> environment_; |
| 327 SetOncePointer<LPointerMap> pointer_map_; | 328 SetOncePointer<LPointerMap> pointer_map_; |
| 328 SetOncePointer<LOperand> result_; | 329 SetOncePointer<LOperand> result_; |
| 329 HValue* hydrogen_value_; | 330 HValue* hydrogen_value_; |
| 330 SetOncePointer<LEnvironment> deoptimization_environment_; | 331 SetOncePointer<LEnvironment> deoptimization_environment_; |
| 331 }; | 332 }; |
| 332 | 333 |
| 333 | 334 |
| 334 class LGapNode; | |
| 335 | |
| 336 | |
| 337 class LGapResolver BASE_EMBEDDED { | |
| 338 public: | |
| 339 LGapResolver(const ZoneList<LMoveOperands>* moves, LOperand* marker_operand); | |
| 340 const ZoneList<LMoveOperands>* ResolveInReverseOrder(); | |
| 341 | |
| 342 private: | |
| 343 LGapNode* LookupNode(LOperand* operand); | |
| 344 bool CanReach(LGapNode* a, LGapNode* b, int visited_id); | |
| 345 bool CanReach(LGapNode* a, LGapNode* b); | |
| 346 void RegisterMove(LMoveOperands move); | |
| 347 void AddResultMove(LOperand* from, LOperand* to); | |
| 348 void AddResultMove(LGapNode* from, LGapNode* to); | |
| 349 void ResolveCycle(LGapNode* start); | |
| 350 | |
| 351 ZoneList<LGapNode*> nodes_; | |
| 352 ZoneList<LGapNode*> identified_cycles_; | |
| 353 ZoneList<LMoveOperands> result_; | |
| 354 LOperand* marker_operand_; | |
| 355 int next_visited_id_; | |
| 356 int bailout_after_ast_id_; | |
| 357 }; | |
| 358 | |
| 359 | |
| 360 class LParallelMove : public ZoneObject { | 335 class LParallelMove : public ZoneObject { |
| 361 public: | 336 public: |
| 362 LParallelMove() : move_operands_(4) { } | 337 LParallelMove() : move_operands_(4) { } |
| 363 | 338 |
| 364 void AddMove(LOperand* from, LOperand* to) { | 339 void AddMove(LOperand* from, LOperand* to) { |
| 365 move_operands_.Add(LMoveOperands(from, to)); | 340 move_operands_.Add(LMoveOperands(from, to)); |
| 366 } | 341 } |
| 367 | 342 |
| 368 bool IsRedundant() const; | 343 bool IsRedundant() const; |
| 369 | 344 |
| (...skipping 1760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2130 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2105 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
| 2131 }; | 2106 }; |
| 2132 | 2107 |
| 2133 #undef DECLARE_HYDROGEN_ACCESSOR | 2108 #undef DECLARE_HYDROGEN_ACCESSOR |
| 2134 #undef DECLARE_INSTRUCTION | 2109 #undef DECLARE_INSTRUCTION |
| 2135 #undef DECLARE_CONCRETE_INSTRUCTION | 2110 #undef DECLARE_CONCRETE_INSTRUCTION |
| 2136 | 2111 |
| 2137 } } // namespace v8::internal | 2112 } } // namespace v8::internal |
| 2138 | 2113 |
| 2139 #endif // V8_ARM_LITHIUM_ARM_H_ | 2114 #endif // V8_ARM_LITHIUM_ARM_H_ |
| OLD | NEW |