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

Side by Side Diff: src/keys.cc

Issue 2394213003: Named all zones in the project (Closed)
Patch Set: Merge branch 'master' into zonenames Created 4 years, 2 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/json-parser.cc ('k') | src/objects.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 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 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 // (No-op, just keep it in |target_keys|.) 787 // (No-op, just keep it in |target_keys|.)
788 } 788 }
789 } 789 }
790 // 15. If extensibleTarget is true and targetNonconfigurableKeys is empty, 790 // 15. If extensibleTarget is true and targetNonconfigurableKeys is empty,
791 // then: 791 // then:
792 if (extensible_target && nonconfigurable_keys_length == 0) { 792 if (extensible_target && nonconfigurable_keys_length == 0) {
793 // 15a. Return trapResult. 793 // 15a. Return trapResult.
794 return AddKeysFromJSProxy(proxy, trap_result); 794 return AddKeysFromJSProxy(proxy, trap_result);
795 } 795 }
796 // 16. Let uncheckedResultKeys be a new List which is a copy of trapResult. 796 // 16. Let uncheckedResultKeys be a new List which is a copy of trapResult.
797 Zone set_zone(isolate_->allocator()); 797 Zone set_zone(isolate_->allocator(), ZONE_NAME);
798 const int kPresent = 1; 798 const int kPresent = 1;
799 const int kGone = 0; 799 const int kGone = 0;
800 IdentityMap<int> unchecked_result_keys(isolate_->heap(), &set_zone); 800 IdentityMap<int> unchecked_result_keys(isolate_->heap(), &set_zone);
801 int unchecked_result_keys_size = 0; 801 int unchecked_result_keys_size = 0;
802 for (int i = 0; i < trap_result->length(); ++i) { 802 for (int i = 0; i < trap_result->length(); ++i) {
803 DCHECK(trap_result->get(i)->IsUniqueName()); 803 DCHECK(trap_result->get(i)->IsUniqueName());
804 Object* key = trap_result->get(i); 804 Object* key = trap_result->get(i);
805 int* entry = unchecked_result_keys.Get(key); 805 int* entry = unchecked_result_keys.Get(key);
806 if (*entry != kPresent) { 806 if (*entry != kPresent) {
807 *entry = kPresent; 807 *entry = kPresent;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 isolate_, keys, 862 isolate_, keys,
863 KeyAccumulator::GetKeys(target, KeyCollectionMode::kOwnOnly, filter_, 863 KeyAccumulator::GetKeys(target, KeyCollectionMode::kOwnOnly, filter_,
864 GetKeysConversion::kConvertToString, is_for_in_), 864 GetKeysConversion::kConvertToString, is_for_in_),
865 Nothing<bool>()); 865 Nothing<bool>());
866 Maybe<bool> result = AddKeysFromJSProxy(proxy, keys); 866 Maybe<bool> result = AddKeysFromJSProxy(proxy, keys);
867 return result; 867 return result;
868 } 868 }
869 869
870 } // namespace internal 870 } // namespace internal
871 } // namespace v8 871 } // namespace v8
OLDNEW
« no previous file with comments | « src/json-parser.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698