| 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/scopeinfo.h" | 9 #include "src/ast/scopeinfo.h" |
| 10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
| (...skipping 2703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2714 | 2714 |
| 2715 set_experimental_natives_source_cache( | 2715 set_experimental_natives_source_cache( |
| 2716 *factory->NewFixedArray(ExperimentalNatives::GetBuiltinsCount())); | 2716 *factory->NewFixedArray(ExperimentalNatives::GetBuiltinsCount())); |
| 2717 | 2717 |
| 2718 set_extra_natives_source_cache( | 2718 set_extra_natives_source_cache( |
| 2719 *factory->NewFixedArray(ExtraNatives::GetBuiltinsCount())); | 2719 *factory->NewFixedArray(ExtraNatives::GetBuiltinsCount())); |
| 2720 | 2720 |
| 2721 set_experimental_extra_natives_source_cache( | 2721 set_experimental_extra_natives_source_cache( |
| 2722 *factory->NewFixedArray(ExperimentalExtraNatives::GetBuiltinsCount())); | 2722 *factory->NewFixedArray(ExperimentalExtraNatives::GetBuiltinsCount())); |
| 2723 | 2723 |
| 2724 set_code_stub_natives_source_cache( | |
| 2725 *factory->NewFixedArray(CodeStubNatives::GetBuiltinsCount())); | |
| 2726 | |
| 2727 set_undefined_cell(*factory->NewCell(factory->undefined_value())); | 2724 set_undefined_cell(*factory->NewCell(factory->undefined_value())); |
| 2728 | 2725 |
| 2729 // The symbol registry is initialized lazily. | 2726 // The symbol registry is initialized lazily. |
| 2730 set_symbol_registry(Smi::FromInt(0)); | 2727 set_symbol_registry(Smi::FromInt(0)); |
| 2731 | 2728 |
| 2732 // Allocate object to hold object observation state. | 2729 // Allocate object to hold object observation state. |
| 2733 set_observation_state(*factory->NewJSObjectFromMap( | 2730 set_observation_state(*factory->NewJSObjectFromMap( |
| 2734 factory->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize))); | 2731 factory->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize))); |
| 2735 | 2732 |
| 2736 // Microtask queue uses the empty fixed array as a sentinel for "empty". | 2733 // Microtask queue uses the empty fixed array as a sentinel for "empty". |
| (...skipping 2341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5078 // Create initial maps. | 5075 // Create initial maps. |
| 5079 if (!CreateInitialMaps()) return false; | 5076 if (!CreateInitialMaps()) return false; |
| 5080 CreateApiObjects(); | 5077 CreateApiObjects(); |
| 5081 | 5078 |
| 5082 // Create initial objects | 5079 // Create initial objects |
| 5083 CreateInitialObjects(); | 5080 CreateInitialObjects(); |
| 5084 CHECK_EQ(0u, gc_count_); | 5081 CHECK_EQ(0u, gc_count_); |
| 5085 | 5082 |
| 5086 set_native_contexts_list(undefined_value()); | 5083 set_native_contexts_list(undefined_value()); |
| 5087 set_allocation_sites_list(undefined_value()); | 5084 set_allocation_sites_list(undefined_value()); |
| 5085 |
| 5088 return true; | 5086 return true; |
| 5089 } | 5087 } |
| 5090 | 5088 |
| 5091 | 5089 |
| 5092 void Heap::SetStackLimits() { | 5090 void Heap::SetStackLimits() { |
| 5093 DCHECK(isolate_ != NULL); | 5091 DCHECK(isolate_ != NULL); |
| 5094 DCHECK(isolate_ == isolate()); | 5092 DCHECK(isolate_ == isolate()); |
| 5095 // On 64 bit machines, pointers are generally out of range of Smis. We write | 5093 // On 64 bit machines, pointers are generally out of range of Smis. We write |
| 5096 // something that looks like an out of range Smi to the GC. | 5094 // something that looks like an out of range Smi to the GC. |
| 5097 | 5095 |
| (...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6103 } | 6101 } |
| 6104 | 6102 |
| 6105 | 6103 |
| 6106 // static | 6104 // static |
| 6107 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6105 int Heap::GetStaticVisitorIdForMap(Map* map) { |
| 6108 return StaticVisitorBase::GetVisitorId(map); | 6106 return StaticVisitorBase::GetVisitorId(map); |
| 6109 } | 6107 } |
| 6110 | 6108 |
| 6111 } // namespace internal | 6109 } // namespace internal |
| 6112 } // namespace v8 | 6110 } // namespace v8 |
| OLD | NEW |