| 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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 V(compare_ic_string, "==") \ | 285 V(compare_ic_string, "==") \ |
| 286 V(strict_compare_ic_string, "===") \ | 286 V(strict_compare_ic_string, "===") \ |
| 287 V(infinity_string, "Infinity") \ | 287 V(infinity_string, "Infinity") \ |
| 288 V(minus_infinity_string, "-Infinity") \ | 288 V(minus_infinity_string, "-Infinity") \ |
| 289 V(hidden_stack_trace_string, "v8::hidden_stack_trace") \ | 289 V(hidden_stack_trace_string, "v8::hidden_stack_trace") \ |
| 290 V(query_colon_string, "(?:)") \ | 290 V(query_colon_string, "(?:)") \ |
| 291 V(Generator_string, "Generator") \ | 291 V(Generator_string, "Generator") \ |
| 292 V(throw_string, "throw") \ | 292 V(throw_string, "throw") \ |
| 293 V(done_string, "done") \ | 293 V(done_string, "done") \ |
| 294 V(value_string, "value") \ | 294 V(value_string, "value") \ |
| 295 V(next_string, "next") | 295 V(next_string, "next") \ |
| 296 V(byte_length_string, "byteLength") \ |
| 297 V(byte_offset_string, "byteOffset") \ |
| 298 V(buffer_string, "buffer") |
| 296 | 299 |
| 297 // Forward declarations. | 300 // Forward declarations. |
| 298 class GCTracer; | 301 class GCTracer; |
| 299 class HeapStats; | 302 class HeapStats; |
| 300 class Isolate; | 303 class Isolate; |
| 301 class WeakObjectRetainer; | 304 class WeakObjectRetainer; |
| 302 | 305 |
| 303 | 306 |
| 304 typedef String* (*ExternalStringTableUpdaterCallback)(Heap* heap, | 307 typedef String* (*ExternalStringTableUpdaterCallback)(Heap* heap, |
| 305 Object** pointer); | 308 Object** pointer); |
| (...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 941 FixedDoubleArray* src, Map* map); | 944 FixedDoubleArray* src, Map* map); |
| 942 | 945 |
| 943 // Allocates a fixed array initialized with the hole values. | 946 // Allocates a fixed array initialized with the hole values. |
| 944 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 947 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
| 945 // failed. | 948 // failed. |
| 946 // Please note this does not perform a garbage collection. | 949 // Please note this does not perform a garbage collection. |
| 947 MUST_USE_RESULT MaybeObject* AllocateFixedArrayWithHoles( | 950 MUST_USE_RESULT MaybeObject* AllocateFixedArrayWithHoles( |
| 948 int length, | 951 int length, |
| 949 PretenureFlag pretenure = NOT_TENURED); | 952 PretenureFlag pretenure = NOT_TENURED); |
| 950 | 953 |
| 951 MUST_USE_RESULT MaybeObject* AllocateRawFixedDoubleArray( | |
| 952 int length, | |
| 953 PretenureFlag pretenure); | |
| 954 | |
| 955 // Allocates a fixed double array with uninitialized values. Returns | 954 // Allocates a fixed double array with uninitialized values. Returns |
| 956 // Failure::RetryAfterGC(requested_bytes, space) if the allocation failed. | 955 // Failure::RetryAfterGC(requested_bytes, space) if the allocation failed. |
| 957 // Please note this does not perform a garbage collection. | 956 // Please note this does not perform a garbage collection. |
| 958 MUST_USE_RESULT MaybeObject* AllocateUninitializedFixedDoubleArray( | 957 MUST_USE_RESULT MaybeObject* AllocateUninitializedFixedDoubleArray( |
| 959 int length, | 958 int length, |
| 960 PretenureFlag pretenure = NOT_TENURED); | 959 PretenureFlag pretenure = NOT_TENURED); |
| 961 | 960 |
| 962 // Allocates a fixed double array with hole values. Returns | 961 // Allocates a fixed double array with hole values. Returns |
| 963 // Failure::RetryAfterGC(requested_bytes, space) if the allocation failed. | 962 // Failure::RetryAfterGC(requested_bytes, space) if the allocation failed. |
| 964 // Please note this does not perform a garbage collection. | 963 // 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); | 1494 Object* GetNumberStringCache(Object* number); |
| 1496 | 1495 |
| 1497 // Update the cache with a new number-string pair. | 1496 // Update the cache with a new number-string pair. |
| 1498 void SetNumberStringCache(Object* number, String* str); | 1497 void SetNumberStringCache(Object* number, String* str); |
| 1499 | 1498 |
| 1500 // Adjusts the amount of registered external memory. | 1499 // Adjusts the amount of registered external memory. |
| 1501 // Returns the adjusted value. | 1500 // Returns the adjusted value. |
| 1502 inline intptr_t AdjustAmountOfExternalAllocatedMemory( | 1501 inline intptr_t AdjustAmountOfExternalAllocatedMemory( |
| 1503 intptr_t change_in_bytes); | 1502 intptr_t change_in_bytes); |
| 1504 | 1503 |
| 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. | 1504 // This is only needed for testing high promotion mode. |
| 1511 void SetNewSpaceHighPromotionModeActive(bool mode) { | 1505 void SetNewSpaceHighPromotionModeActive(bool mode) { |
| 1512 new_space_high_promotion_mode_active_ = mode; | 1506 new_space_high_promotion_mode_active_ = mode; |
| 1513 } | 1507 } |
| 1514 | 1508 |
| 1515 // Returns the allocation mode (pre-tenuring) based on observed promotion | 1509 // Returns the allocation mode (pre-tenuring) based on observed promotion |
| 1516 // rates of previous collections. | 1510 // rates of previous collections. |
| 1517 inline PretenureFlag GetPretenureMode() { | 1511 inline PretenureFlag GetPretenureMode() { |
| 1518 return FLAG_pretenuring && new_space_high_promotion_mode_active_ | 1512 return FLAG_pretenuring && new_space_high_promotion_mode_active_ |
| 1519 ? TENURED : NOT_TENURED; | 1513 ? 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 | 2067 // have to test the allocation space argument and (b) can reduce code size |
| 2074 // (since both AllocateRaw and AllocateRawMap are inlined). | 2068 // (since both AllocateRaw and AllocateRawMap are inlined). |
| 2075 MUST_USE_RESULT inline MaybeObject* AllocateRawMap(); | 2069 MUST_USE_RESULT inline MaybeObject* AllocateRawMap(); |
| 2076 | 2070 |
| 2077 // Allocate an uninitialized object in the simple cell space. | 2071 // Allocate an uninitialized object in the simple cell space. |
| 2078 MUST_USE_RESULT inline MaybeObject* AllocateRawCell(); | 2072 MUST_USE_RESULT inline MaybeObject* AllocateRawCell(); |
| 2079 | 2073 |
| 2080 // Allocate an uninitialized object in the global property cell space. | 2074 // Allocate an uninitialized object in the global property cell space. |
| 2081 MUST_USE_RESULT inline MaybeObject* AllocateRawPropertyCell(); | 2075 MUST_USE_RESULT inline MaybeObject* AllocateRawPropertyCell(); |
| 2082 | 2076 |
| 2077 // Allocate an uninitialized fixed array. |
| 2078 MUST_USE_RESULT MaybeObject* AllocateRawFixedArray( |
| 2079 int length, PretenureFlag pretenure); |
| 2080 |
| 2081 // Allocate an uninitialized fixed double array. |
| 2082 MUST_USE_RESULT MaybeObject* AllocateRawFixedDoubleArray( |
| 2083 int length, PretenureFlag pretenure); |
| 2084 |
| 2085 // Allocate an initialized fixed array with the given filler value. |
| 2086 MUST_USE_RESULT MaybeObject* AllocateFixedArrayWithFiller( |
| 2087 int length, PretenureFlag pretenure, Object* filler); |
| 2088 |
| 2083 // Initializes a JSObject based on its map. | 2089 // Initializes a JSObject based on its map. |
| 2084 void InitializeJSObjectFromMap(JSObject* obj, | 2090 void InitializeJSObjectFromMap(JSObject* obj, |
| 2085 FixedArray* properties, | 2091 FixedArray* properties, |
| 2086 Map* map); | 2092 Map* map); |
| 2087 | 2093 |
| 2088 bool CreateInitialMaps(); | 2094 bool CreateInitialMaps(); |
| 2089 bool CreateInitialObjects(); | 2095 bool CreateInitialObjects(); |
| 2090 | 2096 |
| 2091 // These five Create*EntryStub functions are here and forced to not be inlined | 2097 // 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. | 2098 // 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. | 3030 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
| 3025 | 3031 |
| 3026 private: | 3032 private: |
| 3027 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 3033 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
| 3028 }; | 3034 }; |
| 3029 #endif // DEBUG | 3035 #endif // DEBUG |
| 3030 | 3036 |
| 3031 } } // namespace v8::internal | 3037 } } // namespace v8::internal |
| 3032 | 3038 |
| 3033 #endif // V8_HEAP_H_ | 3039 #endif // V8_HEAP_H_ |
| OLD | NEW |