summaryrefslogtreecommitdiff
path: root/deps/v8/src/compiler/gap-resolver.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/compiler/gap-resolver.cc')
-rw-r--r--deps/v8/src/compiler/gap-resolver.cc14
1 files changed, 6 insertions, 8 deletions
diff --git a/deps/v8/src/compiler/gap-resolver.cc b/deps/v8/src/compiler/gap-resolver.cc
index 3dc1ee27c9..4542a73685 100644
--- a/deps/v8/src/compiler/gap-resolver.cc
+++ b/deps/v8/src/compiler/gap-resolver.cc
@@ -5,7 +5,6 @@
#include "src/compiler/gap-resolver.h"
#include <algorithm>
-#include <functional>
#include <set>
namespace v8 {
@@ -19,10 +18,6 @@ namespace {
const int kFloat32Bit = REP_BIT(MachineRepresentation::kFloat32);
const int kFloat64Bit = REP_BIT(MachineRepresentation::kFloat64);
-inline bool Blocks(MoveOperands* move, InstructionOperand destination) {
- return !move->IsEliminated() && move->source().InterferesWith(destination);
-}
-
// Splits a FP move between two location operands into the equivalent series of
// moves between smaller sub-operands, e.g. a double move to two single moves.
// This helps reduce the number of cycles that would normally occur under FP
@@ -53,7 +48,7 @@ MoveOperands* Split(MoveOperands* move, MachineRepresentation smaller_rep,
src_index = src_loc.register_code() * aliases;
} else {
src_index = src_loc.index();
- // For operands that occuply multiple slots, the index refers to the last
+ // For operands that occupy multiple slots, the index refers to the last
// slot. On little-endian architectures, we start at the high slot and use a
// negative step so that register-to-slot moves are in the correct order.
src_step = -slot_size;
@@ -197,8 +192,11 @@ void GapResolver::PerformMove(ParallelMove* moves, MoveOperands* move) {
// The move may be blocked on a (at most one) pending move, in which case we
// have a cycle. Search for such a blocking move and perform a swap to
// resolve it.
- auto blocker = std::find_if(moves->begin(), moves->end(),
- std::bind2nd(std::ptr_fun(&Blocks), destination));
+ auto blocker =
+ std::find_if(moves->begin(), moves->end(), [&](MoveOperands* move) {
+ return !move->IsEliminated() &&
+ move->source().InterferesWith(destination);
+ });
if (blocker == moves->end()) {
// The easy case: This move is not blocked.
assembler_->AssembleMove(&source, &destination);