OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_CCTEST_COMPILER_FUNCTION_TESTER_H_ | 5 #ifndef V8_CCTEST_COMPILER_FUNCTION_TESTER_H_ |
6 #define V8_CCTEST_COMPILER_FUNCTION_TESTER_H_ | 6 #define V8_CCTEST_COMPILER_FUNCTION_TESTER_H_ |
7 | 7 |
8 #include "src/v8.h" | 8 #include "src/v8.h" |
9 #include "test/cctest/cctest.h" | 9 #include "test/cctest/cctest.h" |
10 | 10 |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 Handle<String> Val(const char* string) { | 130 Handle<String> Val(const char* string) { |
131 return isolate->factory()->InternalizeUtf8String(string); | 131 return isolate->factory()->InternalizeUtf8String(string); |
132 } | 132 } |
133 | 133 |
134 Handle<Object> Val(double value) { | 134 Handle<Object> Val(double value) { |
135 return isolate->factory()->NewNumber(value); | 135 return isolate->factory()->NewNumber(value); |
136 } | 136 } |
137 | 137 |
138 Handle<Object> infinity() { return isolate->factory()->infinity_value(); } | 138 Handle<Object> infinity() { return isolate->factory()->infinity_value(); } |
139 | 139 |
140 Handle<Object> minus_infinity() { return Val(-V8_INFINITY); } | 140 Handle<Object> minus_infinity() { |
| 141 return Val(-std::numeric_limits<double>::infinity()); |
| 142 } |
141 | 143 |
142 Handle<Object> nan() { return isolate->factory()->nan_value(); } | 144 Handle<Object> nan() { return isolate->factory()->nan_value(); } |
143 | 145 |
144 Handle<Object> undefined() { return isolate->factory()->undefined_value(); } | 146 Handle<Object> undefined() { return isolate->factory()->undefined_value(); } |
145 | 147 |
146 Handle<Object> null() { return isolate->factory()->null_value(); } | 148 Handle<Object> null() { return isolate->factory()->null_value(); } |
147 | 149 |
148 Handle<Object> true_value() { return isolate->factory()->true_value(); } | 150 Handle<Object> true_value() { return isolate->factory()->true_value(); } |
149 | 151 |
150 Handle<Object> false_value() { return isolate->factory()->false_value(); } | 152 Handle<Object> false_value() { return isolate->factory()->false_value(); } |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 CHECK(!code.is_null()); | 222 CHECK(!code.is_null()); |
221 function->ReplaceCode(*code); | 223 function->ReplaceCode(*code); |
222 return function; | 224 return function; |
223 } | 225 } |
224 }; | 226 }; |
225 } | 227 } |
226 } | 228 } |
227 } // namespace v8::internal::compiler | 229 } // namespace v8::internal::compiler |
228 | 230 |
229 #endif // V8_CCTEST_COMPILER_FUNCTION_TESTER_H_ | 231 #endif // V8_CCTEST_COMPILER_FUNCTION_TESTER_H_ |
OLD | NEW |