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

Side by Side Diff: src/mark-compact.cc

Issue 385004: Remove sliced string string type... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 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/ia32/codegen-ia32.cc ('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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 object->SizeFromMap(map), 565 object->SizeFromMap(map),
566 &marker); 566 &marker);
567 } 567 }
568 } 568 }
569 }; 569 };
570 570
571 571
572 void MarkCompactCollector::MarkSymbolTable() { 572 void MarkCompactCollector::MarkSymbolTable() {
573 // Objects reachable from symbols are marked as live so as to ensure 573 // Objects reachable from symbols are marked as live so as to ensure
574 // that if the symbol itself remains alive after GC for any reason, 574 // that if the symbol itself remains alive after GC for any reason,
575 // and if it is a sliced string or a cons string backed by an 575 // and if it is a cons string backed by an external string (even indirectly),
576 // external string (even indirectly), then the external string does 576 // then the external string does not receive a weak reference callback.
577 // not receive a weak reference callback.
578 SymbolTable* symbol_table = Heap::raw_unchecked_symbol_table(); 577 SymbolTable* symbol_table = Heap::raw_unchecked_symbol_table();
579 // Mark the symbol table itself. 578 // Mark the symbol table itself.
580 SetMark(symbol_table); 579 SetMark(symbol_table);
581 // Explicitly mark the prefix. 580 // Explicitly mark the prefix.
582 MarkingVisitor marker; 581 MarkingVisitor marker;
583 symbol_table->IteratePrefix(&marker); 582 symbol_table->IteratePrefix(&marker);
584 ProcessMarkingStack(&marker); 583 ProcessMarkingStack(&marker);
585 // Mark subparts of the symbols but not the symbols themselves 584 // Mark subparts of the symbols but not the symbols themselves
586 // (unless reachable from another symbol). 585 // (unless reachable from another symbol).
587 SymbolMarkingVisitor symbol_marker; 586 SymbolMarkingVisitor symbol_marker;
(...skipping 1219 matching lines...) Expand 10 before | Expand all | Expand 10 after
1807 1806
1808 void MarkCompactCollector::RebuildRSets() { 1807 void MarkCompactCollector::RebuildRSets() {
1809 #ifdef DEBUG 1808 #ifdef DEBUG
1810 ASSERT(state_ == RELOCATE_OBJECTS); 1809 ASSERT(state_ == RELOCATE_OBJECTS);
1811 state_ = REBUILD_RSETS; 1810 state_ = REBUILD_RSETS;
1812 #endif 1811 #endif
1813 Heap::RebuildRSets(); 1812 Heap::RebuildRSets();
1814 } 1813 }
1815 1814
1816 } } // namespace v8::internal 1815 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698