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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 // Access to the frame pointer | 188 // Access to the frame pointer |
189 Node* LoadFramePointer(); | 189 Node* LoadFramePointer(); |
190 Node* LoadParentFramePointer(); | 190 Node* LoadParentFramePointer(); |
191 | 191 |
192 // Access to the stack pointer | 192 // Access to the stack pointer |
193 Node* LoadStackPointer(); | 193 Node* LoadStackPointer(); |
194 | 194 |
195 // Load raw memory location. | 195 // Load raw memory location. |
196 Node* Load(MachineType rep, Node* base); | 196 Node* Load(MachineType rep, Node* base); |
197 Node* Load(MachineType rep, Node* base, Node* index); | 197 Node* Load(MachineType rep, Node* base, Node* index); |
| 198 Node* AtomicLoad(MachineType rep, Node* base, Node* index); |
198 | 199 |
199 // Store value to raw memory location. | 200 // Store value to raw memory location. |
200 Node* Store(MachineRepresentation rep, Node* base, Node* value); | 201 Node* Store(MachineRepresentation rep, Node* base, Node* value); |
201 Node* Store(MachineRepresentation rep, Node* base, Node* index, Node* value); | 202 Node* Store(MachineRepresentation rep, Node* base, Node* index, Node* value); |
202 Node* StoreNoWriteBarrier(MachineRepresentation rep, Node* base, Node* value); | 203 Node* StoreNoWriteBarrier(MachineRepresentation rep, Node* base, Node* value); |
203 Node* StoreNoWriteBarrier(MachineRepresentation rep, Node* base, Node* index, | 204 Node* StoreNoWriteBarrier(MachineRepresentation rep, Node* base, Node* index, |
204 Node* value); | 205 Node* value); |
205 | 206 |
206 // Basic arithmetic operations. | 207 // Basic arithmetic operations. |
207 #define DECLARE_CODE_STUB_ASSEMBER_BINARY_OP(name) Node* name(Node* a, Node* b); | 208 #define DECLARE_CODE_STUB_ASSEMBER_BINARY_OP(name) Node* name(Node* a, Node* b); |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 Node* BitFieldDecode(Node* word32, uint32_t shift, uint32_t mask); | 389 Node* BitFieldDecode(Node* word32, uint32_t shift, uint32_t mask); |
389 | 390 |
390 // Conversions. | 391 // Conversions. |
391 Node* ChangeFloat64ToTagged(Node* value); | 392 Node* ChangeFloat64ToTagged(Node* value); |
392 Node* ChangeInt32ToTagged(Node* value); | 393 Node* ChangeInt32ToTagged(Node* value); |
393 Node* ChangeUint32ToTagged(Node* value); | 394 Node* ChangeUint32ToTagged(Node* value); |
394 Node* TruncateTaggedToFloat64(Node* context, Node* value); | 395 Node* TruncateTaggedToFloat64(Node* context, Node* value); |
395 Node* TruncateTaggedToWord32(Node* context, Node* value); | 396 Node* TruncateTaggedToWord32(Node* context, Node* value); |
396 // Truncate to int32 using JavaScript truncation mode. | 397 // Truncate to int32 using JavaScript truncation mode. |
397 Node* TruncateFloat64ToInt32(Node* value); | 398 Node* TruncateFloat64ToInt32(Node* value); |
| 399 // No-op on 32-bit, otherwise zero extend. |
| 400 Node* ChangeUint32ToWord(Node* value); |
398 | 401 |
399 // Type conversions. | 402 // Type conversions. |
400 // Throws a TypeError for {method_name} if {value} is not coercible to Object, | 403 // Throws a TypeError for {method_name} if {value} is not coercible to Object, |
401 // or returns the {value} converted to a String otherwise. | 404 // or returns the {value} converted to a String otherwise. |
402 Node* ToThisString(Node* context, Node* value, char const* method_name); | 405 Node* ToThisString(Node* context, Node* value, char const* method_name); |
403 | 406 |
404 // String helpers. | 407 // String helpers. |
405 // Load a character from a String (might flatten a ConsString). | 408 // Load a character from a String (might flatten a ConsString). |
406 Node* StringCharCodeAt(Node* string, Node* smi_index); | 409 Node* StringCharCodeAt(Node* string, Node* smi_index); |
407 // Return the single character string with only {code}. | 410 // Return the single character string with only {code}. |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 // Map of variables to the list of value nodes that have been added from each | 510 // Map of variables to the list of value nodes that have been added from each |
508 // merge path in their order of merging. | 511 // merge path in their order of merging. |
509 std::map<Variable::Impl*, std::vector<Node*>> variable_merges_; | 512 std::map<Variable::Impl*, std::vector<Node*>> variable_merges_; |
510 }; | 513 }; |
511 | 514 |
512 } // namespace compiler | 515 } // namespace compiler |
513 } // namespace internal | 516 } // namespace internal |
514 } // namespace v8 | 517 } // namespace v8 |
515 | 518 |
516 #endif // V8_COMPILER_CODE_STUB_ASSEMBLER_H_ | 519 #endif // V8_COMPILER_CODE_STUB_ASSEMBLER_H_ |
OLD | NEW |