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

Side by Side Diff: src/heap.h

Issue 8004: - Cleaned up Heap::CopyObject. Inlined fast case. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/heap.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 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 } 677 }
678 678
679 static void TracePathToObject(); 679 static void TracePathToObject();
680 static void TracePathToGlobal(); 680 static void TracePathToGlobal();
681 #endif 681 #endif
682 682
683 // Callback function pased to Heap::Iterate etc. Copies an object if 683 // Callback function pased to Heap::Iterate etc. Copies an object if
684 // necessary, the object might be promoted to an old space. The caller must 684 // necessary, the object might be promoted to an old space. The caller must
685 // ensure the precondition that the object is (a) a heap object and (b) in 685 // ensure the precondition that the object is (a) a heap object and (b) in
686 // the heap's from space. 686 // the heap's from space.
687 static void CopyObject(HeapObject** p); 687 static void ScavengePointer(HeapObject** p);
688 static inline void ScavengeObject(HeapObject** p, HeapObject* object);
688 689
689 // Clear a range of remembered set addresses corresponding to the object 690 // Clear a range of remembered set addresses corresponding to the object
690 // area address 'start' with size 'size_in_bytes', eg, when adding blocks 691 // area address 'start' with size 'size_in_bytes', eg, when adding blocks
691 // to the free list. 692 // to the free list.
692 static void ClearRSetRange(Address start, int size_in_bytes); 693 static void ClearRSetRange(Address start, int size_in_bytes);
693 694
694 // Rebuild remembered set in old and map spaces. 695 // Rebuild remembered set in old and map spaces.
695 static void RebuildRSets(); 696 static void RebuildRSets();
696 697
697 // 698 //
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 875
875 // Update an old object's remembered set 876 // Update an old object's remembered set
876 static int UpdateRSet(HeapObject* obj); 877 static int UpdateRSet(HeapObject* obj);
877 878
878 // Rebuild remembered set in an old space. 879 // Rebuild remembered set in an old space.
879 static void RebuildRSets(PagedSpace* space); 880 static void RebuildRSets(PagedSpace* space);
880 881
881 // Rebuild remembered set in the large object space. 882 // Rebuild remembered set in the large object space.
882 static void RebuildRSets(LargeObjectSpace* space); 883 static void RebuildRSets(LargeObjectSpace* space);
883 884
885 // Slow part of scavenge object.
886 static void ScavengeObjectSlow(HeapObject** p, HeapObject* object);
887
884 static const int kInitialSymbolTableSize = 2048; 888 static const int kInitialSymbolTableSize = 2048;
885 static const int kInitialEvalCacheSize = 64; 889 static const int kInitialEvalCacheSize = 64;
886 890
887 friend class Factory; 891 friend class Factory;
888 friend class DisallowAllocationFailure; 892 friend class DisallowAllocationFailure;
889 }; 893 };
890 894
891 895
892 #ifdef DEBUG 896 #ifdef DEBUG
893 // Visitor class to verify interior pointers that do not have remembered set 897 // Visitor class to verify interior pointers that do not have remembered set
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
1180 int marked_count_; 1184 int marked_count_;
1181 1185
1182 // The count from the end of the previous full GC. Will be zero if there 1186 // The count from the end of the previous full GC. Will be zero if there
1183 // was no previous full GC. 1187 // was no previous full GC.
1184 int previous_marked_count_; 1188 int previous_marked_count_;
1185 }; 1189 };
1186 1190
1187 } } // namespace v8::internal 1191 } } // namespace v8::internal
1188 1192
1189 #endif // V8_HEAP_H_ 1193 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « no previous file | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698