Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(257)

Side by Side Diff: src/heap/heap.cc

Issue 2807023003: [snapshot] encode resource before serializing. (Closed)
Patch Set: fix Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/heap/heap.h ('k') | src/snapshot/deserializer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2764 matching lines...) Expand 10 before | Expand all | Expand 10 after
2775 // Allocate cache for single character one byte strings. 2775 // Allocate cache for single character one byte strings.
2776 set_single_character_string_cache( 2776 set_single_character_string_cache(
2777 *factory->NewFixedArray(String::kMaxOneByteCharCode + 1, TENURED)); 2777 *factory->NewFixedArray(String::kMaxOneByteCharCode + 1, TENURED));
2778 2778
2779 // Allocate cache for string split and regexp-multiple. 2779 // Allocate cache for string split and regexp-multiple.
2780 set_string_split_cache(*factory->NewFixedArray( 2780 set_string_split_cache(*factory->NewFixedArray(
2781 RegExpResultsCache::kRegExpResultsCacheSize, TENURED)); 2781 RegExpResultsCache::kRegExpResultsCacheSize, TENURED));
2782 set_regexp_multiple_cache(*factory->NewFixedArray( 2782 set_regexp_multiple_cache(*factory->NewFixedArray(
2783 RegExpResultsCache::kRegExpResultsCacheSize, TENURED)); 2783 RegExpResultsCache::kRegExpResultsCacheSize, TENURED));
2784 2784
2785 // Allocate cache for external strings pointing to native source code.
2786 set_natives_source_cache(
2787 *factory->NewFixedArray(Natives::GetBuiltinsCount()));
2788
2789 set_extra_natives_source_cache(
2790 *factory->NewFixedArray(ExtraNatives::GetBuiltinsCount()));
2791
2792 set_experimental_extra_natives_source_cache(
2793 *factory->NewFixedArray(ExperimentalExtraNatives::GetBuiltinsCount()));
2794
2795 set_undefined_cell(*factory->NewCell(factory->undefined_value())); 2785 set_undefined_cell(*factory->NewCell(factory->undefined_value()));
2796 2786
2797 // Microtask queue uses the empty fixed array as a sentinel for "empty". 2787 // Microtask queue uses the empty fixed array as a sentinel for "empty".
2798 // Number of queued microtasks stored in Isolate::pending_microtask_count(). 2788 // Number of queued microtasks stored in Isolate::pending_microtask_count().
2799 set_microtask_queue(empty_fixed_array()); 2789 set_microtask_queue(empty_fixed_array());
2800 2790
2801 { 2791 {
2802 Handle<FixedArray> empty_sloppy_arguments_elements = 2792 Handle<FixedArray> empty_sloppy_arguments_elements =
2803 factory->NewFixedArray(2, TENURED); 2793 factory->NewFixedArray(2, TENURED);
2804 empty_sloppy_arguments_elements->set_map(sloppy_arguments_elements_map()); 2794 empty_sloppy_arguments_elements->set_map(sloppy_arguments_elements_map());
(...skipping 3602 matching lines...) Expand 10 before | Expand all | Expand 10 after
6407 } 6397 }
6408 6398
6409 6399
6410 // static 6400 // static
6411 int Heap::GetStaticVisitorIdForMap(Map* map) { 6401 int Heap::GetStaticVisitorIdForMap(Map* map) {
6412 return StaticVisitorBase::GetVisitorId(map); 6402 return StaticVisitorBase::GetVisitorId(map);
6413 } 6403 }
6414 6404
6415 } // namespace internal 6405 } // namespace internal
6416 } // namespace v8 6406 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/heap.h ('k') | src/snapshot/deserializer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698