From 53360548da6e2acab08d4db8905d737b5ddc4a0e Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Mon, 19 Jul 2021 14:53:25 -0400 Subject: [PATCH] tame: Ignore duplicate conjunctive predicates in value list optimization error This can occur in generated code (e.g. from proguic if a question-based predicate inherits a predicate already specified). This commit does not change anything that's emitted; it merely allows proceeding. TAMER can be smarter about this; I don't want to invest more time into generalizing deduplication of predicates. --- RELEASES.md | 10 ++++++++++ src/current/compiler/js.xsl | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/RELEASES.md b/RELEASES.md index 0d588b74..085229b4 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -14,6 +14,16 @@ commits that introduce the changes. To make a new release, run `tools/mkrelease`, which will handle updating the heading for you. +NEXT +==== +Compiler +-------- +- Do not report value list optimization error on duplicate conjunctive + predicates. + - This doesn't emit code any differently, it merely permits the situation, + which can occur in generated code. + + v18.0.2 (2021-07-15) ==================== This is a bugfix release that corrects issues with the Summary Page compiler diff --git a/src/current/compiler/js.xsl b/src/current/compiler/js.xsl index 8c97de86..c34f099d 100644 --- a/src/current/compiler/js.xsl +++ b/src/current/compiler/js.xsl @@ -1030,7 +1030,8 @@ not( c:eq ) or ( c:eq/c:value-of - and $symtable-map( c:eq/c:value-of/@name )/@dim != '0' ) ] )" /> + and $symtable-map( c:eq/c:value-of/@name )/@dim != '0' ) ] ) + and count( distinct-values( $matches/c:eq/c:value-of/@name ) ) > 1" />