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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 return BitFieldDecode(word32, T::kShift, T::kMask); | 358 return BitFieldDecode(word32, T::kShift, T::kMask); |
359 } | 359 } |
360 | 360 |
361 Node* BitFieldDecode(Node* word32, uint32_t shift, uint32_t mask); | 361 Node* BitFieldDecode(Node* word32, uint32_t shift, uint32_t mask); |
362 | 362 |
363 // Conversions. | 363 // Conversions. |
364 Node* ChangeFloat64ToTagged(Node* value); | 364 Node* ChangeFloat64ToTagged(Node* value); |
365 Node* ChangeInt32ToTagged(Node* value); | 365 Node* ChangeInt32ToTagged(Node* value); |
366 Node* TruncateTaggedToFloat64(Node* context, Node* value); | 366 Node* TruncateTaggedToFloat64(Node* context, Node* value); |
367 Node* TruncateTaggedToWord32(Node* context, Node* value); | 367 Node* TruncateTaggedToWord32(Node* context, Node* value); |
| 368 // Truncate to int32 using JavaScript truncation mode. |
| 369 Node* TruncateFloat64ToInt32(Node* value); |
368 | 370 |
369 // Branching helpers. | 371 // Branching helpers. |
370 // TODO(danno): Can we be more cleverish wrt. edge-split? | 372 // TODO(danno): Can we be more cleverish wrt. edge-split? |
371 void BranchIf(Node* condition, Label* if_true, Label* if_false); | 373 void BranchIf(Node* condition, Label* if_true, Label* if_false); |
372 | 374 |
373 #define BRANCH_HELPER(name) \ | 375 #define BRANCH_HELPER(name) \ |
374 void BranchIf##name(Node* a, Node* b, Label* if_true, Label* if_false) { \ | 376 void BranchIf##name(Node* a, Node* b, Label* if_true, Label* if_false) { \ |
375 BranchIf(name(a, b), if_true, if_false); \ | 377 BranchIf(name(a, b), if_true, if_false); \ |
376 } | 378 } |
377 CODE_STUB_ASSEMBLER_COMPARE_BINARY_OP_LIST(BRANCH_HELPER) | 379 CODE_STUB_ASSEMBLER_COMPARE_BINARY_OP_LIST(BRANCH_HELPER) |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 // Map of variables to the list of value nodes that have been added from each | 468 // Map of variables to the list of value nodes that have been added from each |
467 // merge path in their order of merging. | 469 // merge path in their order of merging. |
468 std::map<Variable::Impl*, std::vector<Node*>> variable_merges_; | 470 std::map<Variable::Impl*, std::vector<Node*>> variable_merges_; |
469 }; | 471 }; |
470 | 472 |
471 } // namespace compiler | 473 } // namespace compiler |
472 } // namespace internal | 474 } // namespace internal |
473 } // namespace v8 | 475 } // namespace v8 |
474 | 476 |
475 #endif // V8_COMPILER_CODE_STUB_ASSEMBLER_H_ | 477 #endif // V8_COMPILER_CODE_STUB_ASSEMBLER_H_ |
OLD | NEW |