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

Side by Side Diff: src/factory.cc

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.h ('k') | src/heap/heap.h » ('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 #include "src/factory.h" 5 #include "src/factory.h"
6 6
7 #include "src/allocation-site-scopes.h" 7 #include "src/allocation-site-scopes.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/conversions.h" 10 #include "src/conversions.h"
(...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after
1034 1034
1035 1035
1036 Handle<FixedArray> Factory::CopyFixedArrayAndGrow(Handle<FixedArray> array, 1036 Handle<FixedArray> Factory::CopyFixedArrayAndGrow(Handle<FixedArray> array,
1037 int grow_by, 1037 int grow_by,
1038 PretenureFlag pretenure) { 1038 PretenureFlag pretenure) {
1039 CALL_HEAP_FUNCTION(isolate(), isolate()->heap()->CopyFixedArrayAndGrow( 1039 CALL_HEAP_FUNCTION(isolate(), isolate()->heap()->CopyFixedArrayAndGrow(
1040 *array, grow_by, pretenure), 1040 *array, grow_by, pretenure),
1041 FixedArray); 1041 FixedArray);
1042 } 1042 }
1043 1043
1044 Handle<FixedArray> Factory::CopyFixedArrayUpTo(Handle<FixedArray> array,
1045 int new_len,
1046 PretenureFlag pretenure) {
1047 CALL_HEAP_FUNCTION(isolate(), isolate()->heap()->CopyFixedArrayUpTo(
1048 *array, new_len, pretenure),
1049 FixedArray);
1050 }
1044 1051
1045 Handle<FixedArray> Factory::CopyFixedArray(Handle<FixedArray> array) { 1052 Handle<FixedArray> Factory::CopyFixedArray(Handle<FixedArray> array) {
1046 CALL_HEAP_FUNCTION(isolate(), 1053 CALL_HEAP_FUNCTION(isolate(),
1047 isolate()->heap()->CopyFixedArray(*array), 1054 isolate()->heap()->CopyFixedArray(*array),
1048 FixedArray); 1055 FixedArray);
1049 } 1056 }
1050 1057
1051 1058
1052 Handle<FixedArray> Factory::CopyAndTenureFixedCOWArray( 1059 Handle<FixedArray> Factory::CopyAndTenureFixedCOWArray(
1053 Handle<FixedArray> array) { 1060 Handle<FixedArray> array) {
(...skipping 1336 matching lines...) Expand 10 before | Expand all | Expand 10 after
2390 } 2397 }
2391 2398
2392 2399
2393 Handle<Object> Factory::ToBoolean(bool value) { 2400 Handle<Object> Factory::ToBoolean(bool value) {
2394 return value ? true_value() : false_value(); 2401 return value ? true_value() : false_value();
2395 } 2402 }
2396 2403
2397 2404
2398 } // namespace internal 2405 } // namespace internal
2399 } // namespace v8 2406 } // namespace v8
OLDNEW
« no previous file with comments | « src/factory.h ('k') | src/heap/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698