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

Side by Side Diff: src/keys.cc

Issue 2002203002: [api] Add more parameters to Object::GetPropertyNames (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@2016-05-06_keys_fast_path_1995263002
Patch Set: reverting accidental formatting 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
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/keys.h" 5 #include "src/keys.h"
6 6
7 #include "src/api-arguments.h" 7 #include "src/api-arguments.h"
8 #include "src/elements.h" 8 #include "src/elements.h"
9 #include "src/factory.h" 9 #include "src/factory.h"
10 #include "src/identity-map.h" 10 #include "src/identity-map.h"
(...skipping 15 matching lines...) Expand all
26 for (int i = 0; i < len; i++) { 26 for (int i = 0; i < len; i++) {
27 Object* e = array->get(i); 27 Object* e = array->get(i);
28 if (!(e->IsName() || e->IsNumber())) return false; 28 if (!(e->IsName() || e->IsNumber())) return false;
29 } 29 }
30 return true; 30 return true;
31 } 31 }
32 32
33 } // namespace 33 } // namespace
34 34
35 MaybeHandle<FixedArray> KeyAccumulator::GetKeys( 35 MaybeHandle<FixedArray> KeyAccumulator::GetKeys(
36 Handle<JSReceiver> object, KeyCollectionType type, PropertyFilter filter, 36 Handle<JSReceiver> object, KeysCollectionLimit type, PropertyFilter filter,
37 GetKeysConversion keys_conversion, bool filter_proxy_keys, bool is_for_in) { 37 GetKeysConversion keys_conversion, bool filter_proxy_keys, bool is_for_in) {
38 USE(ContainsOnlyValidKeys); 38 USE(ContainsOnlyValidKeys);
39 Isolate* isolate = object->GetIsolate(); 39 Isolate* isolate = object->GetIsolate();
40 KeyAccumulator accumulator(isolate, type, filter); 40 KeyAccumulator accumulator(isolate, type, filter);
41 accumulator.set_filter_proxy_keys(filter_proxy_keys); 41 accumulator.set_filter_proxy_keys(filter_proxy_keys);
42 accumulator.set_is_for_in(is_for_in); 42 accumulator.set_is_for_in(is_for_in);
43 MAYBE_RETURN(accumulator.CollectKeys(object, object), 43 MAYBE_RETURN(accumulator.CollectKeys(object, object),
44 MaybeHandle<FixedArray>()); 44 MaybeHandle<FixedArray>());
45 Handle<FixedArray> keys = accumulator.GetKeys(keys_conversion); 45 Handle<FixedArray> keys = accumulator.GetKeys(keys_conversion);
46 DCHECK(ContainsOnlyValidKeys(keys)); 46 DCHECK(ContainsOnlyValidKeys(keys));
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 isolate_, keys, JSReceiver::OwnPropertyKeys(target), Nothing<bool>()); 729 isolate_, keys, JSReceiver::OwnPropertyKeys(target), Nothing<bool>());
730 bool prev_filter_proxy_keys_ = filter_proxy_keys_; 730 bool prev_filter_proxy_keys_ = filter_proxy_keys_;
731 filter_proxy_keys_ = false; 731 filter_proxy_keys_ = false;
732 Maybe<bool> result = AddKeysFromJSProxy(proxy, keys); 732 Maybe<bool> result = AddKeysFromJSProxy(proxy, keys);
733 filter_proxy_keys_ = prev_filter_proxy_keys_; 733 filter_proxy_keys_ = prev_filter_proxy_keys_;
734 return result; 734 return result;
735 } 735 }
736 736
737 } // namespace internal 737 } // namespace internal
738 } // namespace v8 738 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698