| 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 | |
| 147 Type* Semantic(Type* t) { return Type::Semantic(t, zone_); } | 145 Type* Semantic(Type* t) { return Type::Semantic(t, zone_); } |
| 148 | 146 |
| 149 Type* Random() { | 147 Type* Random() { |
| 150 return types[rng_->NextInt(static_cast<int>(types.size()))]; | 148 return types[rng_->NextInt(static_cast<int>(types.size()))]; |
| 151 } | 149 } |
| 152 | 150 |
| 153 Type* Fuzz(int depth = 4) { | 151 Type* Fuzz(int depth = 4) { |
| 154 switch (rng_->NextInt(depth == 0 ? 3 : 20)) { | 152 switch (rng_->NextInt(depth == 0 ? 3 : 20)) { |
| 155 case 0: { // bitset | 153 case 0: { // bitset |
| 156 #define COUNT_BITSET_TYPES(type, value) + 1 | 154 #define COUNT_BITSET_TYPES(type, value) + 1 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 private: | 203 private: |
| 206 Zone* zone_; | 204 Zone* zone_; |
| 207 v8::base::RandomNumberGenerator* rng_; | 205 v8::base::RandomNumberGenerator* rng_; |
| 208 }; | 206 }; |
| 209 | 207 |
| 210 } // namespace compiler | 208 } // namespace compiler |
| 211 } // namespace internal | 209 } // namespace internal |
| 212 } // namespace v8 | 210 } // namespace v8 |
| 213 | 211 |
| 214 #endif | 212 #endif |
| OLD | NEW |