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

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

Issue 1197133003: Move SetFastElementsCapacity into GrowCapacityAndConvert (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/runtime/runtime-array.cc ('k') | no next file » | 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/arguments.h" 7 #include "src/arguments.h"
8 #include "src/bootstrapper.h" 8 #include "src/bootstrapper.h"
9 #include "src/debug.h" 9 #include "src/debug.h"
10 #include "src/messages.h" 10 #include "src/messages.h"
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 569
570 CONVERT_ARG_HANDLE_CHECKED(JSArray, array, 0); 570 CONVERT_ARG_HANDLE_CHECKED(JSArray, array, 0);
571 CONVERT_ARG_HANDLE_CHECKED(Object, value, 1); 571 CONVERT_ARG_HANDLE_CHECKED(Object, value, 1);
572 572
573 uint32_t index; 573 uint32_t index;
574 CHECK(array->length()->ToArrayIndex(&index)); 574 CHECK(array->length()->ToArrayIndex(&index));
575 575
576 Handle<Object> result; 576 Handle<Object> result;
577 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( 577 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
578 isolate, result, JSObject::AddDataElement(array, index, value, NONE)); 578 isolate, result, JSObject::AddDataElement(array, index, value, NONE));
579 JSObject::ValidateElements(array);
579 return *array; 580 return *array;
580 } 581 }
581 582
582 583
583 RUNTIME_FUNCTION(Runtime_SetProperty) { 584 RUNTIME_FUNCTION(Runtime_SetProperty) {
584 HandleScope scope(isolate); 585 HandleScope scope(isolate);
585 RUNTIME_ASSERT(args.length() == 4); 586 RUNTIME_ASSERT(args.length() == 4);
586 587
587 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); 588 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
588 CONVERT_ARG_HANDLE_CHECKED(Object, key, 1); 589 CONVERT_ARG_HANDLE_CHECKED(Object, key, 1);
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after
1424 CONVERT_PROPERTY_ATTRIBUTES_CHECKED(attrs, 3); 1425 CONVERT_PROPERTY_ATTRIBUTES_CHECKED(attrs, 3);
1425 1426
1426 RETURN_FAILURE_ON_EXCEPTION( 1427 RETURN_FAILURE_ON_EXCEPTION(
1427 isolate, 1428 isolate,
1428 JSObject::DefineAccessor(object, name, isolate->factory()->null_value(), 1429 JSObject::DefineAccessor(object, name, isolate->factory()->null_value(),
1429 setter, attrs)); 1430 setter, attrs));
1430 return isolate->heap()->undefined_value(); 1431 return isolate->heap()->undefined_value();
1431 } 1432 }
1432 } // namespace internal 1433 } // namespace internal
1433 } // namespace v8 1434 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime-array.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698