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

Side by Side Diff: src/heap.cc

Issue 218993011: Remove internalized cons string types. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 | « no previous file | src/objects.h » ('j') | src/objects.cc » ('J')
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 4946 matching lines...) Expand 10 before | Expand all | Expand 10 after
4957 4957
4958 4958
4959 Map* Heap::InternalizedStringMapForString(String* string) { 4959 Map* Heap::InternalizedStringMapForString(String* string) {
4960 // If the string is in new space it cannot be used as internalized. 4960 // If the string is in new space it cannot be used as internalized.
4961 if (InNewSpace(string)) return NULL; 4961 if (InNewSpace(string)) return NULL;
4962 4962
4963 // Find the corresponding internalized string map for strings. 4963 // Find the corresponding internalized string map for strings.
4964 switch (string->map()->instance_type()) { 4964 switch (string->map()->instance_type()) {
4965 case STRING_TYPE: return internalized_string_map(); 4965 case STRING_TYPE: return internalized_string_map();
4966 case ASCII_STRING_TYPE: return ascii_internalized_string_map(); 4966 case ASCII_STRING_TYPE: return ascii_internalized_string_map();
4967 case CONS_STRING_TYPE: return cons_internalized_string_map();
4968 case CONS_ASCII_STRING_TYPE: return cons_ascii_internalized_string_map();
4969 case EXTERNAL_STRING_TYPE: return external_internalized_string_map(); 4967 case EXTERNAL_STRING_TYPE: return external_internalized_string_map();
4970 case EXTERNAL_ASCII_STRING_TYPE: 4968 case EXTERNAL_ASCII_STRING_TYPE:
4971 return external_ascii_internalized_string_map(); 4969 return external_ascii_internalized_string_map();
4972 case EXTERNAL_STRING_WITH_ONE_BYTE_DATA_TYPE: 4970 case EXTERNAL_STRING_WITH_ONE_BYTE_DATA_TYPE:
4973 return external_internalized_string_with_one_byte_data_map(); 4971 return external_internalized_string_with_one_byte_data_map();
4974 case SHORT_EXTERNAL_STRING_TYPE: 4972 case SHORT_EXTERNAL_STRING_TYPE:
4975 return short_external_internalized_string_map(); 4973 return short_external_internalized_string_map();
4976 case SHORT_EXTERNAL_ASCII_STRING_TYPE: 4974 case SHORT_EXTERNAL_ASCII_STRING_TYPE:
4977 return short_external_ascii_internalized_string_map(); 4975 return short_external_ascii_internalized_string_map();
4978 case SHORT_EXTERNAL_STRING_WITH_ONE_BYTE_DATA_TYPE: 4976 case SHORT_EXTERNAL_STRING_WITH_ONE_BYTE_DATA_TYPE:
(...skipping 2888 matching lines...) Expand 10 before | Expand all | Expand 10 after
7867 static_cast<int>(object_sizes_last_time_[index])); 7865 static_cast<int>(object_sizes_last_time_[index]));
7868 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 7866 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
7869 #undef ADJUST_LAST_TIME_OBJECT_COUNT 7867 #undef ADJUST_LAST_TIME_OBJECT_COUNT
7870 7868
7871 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 7869 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
7872 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 7870 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
7873 ClearObjectStats(); 7871 ClearObjectStats();
7874 } 7872 }
7875 7873
7876 } } // namespace v8::internal 7874 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/objects.h » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698