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

Side by Side Diff: src/runtime/runtime-literals.cc

Issue 1194873004: Revert of Additional HandleScopes to limit Handle consumption. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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 unified diff | Download patch
« no previous file with comments | « src/heap/heap.cc ('k') | test/cctest/test-types.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | test/cctest/test-types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698