| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "src/compiler/types.h" | 7 #include "src/compiler/types.h" |
| 8 #include "src/crankshaft/hydrogen-types.h" | 8 #include "src/crankshaft/hydrogen-types.h" |
| 9 #include "src/factory.h" | 9 #include "src/factory.h" |
| 10 #include "src/heap/heap.h" | 10 #include "src/heap/heap.h" |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 Type* type = T.NewConstant(value); | 188 Type* type = T.NewConstant(value); |
| 189 CHECK(type->IsHeapConstant() || type->IsOtherNumberConstant() || | 189 CHECK(type->IsHeapConstant() || type->IsOtherNumberConstant() || |
| 190 type->IsRange()); | 190 type->IsRange()); |
| 191 } | 191 } |
| 192 | 192 |
| 193 // Value attribute | 193 // Value attribute |
| 194 for (ValueIterator vt = T.values.begin(); vt != T.values.end(); ++vt) { | 194 for (ValueIterator vt = T.values.begin(); vt != T.values.end(); ++vt) { |
| 195 Handle<i::Object> value = *vt; | 195 Handle<i::Object> value = *vt; |
| 196 Type* type = T.NewConstant(value); | 196 Type* type = T.NewConstant(value); |
| 197 if (type->IsHeapConstant()) { | 197 if (type->IsHeapConstant()) { |
| 198 CHECK(*value == *type->AsHeapConstant()->Value()); | 198 CHECK(value.address() == type->AsHeapConstant()->Value().address()); |
| 199 } else if (type->IsOtherNumberConstant()) { | 199 } else if (type->IsOtherNumberConstant()) { |
| 200 CHECK(value->IsHeapNumber()); | 200 CHECK(value->IsHeapNumber()); |
| 201 CHECK(value->Number() == type->AsOtherNumberConstant()->Value()); | 201 CHECK(value->Number() == type->AsOtherNumberConstant()->Value()); |
| 202 } else { | 202 } else { |
| 203 CHECK(type->IsRange()); | 203 CHECK(type->IsRange()); |
| 204 double v = value->Number(); | 204 double v = value->Number(); |
| 205 CHECK(v == type->AsRange()->Min() && v == type->AsRange()->Max()); | 205 CHECK(v == type->AsRange()->Min() && v == type->AsRange()->Max()); |
| 206 } | 206 } |
| 207 } | 207 } |
| 208 | 208 |
| (...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1106 | 1106 |
| 1107 TEST(Union3) { Tests().Union3(); } | 1107 TEST(Union3) { Tests().Union3(); } |
| 1108 | 1108 |
| 1109 TEST(Union4) { Tests().Union4(); } | 1109 TEST(Union4) { Tests().Union4(); } |
| 1110 | 1110 |
| 1111 TEST(Intersect) { Tests().Intersect(); } | 1111 TEST(Intersect) { Tests().Intersect(); } |
| 1112 | 1112 |
| 1113 TEST(Distributivity) { Tests().Distributivity(); } | 1113 TEST(Distributivity) { Tests().Distributivity(); } |
| 1114 | 1114 |
| 1115 TEST(GetRange) { Tests().GetRange(); } | 1115 TEST(GetRange) { Tests().GetRange(); } |
| OLD | NEW |