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

Side by Side Diff: src/heap.cc

Issue 225183009: Use OrderedHashTables as the backing store of JSSet and JSMap (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Get rid of IsOrderedHashSet/Map methods Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/heap.h ('k') | src/objects.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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2892 matching lines...) Expand 10 before | Expand all | Expand 10 after
2903 2903
2904 for (unsigned i = 0; i < ARRAY_SIZE(struct_table); i++) { 2904 for (unsigned i = 0; i < ARRAY_SIZE(struct_table); i++) {
2905 const StructTable& entry = struct_table[i]; 2905 const StructTable& entry = struct_table[i];
2906 Map* map; 2906 Map* map;
2907 if (!AllocateMap(entry.type, entry.size)->To(&map)) 2907 if (!AllocateMap(entry.type, entry.size)->To(&map))
2908 return false; 2908 return false;
2909 roots_[entry.index] = map; 2909 roots_[entry.index] = map;
2910 } 2910 }
2911 2911
2912 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, hash_table) 2912 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, hash_table)
2913 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, ordered_hash_table)
2913 2914
2914 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, function_context) 2915 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, function_context)
2915 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, catch_context) 2916 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, catch_context)
2916 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, with_context) 2917 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, with_context)
2917 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, block_context) 2918 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, block_context)
2918 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, module_context) 2919 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, module_context)
2919 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, global_context) 2920 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, global_context)
2920 2921
2921 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, native_context) 2922 ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, native_context)
2922 native_context_map()->set_dictionary_map(true); 2923 native_context_map()->set_dictionary_map(true);
(...skipping 4942 matching lines...) Expand 10 before | Expand all | Expand 10 after
7865 static_cast<int>(object_sizes_last_time_[index])); 7866 static_cast<int>(object_sizes_last_time_[index]));
7866 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 7867 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
7867 #undef ADJUST_LAST_TIME_OBJECT_COUNT 7868 #undef ADJUST_LAST_TIME_OBJECT_COUNT
7868 7869
7869 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 7870 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
7870 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 7871 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
7871 ClearObjectStats(); 7872 ClearObjectStats();
7872 } 7873 }
7873 7874
7874 } } // namespace v8::internal 7875 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698