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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 TypeHandle type = Type::Function(result, receiver, arity, region_); | 300 TypeHandle type = Type::Function(result, receiver, arity, region_); |
301 for (int i = 0; i < type->AsFunction()->Arity(); ++i) { | 301 for (int i = 0; i < type->AsFunction()->Arity(); ++i) { |
302 TypeHandle parameter = Fuzz(depth / 2); | 302 TypeHandle parameter = Fuzz(depth / 2); |
303 type->AsFunction()->InitParameter(i, parameter); | 303 type->AsFunction()->InitParameter(i, parameter); |
304 } | 304 } |
305 return type; | 305 return type; |
306 } | 306 } |
307 case 8: { // simd | 307 case 8: { // simd |
308 static const int num_simd_types = | 308 static const int num_simd_types = |
309 #define COUNT_SIMD_TYPE(NAME, Name, name, lane_count, lane_type) +1 | 309 #define COUNT_SIMD_TYPE(NAME, Name, name, lane_count, lane_type) +1 |
310 SIMD128_TYPES(COUNT_SIMD_TYPE) | 310 SIMD128_TYPES(COUNT_SIMD_TYPE); |
311 #undef COUNT_SIMD_TYPE | 311 #undef COUNT_SIMD_TYPE |
312 ; | |
313 TypeHandle (*simd_constructors[num_simd_types])(Isolate*, Region*) = { | 312 TypeHandle (*simd_constructors[num_simd_types])(Isolate*, Region*) = { |
314 #define COUNT_SIMD_TYPE(NAME, Name, name, lane_count, lane_type) \ | 313 #define COUNT_SIMD_TYPE(NAME, Name, name, lane_count, lane_type) \ |
315 &Type::Name, | 314 &Type::Name, |
316 SIMD128_TYPES(COUNT_SIMD_TYPE) | 315 SIMD128_TYPES(COUNT_SIMD_TYPE) |
317 #undef COUNT_SIMD_TYPE | 316 #undef COUNT_SIMD_TYPE |
318 }; | 317 }; |
319 return simd_constructors[rng_->NextInt(num_simd_types)]( | 318 return simd_constructors[rng_->NextInt(num_simd_types)]( |
320 isolate_, region_); | 319 isolate_, region_); |
321 } | 320 } |
322 default: { // union | 321 default: { // union |
(...skipping 14 matching lines...) Expand all Loading... |
337 private: | 336 private: |
338 Region* region_; | 337 Region* region_; |
339 Isolate* isolate_; | 338 Isolate* isolate_; |
340 v8::base::RandomNumberGenerator* rng_; | 339 v8::base::RandomNumberGenerator* rng_; |
341 }; | 340 }; |
342 | 341 |
343 | 342 |
344 } } // namespace v8::internal | 343 } } // namespace v8::internal |
345 | 344 |
346 #endif | 345 #endif |
OLD | NEW |