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

Side by Side Diff: src/factory.cc

Issue 1255173006: Introduce safe interface to "copy and grow" FixedArray. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed nits. Created 5 years, 4 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 960 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 971
972 972
973 Handle<FixedArray> Factory::CopyFixedArrayWithMap(Handle<FixedArray> array, 973 Handle<FixedArray> Factory::CopyFixedArrayWithMap(Handle<FixedArray> array,
974 Handle<Map> map) { 974 Handle<Map> map) {
975 CALL_HEAP_FUNCTION(isolate(), 975 CALL_HEAP_FUNCTION(isolate(),
976 isolate()->heap()->CopyFixedArrayWithMap(*array, *map), 976 isolate()->heap()->CopyFixedArrayWithMap(*array, *map),
977 FixedArray); 977 FixedArray);
978 } 978 }
979 979
980 980
981 Handle<FixedArray> Factory::CopyFixedArrayAndGrow(Handle<FixedArray> array,
982 int grow_by) {
983 CALL_HEAP_FUNCTION(isolate(),
984 isolate()->heap()->CopyFixedArrayAndGrow(*array, grow_by),
985 FixedArray);
986 }
987
988
981 Handle<FixedArray> Factory::CopyFixedArray(Handle<FixedArray> array) { 989 Handle<FixedArray> Factory::CopyFixedArray(Handle<FixedArray> array) {
982 CALL_HEAP_FUNCTION(isolate(), 990 CALL_HEAP_FUNCTION(isolate(),
983 isolate()->heap()->CopyFixedArray(*array), 991 isolate()->heap()->CopyFixedArray(*array),
984 FixedArray); 992 FixedArray);
985 } 993 }
986 994
987 995
988 Handle<FixedArray> Factory::CopyAndTenureFixedCOWArray( 996 Handle<FixedArray> Factory::CopyAndTenureFixedCOWArray(
989 Handle<FixedArray> array) { 997 Handle<FixedArray> array) {
990 DCHECK(isolate()->heap()->InNewSpace(*array)); 998 DCHECK(isolate()->heap()->InNewSpace(*array));
(...skipping 1473 matching lines...) Expand 10 before | Expand all | Expand 10 after
2464 } 2472 }
2465 2473
2466 2474
2467 Handle<Object> Factory::ToBoolean(bool value) { 2475 Handle<Object> Factory::ToBoolean(bool value) {
2468 return value ? true_value() : false_value(); 2476 return value ? true_value() : false_value();
2469 } 2477 }
2470 2478
2471 2479
2472 } // namespace internal 2480 } // namespace internal
2473 } // namespace v8 2481 } // 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