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

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

Issue 4061002: [Isolates] Clean up some usages of the heap macro. (Closed)
Patch Set: Created 10 years, 2 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
« no previous file with comments | « src/heap-inl.h ('k') | src/objects.cc » ('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 1544 matching lines...) Expand 10 before | Expand all | Expand 10 after
1555 if (new_addr == NULL) { 1555 if (new_addr == NULL) {
1556 // We encountered pointer to a dead object. Clear it so we will 1556 // We encountered pointer to a dead object. Clear it so we will
1557 // not visit it again during next iteration of dirty regions. 1557 // not visit it again during next iteration of dirty regions.
1558 *p = NULL; 1558 *p = NULL;
1559 } else { 1559 } else {
1560 *p = HeapObject::FromAddress(new_addr); 1560 *p = HeapObject::FromAddress(new_addr);
1561 } 1561 }
1562 } 1562 }
1563 1563
1564 1564
1565 static String* UpdateNewSpaceReferenceInExternalStringTableEntry(Object **p) { 1565 static String* UpdateNewSpaceReferenceInExternalStringTableEntry(Heap* heap,
1566 Object** p) {
1566 Address old_addr = HeapObject::cast(*p)->address(); 1567 Address old_addr = HeapObject::cast(*p)->address();
1567 Address new_addr = Memory::Address_at(old_addr); 1568 Address new_addr = Memory::Address_at(old_addr);
1568 return String::cast(HeapObject::FromAddress(new_addr)); 1569 return String::cast(HeapObject::FromAddress(new_addr));
1569 } 1570 }
1570 1571
1571 1572
1572 static bool TryPromoteObject(Heap* heap, HeapObject* object, int object_size) { 1573 static bool TryPromoteObject(Heap* heap, HeapObject* object, int object_size) {
1573 Object* result; 1574 Object* result;
1574 1575
1575 if (object_size > heap->MaxObjectSizeInPagedSpace()) { 1576 if (object_size > heap->MaxObjectSizeInPagedSpace()) {
(...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after
2696 } 2697 }
2697 2698
2698 2699
2699 void MarkCompactCollector::Initialize() { 2700 void MarkCompactCollector::Initialize() {
2700 StaticPointersToNewGenUpdatingVisitor::Initialize(); 2701 StaticPointersToNewGenUpdatingVisitor::Initialize();
2701 StaticMarkingVisitor::Initialize(); 2702 StaticMarkingVisitor::Initialize();
2702 } 2703 }
2703 2704
2704 2705
2705 } } // namespace v8::internal 2706 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap-inl.h ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698