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

Side by Side Diff: src/lookup.cc

Issue 2591233002: [runtime] Add PropertyConstness bit to PropertyDetails. (Closed)
Patch Set: Addressed comments, used better name: IsGeneralizableTo Created 3 years, 11 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 | « no previous file | src/map-updater.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 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/lookup.h" 5 #include "src/lookup.h"
6 6
7 #include "src/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/deoptimizer.h" 8 #include "src/deoptimizer.h"
9 #include "src/elements.h" 9 #include "src/elements.h"
10 #include "src/field-type.h" 10 #include "src/field-type.h"
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 if (IsElement()) { 680 if (IsElement()) {
681 Handle<JSObject> object = Handle<JSObject>::cast(holder); 681 Handle<JSObject> object = Handle<JSObject>::cast(holder);
682 ElementsAccessor* accessor = object->GetElementsAccessor(); 682 ElementsAccessor* accessor = object->GetElementsAccessor();
683 accessor->Set(object, number_, *value); 683 accessor->Set(object, number_, *value);
684 } else if (holder->HasFastProperties()) { 684 } else if (holder->HasFastProperties()) {
685 if (property_details_.location() == kField) { 685 if (property_details_.location() == kField) {
686 JSObject::cast(*holder)->WriteToField(descriptor_number(), 686 JSObject::cast(*holder)->WriteToField(descriptor_number(),
687 property_details_, *value); 687 property_details_, *value);
688 } else { 688 } else {
689 DCHECK_EQ(kDescriptor, property_details_.location()); 689 DCHECK_EQ(kDescriptor, property_details_.location());
690 DCHECK_EQ(kConst, property_details_.constness());
690 } 691 }
691 } else if (holder->IsJSGlobalObject()) { 692 } else if (holder->IsJSGlobalObject()) {
692 GlobalDictionary* dictionary = JSObject::cast(*holder)->global_dictionary(); 693 GlobalDictionary* dictionary = JSObject::cast(*holder)->global_dictionary();
693 Object* cell = dictionary->ValueAt(dictionary_entry()); 694 Object* cell = dictionary->ValueAt(dictionary_entry());
694 DCHECK(cell->IsPropertyCell()); 695 DCHECK(cell->IsPropertyCell());
695 PropertyCell::cast(cell)->set_value(*value); 696 PropertyCell::cast(cell)->set_value(*value);
696 } else { 697 } else {
697 NameDictionary* dictionary = holder->property_dictionary(); 698 NameDictionary* dictionary = holder->property_dictionary();
698 dictionary->ValueAtPut(dictionary_entry(), *value); 699 dictionary->ValueAtPut(dictionary_entry(), *value);
699 } 700 }
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 873
873 // We have found a cached property! Modify the iterator accordingly. 874 // We have found a cached property! Modify the iterator accordingly.
874 name_ = maybe_name.ToHandleChecked(); 875 name_ = maybe_name.ToHandleChecked();
875 Restart(); 876 Restart();
876 CHECK_EQ(state(), LookupIterator::DATA); 877 CHECK_EQ(state(), LookupIterator::DATA);
877 return true; 878 return true;
878 } 879 }
879 880
880 } // namespace internal 881 } // namespace internal
881 } // namespace v8 882 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/map-updater.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698