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 2396353002: Revert "Add Smi::Zero and replace all Smi::FromInt(0) calls" (Closed)
Patch Set: 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/isolate.cc ('k') | src/layout-descriptor-inl.h » ('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 762 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 Maybe<bool> found = JSReceiver::GetOwnPropertyDescriptor( 773 Maybe<bool> found = JSReceiver::GetOwnPropertyDescriptor(
774 isolate_, target, handle(target_keys->get(i), isolate_), &desc); 774 isolate_, target, handle(target_keys->get(i), isolate_), &desc);
775 MAYBE_RETURN(found, Nothing<bool>()); 775 MAYBE_RETURN(found, Nothing<bool>());
776 // 14b. If desc is not undefined and desc.[[Configurable]] is false, then 776 // 14b. If desc is not undefined and desc.[[Configurable]] is false, then
777 if (found.FromJust() && !desc.configurable()) { 777 if (found.FromJust() && !desc.configurable()) {
778 // 14b i. Append key as an element of targetNonconfigurableKeys. 778 // 14b i. Append key as an element of targetNonconfigurableKeys.
779 target_nonconfigurable_keys->set(nonconfigurable_keys_length, 779 target_nonconfigurable_keys->set(nonconfigurable_keys_length,
780 target_keys->get(i)); 780 target_keys->get(i));
781 nonconfigurable_keys_length++; 781 nonconfigurable_keys_length++;
782 // The key was moved, null it out in the original list. 782 // The key was moved, null it out in the original list.
783 target_keys->set(i, Smi::kZero); 783 target_keys->set(i, Smi::FromInt(0));
784 } else { 784 } else {
785 // 14c. Else, 785 // 14c. Else,
786 // 14c i. Append key as an element of targetConfigurableKeys. 786 // 14c i. Append key as an element of targetConfigurableKeys.
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.
(...skipping 68 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/isolate.cc ('k') | src/layout-descriptor-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698