Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(724)

Side by Side Diff: src/heap/heap.h

Issue 1690953002: [runtime/heap] Introduce CopyFixedArrayUpTo to match CopyFixedArrayAndGrow, copying to a smaller ar… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/factory.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_HEAP_HEAP_H_ 5 #ifndef V8_HEAP_HEAP_H_
6 #define V8_HEAP_HEAP_H_ 6 #define V8_HEAP_HEAP_H_
7 7
8 #include <cmath> 8 #include <cmath>
9 #include <map> 9 #include <map>
10 10
(...skipping 1859 matching lines...) Expand 10 before | Expand all | Expand 10 after
1870 // Allocates an uninitialized fixed array. It must be filled by the caller. 1870 // Allocates an uninitialized fixed array. It must be filled by the caller.
1871 MUST_USE_RESULT AllocationResult AllocateUninitializedFixedArray(int length); 1871 MUST_USE_RESULT AllocationResult AllocateUninitializedFixedArray(int length);
1872 1872
1873 // Make a copy of src and return it. 1873 // Make a copy of src and return it.
1874 MUST_USE_RESULT inline AllocationResult CopyFixedArray(FixedArray* src); 1874 MUST_USE_RESULT inline AllocationResult CopyFixedArray(FixedArray* src);
1875 1875
1876 // Make a copy of src, also grow the copy, and return the copy. 1876 // Make a copy of src, also grow the copy, and return the copy.
1877 MUST_USE_RESULT AllocationResult 1877 MUST_USE_RESULT AllocationResult
1878 CopyFixedArrayAndGrow(FixedArray* src, int grow_by, PretenureFlag pretenure); 1878 CopyFixedArrayAndGrow(FixedArray* src, int grow_by, PretenureFlag pretenure);
1879 1879
1880 // Make a copy of src, also grow the copy, and return the copy.
1881 MUST_USE_RESULT AllocationResult CopyFixedArrayUpTo(FixedArray* src,
1882 int new_len,
1883 PretenureFlag pretenure);
1884
1880 // Make a copy of src, set the map, and return the copy. 1885 // Make a copy of src, set the map, and return the copy.
1881 MUST_USE_RESULT AllocationResult 1886 MUST_USE_RESULT AllocationResult
1882 CopyFixedArrayWithMap(FixedArray* src, Map* map); 1887 CopyFixedArrayWithMap(FixedArray* src, Map* map);
1883 1888
1884 // Make a copy of src and return it. 1889 // Make a copy of src and return it.
1885 MUST_USE_RESULT inline AllocationResult CopyFixedDoubleArray( 1890 MUST_USE_RESULT inline AllocationResult CopyFixedDoubleArray(
1886 FixedDoubleArray* src); 1891 FixedDoubleArray* src);
1887 1892
1888 // Computes a single character string where the character has code. 1893 // Computes a single character string where the character has code.
1889 // A cache is used for one-byte (Latin1) codes. 1894 // A cache is used for one-byte (Latin1) codes.
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after
2630 2635
2631 private: 2636 private:
2632 friend class NewSpace; 2637 friend class NewSpace;
2633 DISALLOW_COPY_AND_ASSIGN(InlineAllocationObserver); 2638 DISALLOW_COPY_AND_ASSIGN(InlineAllocationObserver);
2634 }; 2639 };
2635 2640
2636 } // namespace internal 2641 } // namespace internal
2637 } // namespace v8 2642 } // namespace v8
2638 2643
2639 #endif // V8_HEAP_HEAP_H_ 2644 #endif // V8_HEAP_HEAP_H_
OLDNEW
« no previous file with comments | « src/factory.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698