// Copyright 2014 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "src/compiler/backend/gap-resolver.h" #include "src/base/utils/random-number-generator.h" #include "test/cctest/cctest.h" namespace v8 { namespace internal { namespace compiler { const auto GetRegConfig = …; // Fragments the given FP operand into an equivalent set of FP operands to // simplify ParallelMove equivalence testing. void GetCanonicalOperands(const InstructionOperand& op, std::vector<InstructionOperand>* fragments) { … } // Fake frame size. The test's stack operand indices should be below this value. // Stack slots above this value correspond to temporaries pushed by the gap // resolver to resolve move cycles, and are ignored when comparing interpreter // states. constexpr int kLastFrameSlotId = …; // The state of our move interpreter is the mapping of operands to values. Note // that the actual values don't really matter, all we care about is equality. class InterpreterState { … }; // An abstract interpreter for moves, swaps and parallel moves. class MoveInterpreter : public GapResolver::Assembler { … }; class ParallelMoveCreator : public HandleAndZoneScope { … }; void RunTest(ParallelMove* pm, Zone* zone) { … } TEST(Aliasing) { … } // Test parallel moves that change the frame layout. These typically happen when // preparing tail-calls. TEST(ComplexParallelMoves) { … } TEST(FuzzResolver) { … } } // namespace compiler } // namespace internal } // namespace v8