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

Side by Side Diff: src/heap.h

Issue 3066044: Generalize virtually dispatched scavenger to virtually dispatched specialized visitors. (Closed)
Patch Set: cleanup Created 10 years, 4 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/factory.cc ('k') | 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 965 matching lines...) Expand 10 before | Expand all | Expand 10 after
976 976
977 static Object* NumberToString(Object* number, 977 static Object* NumberToString(Object* number,
978 bool check_number_string_cache = true); 978 bool check_number_string_cache = true);
979 979
980 static Map* MapForExternalArrayType(ExternalArrayType array_type); 980 static Map* MapForExternalArrayType(ExternalArrayType array_type);
981 static RootListIndex RootIndexForExternalArrayType( 981 static RootListIndex RootIndexForExternalArrayType(
982 ExternalArrayType array_type); 982 ExternalArrayType array_type);
983 983
984 static void RecordStats(HeapStats* stats, bool take_snapshot = false); 984 static void RecordStats(HeapStats* stats, bool take_snapshot = false);
985 985
986 static Scavenger GetScavenger(int instance_type, int instance_size);
987
988 // Copy block of memory from src to dst. Size of block should be aligned 986 // Copy block of memory from src to dst. Size of block should be aligned
989 // by pointer size. 987 // by pointer size.
990 static inline void CopyBlock(Address dst, Address src, int byte_size); 988 static inline void CopyBlock(Address dst, Address src, int byte_size);
991 989
992 static inline void CopyBlockToOldSpaceAndUpdateRegionMarks(Address dst, 990 static inline void CopyBlockToOldSpaceAndUpdateRegionMarks(Address dst,
993 Address src, 991 Address src,
994 int byte_size); 992 int byte_size);
995 993
996 // Optimized version of memmove for blocks with pointer size aligned sizes and 994 // Optimized version of memmove for blocks with pointer size aligned sizes and
997 // pointer size aligned addresses. 995 // pointer size aligned addresses.
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after
1718 // invocation IFF --trace_gc is used. 1716 // invocation IFF --trace_gc is used.
1719 1717
1720 class GCTracer BASE_EMBEDDED { 1718 class GCTracer BASE_EMBEDDED {
1721 public: 1719 public:
1722 class Scope BASE_EMBEDDED { 1720 class Scope BASE_EMBEDDED {
1723 public: 1721 public:
1724 enum ScopeId { 1722 enum ScopeId {
1725 EXTERNAL, 1723 EXTERNAL,
1726 MC_MARK, 1724 MC_MARK,
1727 MC_SWEEP, 1725 MC_SWEEP,
1726 MC_SWEEP_NEWSPACE,
1728 MC_COMPACT, 1727 MC_COMPACT,
1729 MC_FLUSH_CODE, 1728 MC_FLUSH_CODE,
1730 kNumberOfScopes 1729 kNumberOfScopes
1731 }; 1730 };
1732 1731
1733 Scope(GCTracer* tracer, ScopeId scope) 1732 Scope(GCTracer* tracer, ScopeId scope)
1734 : tracer_(tracer), 1733 : tracer_(tracer),
1735 scope_(scope) { 1734 scope_(scope) {
1736 start_time_ = OS::TimeCurrentMillis(); 1735 start_time_ = OS::TimeCurrentMillis();
1737 } 1736 }
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
1979 1978
1980 // To speed up scavenge collections new space string are kept 1979 // To speed up scavenge collections new space string are kept
1981 // separate from old space strings. 1980 // separate from old space strings.
1982 static List<Object*> new_space_strings_; 1981 static List<Object*> new_space_strings_;
1983 static List<Object*> old_space_strings_; 1982 static List<Object*> old_space_strings_;
1984 }; 1983 };
1985 1984
1986 } } // namespace v8::internal 1985 } } // namespace v8::internal
1987 1986
1988 #endif // V8_HEAP_H_ 1987 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « src/factory.cc ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698