| 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 930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 941 FixedDoubleArray* src, Map* map); | 941 FixedDoubleArray* src, Map* map); |
| 942 | 942 |
| 943 // Allocates a fixed array initialized with the hole values. | 943 // Allocates a fixed array initialized with the hole values. |
| 944 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 944 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
| 945 // failed. | 945 // failed. |
| 946 // Please note this does not perform a garbage collection. | 946 // Please note this does not perform a garbage collection. |
| 947 MUST_USE_RESULT MaybeObject* AllocateFixedArrayWithHoles( | 947 MUST_USE_RESULT MaybeObject* AllocateFixedArrayWithHoles( |
| 948 int length, | 948 int length, |
| 949 PretenureFlag pretenure = NOT_TENURED); | 949 PretenureFlag pretenure = NOT_TENURED); |
| 950 | 950 |
| 951 MUST_USE_RESULT MaybeObject* AllocateRawFixedDoubleArray( | |
| 952 int length, | |
| 953 PretenureFlag pretenure); | |
| 954 | |
| 955 // Allocates a fixed double array with uninitialized values. Returns | 951 // Allocates a fixed double array with uninitialized values. Returns |
| 956 // Failure::RetryAfterGC(requested_bytes, space) if the allocation failed. | 952 // Failure::RetryAfterGC(requested_bytes, space) if the allocation failed. |
| 957 // Please note this does not perform a garbage collection. | 953 // Please note this does not perform a garbage collection. |
| 958 MUST_USE_RESULT MaybeObject* AllocateUninitializedFixedDoubleArray( | 954 MUST_USE_RESULT MaybeObject* AllocateUninitializedFixedDoubleArray( |
| 959 int length, | 955 int length, |
| 960 PretenureFlag pretenure = NOT_TENURED); | 956 PretenureFlag pretenure = NOT_TENURED); |
| 961 | 957 |
| 962 // Allocates a fixed double array with hole values. Returns | 958 // Allocates a fixed double array with hole values. Returns |
| 963 // Failure::RetryAfterGC(requested_bytes, space) if the allocation failed. | 959 // Failure::RetryAfterGC(requested_bytes, space) if the allocation failed. |
| 964 // Please note this does not perform a garbage collection. | 960 // Please note this does not perform a garbage collection. |
| (...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1495 Object* GetNumberStringCache(Object* number); | 1491 Object* GetNumberStringCache(Object* number); |
| 1496 | 1492 |
| 1497 // Update the cache with a new number-string pair. | 1493 // Update the cache with a new number-string pair. |
| 1498 void SetNumberStringCache(Object* number, String* str); | 1494 void SetNumberStringCache(Object* number, String* str); |
| 1499 | 1495 |
| 1500 // Adjusts the amount of registered external memory. | 1496 // Adjusts the amount of registered external memory. |
| 1501 // Returns the adjusted value. | 1497 // Returns the adjusted value. |
| 1502 inline intptr_t AdjustAmountOfExternalAllocatedMemory( | 1498 inline intptr_t AdjustAmountOfExternalAllocatedMemory( |
| 1503 intptr_t change_in_bytes); | 1499 intptr_t change_in_bytes); |
| 1504 | 1500 |
| 1505 // Allocate uninitialized fixed array. | |
| 1506 MUST_USE_RESULT MaybeObject* AllocateRawFixedArray(int length); | |
| 1507 MUST_USE_RESULT MaybeObject* AllocateRawFixedArray(int length, | |
| 1508 PretenureFlag pretenure); | |
| 1509 | |
| 1510 // This is only needed for testing high promotion mode. | 1501 // This is only needed for testing high promotion mode. |
| 1511 void SetNewSpaceHighPromotionModeActive(bool mode) { | 1502 void SetNewSpaceHighPromotionModeActive(bool mode) { |
| 1512 new_space_high_promotion_mode_active_ = mode; | 1503 new_space_high_promotion_mode_active_ = mode; |
| 1513 } | 1504 } |
| 1514 | 1505 |
| 1515 // Returns the allocation mode (pre-tenuring) based on observed promotion | 1506 // Returns the allocation mode (pre-tenuring) based on observed promotion |
| 1516 // rates of previous collections. | 1507 // rates of previous collections. |
| 1517 inline PretenureFlag GetPretenureMode() { | 1508 inline PretenureFlag GetPretenureMode() { |
| 1518 return FLAG_pretenuring && new_space_high_promotion_mode_active_ | 1509 return FLAG_pretenuring && new_space_high_promotion_mode_active_ |
| 1519 ? TENURED : NOT_TENURED; | 1510 ? TENURED : NOT_TENURED; |
| (...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2073 // have to test the allocation space argument and (b) can reduce code size | 2064 // have to test the allocation space argument and (b) can reduce code size |
| 2074 // (since both AllocateRaw and AllocateRawMap are inlined). | 2065 // (since both AllocateRaw and AllocateRawMap are inlined). |
| 2075 MUST_USE_RESULT inline MaybeObject* AllocateRawMap(); | 2066 MUST_USE_RESULT inline MaybeObject* AllocateRawMap(); |
| 2076 | 2067 |
| 2077 // Allocate an uninitialized object in the simple cell space. | 2068 // Allocate an uninitialized object in the simple cell space. |
| 2078 MUST_USE_RESULT inline MaybeObject* AllocateRawCell(); | 2069 MUST_USE_RESULT inline MaybeObject* AllocateRawCell(); |
| 2079 | 2070 |
| 2080 // Allocate an uninitialized object in the global property cell space. | 2071 // Allocate an uninitialized object in the global property cell space. |
| 2081 MUST_USE_RESULT inline MaybeObject* AllocateRawPropertyCell(); | 2072 MUST_USE_RESULT inline MaybeObject* AllocateRawPropertyCell(); |
| 2082 | 2073 |
| 2074 // Allocate an uninitialized fixed array. |
| 2075 MUST_USE_RESULT MaybeObject* AllocateRawFixedArray( |
| 2076 int length, PretenureFlag pretenure); |
| 2077 |
| 2078 // Allocate an uninitialized fixed double array. |
| 2079 MUST_USE_RESULT MaybeObject* AllocateRawFixedDoubleArray( |
| 2080 int length, PretenureFlag pretenure); |
| 2081 |
| 2082 // Allocate an initialized fixed array with the given filler value. |
| 2083 MUST_USE_RESULT MaybeObject* AllocateFixedArrayWithFiller( |
| 2084 int length, PretenureFlag pretenure, Object* filler); |
| 2085 |
| 2083 // Initializes a JSObject based on its map. | 2086 // Initializes a JSObject based on its map. |
| 2084 void InitializeJSObjectFromMap(JSObject* obj, | 2087 void InitializeJSObjectFromMap(JSObject* obj, |
| 2085 FixedArray* properties, | 2088 FixedArray* properties, |
| 2086 Map* map); | 2089 Map* map); |
| 2087 | 2090 |
| 2088 bool CreateInitialMaps(); | 2091 bool CreateInitialMaps(); |
| 2089 bool CreateInitialObjects(); | 2092 bool CreateInitialObjects(); |
| 2090 | 2093 |
| 2091 // These five Create*EntryStub functions are here and forced to not be inlined | 2094 // These five Create*EntryStub functions are here and forced to not be inlined |
| 2092 // because of a gcc-4.4 bug that assigns wrong vtable entries. | 2095 // because of a gcc-4.4 bug that assigns wrong vtable entries. |
| (...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3024 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 3027 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
| 3025 | 3028 |
| 3026 private: | 3029 private: |
| 3027 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 3030 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
| 3028 }; | 3031 }; |
| 3029 #endif // DEBUG | 3032 #endif // DEBUG |
| 3030 | 3033 |
| 3031 } } // namespace v8::internal | 3034 } } // namespace v8::internal |
| 3032 | 3035 |
| 3033 #endif // V8_HEAP_H_ | 3036 #endif // V8_HEAP_H_ |
| OLD | NEW |