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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 | 301 |
302 // Check that the value is a positive smi. | 302 // Check that the value is a positive smi. |
303 Node* WordIsPositiveSmi(Node* a); | 303 Node* WordIsPositiveSmi(Node* a); |
304 | 304 |
305 // Load an object pointer from a buffer that isn't in the heap. | 305 // Load an object pointer from a buffer that isn't in the heap. |
306 Node* LoadBufferObject(Node* buffer, int offset, | 306 Node* LoadBufferObject(Node* buffer, int offset, |
307 MachineType rep = MachineType::AnyTagged()); | 307 MachineType rep = MachineType::AnyTagged()); |
308 // Load a field from an object on the heap. | 308 // Load a field from an object on the heap. |
309 Node* LoadObjectField(Node* object, int offset, | 309 Node* LoadObjectField(Node* object, int offset, |
310 MachineType rep = MachineType::AnyTagged()); | 310 MachineType rep = MachineType::AnyTagged()); |
| 311 // Store a field to an object on the heap. |
| 312 Node* StoreObjectFieldNoWriteBarrier( |
| 313 Node* object, int offset, Node* value, |
| 314 MachineRepresentation rep = MachineRepresentation::kTagged); |
311 // Load the floating point value of a HeapNumber. | 315 // Load the floating point value of a HeapNumber. |
312 Node* LoadHeapNumberValue(Node* object); | 316 Node* LoadHeapNumberValue(Node* object); |
313 // Store the floating point value of a HeapNumber. | 317 // Store the floating point value of a HeapNumber. |
314 Node* StoreHeapNumberValue(Node* object, Node* value); | 318 Node* StoreHeapNumberValue(Node* object, Node* value); |
315 // Truncate the floating point value of a HeapNumber to an Int32. | 319 // Truncate the floating point value of a HeapNumber to an Int32. |
316 Node* TruncateHeapNumberValueToWord32(Node* object); | 320 Node* TruncateHeapNumberValueToWord32(Node* object); |
317 // Load the bit field of a Map. | 321 // Load the bit field of a Map. |
318 Node* LoadMapBitField(Node* map); | 322 Node* LoadMapBitField(Node* map); |
319 // Load bit field 2 of a map. | 323 // Load bit field 2 of a map. |
320 Node* LoadMapBitField2(Node* map); | 324 Node* LoadMapBitField2(Node* map); |
321 // Load bit field 3 of a map. | 325 // Load bit field 3 of a map. |
322 Node* LoadMapBitField3(Node* map); | 326 Node* LoadMapBitField3(Node* map); |
323 // Load the instance type of a map. | 327 // Load the instance type of a map. |
324 Node* LoadMapInstanceType(Node* map); | 328 Node* LoadMapInstanceType(Node* map); |
325 // Load the instance descriptors of a map. | 329 // Load the instance descriptors of a map. |
326 Node* LoadMapDescriptors(Node* map); | 330 Node* LoadMapDescriptors(Node* map); |
327 | 331 |
328 // Load the hash field of a name. | 332 // Load the hash field of a name. |
329 Node* LoadNameHash(Node* name); | 333 Node* LoadNameHash(Node* name); |
| 334 // Load the instance size of a Map. |
| 335 Node* LoadMapInstanceSize(Node* map); |
330 | 336 |
331 // Load an array element from a FixedArray. | 337 // Load an array element from a FixedArray. |
332 Node* LoadFixedArrayElementInt32Index(Node* object, Node* int32_index, | 338 Node* LoadFixedArrayElementInt32Index(Node* object, Node* int32_index, |
333 int additional_offset = 0); | 339 int additional_offset = 0); |
334 Node* LoadFixedArrayElementSmiIndex(Node* object, Node* smi_index, | 340 Node* LoadFixedArrayElementSmiIndex(Node* object, Node* smi_index, |
335 int additional_offset = 0); | 341 int additional_offset = 0); |
336 Node* LoadFixedArrayElementConstantIndex(Node* object, int index); | 342 Node* LoadFixedArrayElementConstantIndex(Node* object, int index); |
337 | 343 |
338 // Allocate an object of the given size. | 344 // Allocate an object of the given size. |
339 Node* Allocate(int size, AllocationFlags flags = kNone); | 345 Node* Allocate(int size, AllocationFlags flags = kNone); |
340 // Allocate a HeapNumber without initializing its value. | 346 // Allocate a HeapNumber without initializing its value. |
341 Node* AllocateHeapNumber(); | 347 Node* AllocateHeapNumber(); |
342 // Allocate a HeapNumber with a specific value. | 348 // Allocate a HeapNumber with a specific value. |
343 Node* AllocateHeapNumberWithValue(Node* value); | 349 Node* AllocateHeapNumberWithValue(Node* value); |
| 350 Node* InnerAllocate(Node* previous, int offset); |
344 | 351 |
345 // Store an array element to a FixedArray. | 352 // Store an array element to a FixedArray. |
346 Node* StoreFixedArrayElementNoWriteBarrier(Node* object, Node* index, | 353 Node* StoreFixedArrayElementNoWriteBarrier(Node* object, Node* index, |
347 Node* value); | 354 Node* value); |
348 // Load the Map of an HeapObject. | 355 // Load the Map of an HeapObject. |
349 Node* LoadMap(Node* object); | 356 Node* LoadMap(Node* object); |
350 // Store the Map of an HeapObject. | 357 // Store the Map of an HeapObject. |
351 Node* StoreMapNoWriteBarrier(Node* object, Node* map); | 358 Node* StoreMapNoWriteBarrier(Node* object, Node* map); |
352 // Load the instance type of an HeapObject. | 359 // Load the instance type of an HeapObject. |
353 Node* LoadInstanceType(Node* object); | 360 Node* LoadInstanceType(Node* object); |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
471 // Map of variables to the list of value nodes that have been added from each | 478 // Map of variables to the list of value nodes that have been added from each |
472 // merge path in their order of merging. | 479 // merge path in their order of merging. |
473 std::map<Variable::Impl*, std::vector<Node*>> variable_merges_; | 480 std::map<Variable::Impl*, std::vector<Node*>> variable_merges_; |
474 }; | 481 }; |
475 | 482 |
476 } // namespace compiler | 483 } // namespace compiler |
477 } // namespace internal | 484 } // namespace internal |
478 } // namespace v8 | 485 } // namespace v8 |
479 | 486 |
480 #endif // V8_COMPILER_CODE_STUB_ASSEMBLER_H_ | 487 #endif // V8_COMPILER_CODE_STUB_ASSEMBLER_H_ |
OLD | NEW |