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_ASSEMBLER_H_ | 5 #ifndef V8_COMPILER_CODE_ASSEMBLER_H_ |
6 #define V8_COMPILER_CODE_ASSEMBLER_H_ | 6 #define V8_COMPILER_CODE_ASSEMBLER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 | 276 |
277 Node* WordShl(Node* value, int shift); | 277 Node* WordShl(Node* value, int shift); |
278 Node* WordShr(Node* value, int shift); | 278 Node* WordShr(Node* value, int shift); |
279 Node* Word32Shr(Node* value, int shift); | 279 Node* Word32Shr(Node* value, int shift); |
280 | 280 |
281 // Unary | 281 // Unary |
282 #define DECLARE_CODE_ASSEMBLER_UNARY_OP(name) Node* name(Node* a); | 282 #define DECLARE_CODE_ASSEMBLER_UNARY_OP(name) Node* name(Node* a); |
283 CODE_ASSEMBLER_UNARY_OP_LIST(DECLARE_CODE_ASSEMBLER_UNARY_OP) | 283 CODE_ASSEMBLER_UNARY_OP_LIST(DECLARE_CODE_ASSEMBLER_UNARY_OP) |
284 #undef DECLARE_CODE_ASSEMBLER_UNARY_OP | 284 #undef DECLARE_CODE_ASSEMBLER_UNARY_OP |
285 | 285 |
| 286 // Changes an intptr_t to a double, e.g. for storing an element index |
| 287 // outside Smi range in a HeapNumber. Lossless on 32-bit, |
| 288 // rounds on 64-bit (which doesn't affect valid element indices). |
| 289 Node* RoundIntPtrToFloat64(Node* value); |
286 // No-op on 32-bit, otherwise zero extend. | 290 // No-op on 32-bit, otherwise zero extend. |
287 Node* ChangeUint32ToWord(Node* value); | 291 Node* ChangeUint32ToWord(Node* value); |
288 // No-op on 32-bit, otherwise sign extend. | 292 // No-op on 32-bit, otherwise sign extend. |
289 Node* ChangeInt32ToIntPtr(Node* value); | 293 Node* ChangeInt32ToIntPtr(Node* value); |
290 | 294 |
291 // Projections | 295 // Projections |
292 Node* Projection(int index, Node* value); | 296 Node* Projection(int index, Node* value); |
293 | 297 |
294 // Calls | 298 // Calls |
295 Node* CallRuntime(Runtime::FunctionId function_id, Node* context); | 299 Node* CallRuntime(Runtime::FunctionId function_id, Node* context); |
(...skipping 182 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 | 482 // Map of variables to the list of value nodes that have been added from each |
479 // merge path in their order of merging. | 483 // merge path in their order of merging. |
480 std::map<Variable::Impl*, std::vector<Node*>> variable_merges_; | 484 std::map<Variable::Impl*, std::vector<Node*>> variable_merges_; |
481 }; | 485 }; |
482 | 486 |
483 } // namespace compiler | 487 } // namespace compiler |
484 } // namespace internal | 488 } // namespace internal |
485 } // namespace v8 | 489 } // namespace v8 |
486 | 490 |
487 #endif // V8_COMPILER_CODE_ASSEMBLER_H_ | 491 #endif // V8_COMPILER_CODE_ASSEMBLER_H_ |
OLD | NEW |