| 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/heap/heap.h" | 5 #include "src/heap/heap.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/ast/context-slot-cache.h" | 9 #include "src/ast/context-slot-cache.h" |
| 10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
| (...skipping 2591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2602 void Heap::CreateInitialObjects() { | 2602 void Heap::CreateInitialObjects() { |
| 2603 HandleScope scope(isolate()); | 2603 HandleScope scope(isolate()); |
| 2604 Factory* factory = isolate()->factory(); | 2604 Factory* factory = isolate()->factory(); |
| 2605 | 2605 |
| 2606 // The -0 value must be set before NewNumber works. | 2606 // The -0 value must be set before NewNumber works. |
| 2607 set_minus_zero_value(*factory->NewHeapNumber(-0.0, IMMUTABLE, TENURED)); | 2607 set_minus_zero_value(*factory->NewHeapNumber(-0.0, IMMUTABLE, TENURED)); |
| 2608 DCHECK(std::signbit(minus_zero_value()->Number()) != 0); | 2608 DCHECK(std::signbit(minus_zero_value()->Number()) != 0); |
| 2609 | 2609 |
| 2610 set_nan_value(*factory->NewHeapNumber( | 2610 set_nan_value(*factory->NewHeapNumber( |
| 2611 std::numeric_limits<double>::quiet_NaN(), IMMUTABLE, TENURED)); | 2611 std::numeric_limits<double>::quiet_NaN(), IMMUTABLE, TENURED)); |
| 2612 set_hole_nan_value(*factory->NewHeapNumber(bit_cast<double>(kHoleNanInt64), | 2612 set_hole_nan_value( |
| 2613 IMMUTABLE, TENURED)); | 2613 *factory->NewHeapNumber(kHoleNanDouble, IMMUTABLE, TENURED)); |
| 2614 set_infinity_value(*factory->NewHeapNumber(V8_INFINITY, IMMUTABLE, TENURED)); | 2614 set_infinity_value(*factory->NewHeapNumber(V8_INFINITY, IMMUTABLE, TENURED)); |
| 2615 set_minus_infinity_value( | 2615 set_minus_infinity_value( |
| 2616 *factory->NewHeapNumber(-V8_INFINITY, IMMUTABLE, TENURED)); | 2616 *factory->NewHeapNumber(-V8_INFINITY, IMMUTABLE, TENURED)); |
| 2617 | 2617 |
| 2618 // Allocate initial string table. | 2618 // Allocate initial string table. |
| 2619 set_string_table(*StringTable::New(isolate(), kInitialStringTableSize)); | 2619 set_string_table(*StringTable::New(isolate(), kInitialStringTableSize)); |
| 2620 | 2620 |
| 2621 // Allocate | 2621 // Allocate |
| 2622 | 2622 |
| 2623 // Finish initializing oddballs after creating the string table. | 2623 // Finish initializing oddballs after creating the string table. |
| (...skipping 3862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6486 } | 6486 } |
| 6487 | 6487 |
| 6488 | 6488 |
| 6489 // static | 6489 // static |
| 6490 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6490 int Heap::GetStaticVisitorIdForMap(Map* map) { |
| 6491 return StaticVisitorBase::GetVisitorId(map); | 6491 return StaticVisitorBase::GetVisitorId(map); |
| 6492 } | 6492 } |
| 6493 | 6493 |
| 6494 } // namespace internal | 6494 } // namespace internal |
| 6495 } // namespace v8 | 6495 } // namespace v8 |
| OLD | NEW |