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