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

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

Issue 2010593002: Revert of [keys] Simplify KeyAccumulator (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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-forin.cc ('k') | test/cctest/test-api-interceptors.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/runtime/runtime-utils.h" 5 #include "src/runtime/runtime-utils.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/debug.h" 9 #include "src/debug/debug.h"
10 #include "src/isolate-inl.h" 10 #include "src/isolate-inl.h"
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 RUNTIME_FUNCTION(Runtime_GetOwnPropertyKeys) { 556 RUNTIME_FUNCTION(Runtime_GetOwnPropertyKeys) {
557 HandleScope scope(isolate); 557 HandleScope scope(isolate);
558 DCHECK(args.length() == 2); 558 DCHECK(args.length() == 2);
559 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, object, 0); 559 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, object, 0);
560 CONVERT_SMI_ARG_CHECKED(filter_value, 1); 560 CONVERT_SMI_ARG_CHECKED(filter_value, 1);
561 PropertyFilter filter = static_cast<PropertyFilter>(filter_value); 561 PropertyFilter filter = static_cast<PropertyFilter>(filter_value);
562 562
563 Handle<FixedArray> keys; 563 Handle<FixedArray> keys;
564 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( 564 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
565 isolate, keys, 565 isolate, keys,
566 KeyAccumulator::GetKeys(object, OWN_ONLY, filter, CONVERT_TO_STRING)); 566 JSReceiver::GetKeys(object, OWN_ONLY, filter, CONVERT_TO_STRING));
567 567
568 return *isolate->factory()->NewJSArrayWithElements(keys); 568 return *isolate->factory()->NewJSArrayWithElements(keys);
569 } 569 }
570 570
571 571
572 // Return information on whether an object has a named or indexed interceptor. 572 // Return information on whether an object has a named or indexed interceptor.
573 // args[0]: object 573 // args[0]: object
574 RUNTIME_FUNCTION(Runtime_GetInterceptorInfo) { 574 RUNTIME_FUNCTION(Runtime_GetInterceptorInfo) {
575 HandleScope scope(isolate); 575 HandleScope scope(isolate);
576 DCHECK(args.length() == 1); 576 DCHECK(args.length() == 1);
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
973 isolate, o, key, &success, LookupIterator::OWN); 973 isolate, o, key, &success, LookupIterator::OWN);
974 if (!success) return isolate->heap()->exception(); 974 if (!success) return isolate->heap()->exception();
975 MAYBE_RETURN( 975 MAYBE_RETURN(
976 JSReceiver::CreateDataProperty(&it, value, Object::THROW_ON_ERROR), 976 JSReceiver::CreateDataProperty(&it, value, Object::THROW_ON_ERROR),
977 isolate->heap()->exception()); 977 isolate->heap()->exception());
978 return *value; 978 return *value;
979 } 979 }
980 980
981 } // namespace internal 981 } // namespace internal
982 } // namespace v8 982 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime-forin.cc ('k') | test/cctest/test-api-interceptors.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698