Index: src/objects.cc |
=================================================================== |
--- src/objects.cc (revision 8931) |
+++ src/objects.cc (working copy) |
@@ -4637,7 +4637,20 @@ |
MaybeObject* FixedArray::AddKeysFromJSArray(JSArray* array) { |
- return array->GetElementsAccessor()->AddJSArrayKeysToFixedArray(array, this); |
+ ElementsAccessor* accessor = array->GetElementsAccessor(); |
+ MaybeObject* maybe_result = |
+ accessor->AddElementsToFixedArray(array->elements(), this); |
+ FixedArray* result; |
+ if (!maybe_result->To<FixedArray>(&result)) return maybe_result; |
+#ifdef DEBUG |
+ if (FLAG_enable_slow_asserts) { |
+ for (int i = 0; i < result->length(); i++) { |
+ Object* current = result->get(i); |
+ ASSERT(current->IsNumber() || current->IsString()); |
+ } |
+ } |
+#endif |
+ return result; |
} |
@@ -6961,12 +6974,16 @@ |
PrintF(out, "Deoptimization Input Data (deopt points = %d)\n", deopt_count); |
if (0 == deopt_count) return; |
- PrintF(out, "%6s %6s %6s %12s\n", "index", "ast id", "argc", "commands"); |
+ PrintF(out, "%6s %6s %6s %12s\n", "index", "ast id", "argc", |
+ FLAG_print_code_verbose ? "commands" : ""); |
for (int i = 0; i < deopt_count; i++) { |
PrintF(out, "%6d %6d %6d", |
i, AstId(i)->value(), ArgumentsStackHeight(i)->value()); |
- if (!FLAG_print_code_verbose) continue; |
+ if (!FLAG_print_code_verbose) { |
+ PrintF(out, "\n"); |
+ continue; |
+ } |
// Print details of the frame translation. |
int translation_index = TranslationIndex(i)->value(); |
TranslationIterator iterator(TranslationByteArray(), translation_index); |
@@ -8403,14 +8420,14 @@ |
return isolate->Throw(*error); |
} |
} |
- Object* new_dictionary; |
+ FixedArrayBase* new_dictionary; |
MaybeObject* maybe = dictionary->AtNumberPut(index, value); |
- if (!maybe->ToObject(&new_dictionary)) return maybe; |
+ if (!maybe->To<FixedArrayBase>(&new_dictionary)) return maybe; |
if (dictionary != NumberDictionary::cast(new_dictionary)) { |
if (is_arguments) { |
elements->set(1, new_dictionary); |
} else { |
- set_elements(HeapObject::cast(new_dictionary)); |
+ set_elements(new_dictionary); |
} |
dictionary = NumberDictionary::cast(new_dictionary); |
} |