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); | |
195 if (fixed_array_values->get(i)->IsFixedArray()) { | 194 if (fixed_array_values->get(i)->IsFixedArray()) { |
196 // The value contains the constant_properties of a | 195 // The value contains the constant_properties of a |
197 // simple object or array literal. | 196 // simple object or array literal. |
198 Handle<FixedArray> fa(FixedArray::cast(fixed_array_values->get(i))); | 197 Handle<FixedArray> fa(FixedArray::cast(fixed_array_values->get(i))); |
199 Handle<Object> result; | 198 Handle<Object> result; |
200 ASSIGN_RETURN_ON_EXCEPTION( | 199 ASSIGN_RETURN_ON_EXCEPTION( |
201 isolate, result, | 200 isolate, result, |
202 CreateLiteralBoilerplate(isolate, literals, fa, is_strong), | 201 CreateLiteralBoilerplate(isolate, literals, fa, is_strong), |
203 Object); | 202 Object); |
204 fixed_array_values_copy->set(i, *result); | 203 fixed_array_values_copy->set(i, *result); |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 JSObject::TransitionElementsKind(boilerplate_object, transitioned_kind); | 430 JSObject::TransitionElementsKind(boilerplate_object, transitioned_kind); |
432 } | 431 } |
433 } | 432 } |
434 FixedArray* object_array = FixedArray::cast(object->elements()); | 433 FixedArray* object_array = FixedArray::cast(object->elements()); |
435 object_array->set(store_index, *value); | 434 object_array->set(store_index, *value); |
436 } | 435 } |
437 return *object; | 436 return *object; |
438 } | 437 } |
439 } // namespace internal | 438 } // namespace internal |
440 } // namespace v8 | 439 } // namespace v8 |
OLD | NEW |