Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Unified Diff: test/unittests/compiler/typer-unittest.cc

Issue 1655833002: Remove the template magic from types.(h|cc), remove types-inl.h. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Undo whitespace change Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/unittests/compiler/simplified-operator-unittest.cc ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/compiler/typer-unittest.cc
diff --git a/test/unittests/compiler/typer-unittest.cc b/test/unittests/compiler/typer-unittest.cc
index 6e4d4d589fb7b8643ae59b0b49019182c853b704..e1303c7345d7b816e6706f573dedb96aea80af2d 100644
--- a/test/unittests/compiler/typer-unittest.cc
+++ b/test/unittests/compiler/typer-unittest.cc
@@ -49,7 +49,7 @@ class TyperTest : public TypedGraphTest {
}
}
- Types<Type, Type*, Zone> types_;
+ Types types_;
JSOperatorBuilder javascript_;
BinaryOperationHints const hints_ = BinaryOperationHints::Any();
Node* context_node_;
@@ -115,7 +115,7 @@ class TyperTest : public TypedGraphTest {
return result;
}
- double RandomInt(Type::RangeType* range) {
+ double RandomInt(RangeType* range) {
return RandomInt(range->Min(), range->Max());
}
@@ -149,12 +149,12 @@ class TyperTest : public TypedGraphTest {
void TestBinaryArithOp(const Operator* op, BinaryFunction opfun) {
TestBinaryArithOpCloseToZero(op, opfun, 8);
for (int i = 0; i < 100; ++i) {
- Type::RangeType* r1 = RandomRange()->AsRange();
- Type::RangeType* r2 = RandomRange()->AsRange();
+ Type* r1 = RandomRange();
+ Type* r2 = RandomRange();
Type* expected_type = TypeBinaryOp(op, r1, r2);
for (int i = 0; i < 10; i++) {
- double x1 = RandomInt(r1);
- double x2 = RandomInt(r2);
+ double x1 = RandomInt(r1->AsRange());
+ double x2 = RandomInt(r2->AsRange());
double result_value = opfun(x1, x2);
Type* result_type = Type::Constant(
isolate()->factory()->NewNumber(result_value), zone());
@@ -166,12 +166,12 @@ class TyperTest : public TypedGraphTest {
template <class BinaryFunction>
void TestBinaryCompareOp(const Operator* op, BinaryFunction opfun) {
for (int i = 0; i < 100; ++i) {
- Type::RangeType* r1 = RandomRange()->AsRange();
- Type::RangeType* r2 = RandomRange()->AsRange();
+ Type* r1 = RandomRange();
+ Type* r2 = RandomRange();
Type* expected_type = TypeBinaryOp(op, r1, r2);
for (int i = 0; i < 10; i++) {
- double x1 = RandomInt(r1);
- double x2 = RandomInt(r2);
+ double x1 = RandomInt(r1->AsRange());
+ double x2 = RandomInt(r2->AsRange());
bool result_value = opfun(x1, x2);
Type* result_type =
Type::Constant(result_value ? isolate()->factory()->true_value()
@@ -185,12 +185,12 @@ class TyperTest : public TypedGraphTest {
template <class BinaryFunction>
void TestBinaryBitOp(const Operator* op, BinaryFunction opfun) {
for (int i = 0; i < 100; ++i) {
- Type::RangeType* r1 = RandomRange(true)->AsRange();
- Type::RangeType* r2 = RandomRange(true)->AsRange();
+ Type* r1 = RandomRange(true);
+ Type* r2 = RandomRange(true);
Type* expected_type = TypeBinaryOp(op, r1, r2);
for (int i = 0; i < 10; i++) {
- int32_t x1 = static_cast<int32_t>(RandomInt(r1));
- int32_t x2 = static_cast<int32_t>(RandomInt(r2));
+ int32_t x1 = static_cast<int32_t>(RandomInt(r1->AsRange()));
+ int32_t x2 = static_cast<int32_t>(RandomInt(r2->AsRange()));
double result_value = opfun(x1, x2);
Type* result_type = Type::Constant(
isolate()->factory()->NewNumber(result_value), zone());
« no previous file with comments | « test/unittests/compiler/simplified-operator-unittest.cc ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698