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/schedule.h" | 5 #include "src/compiler/schedule.h" |
6 #include "src/compiler/access-builder.h" | 6 #include "src/compiler/access-builder.h" |
7 #include "src/compiler/common-operator.h" | 7 #include "src/compiler/common-operator.h" |
8 #include "src/compiler/graph-visualizer.h" | 8 #include "src/compiler/graph-visualizer.h" |
9 #include "src/compiler/graph.h" | 9 #include "src/compiler/graph.h" |
10 #include "src/compiler/js-operator.h" | 10 #include "src/compiler/js-operator.h" |
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
545 } | 545 } |
546 | 546 |
547 | 547 |
548 TARGET_TEST_F(SchedulerTest, CallException) { | 548 TARGET_TEST_F(SchedulerTest, CallException) { |
549 Node* start = graph()->NewNode(common()->Start(1)); | 549 Node* start = graph()->NewNode(common()->Start(1)); |
550 graph()->SetStart(start); | 550 graph()->SetStart(start); |
551 | 551 |
552 Node* p0 = graph()->NewNode(common()->Parameter(0), start); | 552 Node* p0 = graph()->NewNode(common()->Parameter(0), start); |
553 Node* c1 = graph()->NewNode(&kMockCall, start); | 553 Node* c1 = graph()->NewNode(&kMockCall, start); |
554 Node* ok1 = graph()->NewNode(common()->IfSuccess(), c1); | 554 Node* ok1 = graph()->NewNode(common()->IfSuccess(), c1); |
555 Node* ex1 = graph()->NewNode( | 555 Node* ex1 = graph()->NewNode(common()->IfException(), c1, c1); |
556 common()->IfException(IfExceptionHint::kLocallyUncaught), c1, c1); | |
557 Node* c2 = graph()->NewNode(&kMockCall, ok1); | 556 Node* c2 = graph()->NewNode(&kMockCall, ok1); |
558 Node* ok2 = graph()->NewNode(common()->IfSuccess(), c2); | 557 Node* ok2 = graph()->NewNode(common()->IfSuccess(), c2); |
559 Node* ex2 = graph()->NewNode( | 558 Node* ex2 = graph()->NewNode(common()->IfException(), c2, c2); |
560 common()->IfException(IfExceptionHint::kLocallyUncaught), c2, c2); | |
561 Node* hdl = graph()->NewNode(common()->Merge(2), ex1, ex2); | 559 Node* hdl = graph()->NewNode(common()->Merge(2), ex1, ex2); |
562 Node* m = graph()->NewNode(common()->Merge(2), ok2, hdl); | 560 Node* m = graph()->NewNode(common()->Merge(2), ok2, hdl); |
563 Node* phi = graph()->NewNode(common()->Phi(MachineRepresentation::kTagged, 2), | 561 Node* phi = graph()->NewNode(common()->Phi(MachineRepresentation::kTagged, 2), |
564 c2, p0, m); | 562 c2, p0, m); |
565 Node* ret = graph()->NewNode(common()->Return(), phi, start, m); | 563 Node* ret = graph()->NewNode(common()->Return(), phi, start, m); |
566 Node* end = graph()->NewNode(common()->End(1), ret); | 564 Node* end = graph()->NewNode(common()->End(1), ret); |
567 | 565 |
568 graph()->SetEnd(end); | 566 graph()->SetEnd(end); |
569 | 567 |
570 Schedule* schedule = ComputeAndVerifySchedule(17); | 568 Schedule* schedule = ComputeAndVerifySchedule(17); |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
654 | 652 |
655 Schedule* schedule = ComputeAndVerifySchedule(6); | 653 Schedule* schedule = ComputeAndVerifySchedule(6); |
656 BasicBlock* block = schedule->block(loop); | 654 BasicBlock* block = schedule->block(loop); |
657 EXPECT_EQ(block, schedule->block(effect)); | 655 EXPECT_EQ(block, schedule->block(effect)); |
658 EXPECT_GE(block->rpo_number(), 0); | 656 EXPECT_GE(block->rpo_number(), 0); |
659 } | 657 } |
660 | 658 |
661 } // namespace compiler | 659 } // namespace compiler |
662 } // namespace internal | 660 } // namespace internal |
663 } // namespace v8 | 661 } // namespace v8 |
OLD | NEW |