OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 values.push_back(smi); | 80 values.push_back(smi); |
81 values.push_back(signed32); | 81 values.push_back(signed32); |
82 values.push_back(object1); | 82 values.push_back(object1); |
83 values.push_back(object2); | 83 values.push_back(object2); |
84 values.push_back(array); | 84 values.push_back(array); |
85 values.push_back(uninitialized); | 85 values.push_back(uninitialized); |
86 for (ValueVector::iterator it = values.begin(); it != values.end(); ++it) { | 86 for (ValueVector::iterator it = values.begin(); it != values.end(); ++it) { |
87 types.push_back(Type::Constant(*it, region)); | 87 types.push_back(Type::Constant(*it, region)); |
88 } | 88 } |
89 | 89 |
90 integers.push_back(isolate->factory()->NewNumber( | 90 integers.push_back(isolate->factory()->NewNumber(-V8_INFINITY)); |
91 -std::numeric_limits<double>::infinity())); | 91 integers.push_back(isolate->factory()->NewNumber(+V8_INFINITY)); |
92 integers.push_back(isolate->factory()->NewNumber( | |
93 +std::numeric_limits<double>::infinity())); | |
94 integers.push_back(isolate->factory()->NewNumber(-rng_->NextInt(10))); | 92 integers.push_back(isolate->factory()->NewNumber(-rng_->NextInt(10))); |
95 integers.push_back(isolate->factory()->NewNumber(+rng_->NextInt(10))); | 93 integers.push_back(isolate->factory()->NewNumber(+rng_->NextInt(10))); |
96 for (int i = 0; i < 10; ++i) { | 94 for (int i = 0; i < 10; ++i) { |
97 double x = rng_->NextInt(); | 95 double x = rng_->NextInt(); |
98 integers.push_back(isolate->factory()->NewNumber(x)); | 96 integers.push_back(isolate->factory()->NewNumber(x)); |
99 x *= rng_->NextInt(); | 97 x *= rng_->NextInt(); |
100 if (!IsMinusZero(x)) integers.push_back(isolate->factory()->NewNumber(x)); | 98 if (!IsMinusZero(x)) integers.push_back(isolate->factory()->NewNumber(x)); |
101 } | 99 } |
102 | 100 |
103 Integer = Type::Range( | 101 Integer = Type::Range(isolate->factory()->NewNumber(-V8_INFINITY), |
104 isolate->factory()->NewNumber(-std::numeric_limits<double>::infinity()), | 102 isolate->factory()->NewNumber(+V8_INFINITY), region); |
105 isolate->factory()->NewNumber(+std::numeric_limits<double>::infinity()), | |
106 region); | |
107 | 103 |
108 NumberArray = Type::Array(Number, region); | 104 NumberArray = Type::Array(Number, region); |
109 StringArray = Type::Array(String, region); | 105 StringArray = Type::Array(String, region); |
110 AnyArray = Type::Array(Any, region); | 106 AnyArray = Type::Array(Any, region); |
111 | 107 |
112 SignedFunction1 = Type::Function(SignedSmall, SignedSmall, region); | 108 SignedFunction1 = Type::Function(SignedSmall, SignedSmall, region); |
113 NumberFunction1 = Type::Function(Number, Number, region); | 109 NumberFunction1 = Type::Function(Number, Number, region); |
114 NumberFunction2 = Type::Function(Number, Number, Number, region); | 110 NumberFunction2 = Type::Function(Number, Number, Number, region); |
115 MethodFunction = Type::Function(String, Object, 0, region); | 111 MethodFunction = Type::Function(String, Object, 0, region); |
116 | 112 |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 | 302 |
307 private: | 303 private: |
308 Region* region_; | 304 Region* region_; |
309 v8::base::RandomNumberGenerator* rng_; | 305 v8::base::RandomNumberGenerator* rng_; |
310 }; | 306 }; |
311 | 307 |
312 | 308 |
313 } } // namespace v8::internal | 309 } } // namespace v8::internal |
314 | 310 |
315 #endif | 311 #endif |
OLD | NEW |