| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |