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

Side by Side Diff: src/heap.cc

Issue 7124006: Two-page newspace. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Address review comments. Created 9 years, 6 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/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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 4296 matching lines...) Expand 10 before | Expand all | Expand 10 after
4307 if (string->IsSymbol()) { 4307 if (string->IsSymbol()) {
4308 *symbol = string; 4308 *symbol = string;
4309 return true; 4309 return true;
4310 } 4310 }
4311 return symbol_table()->LookupSymbolIfExists(string, symbol); 4311 return symbol_table()->LookupSymbolIfExists(string, symbol);
4312 } 4312 }
4313 4313
4314 4314
4315 #ifdef DEBUG 4315 #ifdef DEBUG
4316 void Heap::ZapFromSpace() { 4316 void Heap::ZapFromSpace() {
4317 ASSERT(reinterpret_cast<Object*>(kFromSpaceZapValue)->IsFailure()); 4317 NewSpacePageIterator it(new_space_.FromSpaceLow(),
4318 for (Address a = new_space_.FromSpaceLow(); 4318 new_space_.FromSpaceHigh());
4319 a < new_space_.FromSpaceHigh(); 4319 while (it.has_next()) {
4320 a += kPointerSize) { 4320 NewSpacePage* page = it.next();
4321 Memory::Address_at(a) = kFromSpaceZapValue; 4321 for (Address cursor = page->body(), limit = page->body_limit();
4322 cursor < limit;
4323 cursor += kPointerSize) {
4324 Memory::Address_at(cursor) = kFromSpaceZapValue;
4325 }
4322 } 4326 }
4323 } 4327 }
4324 #endif // DEBUG 4328 #endif // DEBUG
4325 4329
4326 4330
4327 void Heap::IteratePointersToNewSpace(Heap* heap, 4331 void Heap::IteratePointersToNewSpace(Heap* heap,
4328 Address start, 4332 Address start,
4329 Address end, 4333 Address end,
4330 ObjectSlotCallback copy_object_func) { 4334 ObjectSlotCallback copy_object_func) {
4331 for (Address slot_address = start; 4335 for (Address slot_address = start;
(...skipping 1675 matching lines...) Expand 10 before | Expand all | Expand 10 after
6007 } 6011 }
6008 6012
6009 6013
6010 void ExternalStringTable::TearDown() { 6014 void ExternalStringTable::TearDown() {
6011 new_space_strings_.Free(); 6015 new_space_strings_.Free();
6012 old_space_strings_.Free(); 6016 old_space_strings_.Free();
6013 } 6017 }
6014 6018
6015 6019
6016 } } // namespace v8::internal 6020 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/heap-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698