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 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
709 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 709 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
710 // failed. | 710 // failed. |
711 // If allocation_site is non-null, then a memento is emitted after the object | 711 // If allocation_site is non-null, then a memento is emitted after the object |
712 // that points to the site. | 712 // that points to the site. |
713 // Please note this does not perform a garbage collection. | 713 // Please note this does not perform a garbage collection. |
714 MUST_USE_RESULT MaybeObject* AllocateJSObject( | 714 MUST_USE_RESULT MaybeObject* AllocateJSObject( |
715 JSFunction* constructor, | 715 JSFunction* constructor, |
716 PretenureFlag pretenure = NOT_TENURED, | 716 PretenureFlag pretenure = NOT_TENURED, |
717 AllocationSite* allocation_site = NULL); | 717 AllocationSite* allocation_site = NULL); |
718 | 718 |
719 MUST_USE_RESULT MaybeObject* AllocateJSArrayStorage( | |
720 JSArray* array, | |
721 int length, | |
722 int capacity, | |
723 ArrayStorageAllocationMode mode = DONT_INITIALIZE_ARRAY_ELEMENTS); | |
724 | |
725 // Returns a deep copy of the JavaScript object. | 719 // Returns a deep copy of the JavaScript object. |
726 // Properties and elements are copied too. | 720 // Properties and elements are copied too. |
727 // Returns failure if allocation failed. | 721 // Returns failure if allocation failed. |
728 // Optionally takes an AllocationSite to be appended in an AllocationMemento. | 722 // Optionally takes an AllocationSite to be appended in an AllocationMemento. |
729 MUST_USE_RESULT MaybeObject* CopyJSObject(JSObject* source, | 723 MUST_USE_RESULT MaybeObject* CopyJSObject(JSObject* source, |
730 AllocationSite* site = NULL); | 724 AllocationSite* site = NULL); |
731 | 725 |
732 // Allocates a Harmony proxy or function proxy. | 726 // Allocates a Harmony proxy or function proxy. |
733 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 727 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
734 // failed. | 728 // failed. |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
976 // Make a copy of src and return it. Returns | 970 // Make a copy of src and return it. Returns |
977 // Failure::RetryAfterGC(requested_bytes, space) if the allocation failed. | 971 // Failure::RetryAfterGC(requested_bytes, space) if the allocation failed. |
978 MUST_USE_RESULT inline MaybeObject* CopyConstantPoolArray( | 972 MUST_USE_RESULT inline MaybeObject* CopyConstantPoolArray( |
979 ConstantPoolArray* src); | 973 ConstantPoolArray* src); |
980 | 974 |
981 // Make a copy of src, set the map, and return the copy. Returns | 975 // Make a copy of src, set the map, and return the copy. Returns |
982 // Failure::RetryAfterGC(requested_bytes, space) if the allocation failed. | 976 // Failure::RetryAfterGC(requested_bytes, space) if the allocation failed. |
983 MUST_USE_RESULT MaybeObject* CopyConstantPoolArrayWithMap( | 977 MUST_USE_RESULT MaybeObject* CopyConstantPoolArrayWithMap( |
984 ConstantPoolArray* src, Map* map); | 978 ConstantPoolArray* src, Map* map); |
985 | 979 |
986 // Allocates a fixed array initialized with the hole values. | |
987 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | |
988 // failed. | |
989 // Please note this does not perform a garbage collection. | |
990 MUST_USE_RESULT MaybeObject* AllocateFixedArrayWithHoles( | |
991 int length, | |
992 PretenureFlag pretenure = NOT_TENURED); | |
993 | |
994 MUST_USE_RESULT MaybeObject* AllocateConstantPoolArray( | 980 MUST_USE_RESULT MaybeObject* AllocateConstantPoolArray( |
995 int number_of_int64_entries, | 981 int number_of_int64_entries, |
996 int number_of_code_ptr_entries, | 982 int number_of_code_ptr_entries, |
997 int number_of_heap_ptr_entries, | 983 int number_of_heap_ptr_entries, |
998 int number_of_int32_entries); | 984 int number_of_int32_entries); |
999 | 985 |
1000 // Allocates a fixed double array with uninitialized values. Returns | 986 // Allocates a fixed double array with uninitialized values. Returns |
1001 // Failure::RetryAfterGC(requested_bytes, space) if the allocation failed. | 987 // Failure::RetryAfterGC(requested_bytes, space) if the allocation failed. |
1002 // Please note this does not perform a garbage collection. | 988 // Please note this does not perform a garbage collection. |
1003 MUST_USE_RESULT MaybeObject* AllocateUninitializedFixedDoubleArray( | 989 MUST_USE_RESULT MaybeObject* AllocateUninitializedFixedDoubleArray( |
1004 int length, | 990 int length, |
1005 PretenureFlag pretenure = NOT_TENURED); | 991 PretenureFlag pretenure = NOT_TENURED); |
1006 | 992 |
1007 // Allocates a fixed double array with hole values. Returns | |
1008 // Failure::RetryAfterGC(requested_bytes, space) if the allocation failed. | |
1009 // Please note this does not perform a garbage collection. | |
1010 MUST_USE_RESULT MaybeObject* AllocateFixedDoubleArrayWithHoles( | |
1011 int length, | |
1012 PretenureFlag pretenure = NOT_TENURED); | |
1013 | |
1014 // AllocateHashTable is identical to AllocateFixedArray except | 993 // AllocateHashTable is identical to AllocateFixedArray except |
1015 // that the resulting object has hash_table_map as map. | 994 // that the resulting object has hash_table_map as map. |
1016 MUST_USE_RESULT MaybeObject* AllocateHashTable( | 995 MUST_USE_RESULT MaybeObject* AllocateHashTable( |
1017 int length, PretenureFlag pretenure = NOT_TENURED); | 996 int length, PretenureFlag pretenure = NOT_TENURED); |
1018 | 997 |
1019 // Allocates a new utility object in the old generation. | 998 // Allocates a new utility object in the old generation. |
1020 MUST_USE_RESULT MaybeObject* AllocateStruct(InstanceType type); | 999 MUST_USE_RESULT MaybeObject* AllocateStruct(InstanceType type); |
1021 | 1000 |
1022 // Allocates a function initialized with a shared part. | 1001 // Allocates a function initialized with a shared part. |
1023 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 1002 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
(...skipping 2034 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3058 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 3037 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
3059 | 3038 |
3060 private: | 3039 private: |
3061 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 3040 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
3062 }; | 3041 }; |
3063 #endif // DEBUG | 3042 #endif // DEBUG |
3064 | 3043 |
3065 } } // namespace v8::internal | 3044 } } // namespace v8::internal |
3066 | 3045 |
3067 #endif // V8_HEAP_H_ | 3046 #endif // V8_HEAP_H_ |
OLD | NEW |