#include "src/base/overflowing-math.h"
#include "src/base/utils/random-number-generator.h"
#include "src/codegen/tick-counter.h"
#include "src/compiler/js-graph.h"
#include "src/compiler/machine-operator-reducer.h"
#include "src/compiler/operator-properties.h"
#include "src/compiler/typer.h"
#include "src/objects/objects-inl.h"
#include "test/cctest/cctest.h"
#include "test/common/value-helper.h"
namespace v8 {
namespace internal {
namespace compiler {
template <typename T>
const Operator* NewConstantOperator(CommonOperatorBuilder* common,
T value);
template <>
const Operator* NewConstantOperator<int32_t>(CommonOperatorBuilder* common,
int32_t value) { … }
template <>
const Operator* NewConstantOperator<int64_t>(CommonOperatorBuilder* common,
int64_t value) { … }
template <>
const Operator* NewConstantOperator<double>(CommonOperatorBuilder* common,
double value) { … }
template <>
const Operator* NewConstantOperator<float>(CommonOperatorBuilder* common,
float value) { … }
template <typename T>
T ValueOfOperator(const Operator* op);
template <>
int32_t ValueOfOperator<int32_t>(const Operator* op) { … }
template <>
int64_t ValueOfOperator<int64_t>(const Operator* op) { … }
template <>
float ValueOfOperator<float>(const Operator* op) { … }
template <>
double ValueOfOperator<double>(const Operator* op) { … }
class ReducerTester : public HandleAndZoneScope { … };
TEST(ReduceWord32And) { … }
TEST(ReduceWord32Or) { … }
TEST(ReduceWord32Xor) { … }
TEST(ReduceWord32Shl) { … }
TEST(ReduceWord64Shl) { … }
TEST(ReduceWord32Shr) { … }
TEST(ReduceWord64Shr) { … }
TEST(ReduceWord32Sar) { … }
TEST(ReduceWord64Sar) { … }
static void CheckJsShift(ReducerTester* R) { … }
TEST(ReduceJsShifts) { … }
TEST(Word32Equal) { … }
TEST(ReduceInt32Add) { … }
TEST(ReduceInt64Add) { … }
TEST(ReduceInt32Sub) { … }
TEST(ReduceInt64Sub) { … }
TEST(ReduceInt32Mul) { … }
TEST(ReduceInt32Div) { … }
TEST(ReduceUint32Div) { … }
TEST(ReduceInt32Mod) { … }
TEST(ReduceUint32Mod) { … }
TEST(ReduceInt32LessThan) { … }
TEST(ReduceInt32LessThanOrEqual) { … }
TEST(ReduceUint32LessThan) { … }
TEST(ReduceUint32LessThanOrEqual) { … }
TEST(ReduceLoadStore) { … }
TEST(ReduceFloat32Sub) { … }
TEST(ReduceFloat64Sub) { … }
}
}
}