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

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

Issue 1114043002: Cache experimental natives sources as external strings. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: also delete experimental native sources at tear down Created 5 years, 7 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') | test/cctest/test-serialize.cc » ('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/v8.h" 5 #include "src/v8.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/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/once.h" 10 #include "src/base/once.h"
(...skipping 3051 matching lines...) Expand 10 before | Expand all | Expand 10 after
3062 // Allocate cache for string split and regexp-multiple. 3062 // Allocate cache for string split and regexp-multiple.
3063 set_string_split_cache(*factory->NewFixedArray( 3063 set_string_split_cache(*factory->NewFixedArray(
3064 RegExpResultsCache::kRegExpResultsCacheSize, TENURED)); 3064 RegExpResultsCache::kRegExpResultsCacheSize, TENURED));
3065 set_regexp_multiple_cache(*factory->NewFixedArray( 3065 set_regexp_multiple_cache(*factory->NewFixedArray(
3066 RegExpResultsCache::kRegExpResultsCacheSize, TENURED)); 3066 RegExpResultsCache::kRegExpResultsCacheSize, TENURED));
3067 3067
3068 // Allocate cache for external strings pointing to native source code. 3068 // Allocate cache for external strings pointing to native source code.
3069 set_natives_source_cache( 3069 set_natives_source_cache(
3070 *factory->NewFixedArray(Natives::GetBuiltinsCount())); 3070 *factory->NewFixedArray(Natives::GetBuiltinsCount()));
3071 3071
3072 set_experimental_natives_source_cache(
3073 *factory->NewFixedArray(ExperimentalNatives::GetBuiltinsCount()));
3074
3072 set_undefined_cell(*factory->NewCell(factory->undefined_value())); 3075 set_undefined_cell(*factory->NewCell(factory->undefined_value()));
3073 3076
3074 // The symbol registry is initialized lazily. 3077 // The symbol registry is initialized lazily.
3075 set_symbol_registry(Smi::FromInt(0)); 3078 set_symbol_registry(Smi::FromInt(0));
3076 3079
3077 // Allocate object to hold object observation state. 3080 // Allocate object to hold object observation state.
3078 set_observation_state(*factory->NewJSObjectFromMap( 3081 set_observation_state(*factory->NewJSObjectFromMap(
3079 factory->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize))); 3082 factory->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize)));
3080 3083
3081 // Microtask queue uses the empty fixed array as a sentinel for "empty". 3084 // Microtask queue uses the empty fixed array as a sentinel for "empty".
(...skipping 3337 matching lines...) Expand 10 before | Expand all | Expand 10 after
6419 static_cast<int>(object_sizes_last_time_[index])); 6422 static_cast<int>(object_sizes_last_time_[index]));
6420 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 6423 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
6421 #undef ADJUST_LAST_TIME_OBJECT_COUNT 6424 #undef ADJUST_LAST_TIME_OBJECT_COUNT
6422 6425
6423 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 6426 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
6424 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 6427 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
6425 ClearObjectStats(); 6428 ClearObjectStats();
6426 } 6429 }
6427 } 6430 }
6428 } // namespace v8::internal 6431 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap/heap.h ('k') | test/cctest/test-serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698