Combine all m* optimizations

With the recent refactoring, it's clear that these are the same thing.
master
Mike Gerwitz 2021-01-29 12:07:58 -05:00
parent a563c3ce62
commit 5adf1b7589
1 changed files with 1 additions and 37 deletions

View File

@ -716,43 +716,7 @@
<!-- TODO: generalize -->
<choose>
<when test="$nm > 0 and $ns = 0">
<variable name="jsmatrix" as="xs:string"
select="compiler:optimized-matrix-matches(
$symtable-map, $classify, $matrices )" />
<variable name="jsvec" as="xs:string"
select="compiler:optimized-vec-matches(
$symtable-map, $classify, $vectors )" />
<variable name="js" as="xs:string"
select="compiler:wrap-nonempty(
concat( 'vm', $ctype ),
$jsmatrix,
$jsvec )" />
<sequence select="concat( $var, '=Em(', $yield-to, '=', $js, ');' )" />
</when>
<when test="$nm > 0 and $nv = 0 and $ns > 0">
<variable name="js-matrix" as="xs:string"
select="compiler:optimized-matrix-matches(
$symtable-map, $classify, $matrices )" />
<variable name="js-scalar" as="xs:string"
select="compiler:optimized-scalar-matches(
$symtable-map, $classify, $scalars )" />
<variable name="js" as="xs:string"
select="compiler:wrap-nonempty(
concat( 'sm', $ctype ),
$js-matrix,
$js-scalar )" />
<sequence select="concat( $var, '=Em(', $yield-to, '=', $js, ');' )" />
</when>
<when test="$nm > 0 and $nv > 0 and $ns > 0">
<when test="$nm > 0">
<variable name="js-matrix" as="xs:string"
select="compiler:optimized-matrix-matches(
$symtable-map, $classify, $matrices )" />