Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: test/unittests/compiler/scheduler-unittest.cc

Issue 1158563008: [turbofan] Introduce prediction for exception handlers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Architecture ports. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after
1052 } 1052 }
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(common()->IfException(), c1); 1062 Node* ex1 = graph()->NewNode(
1063 common()->IfException(IfExceptionHint::kLocallyUncaught), c1);
1063 Node* c2 = graph()->NewNode(&kMockCall, ok1); 1064 Node* c2 = graph()->NewNode(&kMockCall, ok1);
1064 Node* ok2 = graph()->NewNode(common()->IfSuccess(), c2); 1065 Node* ok2 = graph()->NewNode(common()->IfSuccess(), c2);
1065 Node* ex2 = graph()->NewNode(common()->IfException(), c2); 1066 Node* ex2 = graph()->NewNode(
1067 common()->IfException(IfExceptionHint::kLocallyUncaught), c2);
1066 Node* hdl = graph()->NewNode(common()->Merge(2), ex1, ex2); 1068 Node* hdl = graph()->NewNode(common()->Merge(2), ex1, ex2);
1067 Node* m = graph()->NewNode(common()->Merge(2), ok2, hdl); 1069 Node* m = graph()->NewNode(common()->Merge(2), ok2, hdl);
1068 Node* phi = graph()->NewNode(common()->Phi(kMachAnyTagged, 2), c2, p0, m); 1070 Node* phi = graph()->NewNode(common()->Phi(kMachAnyTagged, 2), c2, p0, m);
1069 Node* ret = graph()->NewNode(common()->Return(), phi, start, m); 1071 Node* ret = graph()->NewNode(common()->Return(), phi, start, m);
1070 Node* end = graph()->NewNode(common()->End(1), ret); 1072 Node* end = graph()->NewNode(common()->End(1), ret);
1071 1073
1072 graph()->SetEnd(end); 1074 graph()->SetEnd(end);
1073 1075
1074 Schedule* schedule = ComputeAndVerifySchedule(17); 1076 Schedule* schedule = ComputeAndVerifySchedule(17);
1075 // 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
1158 1160
1159 Schedule* schedule = ComputeAndVerifySchedule(6); 1161 Schedule* schedule = ComputeAndVerifySchedule(6);
1160 BasicBlock* block = schedule->block(loop); 1162 BasicBlock* block = schedule->block(loop);
1161 EXPECT_EQ(block, schedule->block(effect)); 1163 EXPECT_EQ(block, schedule->block(effect));
1162 EXPECT_GE(block->rpo_number(), 0); 1164 EXPECT_GE(block->rpo_number(), 0);
1163 } 1165 }
1164 1166
1165 } // namespace compiler 1167 } // namespace compiler
1166 } // namespace internal 1168 } // namespace internal
1167 } // namespace v8 1169 } // namespace v8
OLDNEW
« no previous file with comments | « test/unittests/compiler/node-properties-unittest.cc ('k') | test/unittests/compiler/tail-call-optimization-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698