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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 Type* Constant(Handle<i::Object> value) { | 135 Type* Constant(Handle<i::Object> value) { |
136 return Type::Constant(value, zone_); | 136 return Type::Constant(value, zone_); |
137 } | 137 } |
138 | 138 |
139 Type* Range(double min, double max) { return Type::Range(min, max, zone_); } | 139 Type* Range(double min, double max) { return Type::Range(min, max, zone_); } |
140 | 140 |
141 Type* Union(Type* t1, Type* t2) { return Type::Union(t1, t2, zone_); } | 141 Type* Union(Type* t1, Type* t2) { return Type::Union(t1, t2, zone_); } |
142 | 142 |
143 Type* Intersect(Type* t1, Type* t2) { return Type::Intersect(t1, t2, zone_); } | 143 Type* Intersect(Type* t1, Type* t2) { return Type::Intersect(t1, t2, zone_); } |
144 | 144 |
| 145 Type* Representation(Type* t) { return Type::Representation(t, zone_); } |
| 146 |
145 Type* Semantic(Type* t) { return Type::Semantic(t, zone_); } | 147 Type* Semantic(Type* t) { return Type::Semantic(t, zone_); } |
146 | 148 |
147 Type* Random() { | 149 Type* Random() { |
148 return types[rng_->NextInt(static_cast<int>(types.size()))]; | 150 return types[rng_->NextInt(static_cast<int>(types.size()))]; |
149 } | 151 } |
150 | 152 |
151 Type* Fuzz(int depth = 4) { | 153 Type* Fuzz(int depth = 4) { |
152 switch (rng_->NextInt(depth == 0 ? 3 : 20)) { | 154 switch (rng_->NextInt(depth == 0 ? 3 : 20)) { |
153 case 0: { // bitset | 155 case 0: { // bitset |
154 #define COUNT_BITSET_TYPES(type, value) + 1 | 156 #define COUNT_BITSET_TYPES(type, value) + 1 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 private: | 205 private: |
204 Zone* zone_; | 206 Zone* zone_; |
205 v8::base::RandomNumberGenerator* rng_; | 207 v8::base::RandomNumberGenerator* rng_; |
206 }; | 208 }; |
207 | 209 |
208 } // namespace compiler | 210 } // namespace compiler |
209 } // namespace internal | 211 } // namespace internal |
210 } // namespace v8 | 212 } // namespace v8 |
211 | 213 |
212 #endif | 214 #endif |
OLD | NEW |