#include "src/codegen/tick-counter.h"
#include "src/compiler/compilation-dependencies.h"
#include "src/compiler/js-graph.h"
#include "src/compiler/js-heap-broker.h"
#include "src/compiler/js-typed-lowering.h"
#include "src/compiler/machine-operator.h"
#include "src/compiler/node-properties.h"
#include "src/compiler/opcodes.h"
#include "src/compiler/operator-properties.h"
#include "src/compiler/simplified-operator.h"
#include "src/compiler/typer.h"
#include "src/execution/isolate.h"
#include "src/heap/factory-inl.h"
#include "src/objects/objects.h"
#include "test/cctest/cctest.h"
#include "test/cctest/compiler/js-heap-broker-base.h"
namespace v8 {
namespace internal {
namespace compiler {
class JSTypedLoweringTester : public HandleAndZoneScope,
public JSHeapBrokerTestBase { … };
static Type kStringTypes[] = …;
static Type kInt32Types[] = …;
static Type kNumberTypes[] = …;
static Type I32Type(bool is_signed) { … }
static IrOpcode::Value NumberToI32(bool is_signed) { … }
namespace {
FeedbackSource FeedbackSourceWithOneBinarySlot(JSTypedLoweringTester* R) { … }
FeedbackSource FeedbackSourceWithOneCompareSlot(JSTypedLoweringTester* R) { … }
}
TEST(StringBinops) { … }
TEST(AddNumber1) { … }
TEST(NumberBinops) { … }
static void CheckToI32(Node* old_input, Node* new_input, bool is_signed) { … }
class JSBitwiseShiftTypedLoweringTester : public JSTypedLoweringTester { … };
TEST(Int32BitwiseShifts) { … }
class JSBitwiseTypedLoweringTester : public JSTypedLoweringTester { … };
TEST(Int32BitwiseBinops) { … }
TEST(JSToNumber1) { … }
TEST(JSToNumber_replacement) { … }
TEST(JSToNumberOfConstant) { … }
TEST(JSToNumberOfNumberOrOtherPrimitive) { … }
TEST(JSToString1) { … }
TEST(JSToString_replacement) { … }
TEST(StringComparison) { … }
static void CheckIsConvertedToNumber(Node* val, Node* converted) { … }
TEST(NumberComparison) { … }
TEST(MixedComparison1) { … }
TEST(RemoveToNumberEffects) { … }
class BinopEffectsTester { … };
void CheckEqualityReduction(JSTypedLoweringTester* R, bool strict, Node* l,
Node* r, IrOpcode::Value expected) { … }
TEST(EqualityForNumbers) { … }
TEST(StrictEqualityForRefEqualTypes) { … }
TEST(StrictEqualityForUnique) { … }
TEST(StringEquality) { … }
TEST(RemovePureNumberBinopEffects) { … }
TEST(Int32BinopEffects) { … }
TEST(Int32AddNarrowing) { … }
TEST(Int32Comparisons) { … }
}
}
}