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

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

Issue 17064002: Refactor only: Rename JSGlobaPropertyCell to PropertyCell (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | « src/ic.cc ('k') | src/mips/assembler-mips-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 2249 matching lines...) Expand 10 before | Expand all | Expand 10 after
2260 heap(), 2260 heap(),
2261 reinterpret_cast<Object**>(cell->address() + offset)); 2261 reinterpret_cast<Object**>(cell->address() + offset));
2262 } 2262 }
2263 } 2263 }
2264 } 2264 }
2265 { 2265 {
2266 HeapObjectIterator js_global_property_cell_iterator( 2266 HeapObjectIterator js_global_property_cell_iterator(
2267 heap()->property_cell_space()); 2267 heap()->property_cell_space());
2268 HeapObject* cell; 2268 HeapObject* cell;
2269 while ((cell = js_global_property_cell_iterator.Next()) != NULL) { 2269 while ((cell = js_global_property_cell_iterator.Next()) != NULL) {
2270 ASSERT(cell->IsJSGlobalPropertyCell()); 2270 ASSERT(cell->IsPropertyCell());
2271 if (IsMarked(cell)) { 2271 if (IsMarked(cell)) {
2272 int offset = JSGlobalPropertyCell::kValueOffset; 2272 int offset = PropertyCell::kValueOffset;
2273 MarkCompactMarkingVisitor::VisitPointer( 2273 MarkCompactMarkingVisitor::VisitPointer(
2274 heap(), 2274 heap(),
2275 reinterpret_cast<Object**>(cell->address() + offset)); 2275 reinterpret_cast<Object**>(cell->address() + offset));
2276 offset = JSGlobalPropertyCell::kTypeOffset; 2276 offset = PropertyCell::kTypeOffset;
2277 MarkCompactMarkingVisitor::VisitPointer( 2277 MarkCompactMarkingVisitor::VisitPointer(
2278 heap(), 2278 heap(),
2279 reinterpret_cast<Object**>(cell->address() + offset)); 2279 reinterpret_cast<Object**>(cell->address() + offset));
2280 } 2280 }
2281 } 2281 }
2282 } 2282 }
2283 } 2283 }
2284 2284
2285 RootMarkingVisitor root_visitor(heap()); 2285 RootMarkingVisitor root_visitor(heap());
2286 MarkRoots(&root_visitor); 2286 MarkRoots(&root_visitor);
(...skipping 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after
3424 (Cell::kValueOffset - kHeapObjectTag); 3424 (Cell::kValueOffset - kHeapObjectTag);
3425 updating_visitor.VisitPointer(reinterpret_cast<Object**>(value_address)); 3425 updating_visitor.VisitPointer(reinterpret_cast<Object**>(value_address));
3426 } 3426 }
3427 } 3427 }
3428 3428
3429 HeapObjectIterator js_global_property_cell_iterator( 3429 HeapObjectIterator js_global_property_cell_iterator(
3430 heap_->property_cell_space()); 3430 heap_->property_cell_space());
3431 for (HeapObject* cell = js_global_property_cell_iterator.Next(); 3431 for (HeapObject* cell = js_global_property_cell_iterator.Next();
3432 cell != NULL; 3432 cell != NULL;
3433 cell = js_global_property_cell_iterator.Next()) { 3433 cell = js_global_property_cell_iterator.Next()) {
3434 if (cell->IsJSGlobalPropertyCell()) { 3434 if (cell->IsPropertyCell()) {
3435 Address value_address = 3435 Address value_address =
3436 reinterpret_cast<Address>(cell) + 3436 reinterpret_cast<Address>(cell) +
3437 (JSGlobalPropertyCell::kValueOffset - kHeapObjectTag); 3437 (PropertyCell::kValueOffset - kHeapObjectTag);
3438 updating_visitor.VisitPointer(reinterpret_cast<Object**>(value_address)); 3438 updating_visitor.VisitPointer(reinterpret_cast<Object**>(value_address));
3439 Address type_address = 3439 Address type_address =
3440 reinterpret_cast<Address>(cell) + 3440 reinterpret_cast<Address>(cell) +
3441 (JSGlobalPropertyCell::kTypeOffset - kHeapObjectTag); 3441 (PropertyCell::kTypeOffset - kHeapObjectTag);
3442 updating_visitor.VisitPointer(reinterpret_cast<Object**>(type_address)); 3442 updating_visitor.VisitPointer(reinterpret_cast<Object**>(type_address));
3443 } 3443 }
3444 } 3444 }
3445 3445
3446 // Update pointer from the native contexts list. 3446 // Update pointer from the native contexts list.
3447 updating_visitor.VisitPointer(heap_->native_contexts_list_address()); 3447 updating_visitor.VisitPointer(heap_->native_contexts_list_address());
3448 3448
3449 heap_->string_table()->Iterate(&updating_visitor); 3449 heap_->string_table()->Iterate(&updating_visitor);
3450 3450
3451 // Update pointers from external string table. 3451 // Update pointers from external string table.
(...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after
4317 while (buffer != NULL) { 4317 while (buffer != NULL) {
4318 SlotsBuffer* next_buffer = buffer->next(); 4318 SlotsBuffer* next_buffer = buffer->next();
4319 DeallocateBuffer(buffer); 4319 DeallocateBuffer(buffer);
4320 buffer = next_buffer; 4320 buffer = next_buffer;
4321 } 4321 }
4322 *buffer_address = NULL; 4322 *buffer_address = NULL;
4323 } 4323 }
4324 4324
4325 4325
4326 } } // namespace v8::internal 4326 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ic.cc ('k') | src/mips/assembler-mips-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698