| 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 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 655 // Emits keyed sloppy arguments store. | 655 // Emits keyed sloppy arguments store. |
| 656 void StoreKeyedSloppyArguments(compiler::Node* receiver, compiler::Node* key, | 656 void StoreKeyedSloppyArguments(compiler::Node* receiver, compiler::Node* key, |
| 657 compiler::Node* value, Label* bailout) { | 657 compiler::Node* value, Label* bailout) { |
| 658 DCHECK_NOT_NULL(value); | 658 DCHECK_NOT_NULL(value); |
| 659 EmitKeyedSloppyArguments(receiver, key, value, bailout); | 659 EmitKeyedSloppyArguments(receiver, key, value, bailout); |
| 660 } | 660 } |
| 661 | 661 |
| 662 // Loads script context from the script context table. | 662 // Loads script context from the script context table. |
| 663 compiler::Node* LoadScriptContext(compiler::Node* context, int context_index); | 663 compiler::Node* LoadScriptContext(compiler::Node* context, int context_index); |
| 664 | 664 |
| 665 compiler::Node* ClampedToUint8(compiler::Node* int32_value); |
| 666 |
| 667 // Store value to an elements array with given elements kind. |
| 668 void StoreElement(compiler::Node* elements, ElementsKind kind, |
| 669 compiler::Node* index, compiler::Node* value, |
| 670 ParameterMode mode); |
| 671 |
| 672 void EmitElementStore(compiler::Node* object, compiler::Node* key, |
| 673 compiler::Node* value, bool is_jsarray, |
| 674 ElementsKind elements_kind, |
| 675 KeyedAccessStoreMode store_mode, Label* bailout); |
| 676 |
| 677 compiler::Node* CheckForCapacityGrow(compiler::Node* object, |
| 678 compiler::Node* elements, |
| 679 ElementsKind kind, |
| 680 compiler::Node* length, |
| 681 compiler::Node* key, ParameterMode mode, |
| 682 bool is_js_array, Label* bailout); |
| 683 |
| 684 compiler::Node* CopyElementsOnWrite(compiler::Node* object, |
| 685 compiler::Node* elements, |
| 686 ElementsKind kind, compiler::Node* length, |
| 687 ParameterMode mode, Label* bailout); |
| 688 |
| 665 void LoadIC(const LoadICParameters* p); | 689 void LoadIC(const LoadICParameters* p); |
| 666 void LoadGlobalIC(const LoadICParameters* p); | 690 void LoadGlobalIC(const LoadICParameters* p); |
| 667 void KeyedLoadIC(const LoadICParameters* p); | 691 void KeyedLoadIC(const LoadICParameters* p); |
| 668 void KeyedLoadICGeneric(const LoadICParameters* p); | 692 void KeyedLoadICGeneric(const LoadICParameters* p); |
| 669 | 693 |
| 670 // Get the enumerable length from |map| and return the result as a Smi. | 694 // Get the enumerable length from |map| and return the result as a Smi. |
| 671 compiler::Node* EnumLength(compiler::Node* map); | 695 compiler::Node* EnumLength(compiler::Node* map); |
| 672 | 696 |
| 673 // Check the cache validity for |receiver|. Branch to |use_cache| if | 697 // Check the cache validity for |receiver|. Branch to |use_cache| if |
| 674 // the cache is valid, otherwise branch to |use_runtime|. | 698 // the cache is valid, otherwise branch to |use_runtime|. |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 734 Label* bailout); | 758 Label* bailout); |
| 735 | 759 |
| 736 static const int kElementLoopUnrollThreshold = 8; | 760 static const int kElementLoopUnrollThreshold = 8; |
| 737 }; | 761 }; |
| 738 | 762 |
| 739 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); | 763 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); |
| 740 | 764 |
| 741 } // namespace internal | 765 } // namespace internal |
| 742 } // namespace v8 | 766 } // namespace v8 |
| 743 #endif // V8_CODE_STUB_ASSEMBLER_H_ | 767 #endif // V8_CODE_STUB_ASSEMBLER_H_ |
| OLD | NEW |