| 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 985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 996 // Finds the internalized copy for string in the string table. | 996 // Finds the internalized copy for string in the string table. |
| 997 // If not found, a new string is added to the table and returned. | 997 // If not found, a new string is added to the table and returned. |
| 998 // Returns Failure::RetryAfterGC(requested_bytes, space) if allocation | 998 // Returns Failure::RetryAfterGC(requested_bytes, space) if allocation |
| 999 // failed. | 999 // failed. |
| 1000 // Please note this function does not perform a garbage collection. | 1000 // Please note this function does not perform a garbage collection. |
| 1001 MUST_USE_RESULT MaybeObject* InternalizeStringWithKey(HashTableKey* key); | 1001 MUST_USE_RESULT MaybeObject* InternalizeStringWithKey(HashTableKey* key); |
| 1002 | 1002 |
| 1003 bool InternalizeStringIfExists(String* str, String** result); | 1003 bool InternalizeStringIfExists(String* str, String** result); |
| 1004 bool InternalizeTwoCharsStringIfExists(String* str, String** result); | 1004 bool InternalizeTwoCharsStringIfExists(String* str, String** result); |
| 1005 | 1005 |
| 1006 // Compute the matching internalized string map for a string if possible. | |
| 1007 // NULL is returned if string is in new space or not flattened. | |
| 1008 Map* InternalizedStringMapForString(String* str); | |
| 1009 | |
| 1010 // Converts the given boolean condition to JavaScript boolean value. | 1006 // Converts the given boolean condition to JavaScript boolean value. |
| 1011 inline Object* ToBoolean(bool condition); | 1007 inline Object* ToBoolean(bool condition); |
| 1012 | 1008 |
| 1013 // Performs garbage collection operation. | 1009 // Performs garbage collection operation. |
| 1014 // Returns whether there is a chance that another major GC could | 1010 // Returns whether there is a chance that another major GC could |
| 1015 // collect more garbage. | 1011 // collect more garbage. |
| 1016 inline bool CollectGarbage( | 1012 inline bool CollectGarbage( |
| 1017 AllocationSpace space, | 1013 AllocationSpace space, |
| 1018 const char* gc_reason = NULL, | 1014 const char* gc_reason = NULL, |
| 1019 const GCCallbackFlags gc_callback_flags = kNoGCCallbackFlags); | 1015 const GCCallbackFlags gc_callback_flags = kNoGCCallbackFlags); |
| (...skipping 1887 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2907 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2903 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
| 2908 | 2904 |
| 2909 private: | 2905 private: |
| 2910 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2906 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
| 2911 }; | 2907 }; |
| 2912 #endif // DEBUG | 2908 #endif // DEBUG |
| 2913 | 2909 |
| 2914 } } // namespace v8::internal | 2910 } } // namespace v8::internal |
| 2915 | 2911 |
| 2916 #endif // V8_HEAP_H_ | 2912 #endif // V8_HEAP_H_ |
| OLD | NEW |