diff options
author | Elliott Hughes <enh@google.com> | 2018-11-10 16:09:57 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-11-10 16:09:57 +0000 |
commit | 2c6d101a7ad799f57dcf479731dcff2af97e03d9 (patch) | |
tree | 47f2e24efd83d5866506c83d397cc7860399b918 | |
parent | 39e6b9c03bc4faff9a7a7326ac3aea888265a70d (diff) | |
parent | 95d31b633e98e8cad03f0f59d963044158555c1c (diff) | |
download | v8-nougat-iot-release.tar.gz |
Merge "Backport: Replace std::bind2nd usage with a lambda to fix C++17 build"android-wear-8.0.0_r2android-o-mr1-iot-release-smart-display-r9android-o-mr1-iot-release-smart-display-r8android-o-mr1-iot-release-smart-display-r5android-o-mr1-iot-release-smart-display-r40.1Jandroid-o-mr1-iot-release-smart-display-r4android-o-mr1-iot-release-smart-display-r39android-o-mr1-iot-release-smart-display-r30android-o-mr1-iot-release-smart-display-r22android-o-mr1-iot-release-smart-display-r14android-o-mr1-iot-release-smart-clock-r6android-o-mr1-iot-release-smart-clock-r2android-o-mr1-iot-release-smart-clock-fsiandroid-o-mr1-iot-release-smart-clock-fcsandroid-o-mr1-iot-release-cube_r2android-o-mr1-iot-release-cube-fsiandroid-o-mr1-iot-release-cube-fcsandroid-n-iot-release-ihome-igv1nougat-iot-release
-rw-r--r-- | src/compiler/gap-resolver.cc | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/compiler/gap-resolver.cc b/src/compiler/gap-resolver.cc index 1ba1044e..b85f96e3 100644 --- a/src/compiler/gap-resolver.cc +++ b/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 @@ -196,8 +191,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); |