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-10806main
parent
5e883e3c4f
commit
b0eca41c96
|
@ -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,39 +2451,19 @@
|
||||||
]]>
|
]]>
|
||||||
</text>
|
</text>
|
||||||
|
|
||||||
<choose>
|
<text>
|
||||||
<when test="compiler:use-legacy-classify()">
|
function div(x, y)
|
||||||
<text>
|
{
|
||||||
function div(x, y)
|
if (y === 0) return 0;
|
||||||
{
|
return x / y;
|
||||||
return x / y;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
function pow(x, p)
|
function pow(x, p)
|
||||||
{
|
{
|
||||||
return Math.pow(x, p);
|
if (x === 0) return 0;
|
||||||
}
|
return Math.pow(x, p);
|
||||||
</text>
|
}
|
||||||
</when>
|
</text>
|
||||||
|
|
||||||
<!-- x/0=0 introduced with new classification system; see commit message
|
|
||||||
for more detailed information -->
|
|
||||||
<otherwise>
|
|
||||||
<text>
|
|
||||||
function div(x, y)
|
|
||||||
{
|
|
||||||
if (y === 0) return 0;
|
|
||||||
return x / y;
|
|
||||||
}
|
|
||||||
|
|
||||||
function pow(x, p)
|
|
||||||
{
|
|
||||||
if (x === 0) return 0;
|
|
||||||
return Math.pow(x, p);
|
|
||||||
}
|
|
||||||
</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' ) )" />
|
||||||
|
|
|
@ -270,29 +270,15 @@
|
||||||
|
|
||||||
|
|
||||||
<template match="lv:match[@pattern]" mode="lvv:validate-match" priority="9">
|
<template match="lv:match[@pattern]" mode="lvv:validate-match" priority="9">
|
||||||
<choose>
|
<call-template name="lvv:error">
|
||||||
<!-- warn of upcoming removal -->
|
<with-param name="desc" select="'lv:match[@pattern] support removed'" />
|
||||||
<when test="compiler:use-legacy-classify()">
|
<with-param name="refnode" select="." />
|
||||||
<message select="concat( 'warning: ',
|
<with-param name="content">
|
||||||
ancestor::lv:classify/@as,
|
<text>use lookup tables in place of @pattern in `</text>
|
||||||
': lv:match[@pattern] support is deprecated ',
|
<value-of select="parent::lv:classify/@as" />
|
||||||
'and is removed with the new classification ',
|
<text>'</text>
|
||||||
'system; use lookup tables instead' )" />
|
</with-param>
|
||||||
</when>
|
</call-template>
|
||||||
|
|
||||||
<!-- @pattern support removed in the new classification system -->
|
|
||||||
<otherwise>
|
|
||||||
<call-template name="lvv:error">
|
|
||||||
<with-param name="desc" select="'lv:match[@pattern] support removed'" />
|
|
||||||
<with-param name="refnode" select="." />
|
|
||||||
<with-param name="content">
|
|
||||||
<text>use lookup tables in place of @pattern in `</text>
|
|
||||||
<value-of select="parent::lv:classify/@as" />
|
|
||||||
<text>'</text>
|
|
||||||
</with-param>
|
|
||||||
</call-template>
|
|
||||||
</otherwise>
|
|
||||||
</choose>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue