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 #include "src/compiler/code-stub-assembler.h" | 5 #include "src/compiler/code-stub-assembler.h" |
6 | 6 |
7 #include <ostream> | 7 #include <ostream> |
8 | 8 |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/compiler/graph.h" | 10 #include "src/compiler/graph.h" |
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 return LoadMapInstanceType(LoadMap(object)); | 457 return LoadMapInstanceType(LoadMap(object)); |
458 } | 458 } |
459 | 459 |
460 Node* CodeStubAssembler::BitFieldDecode(Node* word32, uint32_t shift, | 460 Node* CodeStubAssembler::BitFieldDecode(Node* word32, uint32_t shift, |
461 uint32_t mask) { | 461 uint32_t mask) { |
462 return raw_assembler_->Word32Shr( | 462 return raw_assembler_->Word32Shr( |
463 raw_assembler_->Word32And(word32, raw_assembler_->Int32Constant(mask)), | 463 raw_assembler_->Word32And(word32, raw_assembler_->Int32Constant(mask)), |
464 raw_assembler_->Int32Constant(shift)); | 464 raw_assembler_->Int32Constant(shift)); |
465 } | 465 } |
466 | 466 |
| 467 void CodeStubAssembler::BranchIf(Node* condition, Label* if_true, |
| 468 Label* if_false) { |
| 469 Label if_condition_true(this), if_condition_false(this); |
| 470 Branch(condition, &if_condition_true, &if_condition_false); |
| 471 Bind(&if_condition_true); |
| 472 Goto(if_true); |
| 473 Bind(&if_condition_false); |
| 474 Goto(if_false); |
| 475 } |
| 476 |
467 void CodeStubAssembler::BranchIfInt32LessThan(Node* a, Node* b, Label* if_true, | 477 void CodeStubAssembler::BranchIfInt32LessThan(Node* a, Node* b, Label* if_true, |
468 Label* if_false) { | 478 Label* if_false) { |
469 Label if_lessthan(this), if_notlessthan(this); | 479 Label if_lessthan(this), if_notlessthan(this); |
470 Branch(Int32LessThan(a, b), &if_lessthan, &if_notlessthan); | 480 Branch(Int32LessThan(a, b), &if_lessthan, &if_notlessthan); |
471 Bind(&if_lessthan); | 481 Bind(&if_lessthan); |
472 Goto(if_true); | 482 Goto(if_true); |
473 Bind(&if_notlessthan); | 483 Bind(&if_notlessthan); |
474 Goto(if_false); | 484 Goto(if_false); |
475 } | 485 } |
476 | 486 |
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
962 } | 972 } |
963 } | 973 } |
964 } | 974 } |
965 | 975 |
966 bound_ = true; | 976 bound_ = true; |
967 } | 977 } |
968 | 978 |
969 } // namespace compiler | 979 } // namespace compiler |
970 } // namespace internal | 980 } // namespace internal |
971 } // namespace v8 | 981 } // namespace v8 |
OLD | NEW |