| 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 V(Word32Sar) \ | 83 V(Word32Sar) \ |
| 84 V(Word32Ror) \ | 84 V(Word32Ror) \ |
| 85 V(Word64Or) \ | 85 V(Word64Or) \ |
| 86 V(Word64And) \ | 86 V(Word64And) \ |
| 87 V(Word64Xor) \ | 87 V(Word64Xor) \ |
| 88 V(Word64Shr) \ | 88 V(Word64Shr) \ |
| 89 V(Word64Sar) \ | 89 V(Word64Sar) \ |
| 90 V(Word64Ror) | 90 V(Word64Ror) |
| 91 | 91 |
| 92 #define CODE_STUB_ASSEMBLER_UNARY_OP_LIST(V) \ | 92 #define CODE_STUB_ASSEMBLER_UNARY_OP_LIST(V) \ |
| 93 V(Float64Sqrt) \ |
| 93 V(ChangeFloat64ToUint32) \ | 94 V(ChangeFloat64ToUint32) \ |
| 94 V(ChangeInt32ToFloat64) \ | 95 V(ChangeInt32ToFloat64) \ |
| 95 V(ChangeInt32ToInt64) \ | 96 V(ChangeInt32ToInt64) \ |
| 96 V(ChangeUint32ToFloat64) \ | 97 V(ChangeUint32ToFloat64) \ |
| 97 V(ChangeUint32ToUint64) | 98 V(ChangeUint32ToUint64) |
| 98 | 99 |
| 99 class CodeStubAssembler { | 100 class CodeStubAssembler { |
| 100 public: | 101 public: |
| 101 // Create with CallStub linkage. | 102 // Create with CallStub linkage. |
| 102 // |result_size| specifies the number of results returned by the stub. | 103 // |result_size| specifies the number of results returned by the stub. |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 Node* WordIsPositiveSmi(Node* a); | 278 Node* WordIsPositiveSmi(Node* a); |
| 278 | 279 |
| 279 // Load an object pointer from a buffer that isn't in the heap. | 280 // Load an object pointer from a buffer that isn't in the heap. |
| 280 Node* LoadBufferObject(Node* buffer, int offset, | 281 Node* LoadBufferObject(Node* buffer, int offset, |
| 281 MachineType rep = MachineType::AnyTagged()); | 282 MachineType rep = MachineType::AnyTagged()); |
| 282 // Load a field from an object on the heap. | 283 // Load a field from an object on the heap. |
| 283 Node* LoadObjectField(Node* object, int offset, | 284 Node* LoadObjectField(Node* object, int offset, |
| 284 MachineType rep = MachineType::AnyTagged()); | 285 MachineType rep = MachineType::AnyTagged()); |
| 285 // Load the floating point value of a HeapNumber. | 286 // Load the floating point value of a HeapNumber. |
| 286 Node* LoadHeapNumberValue(Node* object); | 287 Node* LoadHeapNumberValue(Node* object); |
| 288 // Store the floating point value of a HeapNumber. |
| 289 Node* StoreHeapNumberValue(Node* object, Node* value); |
| 287 // Load the bit field of a Map. | 290 // Load the bit field of a Map. |
| 288 Node* LoadMapBitField(Node* map); | 291 Node* LoadMapBitField(Node* map); |
| 289 // Load the instance type of a Map. | 292 // Load the instance type of a Map. |
| 290 Node* LoadMapInstanceType(Node* map); | 293 Node* LoadMapInstanceType(Node* map); |
| 291 | 294 |
| 292 // Load an array element from a FixedArray. | 295 // Load an array element from a FixedArray. |
| 293 Node* LoadFixedArrayElementSmiIndex(Node* object, Node* smi_index, | 296 Node* LoadFixedArrayElementSmiIndex(Node* object, Node* smi_index, |
| 294 int additional_offset = 0); | 297 int additional_offset = 0); |
| 295 Node* LoadFixedArrayElementConstantIndex(Node* object, int index); | 298 Node* LoadFixedArrayElementConstantIndex(Node* object, int index); |
| 296 | 299 |
| 297 // Allocate an object of the given size. | 300 // Allocate an object of the given size. |
| 298 Node* Allocate(int size, AllocationFlags flags); | 301 Node* Allocate(int size, AllocationFlags flags); |
| 299 | 302 |
| 300 // Store an array element to a FixedArray. | 303 // Store an array element to a FixedArray. |
| 301 Node* StoreFixedArrayElementNoWriteBarrier(Node* object, Node* index, | 304 Node* StoreFixedArrayElementNoWriteBarrier(Node* object, Node* index, |
| 302 Node* value); | 305 Node* value); |
| 303 // Load the Map of an HeapObject. | 306 // Load the Map of an HeapObject. |
| 304 Node* LoadMap(Node* object); | 307 Node* LoadMap(Node* object); |
| 308 // Store the Map of an HeapObject. |
| 309 Node* StoreMapNoWriteBarrier(Node* object, Node* map); |
| 305 // Load the instance type of an HeapObject. | 310 // Load the instance type of an HeapObject. |
| 306 Node* LoadInstanceType(Node* object); | 311 Node* LoadInstanceType(Node* object); |
| 307 | 312 |
| 308 // Returns a node that is true if the given bit is set in |word32|. | 313 // Returns a node that is true if the given bit is set in |word32|. |
| 309 template <typename T> | 314 template <typename T> |
| 310 Node* BitFieldDecode(Node* word32) { | 315 Node* BitFieldDecode(Node* word32) { |
| 311 return BitFieldDecode(word32, T::kShift, T::kMask); | 316 return BitFieldDecode(word32, T::kShift, T::kMask); |
| 312 } | 317 } |
| 313 | 318 |
| 314 Node* BitFieldDecode(Node* word32, uint32_t shift, uint32_t mask); | 319 Node* BitFieldDecode(Node* word32, uint32_t shift, uint32_t mask); |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 // Map of variables to the list of value nodes that have been added from each | 418 // Map of variables to the list of value nodes that have been added from each |
| 414 // merge path in their order of merging. | 419 // merge path in their order of merging. |
| 415 std::map<Variable::Impl*, std::vector<Node*>> variable_merges_; | 420 std::map<Variable::Impl*, std::vector<Node*>> variable_merges_; |
| 416 }; | 421 }; |
| 417 | 422 |
| 418 } // namespace compiler | 423 } // namespace compiler |
| 419 } // namespace internal | 424 } // namespace internal |
| 420 } // namespace v8 | 425 } // namespace v8 |
| 421 | 426 |
| 422 #endif // V8_COMPILER_CODE_STUB_ASSEMBLER_H_ | 427 #endif // V8_COMPILER_CODE_STUB_ASSEMBLER_H_ |
| OLD | NEW |