OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1409 return FLAG_verify_heap; | 1409 return FLAG_verify_heap; |
1410 #else | 1410 #else |
1411 return false; | 1411 return false; |
1412 #endif | 1412 #endif |
1413 #endif | 1413 #endif |
1414 } | 1414 } |
1415 | 1415 |
1416 // Print short heap statistics. | 1416 // Print short heap statistics. |
1417 void PrintShortHeapStatistics(); | 1417 void PrintShortHeapStatistics(); |
1418 | 1418 |
1419 // Makes a new internalized string object | |
1420 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | |
1421 // failed. | |
1422 // Please note this function does not perform a garbage collection. | |
1423 MUST_USE_RESULT MaybeObject* CreateInternalizedString( | |
1424 const char* str, int length, int hash); | |
1425 MUST_USE_RESULT MaybeObject* CreateInternalizedString(String* str); | |
1426 | |
1427 // Write barrier support for address[offset] = o. | 1419 // Write barrier support for address[offset] = o. |
1428 INLINE(void RecordWrite(Address address, int offset)); | 1420 INLINE(void RecordWrite(Address address, int offset)); |
1429 | 1421 |
1430 // Write barrier support for address[start : start + len[ = o. | 1422 // Write barrier support for address[start : start + len[ = o. |
1431 INLINE(void RecordWrites(Address address, int start, int len)); | 1423 INLINE(void RecordWrites(Address address, int start, int len)); |
1432 | 1424 |
1433 enum HeapState { NOT_IN_GC, SCAVENGE, MARK_COMPACT }; | 1425 enum HeapState { NOT_IN_GC, SCAVENGE, MARK_COMPACT }; |
1434 inline HeapState gc_state() { return gc_state_; } | 1426 inline HeapState gc_state() { return gc_state_; } |
1435 | 1427 |
1436 inline bool IsInGCPostProcessing() { return gc_post_processing_depth_ > 0; } | 1428 inline bool IsInGCPostProcessing() { return gc_post_processing_depth_ > 0; } |
(...skipping 1651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3088 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 3080 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
3089 | 3081 |
3090 private: | 3082 private: |
3091 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 3083 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
3092 }; | 3084 }; |
3093 #endif // DEBUG | 3085 #endif // DEBUG |
3094 | 3086 |
3095 } } // namespace v8::internal | 3087 } } // namespace v8::internal |
3096 | 3088 |
3097 #endif // V8_HEAP_H_ | 3089 #endif // V8_HEAP_H_ |
OLD | NEW |