| 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_IA32_LITHIUM_IA32_H_ | 28 #ifndef V8_IA32_LITHIUM_IA32_H_ |
| 29 #define V8_IA32_LITHIUM_IA32_H_ | 29 #define V8_IA32_LITHIUM_IA32_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 class LGapNode; | |
| 43 | 43 |
| 44 | 44 |
| 45 // Type hierarchy: | 45 // Type hierarchy: |
| 46 // | 46 // |
| 47 // LInstruction | 47 // LInstruction |
| 48 // LAccessArgumentsAt | 48 // LAccessArgumentsAt |
| 49 // LArgumentsElements | 49 // LArgumentsElements |
| 50 // LArgumentsLength | 50 // LArgumentsLength |
| 51 // LBinaryOperation | 51 // LBinaryOperation |
| 52 // LAddI | 52 // LAddI |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 | 328 |
| 329 private: | 329 private: |
| 330 SetOncePointer<LEnvironment> environment_; | 330 SetOncePointer<LEnvironment> environment_; |
| 331 SetOncePointer<LPointerMap> pointer_map_; | 331 SetOncePointer<LPointerMap> pointer_map_; |
| 332 SetOncePointer<LOperand> result_; | 332 SetOncePointer<LOperand> result_; |
| 333 HValue* hydrogen_value_; | 333 HValue* hydrogen_value_; |
| 334 SetOncePointer<LEnvironment> deoptimization_environment_; | 334 SetOncePointer<LEnvironment> deoptimization_environment_; |
| 335 }; | 335 }; |
| 336 | 336 |
| 337 | 337 |
| 338 class LGapResolver BASE_EMBEDDED { | |
| 339 public: | |
| 340 LGapResolver(const ZoneList<LMoveOperands>* moves, LOperand* marker_operand); | |
| 341 const ZoneList<LMoveOperands>* ResolveInReverseOrder(); | |
| 342 | |
| 343 private: | |
| 344 LGapNode* LookupNode(LOperand* operand); | |
| 345 bool CanReach(LGapNode* a, LGapNode* b, int visited_id); | |
| 346 bool CanReach(LGapNode* a, LGapNode* b); | |
| 347 void RegisterMove(LMoveOperands move); | |
| 348 void AddResultMove(LOperand* from, LOperand* to); | |
| 349 void AddResultMove(LGapNode* from, LGapNode* to); | |
| 350 void ResolveCycle(LGapNode* start); | |
| 351 | |
| 352 ZoneList<LGapNode*> nodes_; | |
| 353 ZoneList<LGapNode*> identified_cycles_; | |
| 354 ZoneList<LMoveOperands> result_; | |
| 355 LOperand* marker_operand_; | |
| 356 int next_visited_id_; | |
| 357 int bailout_after_ast_id_; | |
| 358 }; | |
| 359 | |
| 360 | |
| 361 class LParallelMove : public ZoneObject { | 338 class LParallelMove : public ZoneObject { |
| 362 public: | 339 public: |
| 363 LParallelMove() : move_operands_(4) { } | 340 LParallelMove() : move_operands_(4) { } |
| 364 | 341 |
| 365 void AddMove(LOperand* from, LOperand* to) { | 342 void AddMove(LOperand* from, LOperand* to) { |
| 366 move_operands_.Add(LMoveOperands(from, to)); | 343 move_operands_.Add(LMoveOperands(from, to)); |
| 367 } | 344 } |
| 368 | 345 |
| 369 bool IsRedundant() const; | 346 bool IsRedundant() const; |
| 370 | 347 |
| (...skipping 1788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2159 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2136 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
| 2160 }; | 2137 }; |
| 2161 | 2138 |
| 2162 #undef DECLARE_HYDROGEN_ACCESSOR | 2139 #undef DECLARE_HYDROGEN_ACCESSOR |
| 2163 #undef DECLARE_INSTRUCTION | 2140 #undef DECLARE_INSTRUCTION |
| 2164 #undef DECLARE_CONCRETE_INSTRUCTION | 2141 #undef DECLARE_CONCRETE_INSTRUCTION |
| 2165 | 2142 |
| 2166 } } // namespace v8::internal | 2143 } } // namespace v8::internal |
| 2167 | 2144 |
| 2168 #endif // V8_IA32_LITHIUM_IA32_H_ | 2145 #endif // V8_IA32_LITHIUM_IA32_H_ |
| OLD | NEW |