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