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 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
641 // Emits keyed sloppy arguments load if the |value| is nullptr or store | 641 // Emits keyed sloppy arguments load if the |value| is nullptr or store |
642 // otherwise. Returns either the loaded value or |value|. | 642 // otherwise. Returns either the loaded value or |value|. |
643 compiler::Node* EmitKeyedSloppyArguments(compiler::Node* receiver, | 643 compiler::Node* EmitKeyedSloppyArguments(compiler::Node* receiver, |
644 compiler::Node* key, | 644 compiler::Node* key, |
645 compiler::Node* value, | 645 compiler::Node* value, |
646 Label* bailout); | 646 Label* bailout); |
647 | 647 |
648 // Loads script context from the script context table. | 648 // Loads script context from the script context table. |
649 compiler::Node* LoadScriptContext(compiler::Node* context, int context_index); | 649 compiler::Node* LoadScriptContext(compiler::Node* context, int context_index); |
650 | 650 |
| 651 compiler::Node* ClampedToUint8(compiler::Node* int32_value); |
| 652 |
| 653 // Store value to an elements array with given elements kind. |
| 654 void StoreElement(compiler::Node* elements, ElementsKind kind, |
| 655 compiler::Node* index, compiler::Node* value, |
| 656 ParameterMode mode); |
| 657 |
| 658 void StoreObjectElement(compiler::Node* object, compiler::Node* key, |
| 659 compiler::Node* value, bool is_jsarray, |
| 660 ElementsKind elements_kind, |
| 661 KeyedAccessStoreMode store_mode, Label* bailout); |
| 662 |
| 663 compiler::Node* CheckForCapacityGrow(compiler::Node* object, |
| 664 compiler::Node* elements, |
| 665 ElementsKind kind, |
| 666 compiler::Node* length, |
| 667 compiler::Node* key, ParameterMode mode, |
| 668 bool is_js_array, Label* bailout); |
| 669 |
| 670 compiler::Node* CopyElementsOnWrite(compiler::Node* object, |
| 671 compiler::Node* elements, |
| 672 ElementsKind kind, compiler::Node* length, |
| 673 ParameterMode mode, Label* bailout); |
| 674 |
651 void LoadIC(const LoadICParameters* p); | 675 void LoadIC(const LoadICParameters* p); |
652 void LoadGlobalIC(const LoadICParameters* p); | 676 void LoadGlobalIC(const LoadICParameters* p); |
653 void KeyedLoadIC(const LoadICParameters* p); | 677 void KeyedLoadIC(const LoadICParameters* p); |
654 void KeyedLoadICGeneric(const LoadICParameters* p); | 678 void KeyedLoadICGeneric(const LoadICParameters* p); |
655 | 679 |
656 // Get the enumerable length from |map| and return the result as a Smi. | 680 // Get the enumerable length from |map| and return the result as a Smi. |
657 compiler::Node* EnumLength(compiler::Node* map); | 681 compiler::Node* EnumLength(compiler::Node* map); |
658 | 682 |
659 // Check the cache validity for |receiver|. Branch to |use_cache| if | 683 // Check the cache validity for |receiver|. Branch to |use_cache| if |
660 // the cache is valid, otherwise branch to |use_runtime|. | 684 // the cache is valid, otherwise branch to |use_runtime|. |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
713 compiler::Node* SmiShiftBitsConstant(); | 737 compiler::Node* SmiShiftBitsConstant(); |
714 | 738 |
715 static const int kElementLoopUnrollThreshold = 8; | 739 static const int kElementLoopUnrollThreshold = 8; |
716 }; | 740 }; |
717 | 741 |
718 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); | 742 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); |
719 | 743 |
720 } // namespace internal | 744 } // namespace internal |
721 } // namespace v8 | 745 } // namespace v8 |
722 #endif // V8_CODE_STUB_ASSEMBLER_H_ | 746 #endif // V8_CODE_STUB_ASSEMBLER_H_ |
OLD | NEW |