| OLD | NEW |
| 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 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1039 void Verify(); | 1039 void Verify(); |
| 1040 | 1040 |
| 1041 // Report heap statistics. | 1041 // Report heap statistics. |
| 1042 void ReportHeapStatistics(const char* title); | 1042 void ReportHeapStatistics(const char* title); |
| 1043 void ReportCodeStatistics(const char* title); | 1043 void ReportCodeStatistics(const char* title); |
| 1044 | 1044 |
| 1045 // Fill in bogus values in from space | 1045 // Fill in bogus values in from space |
| 1046 void ZapFromSpace(); | 1046 void ZapFromSpace(); |
| 1047 #endif | 1047 #endif |
| 1048 | 1048 |
| 1049 #if defined(ENABLE_LOGGING_AND_PROFILING) | |
| 1050 // Print short heap statistics. | 1049 // Print short heap statistics. |
| 1051 void PrintShortHeapStatistics(); | 1050 void PrintShortHeapStatistics(); |
| 1052 #endif | |
| 1053 | 1051 |
| 1054 // Makes a new symbol object | 1052 // Makes a new symbol object |
| 1055 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 1053 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
| 1056 // failed. | 1054 // failed. |
| 1057 // Please note this function does not perform a garbage collection. | 1055 // Please note this function does not perform a garbage collection. |
| 1058 MUST_USE_RESULT MaybeObject* CreateSymbol( | 1056 MUST_USE_RESULT MaybeObject* CreateSymbol( |
| 1059 const char* str, int length, int hash); | 1057 const char* str, int length, int hash); |
| 1060 MUST_USE_RESULT MaybeObject* CreateSymbol(String* str); | 1058 MUST_USE_RESULT MaybeObject* CreateSymbol(String* str); |
| 1061 | 1059 |
| 1062 // 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 Loading... |
| 1501 // Performs a major collection in the whole heap. | 1499 // Performs a major collection in the whole heap. |
| 1502 void MarkCompact(GCTracer* tracer); | 1500 void MarkCompact(GCTracer* tracer); |
| 1503 | 1501 |
| 1504 // Code to be run before and after mark-compact. | 1502 // Code to be run before and after mark-compact. |
| 1505 void MarkCompactPrologue(bool is_compacting); | 1503 void MarkCompactPrologue(bool is_compacting); |
| 1506 | 1504 |
| 1507 // Completely clear the Instanceof cache (to stop it keeping objects alive | 1505 // Completely clear the Instanceof cache (to stop it keeping objects alive |
| 1508 // around a GC). | 1506 // around a GC). |
| 1509 inline void CompletelyClearInstanceofCache(); | 1507 inline void CompletelyClearInstanceofCache(); |
| 1510 | 1508 |
| 1511 #if defined(DEBUG) || defined(ENABLE_LOGGING_AND_PROFILING) | |
| 1512 // Record statistics before and after garbage collection. | 1509 // Record statistics before and after garbage collection. |
| 1513 void ReportStatisticsBeforeGC(); | 1510 void ReportStatisticsBeforeGC(); |
| 1514 void ReportStatisticsAfterGC(); | 1511 void ReportStatisticsAfterGC(); |
| 1515 #endif | |
| 1516 | 1512 |
| 1517 // Slow part of scavenge object. | 1513 // Slow part of scavenge object. |
| 1518 static void ScavengeObjectSlow(HeapObject** p, HeapObject* object); | 1514 static void ScavengeObjectSlow(HeapObject** p, HeapObject* object); |
| 1519 | 1515 |
| 1520 // Initializes a function with a shared part and prototype. | 1516 // Initializes a function with a shared part and prototype. |
| 1521 // Returns the function. | 1517 // Returns the function. |
| 1522 // Note: this code was factored out of AllocateFunction such that | 1518 // Note: this code was factored out of AllocateFunction such that |
| 1523 // 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 |
| 1524 // 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. |
| 1525 // 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 Loading... |
| 2294 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2290 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
| 2295 }; | 2291 }; |
| 2296 #endif // DEBUG || LIVE_OBJECT_LIST | 2292 #endif // DEBUG || LIVE_OBJECT_LIST |
| 2297 | 2293 |
| 2298 | 2294 |
| 2299 } } // namespace v8::internal | 2295 } } // namespace v8::internal |
| 2300 | 2296 |
| 2301 #undef HEAP | 2297 #undef HEAP |
| 2302 | 2298 |
| 2303 #endif // V8_HEAP_H_ | 2299 #endif // V8_HEAP_H_ |
| OLD | NEW |