Remove legacy classification system flag

This should have been cleaned up long ago; it hasn't been used for a couple
of years now.

DEV-10806
main
Mike Gerwitz 2023-10-05 11:53:35 -04:00
parent 5e883e3c4f
commit b0eca41c96
3 changed files with 25 additions and 95 deletions

View File

@ -41,8 +41,6 @@
<!-- legacy classification system --> <!-- legacy classification system -->
<include href="js-legacy.xsl" /> <include href="js-legacy.xsl" />
<!-- and whether to enable it (set to non-empty string) -->
<param name="legacy-classify" select="''" />
<!-- calculation compiler --> <!-- calculation compiler -->
<include href="js-calc.xsl" /> <include href="js-calc.xsl" />
@ -641,20 +639,6 @@
</function> </function>
<template mode="compile" priority="6"
match="lv:classify[ compiler:use-legacy-classify() ]">
<param name="symtable-map" as="map(*)" tunnel="yes" />
<sequence select="concat(
$compiler:nl,
'/*!lc*/',
string-join(
compiler:compile-classify-legacy( $symtable-map, . ),
'' ),
'/*lc!*/' )" />
</template>
<template match="lv:classify" mode="compile" priority="5"> <template match="lv:classify" mode="compile" priority="5">
<param name="symtable-map" as="map(*)" tunnel="yes" /> <param name="symtable-map" as="map(*)" tunnel="yes" />
@ -664,8 +648,7 @@
<template mode="compile" priority="8" <template mode="compile" priority="8"
match="lv:classify[ match="lv:classify[
@preproc:inline='true' @preproc:inline='true' ]">
and not( compiler:use-legacy-classify() ) ]">
<!-- emit nothing; it'll be inlined at the match site --> <!-- emit nothing; it'll be inlined at the match site -->
</template> </template>
@ -708,14 +691,6 @@
</function> </function>
<function name="compiler:use-legacy-classify" as="xs:boolean">
<variable name="flagname" as="xs:string"
select="'___feature-newclassify'" />
<sequence select="$legacy-classify != ''" />
</function>
<function name="compiler:compile-classify-assign" as="xs:string"> <function name="compiler:compile-classify-assign" as="xs:string">
<param name="symtable-map" as="map(*)" /> <param name="symtable-map" as="map(*)" />
<param name="classify" as="element( lv:classify )" /> <param name="classify" as="element( lv:classify )" />
@ -2476,24 +2451,6 @@
]]> ]]>
</text> </text>
<choose>
<when test="compiler:use-legacy-classify()">
<text>
function div(x, y)
{
return x / y;
}
function pow(x, p)
{
return Math.pow(x, p);
}
</text>
</when>
<!-- x/0=0 introduced with new classification system; see commit message
for more detailed information -->
<otherwise>
<text> <text>
function div(x, y) function div(x, y)
{ {
@ -2507,8 +2464,6 @@
return Math.pow(x, p); return Math.pow(x, p);
} }
</text> </text>
</otherwise>
</choose>
<sequence select="unparsed-text( <sequence select="unparsed-text(
concat( $__path-root, '/src/js/sha256.js' ) )" /> concat( $__path-root, '/src/js/sha256.js' ) )" />

View File

@ -270,18 +270,6 @@
<template match="lv:match[@pattern]" mode="lvv:validate-match" priority="9"> <template match="lv:match[@pattern]" mode="lvv:validate-match" priority="9">
<choose>
<!-- warn of upcoming removal -->
<when test="compiler:use-legacy-classify()">
<message select="concat( 'warning: ',
ancestor::lv:classify/@as,
': lv:match[@pattern] support is deprecated ',
'and is removed with the new classification ',
'system; use lookup tables instead' )" />
</when>
<!-- @pattern support removed in the new classification system -->
<otherwise>
<call-template name="lvv:error"> <call-template name="lvv:error">
<with-param name="desc" select="'lv:match[@pattern] support removed'" /> <with-param name="desc" select="'lv:match[@pattern] support removed'" />
<with-param name="refnode" select="." /> <with-param name="refnode" select="." />
@ -291,8 +279,6 @@
<text>'</text> <text>'</text>
</with-param> </with-param>
</call-template> </call-template>
</otherwise>
</choose>
</template> </template>

View File

@ -288,11 +288,7 @@
( lv:any | lv:all ) ( lv:any | lv:all )
and not( eseq:is-expandable(.) ) ]"> and not( eseq:is-expandable(.) ) ]">
<variable name="result"> <variable name="result">
<apply-templates select="." mode="preproc:class-groupgen"> <apply-templates select="." mode="preproc:class-groupgen" />
<with-param name="legacy-classify"
select="compiler:use-legacy-classify()"
tunnel="yes" />
</apply-templates>
</variable> </variable>
<apply-templates select="$result/lv:classify" mode="preproc:class-extract" /> <apply-templates select="$result/lv:classify" mode="preproc:class-extract" />
@ -413,8 +409,6 @@
<template match="lv:any|lv:all" mode="preproc:class-groupgen" priority="5"> <template match="lv:any|lv:all" mode="preproc:class-groupgen" priority="5">
<param name="legacy-classify" as="xs:boolean" tunnel="yes" />
<variable name="id" select="preproc:pkg-generate-id(.)" /> <variable name="id" select="preproc:pkg-generate-id(.)" />
<variable name="parent-name" select="ancestor::lv:classify/@as" /> <variable name="parent-name" select="ancestor::lv:classify/@as" />
@ -430,19 +424,14 @@
<attribute name="any" select="'true'" /> <attribute name="any" select="'true'" />
</if> </if>
<if test="not( $legacy-classify )">
<attribute name="preproc:inline" select="'true'" /> <attribute name="preproc:inline" select="'true'" />
</if>
<apply-templates mode="preproc:class-groupgen" /> <apply-templates mode="preproc:class-groupgen" />
</lv:classify> </lv:classify>
<!-- this will remain in its place --> <!-- this will remain in its place -->
<lv:match on="{$yields}" value="TRUE" <lv:match on="{$yields}" value="TRUE"
preproc:generated="true"> preproc:generated="true">
<if test="not( $legacy-classify )">
<attribute name="preproc:inline" select="'true'" /> <attribute name="preproc:inline" select="'true'" />
</if>
</lv:match> </lv:match>
</template> </template>