OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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_COMPILER_CODE_STUB_ASSEMBLER_H_ | 5 #ifndef V8_COMPILER_CODE_STUB_ASSEMBLER_H_ |
6 #define V8_COMPILER_CODE_STUB_ASSEMBLER_H_ | 6 #define V8_COMPILER_CODE_STUB_ASSEMBLER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 // Clients of this interface shouldn't depend on lots of compiler internals. | 10 // Clients of this interface shouldn't depend on lots of compiler internals. |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 Node* LoadObjectField(Node* object, int offset, | 297 Node* LoadObjectField(Node* object, int offset, |
298 MachineType rep = MachineType::AnyTagged()); | 298 MachineType rep = MachineType::AnyTagged()); |
299 // Load the floating point value of a HeapNumber. | 299 // Load the floating point value of a HeapNumber. |
300 Node* LoadHeapNumberValue(Node* object); | 300 Node* LoadHeapNumberValue(Node* object); |
301 // Store the floating point value of a HeapNumber. | 301 // Store the floating point value of a HeapNumber. |
302 Node* StoreHeapNumberValue(Node* object, Node* value); | 302 Node* StoreHeapNumberValue(Node* object, Node* value); |
303 // Truncate the floating point value of a HeapNumber to an Int32. | 303 // Truncate the floating point value of a HeapNumber to an Int32. |
304 Node* TruncateHeapNumberValueToWord32(Node* object); | 304 Node* TruncateHeapNumberValueToWord32(Node* object); |
305 // Load the bit field of a Map. | 305 // Load the bit field of a Map. |
306 Node* LoadMapBitField(Node* map); | 306 Node* LoadMapBitField(Node* map); |
307 // Load the instance type of a Map. | 307 // Load bit field 2 of a map. |
| 308 Node* LoadMapBitField2(Node* map); |
| 309 // Load bit field 3 of a map. |
| 310 Node* LoadMapBitField3(Node* map); |
| 311 // Load the instance type of a map. |
308 Node* LoadMapInstanceType(Node* map); | 312 Node* LoadMapInstanceType(Node* map); |
| 313 // Load the instance descriptors of a map. |
| 314 Node* LoadMapDescriptors(Node* map); |
| 315 |
| 316 // Load the hash field of a name. |
| 317 Node* LoadNameHash(Node* name); |
309 | 318 |
310 // Load an array element from a FixedArray. | 319 // Load an array element from a FixedArray. |
| 320 Node* LoadFixedArrayElementInt32Index(Node* object, Node* int32_index, |
| 321 int additional_offset = 0); |
311 Node* LoadFixedArrayElementSmiIndex(Node* object, Node* smi_index, | 322 Node* LoadFixedArrayElementSmiIndex(Node* object, Node* smi_index, |
312 int additional_offset = 0); | 323 int additional_offset = 0); |
313 Node* LoadFixedArrayElementConstantIndex(Node* object, int index); | 324 Node* LoadFixedArrayElementConstantIndex(Node* object, int index); |
314 | 325 |
315 // Allocate an object of the given size. | 326 // Allocate an object of the given size. |
316 Node* Allocate(int size, AllocationFlags flags = kNone); | 327 Node* Allocate(int size, AllocationFlags flags = kNone); |
317 // Allocate a HeapNumber without initializing its value. | 328 // Allocate a HeapNumber without initializing its value. |
318 Node* AllocateHeapNumber(); | 329 Node* AllocateHeapNumber(); |
319 // Allocate a HeapNumber with a specific value. | 330 // Allocate a HeapNumber with a specific value. |
320 Node* AllocateHeapNumberWithValue(Node* value); | 331 Node* AllocateHeapNumberWithValue(Node* value); |
321 | 332 |
322 // Store an array element to a FixedArray. | 333 // Store an array element to a FixedArray. |
323 Node* StoreFixedArrayElementNoWriteBarrier(Node* object, Node* index, | 334 Node* StoreFixedArrayElementNoWriteBarrier(Node* object, Node* index, |
324 Node* value); | 335 Node* value); |
325 // Load the Map of an HeapObject. | 336 // Load the Map of an HeapObject. |
326 Node* LoadMap(Node* object); | 337 Node* LoadMap(Node* object); |
327 // Store the Map of an HeapObject. | 338 // Store the Map of an HeapObject. |
328 Node* StoreMapNoWriteBarrier(Node* object, Node* map); | 339 Node* StoreMapNoWriteBarrier(Node* object, Node* map); |
329 // Load the instance type of an HeapObject. | 340 // Load the instance type of an HeapObject. |
330 Node* LoadInstanceType(Node* object); | 341 Node* LoadInstanceType(Node* object); |
331 | 342 |
| 343 // Load the elements backing store of a JSObject. |
| 344 Node* LoadElements(Node* object); |
| 345 // Load the length of a fixed array base instance. |
| 346 Node* LoadFixedArrayBaseLength(Node* array); |
| 347 |
332 // Returns a node that is true if the given bit is set in |word32|. | 348 // Returns a node that is true if the given bit is set in |word32|. |
333 template <typename T> | 349 template <typename T> |
334 Node* BitFieldDecode(Node* word32) { | 350 Node* BitFieldDecode(Node* word32) { |
335 return BitFieldDecode(word32, T::kShift, T::kMask); | 351 return BitFieldDecode(word32, T::kShift, T::kMask); |
336 } | 352 } |
337 | 353 |
338 Node* BitFieldDecode(Node* word32, uint32_t shift, uint32_t mask); | 354 Node* BitFieldDecode(Node* word32, uint32_t shift, uint32_t mask); |
339 | 355 |
340 // Conversions. | 356 // Conversions. |
341 Node* ChangeFloat64ToTagged(Node* value); | 357 Node* ChangeFloat64ToTagged(Node* value); |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 // Map of variables to the list of value nodes that have been added from each | 459 // Map of variables to the list of value nodes that have been added from each |
444 // merge path in their order of merging. | 460 // merge path in their order of merging. |
445 std::map<Variable::Impl*, std::vector<Node*>> variable_merges_; | 461 std::map<Variable::Impl*, std::vector<Node*>> variable_merges_; |
446 }; | 462 }; |
447 | 463 |
448 } // namespace compiler | 464 } // namespace compiler |
449 } // namespace internal | 465 } // namespace internal |
450 } // namespace v8 | 466 } // namespace v8 |
451 | 467 |
452 #endif // V8_COMPILER_CODE_STUB_ASSEMBLER_H_ | 468 #endif // V8_COMPILER_CODE_STUB_ASSEMBLER_H_ |
OLD | NEW |