| OLD | NEW |
| 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/allocation-site-scopes.h" | 7 #include "src/allocation-site-scopes.h" |
| 8 #include "src/arguments.h" | 8 #include "src/arguments.h" |
| 9 #include "src/ast.h" | 9 #include "src/ast.h" |
| 10 #include "src/parser.h" | 10 #include "src/parser.h" |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 DCHECK(!fixed_array_values->get(i)->IsFixedArray()); | 184 DCHECK(!fixed_array_values->get(i)->IsFixedArray()); |
| 185 } | 185 } |
| 186 #endif | 186 #endif |
| 187 } else { | 187 } else { |
| 188 Handle<FixedArray> fixed_array_values = | 188 Handle<FixedArray> fixed_array_values = |
| 189 Handle<FixedArray>::cast(constant_elements_values); | 189 Handle<FixedArray>::cast(constant_elements_values); |
| 190 Handle<FixedArray> fixed_array_values_copy = | 190 Handle<FixedArray> fixed_array_values_copy = |
| 191 isolate->factory()->CopyFixedArray(fixed_array_values); | 191 isolate->factory()->CopyFixedArray(fixed_array_values); |
| 192 copied_elements_values = fixed_array_values_copy; | 192 copied_elements_values = fixed_array_values_copy; |
| 193 for (int i = 0; i < fixed_array_values->length(); i++) { | 193 for (int i = 0; i < fixed_array_values->length(); i++) { |
| 194 HandleScope scope(isolate); |
| 194 if (fixed_array_values->get(i)->IsFixedArray()) { | 195 if (fixed_array_values->get(i)->IsFixedArray()) { |
| 195 // The value contains the constant_properties of a | 196 // The value contains the constant_properties of a |
| 196 // simple object or array literal. | 197 // simple object or array literal. |
| 197 Handle<FixedArray> fa(FixedArray::cast(fixed_array_values->get(i))); | 198 Handle<FixedArray> fa(FixedArray::cast(fixed_array_values->get(i))); |
| 198 Handle<Object> result; | 199 Handle<Object> result; |
| 199 ASSIGN_RETURN_ON_EXCEPTION( | 200 ASSIGN_RETURN_ON_EXCEPTION( |
| 200 isolate, result, | 201 isolate, result, |
| 201 CreateLiteralBoilerplate(isolate, literals, fa, is_strong), | 202 CreateLiteralBoilerplate(isolate, literals, fa, is_strong), |
| 202 Object); | 203 Object); |
| 203 fixed_array_values_copy->set(i, *result); | 204 fixed_array_values_copy->set(i, *result); |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 JSObject::TransitionElementsKind(boilerplate_object, transitioned_kind); | 431 JSObject::TransitionElementsKind(boilerplate_object, transitioned_kind); |
| 431 } | 432 } |
| 432 } | 433 } |
| 433 FixedArray* object_array = FixedArray::cast(object->elements()); | 434 FixedArray* object_array = FixedArray::cast(object->elements()); |
| 434 object_array->set(store_index, *value); | 435 object_array->set(store_index, *value); |
| 435 } | 436 } |
| 436 return *object; | 437 return *object; |
| 437 } | 438 } |
| 438 } // namespace internal | 439 } // namespace internal |
| 439 } // namespace v8 | 440 } // namespace v8 |
| OLD | NEW |