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

Side by Side Diff: src/factory.cc

Issue 2270783002: Add new FrameArray type (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments Created 4 years, 3 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-symbols.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/accessors.h" 7 #include "src/accessors.h"
8 #include "src/allocation-site-scopes.h" 8 #include "src/allocation-site-scopes.h"
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 if (size > 0) { 170 if (size > 0) {
171 Handle<FixedDoubleArray> double_array = 171 Handle<FixedDoubleArray> double_array =
172 Handle<FixedDoubleArray>::cast(array); 172 Handle<FixedDoubleArray>::cast(array);
173 for (int i = 0; i < size; ++i) { 173 for (int i = 0; i < size; ++i) {
174 double_array->set_the_hole(i); 174 double_array->set_the_hole(i);
175 } 175 }
176 } 176 }
177 return array; 177 return array;
178 } 178 }
179 179
180 Handle<FrameArray> Factory::NewFrameArray(int number_of_frames,
181 PretenureFlag pretenure) {
182 DCHECK_LE(0, number_of_frames);
183 Handle<FixedArray> result =
184 NewFixedArrayWithHoles(FrameArray::LengthFor(number_of_frames));
185 result->set(FrameArray::kFrameCountIndex, Smi::FromInt(0));
186 return Handle<FrameArray>::cast(result);
187 }
180 188
181 Handle<OrderedHashSet> Factory::NewOrderedHashSet() { 189 Handle<OrderedHashSet> Factory::NewOrderedHashSet() {
182 return OrderedHashSet::Allocate(isolate(), OrderedHashSet::kMinCapacity); 190 return OrderedHashSet::Allocate(isolate(), OrderedHashSet::kMinCapacity);
183 } 191 }
184 192
185 193
186 Handle<OrderedHashMap> Factory::NewOrderedHashMap() { 194 Handle<OrderedHashMap> Factory::NewOrderedHashMap() {
187 return OrderedHashMap::Allocate(isolate(), OrderedHashMap::kMinCapacity); 195 return OrderedHashMap::Allocate(isolate(), OrderedHashMap::kMinCapacity);
188 } 196 }
189 197
(...skipping 2306 matching lines...) Expand 10 before | Expand all | Expand 10 after
2496 Handle<AccessorInfo> prototype = 2504 Handle<AccessorInfo> prototype =
2497 Accessors::FunctionPrototypeInfo(isolate(), attribs); 2505 Accessors::FunctionPrototypeInfo(isolate(), attribs);
2498 AccessorConstantDescriptor d(Handle<Name>(Name::cast(prototype->name())), 2506 AccessorConstantDescriptor d(Handle<Name>(Name::cast(prototype->name())),
2499 prototype, attribs); 2507 prototype, attribs);
2500 map->AppendDescriptor(&d); 2508 map->AppendDescriptor(&d);
2501 } 2509 }
2502 } 2510 }
2503 2511
2504 } // namespace internal 2512 } // namespace internal
2505 } // namespace v8 2513 } // namespace v8
OLDNEW
« no previous file with comments | « src/factory.h ('k') | src/heap-symbols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698