| 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 "src/compiler/code-assembler.h" | 8 #include "src/compiler/code-assembler.h" |
| 9 #include "src/objects.h" | 9 #include "src/objects.h" |
| 10 | 10 |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 // Load an array element from a FixedArray. | 132 // Load an array element from a FixedArray. |
| 133 compiler::Node* LoadFixedArrayElementInt32Index(compiler::Node* object, | 133 compiler::Node* LoadFixedArrayElementInt32Index(compiler::Node* object, |
| 134 compiler::Node* int32_index, | 134 compiler::Node* int32_index, |
| 135 int additional_offset = 0); | 135 int additional_offset = 0); |
| 136 compiler::Node* LoadFixedArrayElementSmiIndex(compiler::Node* object, | 136 compiler::Node* LoadFixedArrayElementSmiIndex(compiler::Node* object, |
| 137 compiler::Node* smi_index, | 137 compiler::Node* smi_index, |
| 138 int additional_offset = 0); | 138 int additional_offset = 0); |
| 139 compiler::Node* LoadFixedArrayElementConstantIndex(compiler::Node* object, | 139 compiler::Node* LoadFixedArrayElementConstantIndex(compiler::Node* object, |
| 140 int index); | 140 int index); |
| 141 | 141 |
| 142 // Context manipulation |
| 143 compiler::Node* LoadNativeContext(compiler::Node* context); |
| 144 |
| 142 // Store the floating point value of a HeapNumber. | 145 // Store the floating point value of a HeapNumber. |
| 143 compiler::Node* StoreHeapNumberValue(compiler::Node* object, | 146 compiler::Node* StoreHeapNumberValue(compiler::Node* object, |
| 144 compiler::Node* value); | 147 compiler::Node* value); |
| 145 // Store a field to an object on the heap. | 148 // Store a field to an object on the heap. |
| 146 compiler::Node* StoreObjectField( | 149 compiler::Node* StoreObjectField( |
| 147 compiler::Node* object, int offset, compiler::Node* value); | 150 compiler::Node* object, int offset, compiler::Node* value); |
| 148 compiler::Node* StoreObjectFieldNoWriteBarrier( | 151 compiler::Node* StoreObjectFieldNoWriteBarrier( |
| 149 compiler::Node* object, int offset, compiler::Node* value, | 152 compiler::Node* object, int offset, compiler::Node* value, |
| 150 MachineRepresentation rep = MachineRepresentation::kTagged); | 153 MachineRepresentation rep = MachineRepresentation::kTagged); |
| 151 // Store the Map of an HeapObject. | 154 // Store the Map of an HeapObject. |
| 152 compiler::Node* StoreMapNoWriteBarrier(compiler::Node* object, | 155 compiler::Node* StoreMapNoWriteBarrier(compiler::Node* object, |
| 153 compiler::Node* map); | 156 compiler::Node* map); |
| 154 // Store an array element to a FixedArray. | 157 // Store an array element to a FixedArray. |
| 155 compiler::Node* StoreFixedArrayElementInt32Index(compiler::Node* object, | 158 compiler::Node* StoreFixedArrayElementInt32Index(compiler::Node* object, |
| 156 compiler::Node* index, | 159 compiler::Node* index, |
| 157 compiler::Node* value); | 160 compiler::Node* value); |
| 158 compiler::Node* StoreFixedArrayElementNoWriteBarrier(compiler::Node* object, | 161 compiler::Node* StoreFixedArrayElementNoWriteBarrier(compiler::Node* object, |
| 159 compiler::Node* index, | 162 compiler::Node* index, |
| 160 compiler::Node* value); | 163 compiler::Node* value); |
| 164 compiler::Node* StoreFixedDoubleArrayElementInt32Index(compiler::Node* object, |
| 165 compiler::Node* index, |
| 166 compiler::Node* value); |
| 167 compiler::Node* StoreFixedArrayElementInt32Index(compiler::Node* object, |
| 168 int index, |
| 169 compiler::Node* value); |
| 170 compiler::Node* StoreFixedArrayElementNoWriteBarrier(compiler::Node* object, |
| 171 int index, |
| 172 compiler::Node* value); |
| 173 compiler::Node* StoreFixedDoubleArrayElementInt32Index(compiler::Node* object, |
| 174 int index, |
| 175 compiler::Node* value); |
| 161 | 176 |
| 162 // Allocate a HeapNumber without initializing its value. | 177 // Allocate a HeapNumber without initializing its value. |
| 163 compiler::Node* AllocateHeapNumber(); | 178 compiler::Node* AllocateHeapNumber(); |
| 164 // Allocate a HeapNumber with a specific value. | 179 // Allocate a HeapNumber with a specific value. |
| 165 compiler::Node* AllocateHeapNumberWithValue(compiler::Node* value); | 180 compiler::Node* AllocateHeapNumberWithValue(compiler::Node* value); |
| 166 // Allocate a SeqOneByteString with the given length. | 181 // Allocate a SeqOneByteString with the given length. |
| 167 compiler::Node* AllocateSeqOneByteString(int length); | 182 compiler::Node* AllocateSeqOneByteString(int length); |
| 168 // Allocate a SeqTwoByteString with the given length. | 183 // Allocate a SeqTwoByteString with the given length. |
| 169 compiler::Node* AllocateSeqTwoByteString(int length); | 184 compiler::Node* AllocateSeqTwoByteString(int length); |
| 185 // Allocated an JSArray |
| 186 compiler::Node* AllocateJSArray(ElementsKind kind, |
| 187 compiler::Node* native_context, int capacity, |
| 188 int length, |
| 189 compiler::Node* allocation_site = nullptr); |
| 190 |
| 191 // Allocation site manipulation |
| 192 void InitializeAllocationMemento(compiler::Node* base_allocation, |
| 193 int base_allocation_size, |
| 194 compiler::Node* allocation_site); |
| 170 | 195 |
| 171 compiler::Node* TruncateTaggedToFloat64(compiler::Node* context, | 196 compiler::Node* TruncateTaggedToFloat64(compiler::Node* context, |
| 172 compiler::Node* value); | 197 compiler::Node* value); |
| 173 compiler::Node* TruncateTaggedToWord32(compiler::Node* context, | 198 compiler::Node* TruncateTaggedToWord32(compiler::Node* context, |
| 174 compiler::Node* value); | 199 compiler::Node* value); |
| 175 // Truncate the floating point value of a HeapNumber to an Int32. | 200 // Truncate the floating point value of a HeapNumber to an Int32. |
| 176 compiler::Node* TruncateHeapNumberValueToWord32(compiler::Node* object); | 201 compiler::Node* TruncateHeapNumberValueToWord32(compiler::Node* object); |
| 177 | 202 |
| 178 // Conversions. | 203 // Conversions. |
| 179 compiler::Node* ChangeFloat64ToTagged(compiler::Node* value); | 204 compiler::Node* ChangeFloat64ToTagged(compiler::Node* value); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 204 | 229 |
| 205 private: | 230 private: |
| 206 compiler::Node* AllocateRawAligned(compiler::Node* size_in_bytes, | 231 compiler::Node* AllocateRawAligned(compiler::Node* size_in_bytes, |
| 207 AllocationFlags flags, | 232 AllocationFlags flags, |
| 208 compiler::Node* top_address, | 233 compiler::Node* top_address, |
| 209 compiler::Node* limit_address); | 234 compiler::Node* limit_address); |
| 210 compiler::Node* AllocateRawUnaligned(compiler::Node* size_in_bytes, | 235 compiler::Node* AllocateRawUnaligned(compiler::Node* size_in_bytes, |
| 211 AllocationFlags flags, | 236 AllocationFlags flags, |
| 212 compiler::Node* top_adddress, | 237 compiler::Node* top_adddress, |
| 213 compiler::Node* limit_address); | 238 compiler::Node* limit_address); |
| 239 |
| 240 static const int kElementLoopUnrollThreshold = 8; |
| 214 }; | 241 }; |
| 215 | 242 |
| 216 } // namespace internal | 243 } // namespace internal |
| 217 } // namespace v8 | 244 } // namespace v8 |
| 218 | 245 |
| 219 #endif // V8_CODE_STUB_ASSEMBLER_H_ | 246 #endif // V8_CODE_STUB_ASSEMBLER_H_ |
| OLD | NEW |