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

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

Issue 1075133002: Special case the "empty string" root so it doesn't constantly jump around (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 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
« src/heap/heap.h ('K') | « src/heap/heap.h ('k') | no next file » | 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 2494 matching lines...) Expand 10 before | Expand all | Expand 10 after
2505 const Heap::StringTypeTable Heap::string_type_table[] = { 2505 const Heap::StringTypeTable Heap::string_type_table[] = {
2506 #define STRING_TYPE_ELEMENT(type, size, name, camel_name) \ 2506 #define STRING_TYPE_ELEMENT(type, size, name, camel_name) \
2507 { type, size, k##camel_name##MapRootIndex } \ 2507 { type, size, k##camel_name##MapRootIndex } \
2508 , 2508 ,
2509 STRING_TYPE_LIST(STRING_TYPE_ELEMENT) 2509 STRING_TYPE_LIST(STRING_TYPE_ELEMENT)
2510 #undef STRING_TYPE_ELEMENT 2510 #undef STRING_TYPE_ELEMENT
2511 }; 2511 };
2512 2512
2513 2513
2514 const Heap::ConstantStringTable Heap::constant_string_table[] = { 2514 const Heap::ConstantStringTable Heap::constant_string_table[] = {
2515 {"", kempty_stringRootIndex},
2515 #define CONSTANT_STRING_ELEMENT(name, contents) \ 2516 #define CONSTANT_STRING_ELEMENT(name, contents) \
2516 { contents, k##name##RootIndex } \ 2517 { contents, k##name##RootIndex } \
2517 , 2518 ,
2518 INTERNALIZED_STRING_LIST(CONSTANT_STRING_ELEMENT) 2519 INTERNALIZED_STRING_LIST(CONSTANT_STRING_ELEMENT)
2519 #undef CONSTANT_STRING_ELEMENT 2520 #undef CONSTANT_STRING_ELEMENT
2520 }; 2521 };
2521 2522
2522 2523
2523 const Heap::StructTable Heap::struct_table[] = { 2524 const Heap::StructTable Heap::struct_table[] = {
2524 #define STRUCT_TABLE_ELEMENT(NAME, Name, name) \ 2525 #define STRUCT_TABLE_ELEMENT(NAME, Name, name) \
(...skipping 3840 matching lines...) Expand 10 before | Expand all | Expand 10 after
6365 static_cast<int>(object_sizes_last_time_[index])); 6366 static_cast<int>(object_sizes_last_time_[index]));
6366 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 6367 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
6367 #undef ADJUST_LAST_TIME_OBJECT_COUNT 6368 #undef ADJUST_LAST_TIME_OBJECT_COUNT
6368 6369
6369 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 6370 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
6370 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 6371 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
6371 ClearObjectStats(); 6372 ClearObjectStats();
6372 } 6373 }
6373 } 6374 }
6374 } // namespace v8::internal 6375 } // namespace v8::internal
OLDNEW
« src/heap/heap.h ('K') | « src/heap/heap.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698