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

Side by Side Diff: src/factory.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/builtins.cc ('k') | src/factory.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_FACTORY_H_ 5 #ifndef V8_FACTORY_H_
6 #define V8_FACTORY_H_ 6 #define V8_FACTORY_H_
7 7
8 #include "src/isolate.h" 8 #include "src/isolate.h"
9 #include "src/messages.h" 9 #include "src/messages.h"
10 #include "src/type-feedback-vector.h" 10 #include "src/type-feedback-vector.h"
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 Handle<JSObject> CopyJSObjectWithAllocationSite(Handle<JSObject> object, 316 Handle<JSObject> CopyJSObjectWithAllocationSite(Handle<JSObject> object,
317 Handle<AllocationSite> site); 317 Handle<AllocationSite> site);
318 318
319 Handle<FixedArray> CopyFixedArrayWithMap(Handle<FixedArray> array, 319 Handle<FixedArray> CopyFixedArrayWithMap(Handle<FixedArray> array,
320 Handle<Map> map); 320 Handle<Map> map);
321 321
322 Handle<FixedArray> CopyFixedArrayAndGrow( 322 Handle<FixedArray> CopyFixedArrayAndGrow(
323 Handle<FixedArray> array, int grow_by, 323 Handle<FixedArray> array, int grow_by,
324 PretenureFlag pretenure = NOT_TENURED); 324 PretenureFlag pretenure = NOT_TENURED);
325 325
326 Handle<FixedArray> CopyFixedArrayUpTo(Handle<FixedArray> array, int new_len,
327 PretenureFlag pretenure = NOT_TENURED);
328
326 Handle<FixedArray> CopyFixedArray(Handle<FixedArray> array); 329 Handle<FixedArray> CopyFixedArray(Handle<FixedArray> array);
327 330
328 // This method expects a COW array in new space, and creates a copy 331 // This method expects a COW array in new space, and creates a copy
329 // of it in old space. 332 // of it in old space.
330 Handle<FixedArray> CopyAndTenureFixedCOWArray(Handle<FixedArray> array); 333 Handle<FixedArray> CopyAndTenureFixedCOWArray(Handle<FixedArray> array);
331 334
332 Handle<FixedDoubleArray> CopyFixedDoubleArray( 335 Handle<FixedDoubleArray> CopyFixedDoubleArray(
333 Handle<FixedDoubleArray> array); 336 Handle<FixedDoubleArray> array);
334 337
335 // Numbers (e.g. literals) are pretenured by the parser. 338 // Numbers (e.g. literals) are pretenured by the parser.
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 // Create a JSArray with no elements and no length. 701 // Create a JSArray with no elements and no length.
699 Handle<JSArray> NewJSArray(ElementsKind elements_kind, 702 Handle<JSArray> NewJSArray(ElementsKind elements_kind,
700 Strength strength = Strength::WEAK, 703 Strength strength = Strength::WEAK,
701 PretenureFlag pretenure = NOT_TENURED); 704 PretenureFlag pretenure = NOT_TENURED);
702 }; 705 };
703 706
704 } // namespace internal 707 } // namespace internal
705 } // namespace v8 708 } // namespace v8
706 709
707 #endif // V8_FACTORY_H_ 710 #endif // V8_FACTORY_H_
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698