| 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/assembler-inl.h" | 9 #include "src/assembler-inl.h" |
| 10 #include "src/ast/context-slot-cache.h" | 10 #include "src/ast/context-slot-cache.h" |
| (...skipping 2771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2782 set_string_split_cache(*factory->NewFixedArray( | 2782 set_string_split_cache(*factory->NewFixedArray( |
| 2783 RegExpResultsCache::kRegExpResultsCacheSize, TENURED)); | 2783 RegExpResultsCache::kRegExpResultsCacheSize, TENURED)); |
| 2784 set_regexp_multiple_cache(*factory->NewFixedArray( | 2784 set_regexp_multiple_cache(*factory->NewFixedArray( |
| 2785 RegExpResultsCache::kRegExpResultsCacheSize, TENURED)); | 2785 RegExpResultsCache::kRegExpResultsCacheSize, TENURED)); |
| 2786 | 2786 |
| 2787 set_undefined_cell(*factory->NewCell(factory->undefined_value())); | 2787 set_undefined_cell(*factory->NewCell(factory->undefined_value())); |
| 2788 | 2788 |
| 2789 // Microtask queue uses the empty fixed array as a sentinel for "empty". | 2789 // Microtask queue uses the empty fixed array as a sentinel for "empty". |
| 2790 // Number of queued microtasks stored in Isolate::pending_microtask_count(). | 2790 // Number of queued microtasks stored in Isolate::pending_microtask_count(). |
| 2791 set_microtask_queue(empty_fixed_array()); | 2791 set_microtask_queue(empty_fixed_array()); |
| 2792 set_weak_refs(empty_fixed_array()); |
| 2792 | 2793 |
| 2793 { | 2794 { |
| 2794 Handle<FixedArray> empty_sloppy_arguments_elements = | 2795 Handle<FixedArray> empty_sloppy_arguments_elements = |
| 2795 factory->NewFixedArray(2, TENURED); | 2796 factory->NewFixedArray(2, TENURED); |
| 2796 empty_sloppy_arguments_elements->set_map(sloppy_arguments_elements_map()); | 2797 empty_sloppy_arguments_elements->set_map(sloppy_arguments_elements_map()); |
| 2797 set_empty_sloppy_arguments_elements(*empty_sloppy_arguments_elements); | 2798 set_empty_sloppy_arguments_elements(*empty_sloppy_arguments_elements); |
| 2798 } | 2799 } |
| 2799 | 2800 |
| 2800 { | 2801 { |
| 2801 Handle<WeakCell> cell = factory->NewWeakCell(factory->undefined_value()); | 2802 Handle<WeakCell> cell = factory->NewWeakCell(factory->undefined_value()); |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2922 bool Heap::RootCanBeWrittenAfterInitialization(Heap::RootListIndex root_index) { | 2923 bool Heap::RootCanBeWrittenAfterInitialization(Heap::RootListIndex root_index) { |
| 2923 switch (root_index) { | 2924 switch (root_index) { |
| 2924 case kNumberStringCacheRootIndex: | 2925 case kNumberStringCacheRootIndex: |
| 2925 case kInstanceofCacheFunctionRootIndex: | 2926 case kInstanceofCacheFunctionRootIndex: |
| 2926 case kInstanceofCacheMapRootIndex: | 2927 case kInstanceofCacheMapRootIndex: |
| 2927 case kInstanceofCacheAnswerRootIndex: | 2928 case kInstanceofCacheAnswerRootIndex: |
| 2928 case kCodeStubsRootIndex: | 2929 case kCodeStubsRootIndex: |
| 2929 case kScriptListRootIndex: | 2930 case kScriptListRootIndex: |
| 2930 case kMaterializedObjectsRootIndex: | 2931 case kMaterializedObjectsRootIndex: |
| 2931 case kMicrotaskQueueRootIndex: | 2932 case kMicrotaskQueueRootIndex: |
| 2933 case kWeakRefsRootIndex: |
| 2932 case kDetachedContextsRootIndex: | 2934 case kDetachedContextsRootIndex: |
| 2933 case kWeakObjectToCodeTableRootIndex: | 2935 case kWeakObjectToCodeTableRootIndex: |
| 2934 case kWeakNewSpaceObjectToCodeListRootIndex: | 2936 case kWeakNewSpaceObjectToCodeListRootIndex: |
| 2935 case kRetainedMapsRootIndex: | 2937 case kRetainedMapsRootIndex: |
| 2936 case kCodeCoverageListRootIndex: | 2938 case kCodeCoverageListRootIndex: |
| 2937 case kNoScriptSharedFunctionInfosRootIndex: | 2939 case kNoScriptSharedFunctionInfosRootIndex: |
| 2938 case kWeakStackTraceListRootIndex: | 2940 case kWeakStackTraceListRootIndex: |
| 2939 case kSerializedTemplatesRootIndex: | 2941 case kSerializedTemplatesRootIndex: |
| 2940 case kSerializedGlobalProxySizesRootIndex: | 2942 case kSerializedGlobalProxySizesRootIndex: |
| 2941 case kPublicSymbolTableRootIndex: | 2943 case kPublicSymbolTableRootIndex: |
| (...skipping 3457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6399 } | 6401 } |
| 6400 | 6402 |
| 6401 | 6403 |
| 6402 // static | 6404 // static |
| 6403 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6405 int Heap::GetStaticVisitorIdForMap(Map* map) { |
| 6404 return StaticVisitorBase::GetVisitorId(map); | 6406 return StaticVisitorBase::GetVisitorId(map); |
| 6405 } | 6407 } |
| 6406 | 6408 |
| 6407 } // namespace internal | 6409 } // namespace internal |
| 6408 } // namespace v8 | 6410 } // namespace v8 |
| OLD | NEW |