Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(484)

Side by Side Diff: test/cctest/types-fuzz.h

Issue 798413003: Remove obsolete V8_INFINITY macro. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address Svens smiley. Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/cctest/test-types.cc ('k') | test/unittests/compiler/js-builtin-reducer-unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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(-V8_INFINITY)); 90 integers.push_back(isolate->factory()->NewNumber(
91 integers.push_back(isolate->factory()->NewNumber(+V8_INFINITY)); 91 -std::numeric_limits<double>::infinity()));
92 integers.push_back(isolate->factory()->NewNumber(
93 +std::numeric_limits<double>::infinity()));
92 integers.push_back(isolate->factory()->NewNumber(-rng_->NextInt(10))); 94 integers.push_back(isolate->factory()->NewNumber(-rng_->NextInt(10)));
93 integers.push_back(isolate->factory()->NewNumber(+rng_->NextInt(10))); 95 integers.push_back(isolate->factory()->NewNumber(+rng_->NextInt(10)));
94 for (int i = 0; i < 10; ++i) { 96 for (int i = 0; i < 10; ++i) {
95 double x = rng_->NextInt(); 97 double x = rng_->NextInt();
96 integers.push_back(isolate->factory()->NewNumber(x)); 98 integers.push_back(isolate->factory()->NewNumber(x));
97 x *= rng_->NextInt(); 99 x *= rng_->NextInt();
98 if (!IsMinusZero(x)) integers.push_back(isolate->factory()->NewNumber(x)); 100 if (!IsMinusZero(x)) integers.push_back(isolate->factory()->NewNumber(x));
99 } 101 }
100 102
101 Integer = Type::Range(isolate->factory()->NewNumber(-V8_INFINITY), 103 Integer = Type::Range(
102 isolate->factory()->NewNumber(+V8_INFINITY), region); 104 isolate->factory()->NewNumber(-std::numeric_limits<double>::infinity()),
105 isolate->factory()->NewNumber(+std::numeric_limits<double>::infinity()),
106 region);
103 107
104 NumberArray = Type::Array(Number, region); 108 NumberArray = Type::Array(Number, region);
105 StringArray = Type::Array(String, region); 109 StringArray = Type::Array(String, region);
106 AnyArray = Type::Array(Any, region); 110 AnyArray = Type::Array(Any, region);
107 111
108 SignedFunction1 = Type::Function(SignedSmall, SignedSmall, region); 112 SignedFunction1 = Type::Function(SignedSmall, SignedSmall, region);
109 NumberFunction1 = Type::Function(Number, Number, region); 113 NumberFunction1 = Type::Function(Number, Number, region);
110 NumberFunction2 = Type::Function(Number, Number, Number, region); 114 NumberFunction2 = Type::Function(Number, Number, Number, region);
111 MethodFunction = Type::Function(String, Object, 0, region); 115 MethodFunction = Type::Function(String, Object, 0, region);
112 116
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 306
303 private: 307 private:
304 Region* region_; 308 Region* region_;
305 v8::base::RandomNumberGenerator* rng_; 309 v8::base::RandomNumberGenerator* rng_;
306 }; 310 };
307 311
308 312
309 } } // namespace v8::internal 313 } } // namespace v8::internal
310 314
311 #endif 315 #endif
OLDNEW
« no previous file with comments | « test/cctest/test-types.cc ('k') | test/unittests/compiler/js-builtin-reducer-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698