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

Side by Side Diff: src/ic/accessor-assembler.cc

Issue 2544793002: [stubs] Cleanup storing of maps to objects. (Closed)
Patch Set: Created 4 years 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/compiler/code-assembler.cc ('k') | src/ic/keyed-store-generic.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/accessor-assembler.h" 5 #include "src/ic/accessor-assembler.h"
6 #include "src/ic/accessor-assembler-impl.h" 6 #include "src/ic/accessor-assembler-impl.h"
7 7
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/ic/handler-configuration.h" 10 #include "src/ic/handler-configuration.h"
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 Bind(&if_transition_to_constant); 583 Bind(&if_transition_to_constant);
584 { 584 {
585 // Check that constant matches value. 585 // Check that constant matches value.
586 Node* value_index_in_descriptor = 586 Node* value_index_in_descriptor =
587 DecodeWord<StoreHandler::DescriptorValueIndexBits>(handler_word); 587 DecodeWord<StoreHandler::DescriptorValueIndexBits>(handler_word);
588 Node* descriptors = LoadMapDescriptors(transition); 588 Node* descriptors = LoadMapDescriptors(transition);
589 Node* constant = LoadFixedArrayElement( 589 Node* constant = LoadFixedArrayElement(
590 descriptors, value_index_in_descriptor, 0, INTPTR_PARAMETERS); 590 descriptors, value_index_in_descriptor, 0, INTPTR_PARAMETERS);
591 GotoIf(WordNotEqual(p->value, constant), miss); 591 GotoIf(WordNotEqual(p->value, constant), miss);
592 592
593 StoreObjectField(p->receiver, JSObject::kMapOffset, transition); 593 StoreMap(p->receiver, transition);
594 Return(p->value); 594 Return(p->value);
595 } 595 }
596 } 596 }
597 } 597 }
598 598
599 void AccessorAssemblerImpl::HandleStoreICSmiHandlerCase(Node* handler_word, 599 void AccessorAssemblerImpl::HandleStoreICSmiHandlerCase(Node* handler_word,
600 Node* holder, 600 Node* holder,
601 Node* value, 601 Node* value,
602 Node* transition, 602 Node* transition,
603 Label* miss) { 603 Label* miss) {
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 Node* offset = DecodeWord<StoreHandler::FieldOffsetBits>(handler_word); 702 Node* offset = DecodeWord<StoreHandler::FieldOffsetBits>(handler_word);
703 Label if_inobject(this), if_out_of_object(this); 703 Label if_inobject(this), if_out_of_object(this);
704 Branch(IsSetWord<StoreHandler::IsInobjectBits>(handler_word), &if_inobject, 704 Branch(IsSetWord<StoreHandler::IsInobjectBits>(handler_word), &if_inobject,
705 &if_out_of_object); 705 &if_out_of_object);
706 706
707 Bind(&if_inobject); 707 Bind(&if_inobject);
708 { 708 {
709 StoreNamedField(holder, offset, true, representation, prepared_value, 709 StoreNamedField(holder, offset, true, representation, prepared_value,
710 transition_to_field); 710 transition_to_field);
711 if (transition_to_field) { 711 if (transition_to_field) {
712 StoreObjectField(holder, JSObject::kMapOffset, transition); 712 StoreMap(holder, transition);
713 } 713 }
714 Return(value); 714 Return(value);
715 } 715 }
716 716
717 Bind(&if_out_of_object); 717 Bind(&if_out_of_object);
718 { 718 {
719 StoreNamedField(holder, offset, false, representation, prepared_value, 719 StoreNamedField(holder, offset, false, representation, prepared_value,
720 transition_to_field); 720 transition_to_field);
721 if (transition_to_field) { 721 if (transition_to_field) {
722 StoreObjectField(holder, JSObject::kMapOffset, transition); 722 StoreMap(holder, transition);
723 } 723 }
724 Return(value); 724 Return(value);
725 } 725 }
726 } 726 }
727 727
728 void AccessorAssemblerImpl::EmitFastElementsBoundsCheck( 728 void AccessorAssemblerImpl::EmitFastElementsBoundsCheck(
729 Node* object, Node* elements, Node* intptr_index, 729 Node* object, Node* elements, Node* intptr_index,
730 Node* is_jsarray_condition, Label* miss) { 730 Node* is_jsarray_condition, Label* miss) {
731 Variable var_length(this, MachineType::PointerRepresentation()); 731 Variable var_length(this, MachineType::PointerRepresentation());
732 Comment("Fast elements bounds check"); 732 Comment("Fast elements bounds check");
(...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after
1764 void AccessorAssembler::GenerateKeyedStoreICTrampolineTF( 1764 void AccessorAssembler::GenerateKeyedStoreICTrampolineTF(
1765 CodeAssemblerState* state, LanguageMode language_mode) { 1765 CodeAssemblerState* state, LanguageMode language_mode) {
1766 AccessorAssemblerImpl assembler(state); 1766 AccessorAssemblerImpl assembler(state);
1767 assembler.GenerateKeyedStoreICTrampolineTF(language_mode); 1767 assembler.GenerateKeyedStoreICTrampolineTF(language_mode);
1768 } 1768 }
1769 1769
1770 #undef ACCESSOR_ASSEMBLER_PUBLIC_INTERFACE 1770 #undef ACCESSOR_ASSEMBLER_PUBLIC_INTERFACE
1771 1771
1772 } // namespace internal 1772 } // namespace internal
1773 } // namespace v8 1773 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/code-assembler.cc ('k') | src/ic/keyed-store-generic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698