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