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

Side by Side Diff: src/heap.cc

Issue 11271020: Get rid of obsolete unchecked accessors. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 1 month 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/frames.cc ('k') | src/heap-inl.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 7188 matching lines...) Expand 10 before | Expand all | Expand 10 after
7199 delete caches_[i]; 7199 delete caches_[i];
7200 caches_[i] = NULL; 7200 caches_[i] = NULL;
7201 } 7201 }
7202 } 7202 }
7203 } 7203 }
7204 7204
7205 7205
7206 void ExternalStringTable::CleanUp() { 7206 void ExternalStringTable::CleanUp() {
7207 int last = 0; 7207 int last = 0;
7208 for (int i = 0; i < new_space_strings_.length(); ++i) { 7208 for (int i = 0; i < new_space_strings_.length(); ++i) {
7209 if (new_space_strings_[i] == heap_->raw_unchecked_the_hole_value()) { 7209 if (new_space_strings_[i] == heap_->the_hole_value()) {
7210 continue; 7210 continue;
7211 } 7211 }
7212 if (heap_->InNewSpace(new_space_strings_[i])) { 7212 if (heap_->InNewSpace(new_space_strings_[i])) {
7213 new_space_strings_[last++] = new_space_strings_[i]; 7213 new_space_strings_[last++] = new_space_strings_[i];
7214 } else { 7214 } else {
7215 old_space_strings_.Add(new_space_strings_[i]); 7215 old_space_strings_.Add(new_space_strings_[i]);
7216 } 7216 }
7217 } 7217 }
7218 new_space_strings_.Rewind(last); 7218 new_space_strings_.Rewind(last);
7219 last = 0; 7219 last = 0;
7220 for (int i = 0; i < old_space_strings_.length(); ++i) { 7220 for (int i = 0; i < old_space_strings_.length(); ++i) {
7221 if (old_space_strings_[i] == heap_->raw_unchecked_the_hole_value()) { 7221 if (old_space_strings_[i] == heap_->the_hole_value()) {
7222 continue; 7222 continue;
7223 } 7223 }
7224 ASSERT(!heap_->InNewSpace(old_space_strings_[i])); 7224 ASSERT(!heap_->InNewSpace(old_space_strings_[i]));
7225 old_space_strings_[last++] = old_space_strings_[i]; 7225 old_space_strings_[last++] = old_space_strings_[i];
7226 } 7226 }
7227 old_space_strings_.Rewind(last); 7227 old_space_strings_.Rewind(last);
7228 #ifdef VERIFY_HEAP 7228 #ifdef VERIFY_HEAP
7229 if (FLAG_verify_heap) { 7229 if (FLAG_verify_heap) {
7230 Verify(); 7230 Verify();
7231 } 7231 }
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
7360 static_cast<int>(object_sizes_last_time_[index])); 7360 static_cast<int>(object_sizes_last_time_[index]));
7361 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) 7361 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT)
7362 #undef ADJUST_LAST_TIME_OBJECT_COUNT 7362 #undef ADJUST_LAST_TIME_OBJECT_COUNT
7363 7363
7364 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 7364 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
7365 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 7365 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
7366 ClearObjectStats(); 7366 ClearObjectStats();
7367 } 7367 }
7368 7368
7369 } } // namespace v8::internal 7369 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/frames.cc ('k') | src/heap-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698