Remove version-pruning criteria based on pushed node count

This commit is contained in:
Max Brunsfeld 2017-07-02 23:28:31 -07:00
parent fcffd4b732
commit f93f78ef2d
2 changed files with 3 additions and 9 deletions

View file

@ -2,7 +2,6 @@
static const unsigned MAX_COST_DIFFERENCE = 16 * ERROR_COST_PER_SKIPPED_TREE;
static const unsigned MAX_PUSH_COUNT_WITH_COUNT_DIFFERENCE = 24;
static const unsigned MAX_PUSH_COUNT_TO_ALLOW_MULTIPLE = 32;
static const unsigned MAX_DEPTH_TO_ALLOW_MULTIPLE = 12;
ErrorComparison error_status_compare(ErrorStatus a, ErrorStatus b, bool are_mergeable) {
@ -45,17 +44,11 @@ ErrorComparison error_status_compare(ErrorStatus a, ErrorStatus b, bool are_merg
}
if (a.count > 0) {
if (a.push_count > MAX_PUSH_COUNT_TO_ALLOW_MULTIPLE ||
b.push_count > MAX_PUSH_COUNT_TO_ALLOW_MULTIPLE ||
a.depth > MAX_DEPTH_TO_ALLOW_MULTIPLE ||
if (a.depth > MAX_DEPTH_TO_ALLOW_MULTIPLE ||
b.depth > MAX_DEPTH_TO_ALLOW_MULTIPLE) {
return a.depth <= b.depth ?
ErrorComparisonTakeLeft :
ErrorComparisonTakeRight;
} else {
return a.depth <= b.depth ?
ErrorComparisonPreferLeft :
ErrorComparisonPreferRight;
}
}

View file

@ -30,8 +30,9 @@ h i j k;
(program
(if_statement
(ERROR (identifier) (identifier))
(ERROR (identifier))
(identifier)
(ERROR (identifier))
(statement_block
(expression_statement
(identifier)