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/hydrogen-types.h" | 7 #include "src/hydrogen-types.h" |
8 #include "src/isolate-inl.h" | 8 #include "src/isolate-inl.h" |
9 #include "src/types.h" | 9 #include "src/types.h" |
10 #include "test/cctest/cctest.h" | 10 #include "test/cctest/cctest.h" |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 CHECK(!T.Constant(fac->NewNumber(0xffffffffu + 1.0))->Is(T.Integral32)); | 331 CHECK(!T.Constant(fac->NewNumber(0xffffffffu + 1.0))->Is(T.Integral32)); |
332 CHECK(T.Constant(fac->NewNumber(-0x7fffffff - 2.0))->Is(T.PlainNumber)); | 332 CHECK(T.Constant(fac->NewNumber(-0x7fffffff - 2.0))->Is(T.PlainNumber)); |
333 CHECK(!T.Constant(fac->NewNumber(-0x7fffffff - 2.0))->Is(T.Integral32)); | 333 CHECK(!T.Constant(fac->NewNumber(-0x7fffffff - 2.0))->Is(T.Integral32)); |
334 CHECK(T.Constant(fac->NewNumber(0.1))->Is(T.PlainNumber)); | 334 CHECK(T.Constant(fac->NewNumber(0.1))->Is(T.PlainNumber)); |
335 CHECK(!T.Constant(fac->NewNumber(0.1))->Is(T.Integral32)); | 335 CHECK(!T.Constant(fac->NewNumber(0.1))->Is(T.Integral32)); |
336 CHECK(T.Constant(fac->NewNumber(-10.1))->Is(T.PlainNumber)); | 336 CHECK(T.Constant(fac->NewNumber(-10.1))->Is(T.PlainNumber)); |
337 CHECK(!T.Constant(fac->NewNumber(-10.1))->Is(T.Integral32)); | 337 CHECK(!T.Constant(fac->NewNumber(-10.1))->Is(T.Integral32)); |
338 CHECK(T.Constant(fac->NewNumber(10e60))->Is(T.PlainNumber)); | 338 CHECK(T.Constant(fac->NewNumber(10e60))->Is(T.PlainNumber)); |
339 CHECK(!T.Constant(fac->NewNumber(10e60))->Is(T.Integral32)); | 339 CHECK(!T.Constant(fac->NewNumber(10e60))->Is(T.Integral32)); |
340 CHECK(T.Constant(fac->NewNumber(-1.0*0.0))->Is(T.MinusZero)); | 340 CHECK(T.Constant(fac->NewNumber(-1.0*0.0))->Is(T.MinusZero)); |
341 CHECK(T.Constant(fac->NewNumber(v8::base::OS::nan_value()))->Is(T.NaN)); | 341 CHECK(T.Constant(fac->NewNumber(std::numeric_limits<double>::quiet_NaN())) |
| 342 ->Is(T.NaN)); |
342 CHECK(T.Constant(fac->NewNumber(V8_INFINITY))->Is(T.PlainNumber)); | 343 CHECK(T.Constant(fac->NewNumber(V8_INFINITY))->Is(T.PlainNumber)); |
343 CHECK(!T.Constant(fac->NewNumber(V8_INFINITY))->Is(T.Integral32)); | 344 CHECK(!T.Constant(fac->NewNumber(V8_INFINITY))->Is(T.Integral32)); |
344 CHECK(T.Constant(fac->NewNumber(-V8_INFINITY))->Is(T.PlainNumber)); | 345 CHECK(T.Constant(fac->NewNumber(-V8_INFINITY))->Is(T.PlainNumber)); |
345 CHECK(!T.Constant(fac->NewNumber(-V8_INFINITY))->Is(T.Integral32)); | 346 CHECK(!T.Constant(fac->NewNumber(-V8_INFINITY))->Is(T.Integral32)); |
346 } | 347 } |
347 | 348 |
348 void Range() { | 349 void Range() { |
349 // Constructor | 350 // Constructor |
350 for (ValueIterator i = T.integers.begin(); i != T.integers.end(); ++i) { | 351 for (ValueIterator i = T.integers.begin(); i != T.integers.end(); ++i) { |
351 for (ValueIterator j = T.integers.begin(); j != T.integers.end(); ++j) { | 352 for (ValueIterator j = T.integers.begin(); j != T.integers.end(); ++j) { |
(...skipping 1728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2080 ZoneTests().Convert<HeapType, Handle<HeapType>, Isolate, HeapRep>(); | 2081 ZoneTests().Convert<HeapType, Handle<HeapType>, Isolate, HeapRep>(); |
2081 HeapTests().Convert<Type, Type*, Zone, ZoneRep>(); | 2082 HeapTests().Convert<Type, Type*, Zone, ZoneRep>(); |
2082 } | 2083 } |
2083 | 2084 |
2084 | 2085 |
2085 TEST(HTypeFromType) { | 2086 TEST(HTypeFromType) { |
2086 CcTest::InitializeVM(); | 2087 CcTest::InitializeVM(); |
2087 ZoneTests().HTypeFromType(); | 2088 ZoneTests().HTypeFromType(); |
2088 HeapTests().HTypeFromType(); | 2089 HeapTests().HTypeFromType(); |
2089 } | 2090 } |
OLD | NEW |