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

Side by Side Diff: src/heap.h

Issue 7353017: 2011-07-13: Version 3.4.12 (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 9 years, 5 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') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 Address* NewSpaceAllocationTopAddress() { 402 Address* NewSpaceAllocationTopAddress() {
403 return new_space_.allocation_top_address(); 403 return new_space_.allocation_top_address();
404 } 404 }
405 Address* NewSpaceAllocationLimitAddress() { 405 Address* NewSpaceAllocationLimitAddress() {
406 return new_space_.allocation_limit_address(); 406 return new_space_.allocation_limit_address();
407 } 407 }
408 408
409 // Uncommit unused semi space. 409 // Uncommit unused semi space.
410 bool UncommitFromSpace() { return new_space_.UncommitFromSpace(); } 410 bool UncommitFromSpace() { return new_space_.UncommitFromSpace(); }
411 411
412 #ifdef ENABLE_HEAP_PROTECTION
413 // Protect/unprotect the heap by marking all spaces read-only/writable.
414 void Protect();
415 void Unprotect();
416 #endif
417
418 // Allocates and initializes a new JavaScript object based on a 412 // Allocates and initializes a new JavaScript object based on a
419 // constructor. 413 // constructor.
420 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation 414 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
421 // failed. 415 // failed.
422 // Please note this does not perform a garbage collection. 416 // Please note this does not perform a garbage collection.
423 MUST_USE_RESULT MaybeObject* AllocateJSObject( 417 MUST_USE_RESULT MaybeObject* AllocateJSObject(
424 JSFunction* constructor, PretenureFlag pretenure = NOT_TENURED); 418 JSFunction* constructor, PretenureFlag pretenure = NOT_TENURED);
425 419
426 // Allocates and initializes a new global object based on a constructor. 420 // Allocates and initializes a new global object based on a constructor.
427 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation 421 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
1045 void Verify(); 1039 void Verify();
1046 1040
1047 // Report heap statistics. 1041 // Report heap statistics.
1048 void ReportHeapStatistics(const char* title); 1042 void ReportHeapStatistics(const char* title);
1049 void ReportCodeStatistics(const char* title); 1043 void ReportCodeStatistics(const char* title);
1050 1044
1051 // Fill in bogus values in from space 1045 // Fill in bogus values in from space
1052 void ZapFromSpace(); 1046 void ZapFromSpace();
1053 #endif 1047 #endif
1054 1048
1055 #if defined(ENABLE_LOGGING_AND_PROFILING)
1056 // Print short heap statistics. 1049 // Print short heap statistics.
1057 void PrintShortHeapStatistics(); 1050 void PrintShortHeapStatistics();
1058 #endif
1059 1051
1060 // Makes a new symbol object 1052 // Makes a new symbol object
1061 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation 1053 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
1062 // failed. 1054 // failed.
1063 // Please note this function does not perform a garbage collection. 1055 // Please note this function does not perform a garbage collection.
1064 MUST_USE_RESULT MaybeObject* CreateSymbol( 1056 MUST_USE_RESULT MaybeObject* CreateSymbol(
1065 const char* str, int length, int hash); 1057 const char* str, int length, int hash);
1066 MUST_USE_RESULT MaybeObject* CreateSymbol(String* str); 1058 MUST_USE_RESULT MaybeObject* CreateSymbol(String* str);
1067 1059
1068 // Write barrier support for address[offset] = o. 1060 // Write barrier support for address[offset] = o.
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
1507 // Performs a major collection in the whole heap. 1499 // Performs a major collection in the whole heap.
1508 void MarkCompact(GCTracer* tracer); 1500 void MarkCompact(GCTracer* tracer);
1509 1501
1510 // Code to be run before and after mark-compact. 1502 // Code to be run before and after mark-compact.
1511 void MarkCompactPrologue(bool is_compacting); 1503 void MarkCompactPrologue(bool is_compacting);
1512 1504
1513 // Completely clear the Instanceof cache (to stop it keeping objects alive 1505 // Completely clear the Instanceof cache (to stop it keeping objects alive
1514 // around a GC). 1506 // around a GC).
1515 inline void CompletelyClearInstanceofCache(); 1507 inline void CompletelyClearInstanceofCache();
1516 1508
1517 #if defined(DEBUG) || defined(ENABLE_LOGGING_AND_PROFILING)
1518 // Record statistics before and after garbage collection. 1509 // Record statistics before and after garbage collection.
1519 void ReportStatisticsBeforeGC(); 1510 void ReportStatisticsBeforeGC();
1520 void ReportStatisticsAfterGC(); 1511 void ReportStatisticsAfterGC();
1521 #endif
1522 1512
1523 // Slow part of scavenge object. 1513 // Slow part of scavenge object.
1524 static void ScavengeObjectSlow(HeapObject** p, HeapObject* object); 1514 static void ScavengeObjectSlow(HeapObject** p, HeapObject* object);
1525 1515
1526 // Initializes a function with a shared part and prototype. 1516 // Initializes a function with a shared part and prototype.
1527 // Returns the function. 1517 // Returns the function.
1528 // Note: this code was factored out of AllocateFunction such that 1518 // Note: this code was factored out of AllocateFunction such that
1529 // other parts of the VM could use it. Specifically, a function that creates 1519 // other parts of the VM could use it. Specifically, a function that creates
1530 // instances of type JS_FUNCTION_TYPE benefit from the use of this function. 1520 // instances of type JS_FUNCTION_TYPE benefit from the use of this function.
1531 // Please note this does not perform a garbage collection. 1521 // Please note this does not perform a garbage collection.
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after
2300 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2290 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2301 }; 2291 };
2302 #endif // DEBUG || LIVE_OBJECT_LIST 2292 #endif // DEBUG || LIVE_OBJECT_LIST
2303 2293
2304 2294
2305 } } // namespace v8::internal 2295 } } // namespace v8::internal
2306 2296
2307 #undef HEAP 2297 #undef HEAP
2308 2298
2309 #endif // V8_HEAP_H_ 2299 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « src/handles.cc ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698