| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/api.h" | 8 #include "src/api.h" |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/base/once.h" | 10 #include "src/base/once.h" |
| (...skipping 3169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3180 HandleScope scope(isolate()); | 3180 HandleScope scope(isolate()); |
| 3181 Factory* factory = isolate()->factory(); | 3181 Factory* factory = isolate()->factory(); |
| 3182 | 3182 |
| 3183 // The -0 value must be set before NewNumber works. | 3183 // The -0 value must be set before NewNumber works. |
| 3184 set_minus_zero_value(*factory->NewHeapNumber(-0.0, IMMUTABLE, TENURED)); | 3184 set_minus_zero_value(*factory->NewHeapNumber(-0.0, IMMUTABLE, TENURED)); |
| 3185 DCHECK(std::signbit(minus_zero_value()->Number()) != 0); | 3185 DCHECK(std::signbit(minus_zero_value()->Number()) != 0); |
| 3186 | 3186 |
| 3187 set_nan_value(*factory->NewHeapNumber( | 3187 set_nan_value(*factory->NewHeapNumber( |
| 3188 std::numeric_limits<double>::quiet_NaN(), IMMUTABLE, TENURED)); | 3188 std::numeric_limits<double>::quiet_NaN(), IMMUTABLE, TENURED)); |
| 3189 set_infinity_value(*factory->NewHeapNumber(V8_INFINITY, IMMUTABLE, TENURED)); | 3189 set_infinity_value(*factory->NewHeapNumber(V8_INFINITY, IMMUTABLE, TENURED)); |
| 3190 set_minus_infinity_value( |
| 3191 *factory->NewHeapNumber(-V8_INFINITY, IMMUTABLE, TENURED)); |
| 3190 | 3192 |
| 3191 // The hole has not been created yet, but we want to put something | 3193 // The hole has not been created yet, but we want to put something |
| 3192 // predictable in the gaps in the string table, so lets make that Smi zero. | 3194 // predictable in the gaps in the string table, so lets make that Smi zero. |
| 3193 set_the_hole_value(reinterpret_cast<Oddball*>(Smi::FromInt(0))); | 3195 set_the_hole_value(reinterpret_cast<Oddball*>(Smi::FromInt(0))); |
| 3194 | 3196 |
| 3195 // Allocate initial string table. | 3197 // Allocate initial string table. |
| 3196 set_string_table(*StringTable::New(isolate(), kInitialStringTableSize)); | 3198 set_string_table(*StringTable::New(isolate(), kInitialStringTableSize)); |
| 3197 | 3199 |
| 3198 // Finish initializing oddballs after creating the string table. | 3200 // Finish initializing oddballs after creating the string table. |
| 3199 Oddball::Initialize(isolate(), factory->undefined_value(), "undefined", | 3201 Oddball::Initialize(isolate(), factory->undefined_value(), "undefined", |
| (...skipping 3612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6812 *object_type = "CODE_TYPE"; \ | 6814 *object_type = "CODE_TYPE"; \ |
| 6813 *object_sub_type = "CODE_AGE/" #name; \ | 6815 *object_sub_type = "CODE_AGE/" #name; \ |
| 6814 return true; | 6816 return true; |
| 6815 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) | 6817 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) |
| 6816 #undef COMPARE_AND_RETURN_NAME | 6818 #undef COMPARE_AND_RETURN_NAME |
| 6817 } | 6819 } |
| 6818 return false; | 6820 return false; |
| 6819 } | 6821 } |
| 6820 } // namespace internal | 6822 } // namespace internal |
| 6821 } // namespace v8 | 6823 } // namespace v8 |
| OLD | NEW |