| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 Node* IntPtrAddFoldConstants(Node* left, Node* right); | 101 Node* IntPtrAddFoldConstants(Node* left, Node* right); |
| 102 Node* IntPtrSubFoldConstants(Node* left, Node* right); | 102 Node* IntPtrSubFoldConstants(Node* left, Node* right); |
| 103 // Round the 32bits payload of the provided word up to the next power of two. | 103 // Round the 32bits payload of the provided word up to the next power of two. |
| 104 Node* IntPtrRoundUpToPowerOfTwo32(Node* value); | 104 Node* IntPtrRoundUpToPowerOfTwo32(Node* value); |
| 105 Node* IntPtrMax(Node* left, Node* right); | 105 Node* IntPtrMax(Node* left, Node* right); |
| 106 | 106 |
| 107 // Float64 operations. | 107 // Float64 operations. |
| 108 Node* Float64Ceil(Node* x); | 108 Node* Float64Ceil(Node* x); |
| 109 Node* Float64Floor(Node* x); | 109 Node* Float64Floor(Node* x); |
| 110 Node* Float64Round(Node* x); | 110 Node* Float64Round(Node* x); |
| 111 Node* Float64RoundToEven(Node* x); |
| 111 Node* Float64Trunc(Node* x); | 112 Node* Float64Trunc(Node* x); |
| 112 | 113 |
| 113 // Tag a Word as a Smi value. | 114 // Tag a Word as a Smi value. |
| 114 Node* SmiTag(Node* value); | 115 Node* SmiTag(Node* value); |
| 115 // Untag a Smi value as a Word. | 116 // Untag a Smi value as a Word. |
| 116 Node* SmiUntag(Node* value); | 117 Node* SmiUntag(Node* value); |
| 117 | 118 |
| 118 // Smi conversions. | 119 // Smi conversions. |
| 119 Node* SmiToFloat64(Node* value); | 120 Node* SmiToFloat64(Node* value); |
| 120 Node* SmiFromWord(Node* value) { return SmiTag(value); } | 121 Node* SmiFromWord(Node* value) { return SmiTag(value); } |
| (...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 832 // Emits keyed sloppy arguments store. | 833 // Emits keyed sloppy arguments store. |
| 833 void StoreKeyedSloppyArguments(Node* receiver, Node* key, Node* value, | 834 void StoreKeyedSloppyArguments(Node* receiver, Node* key, Node* value, |
| 834 Label* bailout) { | 835 Label* bailout) { |
| 835 DCHECK_NOT_NULL(value); | 836 DCHECK_NOT_NULL(value); |
| 836 EmitKeyedSloppyArguments(receiver, key, value, bailout); | 837 EmitKeyedSloppyArguments(receiver, key, value, bailout); |
| 837 } | 838 } |
| 838 | 839 |
| 839 // Loads script context from the script context table. | 840 // Loads script context from the script context table. |
| 840 Node* LoadScriptContext(Node* context, int context_index); | 841 Node* LoadScriptContext(Node* context, int context_index); |
| 841 | 842 |
| 842 Node* ClampedToUint8(Node* int32_value); | 843 Node* Int32ToUint8Clamped(Node* int32_value); |
| 844 Node* Float64ToUint8Clamped(Node* float64_value); |
| 845 |
| 846 Node* PrepareValueForWriteToTypedArray(Node* key, ElementsKind elements_kind, |
| 847 Label* bailout); |
| 843 | 848 |
| 844 // Store value to an elements array with given elements kind. | 849 // Store value to an elements array with given elements kind. |
| 845 void StoreElement(Node* elements, ElementsKind kind, Node* index, Node* value, | 850 void StoreElement(Node* elements, ElementsKind kind, Node* index, Node* value, |
| 846 ParameterMode mode); | 851 ParameterMode mode); |
| 847 | 852 |
| 848 void EmitElementStore(Node* object, Node* key, Node* value, bool is_jsarray, | 853 void EmitElementStore(Node* object, Node* key, Node* value, bool is_jsarray, |
| 849 ElementsKind elements_kind, | 854 ElementsKind elements_kind, |
| 850 KeyedAccessStoreMode store_mode, Label* bailout); | 855 KeyedAccessStoreMode store_mode, Label* bailout); |
| 851 | 856 |
| 852 Node* CheckForCapacityGrow(Node* object, Node* elements, ElementsKind kind, | 857 Node* CheckForCapacityGrow(Node* object, Node* elements, ElementsKind kind, |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1068 } | 1073 } |
| 1069 #else | 1074 #else |
| 1070 #define CSA_SLOW_ASSERT(csa, x) ((void)0) | 1075 #define CSA_SLOW_ASSERT(csa, x) ((void)0) |
| 1071 #endif | 1076 #endif |
| 1072 | 1077 |
| 1073 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); | 1078 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); |
| 1074 | 1079 |
| 1075 } // namespace internal | 1080 } // namespace internal |
| 1076 } // namespace v8 | 1081 } // namespace v8 |
| 1077 #endif // V8_CODE_STUB_ASSEMBLER_H_ | 1082 #endif // V8_CODE_STUB_ASSEMBLER_H_ |
| OLD | NEW |