File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change 2
2
//
3
3
// This source file is part of the Swift.org open source project
4
4
//
5
- // Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
5
+ // Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors
6
6
// Licensed under Apache License v2.0 with Runtime Library Exception
7
7
//
8
8
// See https://swift.org/LICENSE.txt for license information
@@ -472,8 +472,6 @@ ConstraintSystem::SolverState::~SolverState() {
472
472
ConstraintSystem::SolverScope::SolverScope (ConstraintSystem &cs)
473
473
: cs(cs), CGScope(cs.CG)
474
474
{
475
- ++cs.solverState ->depth ;
476
-
477
475
resolvedOverloadSets = cs.resolvedOverloadSets ;
478
476
numTypeVariables = cs.TypeVariables .size ();
479
477
numSavedBindings = cs.solverState ->savedBindings .size ();
@@ -488,13 +486,9 @@ ConstraintSystem::SolverScope::SolverScope(ConstraintSystem &cs)
488
486
489
487
cs.solverState ->registerScope (this );
490
488
assert (!cs.failedConstraint && " Unexpected failed constraint!" );
491
-
492
- ++cs.solverState ->NumStatesExplored ;
493
489
}
494
490
495
491
ConstraintSystem::SolverScope::~SolverScope () {
496
- --cs.solverState ->depth ;
497
-
498
492
// Erase the end of various lists.
499
493
cs.resolvedOverloadSets = resolvedOverloadSets;
500
494
truncate (cs.TypeVariables , numTypeVariables);
Original file line number Diff line number Diff line change 2
2
//
3
3
// This source file is part of the Swift.org open source project
4
4
//
5
- // Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
5
+ // Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors
6
6
// Licensed under Apache License v2.0 with Runtime Library Exception
7
7
//
8
8
// See https://swift.org/LICENSE.txt for license information
@@ -1150,6 +1150,9 @@ class ConstraintSystem {
1150
1150
// /
1151
1151
// / \param scope The scope to associate with current solver state.
1152
1152
void registerScope (SolverScope *scope) {
1153
+ ++depth;
1154
+ ++NumStatesExplored;
1155
+
1153
1156
CS.incrementScopeCounter ();
1154
1157
auto scopeInfo =
1155
1158
std::make_tuple (scope, retiredConstraints.begin (),
@@ -1212,6 +1215,8 @@ class ConstraintSystem {
1212
1215
// /
1213
1216
// / \param scope The solver scope to rollback.
1214
1217
void rollback (SolverScope *scope) {
1218
+ --depth;
1219
+
1215
1220
SolverScope *savedScope;
1216
1221
// The position of last retired constraint before given scope.
1217
1222
ConstraintList::iterator lastRetiredPos;
You can’t perform that action at this time.
0 commit comments