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

Side by Side Diff: src/heap.h

Issue 7863: - Optimized CopyFixedArray and CopyJSObject. (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 | « src/handles.cc ('k') | src/heap.cc » ('j') | src/heap.cc » ('J')
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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 } 267 }
268 268
269 // Allocates and initializes a new JavaScript object based on a 269 // Allocates and initializes a new JavaScript object based on a
270 // constructor. 270 // constructor.
271 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation 271 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
272 // failed. 272 // failed.
273 // Please note this does not perform a garbage collection. 273 // Please note this does not perform a garbage collection.
274 static Object* AllocateJSObject(JSFunction* constructor, 274 static Object* AllocateJSObject(JSFunction* constructor,
275 PretenureFlag pretenure = NOT_TENURED); 275 PretenureFlag pretenure = NOT_TENURED);
276 276
277 // Returns a deep copy of the JavaScript object.
278 // Properties and elements are copied too.
279 // Returns failure if allocation failed.
280 static Object* CopyJSObject(JSObject* source);
281
277 // Allocates the function prototype. 282 // Allocates the function prototype.
278 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation 283 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
279 // failed. 284 // failed.
280 // Please note this does not perform a garbage collection. 285 // Please note this does not perform a garbage collection.
281 static Object* AllocateFunctionPrototype(JSFunction* function); 286 static Object* AllocateFunctionPrototype(JSFunction* function);
282 287
283 // Reinitialize an JSGlobalProxy based on a constructor. The object 288 // Reinitialize an JSGlobalProxy based on a constructor. The object
284 // must have the same size as objects allocated using the 289 // must have the same size as objects allocated using the
285 // constructor. The object is reinitialized and behaves as an 290 // constructor. The object is reinitialized and behaves as an
286 // object that has been freshly allocated using the constructor. 291 // object that has been freshly allocated using the constructor.
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 883
879 // Rebuild remembered set in an old space. 884 // Rebuild remembered set in an old space.
880 static void RebuildRSets(PagedSpace* space); 885 static void RebuildRSets(PagedSpace* space);
881 886
882 // Rebuild remembered set in the large object space. 887 // Rebuild remembered set in the large object space.
883 static void RebuildRSets(LargeObjectSpace* space); 888 static void RebuildRSets(LargeObjectSpace* space);
884 889
885 // Slow part of scavenge object. 890 // Slow part of scavenge object.
886 static void ScavengeObjectSlow(HeapObject** p, HeapObject* object); 891 static void ScavengeObjectSlow(HeapObject** p, HeapObject* object);
887 892
893 // Copy memory from src to dst.
894 inline static void CopyBlock(Object** dst, Object** src, int byte_size);
895
888 static const int kInitialSymbolTableSize = 2048; 896 static const int kInitialSymbolTableSize = 2048;
889 static const int kInitialEvalCacheSize = 64; 897 static const int kInitialEvalCacheSize = 64;
890 898
891 friend class Factory; 899 friend class Factory;
892 friend class DisallowAllocationFailure; 900 friend class DisallowAllocationFailure;
893 }; 901 };
894 902
895 903
896 #ifdef DEBUG 904 #ifdef DEBUG
897 // Visitor class to verify interior pointers that do not have remembered set 905 // Visitor class to verify interior pointers that do not have remembered set
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
1184 int marked_count_; 1192 int marked_count_;
1185 1193
1186 // The count from the end of the previous full GC. Will be zero if there 1194 // The count from the end of the previous full GC. Will be zero if there
1187 // was no previous full GC. 1195 // was no previous full GC.
1188 int previous_marked_count_; 1196 int previous_marked_count_;
1189 }; 1197 };
1190 1198
1191 } } // namespace v8::internal 1199 } } // namespace v8::internal
1192 1200
1193 #endif // V8_HEAP_H_ 1201 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « src/handles.cc ('k') | src/heap.cc » ('j') | src/heap.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698