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

Unified Diff: src/factory.cc

Issue 2517153002: Introduce set_the_hole(Isolate*, int) and friends (Closed)
Patch Set: merged with master Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/elements.cc ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index 3e812d56e30a87449eaab456869c60f9bad2439a..958adcfa296e76faf37f2f2782bccabf72c8874b 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -183,11 +183,7 @@ Handle<FixedArrayBase> Factory::NewFixedDoubleArrayWithHoles(
DCHECK(0 <= size);
Handle<FixedArrayBase> array = NewFixedDoubleArray(size, pretenure);
if (size > 0) {
- Handle<FixedDoubleArray> double_array =
- Handle<FixedDoubleArray>::cast(array);
- for (int i = 0; i < size; ++i) {
- double_array->set_the_hole(i);
- }
+ Handle<FixedDoubleArray>::cast(array)->FillWithHoles(0, size);
}
return array;
}
« no previous file with comments | « src/elements.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698