OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_ | 5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_ |
6 #define VM_INTERMEDIATE_LANGUAGE_H_ | 6 #define VM_INTERMEDIATE_LANGUAGE_H_ |
7 | 7 |
8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
9 #include "vm/ast.h" | 9 #include "vm/ast.h" |
10 #include "vm/growable_array.h" | 10 #include "vm/growable_array.h" |
(...skipping 2429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2440 }; | 2440 }; |
2441 | 2441 |
2442 | 2442 |
2443 class ParallelMoveInstr : public Instruction { | 2443 class ParallelMoveInstr : public Instruction { |
2444 public: | 2444 public: |
2445 explicit ParallelMoveInstr() : moves_(4) { | 2445 explicit ParallelMoveInstr() : moves_(4) { |
2446 } | 2446 } |
2447 | 2447 |
2448 DECLARE_INSTRUCTION(ParallelMove) | 2448 DECLARE_INSTRUCTION(ParallelMove) |
2449 | 2449 |
2450 void AddMove(Location dest, Location src) { | 2450 MoveOperands* AddMove(Location dest, Location src) { |
2451 moves_.Add(new MoveOperands(dest, src)); | 2451 MoveOperands* move = new MoveOperands(dest, src); |
| 2452 moves_.Add(move); |
| 2453 return move; |
2452 } | 2454 } |
2453 | 2455 |
2454 MoveOperands* MoveOperandsAt(intptr_t index) const { return moves_[index]; } | 2456 MoveOperands* MoveOperandsAt(intptr_t index) const { return moves_[index]; } |
2455 | 2457 |
2456 void SetSrcSlotAt(intptr_t index, const Location& loc); | 2458 void SetSrcSlotAt(intptr_t index, const Location& loc); |
2457 void SetDestSlotAt(intptr_t index, const Location& loc); | 2459 void SetDestSlotAt(intptr_t index, const Location& loc); |
2458 | 2460 |
2459 intptr_t NumMoves() const { return moves_.length(); } | 2461 intptr_t NumMoves() const { return moves_.length(); } |
2460 | 2462 |
2461 private: | 2463 private: |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2533 const GrowableArray<BlockEntryInstr*>& block_order_; | 2535 const GrowableArray<BlockEntryInstr*>& block_order_; |
2534 | 2536 |
2535 private: | 2537 private: |
2536 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); | 2538 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); |
2537 }; | 2539 }; |
2538 | 2540 |
2539 | 2541 |
2540 } // namespace dart | 2542 } // namespace dart |
2541 | 2543 |
2542 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 2544 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
OLD | NEW |