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

Side by Side Diff: src/heap.cc

Issue 247263003: Hide heap methods where possible. (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
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 4857 matching lines...) Expand 10 before | Expand all | Expand 10 after
4868 old_data_space_->Verify(&no_dirty_regions_visitor); 4868 old_data_space_->Verify(&no_dirty_regions_visitor);
4869 code_space_->Verify(&no_dirty_regions_visitor); 4869 code_space_->Verify(&no_dirty_regions_visitor);
4870 cell_space_->Verify(&no_dirty_regions_visitor); 4870 cell_space_->Verify(&no_dirty_regions_visitor);
4871 property_cell_space_->Verify(&no_dirty_regions_visitor); 4871 property_cell_space_->Verify(&no_dirty_regions_visitor);
4872 4872
4873 lo_space_->Verify(); 4873 lo_space_->Verify();
4874 } 4874 }
4875 #endif 4875 #endif
4876 4876
4877 4877
4878 MaybeObject* Heap::InternalizeUtf8String(Vector<const char> string) {
4879 Utf8StringKey key(string, HashSeed());
4880 return InternalizeStringWithKey(&key);
4881 }
4882
4883
4884 MaybeObject* Heap::InternalizeString(String* string) { 4878 MaybeObject* Heap::InternalizeString(String* string) {
4885 if (string->IsInternalizedString()) return string; 4879 if (string->IsInternalizedString()) return string;
4886 Object* result = NULL; 4880 Object* result = NULL;
4887 Object* new_table; 4881 Object* new_table;
4888 { MaybeObject* maybe_new_table = 4882 { MaybeObject* maybe_new_table =
4889 string_table()->LookupString(string, &result); 4883 string_table()->LookupString(string, &result);
4890 if (!maybe_new_table->ToObject(&new_table)) return maybe_new_table; 4884 if (!maybe_new_table->ToObject(&new_table)) return maybe_new_table;
4891 } 4885 }
4892 // Can't use set_string_table because StringTable::cast knows that 4886 // Can't use set_string_table because StringTable::cast knows that
4893 // StringTable is a singleton and checks for identity. 4887 // StringTable is a singleton and checks for identity.
(...skipping 1843 matching lines...) Expand 10 before | Expand all | Expand 10 after
6737 static_cast<int>(object_sizes_last_time_[index])); 6731 static_cast<int>(object_sizes_last_time_[index]));
6738 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 6732 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
6739 #undef ADJUST_LAST_TIME_OBJECT_COUNT 6733 #undef ADJUST_LAST_TIME_OBJECT_COUNT
6740 6734
6741 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 6735 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
6742 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 6736 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
6743 ClearObjectStats(); 6737 ClearObjectStats();
6744 } 6738 }
6745 6739
6746 } } // namespace v8::internal 6740 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698