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 #ifndef V8_CODE_STUB_ASSEMBLER_H_ | 5 #ifndef V8_CODE_STUB_ASSEMBLER_H_ |
6 #define V8_CODE_STUB_ASSEMBLER_H_ | 6 #define V8_CODE_STUB_ASSEMBLER_H_ |
7 | 7 |
8 #include <functional> | 8 #include <functional> |
9 | 9 |
10 #include "src/compiler/code-assembler.h" | 10 #include "src/compiler/code-assembler.h" |
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
630 Variable* var_handler, Label* if_miss); | 630 Variable* var_handler, Label* if_miss); |
631 | 631 |
632 compiler::Node* PrepareValueForWrite(compiler::Node* value, | 632 compiler::Node* PrepareValueForWrite(compiler::Node* value, |
633 Representation representation, | 633 Representation representation, |
634 Label* bailout); | 634 Label* bailout); |
635 | 635 |
636 void StoreNamedField(compiler::Node* object, FieldIndex index, | 636 void StoreNamedField(compiler::Node* object, FieldIndex index, |
637 Representation representation, compiler::Node* value, | 637 Representation representation, compiler::Node* value, |
638 bool transition_to_field); | 638 bool transition_to_field); |
639 | 639 |
| 640 // Emits keyed sloppy arguments load. Returns either the loaded value. |
| 641 compiler::Node* LoadKeyedSloppyArguments(compiler::Node* receiver, |
| 642 compiler::Node* key, |
| 643 Label* bailout) { |
| 644 return EmitKeyedSloppyArguments(receiver, key, nullptr, bailout); |
| 645 } |
| 646 |
| 647 // Emits keyed sloppy arguments store. |
| 648 void StoreKeyedSloppyArguments(compiler::Node* receiver, compiler::Node* key, |
| 649 compiler::Node* value, Label* bailout) { |
| 650 DCHECK_NOT_NULL(value); |
| 651 EmitKeyedSloppyArguments(receiver, key, value, bailout); |
| 652 } |
| 653 |
640 void LoadIC(const LoadICParameters* p); | 654 void LoadIC(const LoadICParameters* p); |
641 void LoadGlobalIC(const LoadICParameters* p); | 655 void LoadGlobalIC(const LoadICParameters* p); |
642 void KeyedLoadIC(const LoadICParameters* p); | 656 void KeyedLoadIC(const LoadICParameters* p); |
643 void KeyedLoadICGeneric(const LoadICParameters* p); | 657 void KeyedLoadICGeneric(const LoadICParameters* p); |
644 | 658 |
645 // Get the enumerable length from |map| and return the result as a Smi. | 659 // Get the enumerable length from |map| and return the result as a Smi. |
646 compiler::Node* EnumLength(compiler::Node* map); | 660 compiler::Node* EnumLength(compiler::Node* map); |
647 | 661 |
648 // Check the cache validity for |receiver|. Branch to |use_cache| if | 662 // Check the cache validity for |receiver|. Branch to |use_cache| if |
649 // the cache is valid, otherwise branch to |use_runtime|. | 663 // the cache is valid, otherwise branch to |use_runtime|. |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
694 AllocationFlags flags, | 708 AllocationFlags flags, |
695 compiler::Node* top_address, | 709 compiler::Node* top_address, |
696 compiler::Node* limit_address); | 710 compiler::Node* limit_address); |
697 compiler::Node* AllocateRawUnaligned(compiler::Node* size_in_bytes, | 711 compiler::Node* AllocateRawUnaligned(compiler::Node* size_in_bytes, |
698 AllocationFlags flags, | 712 AllocationFlags flags, |
699 compiler::Node* top_adddress, | 713 compiler::Node* top_adddress, |
700 compiler::Node* limit_address); | 714 compiler::Node* limit_address); |
701 | 715 |
702 compiler::Node* SmiShiftBitsConstant(); | 716 compiler::Node* SmiShiftBitsConstant(); |
703 | 717 |
| 718 // Emits keyed sloppy arguments load if the |value| is nullptr or store |
| 719 // otherwise. Returns either the loaded value or |value|. |
| 720 compiler::Node* EmitKeyedSloppyArguments(compiler::Node* receiver, |
| 721 compiler::Node* key, |
| 722 compiler::Node* value, |
| 723 Label* bailout); |
| 724 |
704 static const int kElementLoopUnrollThreshold = 8; | 725 static const int kElementLoopUnrollThreshold = 8; |
705 }; | 726 }; |
706 | 727 |
707 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); | 728 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); |
708 | 729 |
709 } // namespace internal | 730 } // namespace internal |
710 } // namespace v8 | 731 } // namespace v8 |
711 #endif // V8_CODE_STUB_ASSEMBLER_H_ | 732 #endif // V8_CODE_STUB_ASSEMBLER_H_ |
OLD | NEW |