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

Side by Side Diff: src/ic/keyed-store-generic.cc

Issue 2626893005: Revert of Internalize strings in-place (Closed)
Patch Set: rebased 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 | « src/ic/ic.cc ('k') | src/mips/code-stubs-mips.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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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/ic/keyed-store-generic.h" 5 #include "src/ic/keyed-store-generic.h"
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stub-assembler.h" 8 #include "src/code-stub-assembler.h"
9 #include "src/contexts.h" 9 #include "src/contexts.h"
10 #include "src/ic/accessor-assembler-impl.h" 10 #include "src/ic/accessor-assembler-impl.h"
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 454
455 Bind(&if_bump_length_with_gap); 455 Bind(&if_bump_length_with_gap);
456 { 456 {
457 StoreElementWithCapacity(receiver, receiver_map, elements, elements_kind, 457 StoreElementWithCapacity(receiver, receiver_map, elements, elements_kind,
458 intptr_index, value, context, slow, 458 intptr_index, value, context, slow,
459 kBumpLengthWithGap); 459 kBumpLengthWithGap);
460 } 460 }
461 461
462 // Out-of-capacity accesses (index >= capacity) jump here. Additionally, 462 // Out-of-capacity accesses (index >= capacity) jump here. Additionally,
463 // an ElementsKind transition might be necessary. 463 // an ElementsKind transition might be necessary.
464 // The index can also be negative at this point! Jump to the runtime in that
465 // case to convert it to a named property.
466 Bind(&if_grow); 464 Bind(&if_grow);
467 { 465 {
468 Comment("Grow backing store"); 466 Comment("Grow backing store");
469 // TODO(jkummerow): Support inline backing store growth. 467 // TODO(jkummerow): Support inline backing store growth.
470 Goto(slow); 468 Goto(slow);
471 } 469 }
472 470
473 // Any ElementsKind > LAST_FAST_ELEMENTS_KIND jumps here for further dispatch. 471 // Any ElementsKind > LAST_FAST_ELEMENTS_KIND jumps here for further dispatch.
474 Bind(&if_nonfast); 472 Bind(&if_nonfast);
475 { 473 {
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 typedef StoreWithVectorDescriptor Descriptor; 749 typedef StoreWithVectorDescriptor Descriptor;
752 750
753 Node* receiver = Parameter(Descriptor::kReceiver); 751 Node* receiver = Parameter(Descriptor::kReceiver);
754 Node* name = Parameter(Descriptor::kName); 752 Node* name = Parameter(Descriptor::kName);
755 Node* value = Parameter(Descriptor::kValue); 753 Node* value = Parameter(Descriptor::kValue);
756 Node* slot = Parameter(Descriptor::kSlot); 754 Node* slot = Parameter(Descriptor::kSlot);
757 Node* vector = Parameter(Descriptor::kVector); 755 Node* vector = Parameter(Descriptor::kVector);
758 Node* context = Parameter(Descriptor::kContext); 756 Node* context = Parameter(Descriptor::kContext);
759 757
760 Variable var_index(this, MachineType::PointerRepresentation()); 758 Variable var_index(this, MachineType::PointerRepresentation());
761 Variable var_unique(this, MachineRepresentation::kTagged);
762 var_unique.Bind(name); // Dummy initialization.
763 Label if_index(this), if_unique_name(this), slow(this); 759 Label if_index(this), if_unique_name(this), slow(this);
764 760
765 GotoIf(TaggedIsSmi(receiver), &slow); 761 GotoIf(TaggedIsSmi(receiver), &slow);
766 Node* receiver_map = LoadMap(receiver); 762 Node* receiver_map = LoadMap(receiver);
767 Node* instance_type = LoadMapInstanceType(receiver_map); 763 Node* instance_type = LoadMapInstanceType(receiver_map);
768 // Receivers requiring non-standard element accesses (interceptors, access 764 // Receivers requiring non-standard element accesses (interceptors, access
769 // checks, strings and string wrappers, proxies) are handled in the runtime. 765 // checks, strings and string wrappers, proxies) are handled in the runtime.
770 GotoIf(Int32LessThanOrEqual(instance_type, 766 GotoIf(Int32LessThanOrEqual(instance_type,
771 Int32Constant(LAST_CUSTOM_ELEMENTS_RECEIVER)), 767 Int32Constant(LAST_CUSTOM_ELEMENTS_RECEIVER)),
772 &slow); 768 &slow);
773 769
774 TryToName(name, &if_index, &var_index, &if_unique_name, &var_unique, &slow); 770 TryToName(name, &if_index, &var_index, &if_unique_name, &slow);
775 771
776 Bind(&if_index); 772 Bind(&if_index);
777 { 773 {
778 Comment("integer index"); 774 Comment("integer index");
779 EmitGenericElementStore(receiver, receiver_map, instance_type, 775 EmitGenericElementStore(receiver, receiver_map, instance_type,
780 var_index.value(), value, context, &slow); 776 var_index.value(), value, context, &slow);
781 } 777 }
782 778
783 Bind(&if_unique_name); 779 Bind(&if_unique_name);
784 { 780 {
785 Comment("key is unique name"); 781 Comment("key is unique name");
786 StoreICParameters p(context, receiver, var_unique.value(), value, slot, 782 KeyedStoreGenericAssembler::StoreICParameters p(context, receiver, name,
787 vector); 783 value, slot, vector);
788 EmitGenericPropertyStore(receiver, receiver_map, &p, &slow, language_mode); 784 EmitGenericPropertyStore(receiver, receiver_map, &p, &slow, language_mode);
789 } 785 }
790 786
791 Bind(&slow); 787 Bind(&slow);
792 { 788 {
793 Comment("KeyedStoreGeneric_slow"); 789 Comment("KeyedStoreGeneric_slow");
794 TailCallRuntime(Runtime::kSetProperty, context, receiver, name, value, 790 TailCallRuntime(Runtime::kSetProperty, context, receiver, name, value,
795 SmiConstant(language_mode)); 791 SmiConstant(language_mode));
796 } 792 }
797 } 793 }
798 794
799 } // namespace internal 795 } // namespace internal
800 } // namespace v8 796 } // namespace v8
OLDNEW
« no previous file with comments | « src/ic/ic.cc ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698