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

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

Issue 249103002: StringTable::LookupKey() and all callers handlified. (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 | « src/heap.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 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 2128 matching lines...) Expand 10 before | Expand all | Expand 10 after
2139 HeapObject* heap_object = HeapObject::cast(o); 2139 HeapObject* heap_object = HeapObject::cast(o);
2140 MarkBit mark = Marking::MarkBitFrom(heap_object); 2140 MarkBit mark = Marking::MarkBitFrom(heap_object);
2141 return !mark.Get(); 2141 return !mark.Get();
2142 } 2142 }
2143 2143
2144 2144
2145 void MarkCompactCollector::MarkStringTable(RootMarkingVisitor* visitor) { 2145 void MarkCompactCollector::MarkStringTable(RootMarkingVisitor* visitor) {
2146 StringTable* string_table = heap()->string_table(); 2146 StringTable* string_table = heap()->string_table();
2147 // Mark the string table itself. 2147 // Mark the string table itself.
2148 MarkBit string_table_mark = Marking::MarkBitFrom(string_table); 2148 MarkBit string_table_mark = Marking::MarkBitFrom(string_table);
2149 SetMark(string_table, string_table_mark); 2149 if (!string_table_mark.Get()) {
2150 // String table could have already been marked via handle scope iteration.
Yang 2014/04/23 15:17:46 I would rewrite the comment to "...been marked by
Igor Sheludko 2014/04/23 15:44:15 Done.
2151 SetMark(string_table, string_table_mark);
2152 }
2150 // Explicitly mark the prefix. 2153 // Explicitly mark the prefix.
2151 string_table->IteratePrefix(visitor); 2154 string_table->IteratePrefix(visitor);
2152 ProcessMarkingDeque(); 2155 ProcessMarkingDeque();
2153 } 2156 }
2154 2157
2155 2158
2156 void MarkCompactCollector::MarkAllocationSite(AllocationSite* site) { 2159 void MarkCompactCollector::MarkAllocationSite(AllocationSite* site) {
2157 MarkBit mark_bit = Marking::MarkBitFrom(site); 2160 MarkBit mark_bit = Marking::MarkBitFrom(site);
2158 SetMark(site, mark_bit); 2161 SetMark(site, mark_bit);
2159 } 2162 }
(...skipping 2415 matching lines...) Expand 10 before | Expand all | Expand 10 after
4575 while (buffer != NULL) { 4578 while (buffer != NULL) {
4576 SlotsBuffer* next_buffer = buffer->next(); 4579 SlotsBuffer* next_buffer = buffer->next();
4577 DeallocateBuffer(buffer); 4580 DeallocateBuffer(buffer);
4578 buffer = next_buffer; 4581 buffer = next_buffer;
4579 } 4582 }
4580 *buffer_address = NULL; 4583 *buffer_address = NULL;
4581 } 4584 }
4582 4585
4583 4586
4584 } } // namespace v8::internal 4587 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698