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/access-builder.h" | 5 #include "src/compiler/access-builder.h" |
6 #include "src/compiler/common-operator.h" | 6 #include "src/compiler/common-operator.h" |
7 #include "src/compiler/graph.h" | 7 #include "src/compiler/graph.h" |
8 #include "src/compiler/graph-visualizer.h" | 8 #include "src/compiler/graph-visualizer.h" |
9 #include "src/compiler/js-operator.h" | 9 #include "src/compiler/js-operator.h" |
10 #include "src/compiler/node.h" | 10 #include "src/compiler/node.h" |
(...skipping 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1053 | 1053 |
1054 | 1054 |
1055 TARGET_TEST_F(SchedulerTest, CallException) { | 1055 TARGET_TEST_F(SchedulerTest, CallException) { |
1056 Node* start = graph()->NewNode(common()->Start(1)); | 1056 Node* start = graph()->NewNode(common()->Start(1)); |
1057 graph()->SetStart(start); | 1057 graph()->SetStart(start); |
1058 | 1058 |
1059 Node* p0 = graph()->NewNode(common()->Parameter(0), start); | 1059 Node* p0 = graph()->NewNode(common()->Parameter(0), start); |
1060 Node* c1 = graph()->NewNode(&kMockCall, start); | 1060 Node* c1 = graph()->NewNode(&kMockCall, start); |
1061 Node* ok1 = graph()->NewNode(common()->IfSuccess(), c1); | 1061 Node* ok1 = graph()->NewNode(common()->IfSuccess(), c1); |
1062 Node* ex1 = graph()->NewNode( | 1062 Node* ex1 = graph()->NewNode( |
1063 common()->IfException(IfExceptionHint::kLocallyUncaught), c1); | 1063 common()->IfException(IfExceptionHint::kLocallyUncaught), c1, c1); |
1064 Node* c2 = graph()->NewNode(&kMockCall, ok1); | 1064 Node* c2 = graph()->NewNode(&kMockCall, ok1); |
1065 Node* ok2 = graph()->NewNode(common()->IfSuccess(), c2); | 1065 Node* ok2 = graph()->NewNode(common()->IfSuccess(), c2); |
1066 Node* ex2 = graph()->NewNode( | 1066 Node* ex2 = graph()->NewNode( |
1067 common()->IfException(IfExceptionHint::kLocallyUncaught), c2); | 1067 common()->IfException(IfExceptionHint::kLocallyUncaught), c2, c2); |
1068 Node* hdl = graph()->NewNode(common()->Merge(2), ex1, ex2); | 1068 Node* hdl = graph()->NewNode(common()->Merge(2), ex1, ex2); |
1069 Node* m = graph()->NewNode(common()->Merge(2), ok2, hdl); | 1069 Node* m = graph()->NewNode(common()->Merge(2), ok2, hdl); |
1070 Node* phi = graph()->NewNode(common()->Phi(kMachAnyTagged, 2), c2, p0, m); | 1070 Node* phi = graph()->NewNode(common()->Phi(kMachAnyTagged, 2), c2, p0, m); |
1071 Node* ret = graph()->NewNode(common()->Return(), phi, start, m); | 1071 Node* ret = graph()->NewNode(common()->Return(), phi, start, m); |
1072 Node* end = graph()->NewNode(common()->End(1), ret); | 1072 Node* end = graph()->NewNode(common()->End(1), ret); |
1073 | 1073 |
1074 graph()->SetEnd(end); | 1074 graph()->SetEnd(end); |
1075 | 1075 |
1076 Schedule* schedule = ComputeAndVerifySchedule(17); | 1076 Schedule* schedule = ComputeAndVerifySchedule(17); |
1077 // Make sure the exception blocks as well as the handler are deferred. | 1077 // Make sure the exception blocks as well as the handler are deferred. |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1160 | 1160 |
1161 Schedule* schedule = ComputeAndVerifySchedule(6); | 1161 Schedule* schedule = ComputeAndVerifySchedule(6); |
1162 BasicBlock* block = schedule->block(loop); | 1162 BasicBlock* block = schedule->block(loop); |
1163 EXPECT_EQ(block, schedule->block(effect)); | 1163 EXPECT_EQ(block, schedule->block(effect)); |
1164 EXPECT_GE(block->rpo_number(), 0); | 1164 EXPECT_GE(block->rpo_number(), 0); |
1165 } | 1165 } |
1166 | 1166 |
1167 } // namespace compiler | 1167 } // namespace compiler |
1168 } // namespace internal | 1168 } // namespace internal |
1169 } // namespace v8 | 1169 } // namespace v8 |
OLD | NEW |