core: Remove @keep

"keep" is an old feature that forced the linker to retain symbols that were
unused.  This was removed long ago in favor of having all linker roots
defined by the return map.

This also removes an old `@always`, which seems like a typo for
`when="always"` or something...not entirely sure.

DEV-7145
main
Mike Gerwitz 2022-08-22 14:59:16 -04:00
parent acd0aea6a4
commit 6269f8de6e
4 changed files with 8 additions and 26 deletions

View File

@ -139,14 +139,12 @@
<classify as="always"
desc="Always true"
yields="alwaysTrue"
keep="true" />
yields="alwaysTrue" />
<classify as="never"
any="true"
desc="Never true"
yields="neverTrue"
keep="true" />
yields="neverTrue" />
</section>

View File

@ -202,7 +202,6 @@
<param name="@generates@" desc="Variable to generate into" />
<param name="@when@" desc="Conditional bump" />
<param name="@class@" desc="Class to match on" />
<param name="@keep@" desc="Value of keep flag" />
<!-- alternative to @name@ -->
<param name="@const@" desc="Constant value, instead of named" />
@ -211,7 +210,7 @@
<param name="@maxpercent@" desc="Maximum percent" />
<rate yields="_{@generates@}" keep="@keep@">
<rate yields="_{@generates@}">
<c:sum of="@name@" index="k" generates="@generates@" desc="Bumped value">
<c:cases>
<!-- if a condition was provided, check it first -->

View File

@ -76,8 +76,7 @@
-->
<classify as="expect-ok"
yields="@result@"
desc="All features conform to specifications"
keep="true">
desc="All features conform to specifications">
<inline-template>
<for-each>
<sym-set name-prefix="expect-conform-"
@ -154,8 +153,7 @@
<expand-sequence>
<expand-sequence>
<classify as="expect-conform-{@__prefix@}{@__uniq@}"
desc="{@__full_name@} meets expectations"
keep="true">
desc="{@__full_name@} meets expectations">
<inline-template>
<for-each>
<sym-set name-prefix="expect-that-{@__prefix@}"

View File

@ -52,9 +52,6 @@
<template name="_cmatch-to-vector_" desc="Vectorizes a classification match">
<param name="@class@" desc="Classification match string" />
<param name="@generates@" desc="Variable to yield generates (will yield a vector)" />
<param name="@keep@" desc="Rate block @keep">
<text></text>
</param>
<param name="@yields@" desc="Dummy variable to yield generates (useless, but required)">
<text>__</text>
@ -74,7 +71,7 @@
<!-- this conversion is as simple as using a generator to yield the value
of _CMATCH_ for each index -->
<rate class="@class@" yields="@yields@" always="true" keep="@keep@">
<rate class="@class@" yields="@yields@">
<c:sum of="_CMATCH_" index="k" generates="@generates@" desc="@gendesc@" sym="@sym@">
<c:value-of name="_CMATCH_" index="k" />
</c:sum>
@ -90,12 +87,8 @@
<text></text>
</param>
<param name="@keep@" desc="Rate block @keep">
<text></text>
</param>
<rate class="@class@" accumulate="none" yields="@yields@" sym="@sym@" keep="@keep@">
<rate class="@class@" yields="@yields@" sym="@sym@">
<!-- if any single one matches, then we want to yield a 1 -->
<c:apply name="maxreduce" maxreduce_set="_CMATCH_" />
</rate>
@ -124,10 +117,6 @@
<param-value snake="true" name="@as@" />
</param>
<param name="@keep@" desc="Whether to force compilation">
<text></text>
</param>
<param name="@sym@" desc="Optional yield symbol">
<text></text>
</param>
@ -141,12 +130,10 @@
<t:cmatch-to-scalar class="--{@as@}-pre"
yields="__{@yields@}Scalar"
sym="@sym@"
keep="@keep@" />
sym="@sym@" />
<classify as="@as@" yields="@yields@"
desc="@desc@"
keep="@keep@"
sym="@sym@">
<match on="__{@yields@}Scalar" />
</classify>