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

Unified Diff: src/elements.cc

Issue 1372533002: [elements.cc] Clean up CopyDoubleToObjectElements (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/elements.cc
diff --git a/src/elements.cc b/src/elements.cc
index 1a0acf0d69f98659db2d10f136357d8bf611d8f5..4a8308128bd6cf9616aaa207cbc6c1896edacddb 100644
--- a/src/elements.cc
+++ b/src/elements.cc
@@ -210,9 +210,7 @@ static void CopyDictionaryToObjectElements(
static void CopyDoubleToObjectElements(FixedArrayBase* from_base,
uint32_t from_start,
FixedArrayBase* to_base,
- ElementsKind to_kind, uint32_t to_start,
- int raw_copy_size) {
- DCHECK(IsFastSmiOrObjectElementsKind(to_kind));
+ uint32_t to_start, int raw_copy_size) {
int copy_size = raw_copy_size;
if (raw_copy_size < 0) {
DisallowHeapAllocation no_allocation;
@@ -252,13 +250,8 @@ static void CopyDoubleToObjectElements(FixedArrayBase* from_base,
HandleScope scope(isolate);
offset += 100;
for (int i = offset - 100; i < offset && i < copy_size; ++i) {
- if (IsFastSmiElementsKind(to_kind)) {
- UNIMPLEMENTED();
- } else {
- DCHECK(IsFastObjectElementsKind(to_kind));
- Handle<Object> value = FixedDoubleArray::get(from, i + from_start);
- to->set(i + to_start, *value, UPDATE_WRITE_BARRIER);
- }
+ Handle<Object> value = FixedDoubleArray::get(from, i + from_start);
+ to->set(i + to_start, *value, UPDATE_WRITE_BARRIER);
}
}
}
@@ -1550,8 +1543,8 @@ class FastSmiOrObjectElementsAccessor
case FAST_DOUBLE_ELEMENTS:
case FAST_HOLEY_DOUBLE_ELEMENTS: {
AllowHeapAllocation allow_allocation;
- CopyDoubleToObjectElements(
- from, from_start, to, to_kind, to_start, copy_size);
+ DCHECK(IsFastObjectElementsKind(to_kind));
+ CopyDoubleToObjectElements(from, from_start, to, to_start, copy_size);
break;
}
case DICTIONARY_ELEMENTS:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698