| 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 #include "src/factory.h" | 5 #include "src/factory.h" |
| 6 | 6 |
| 7 #include "src/allocation-site-scopes.h" | 7 #include "src/allocation-site-scopes.h" |
| 8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
| 9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/conversions.h" | 10 #include "src/conversions.h" |
| (...skipping 2364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2375 if (Name::Equals(name, nan_string())) return nan_value(); | 2375 if (Name::Equals(name, nan_string())) return nan_value(); |
| 2376 if (Name::Equals(name, infinity_string())) return infinity_value(); | 2376 if (Name::Equals(name, infinity_string())) return infinity_value(); |
| 2377 return Handle<Object>::null(); | 2377 return Handle<Object>::null(); |
| 2378 } | 2378 } |
| 2379 | 2379 |
| 2380 | 2380 |
| 2381 Handle<Object> Factory::ToBoolean(bool value) { | 2381 Handle<Object> Factory::ToBoolean(bool value) { |
| 2382 return value ? true_value() : false_value(); | 2382 return value ? true_value() : false_value(); |
| 2383 } | 2383 } |
| 2384 | 2384 |
| 2385 Handle<String> Factory::ToPrimitiveHintString(ToPrimitiveHint hint) { |
| 2386 switch (hint) { |
| 2387 case ToPrimitiveHint::kDefault: |
| 2388 return default_string(); |
| 2389 case ToPrimitiveHint::kNumber: |
| 2390 return number_string(); |
| 2391 case ToPrimitiveHint::kString: |
| 2392 return string_string(); |
| 2393 } |
| 2394 UNREACHABLE(); |
| 2395 return Handle<String>::null(); |
| 2396 } |
| 2385 | 2397 |
| 2386 } // namespace internal | 2398 } // namespace internal |
| 2387 } // namespace v8 | 2399 } // namespace v8 |
| OLD | NEW |