1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef V8_X64_LITHIUM_GAP_RESOLVER_X64_H_
6 #define V8_X64_LITHIUM_GAP_RESOLVER_X64_H_
10 #include "src/lithium.h"
18 class LGapResolver FINAL BASE_EMBEDDED {
20 explicit LGapResolver(LCodeGen* owner);
22 // Resolve a set of parallel moves, emitting assembler instructions.
23 void Resolve(LParallelMove* parallel_move);
26 // Build the initial list of moves.
27 void BuildInitialMoveList(LParallelMove* parallel_move);
29 // Perform the move at the moves_ index in question (possibly requiring
30 // other moves to satisfy dependencies).
31 void PerformMove(int index);
33 // Emit a move and remove it from the move graph.
34 void EmitMove(int index);
36 // Execute a move by emitting a swap of two operands. The move from
37 // source to destination is removed from the move graph.
38 void EmitSwap(int index);
40 // Verify the move list before performing moves.
45 // List of moves not yet resolved.
46 ZoneList<LMoveOperands> moves_;
49 } } // namespace v8::internal
51 #endif // V8_X64_LITHIUM_GAP_RESOLVER_X64_H_