Clean up extclass remenants

This is left over from f2db9f1268, in which I
should have cleaned all of this up.  One of our developers was hitting the
removed warning, which isn't necessary since the concept of a separate
"classifier" is no longer a thing after the aforementioned commit.

* rater/rater.xsd (no-extclass, no-extclass-keeps): Remove.
* src/current/rater.xsd: Likewise.  (I really need to deduplicate these.)
* src/current/compiler/js.xsl (compiler:entry-rater): Remove inaccurate
    comment (genclasses is used for other things).
* src/current/include/depgen.xsl (preproc:depgen-match): Remove error
    checking for pulling in non-external classes (this is the error that the
    developer hit that is no longer needed).
* src/current/include/preproc/eligclass.xsl (preproc:sym): Remove
    `@extclass' predicate.  Remove portion of comment.
* src/current/include/preproc/expand.xsl: Remove ancient footnote that
    even references an old internal rater!
* src/current/include/preproc/macros.xsl (preproc:class-groupgen): Remove
    external propagation.
* src/current/include/preproc/symtable.xsl (preproc:symimport): Remove
    extclass checks and propagation.
  (preproc:symtable)[lv:rate]: Remove external propagation.
    [lv:classify]: Likewise.
* src/current/include/preproc/template.xsl (preproc:inline-apply): Remove
    external sym metadata support.
master
Mike Gerwitz 2019-05-22 12:57:35 -04:00
parent c888e17e97
commit 13ed4cd7dc
9 changed files with 8 additions and 135 deletions

View File

@ -439,17 +439,6 @@
</xs:annotation>
</xs:attribute>
<xs:attribute name="no-extclass" type="xs:boolean">
<xs:annotation>
<xs:documentation xml:lang="en">
Do not import symbols flagged as external to the classifier.
This is of limited use outside of specialized settings, such as the
UI classifier.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="keep-classes" type="xs:boolean">
<xs:annotation>
<xs:documentation xml:lang="en">
@ -1935,15 +1924,6 @@
</xs:annotation>
</xs:attribute>
<xs:attribute name="no-extclass-keeps" type="xs:boolean">
<xs:annotation>
<xs:documentation xml:lang="en">
When importing @keep symbols from packages, ignore those flagged
as @extclass
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="auto-keep-imports" type="xs:boolean">
<xs:annotation>
<xs:documentation xml:lang="en">

View File

@ -101,7 +101,6 @@
<value-of select="$compiler:nl" />
<text>var classes = {};</text>
<!-- for @external generated clases -->
<text>var genclasses = {};</text>
</template>

View File

@ -440,28 +440,6 @@
<template name="preproc:depgen-match">
<param name="on" select="@on" />
<param name="symtable-map" as="map(*)" tunnel="yes" />
<variable name="class" select="ancestor::lv:classify" />
<variable name="sym" as="element( preproc:sym )"
select="$symtable-map( $on )" />
<!-- are we depending on another classification? -->
<if test="$sym/@type='cgen'">
<variable name="cname" select="substring-after( $sym/@parent, ':class:' )" />
<!-- check if one of our dependencies wants to be external to the classifier,
but we're trying to pull them in...tug-of-war -->
<if test="$sym/@extclass='true' and not( $class/@external='true' )">
<message terminate="yes">
<text>[preproc] !!! fatal: internal classification `</text>
<value-of select="$class/@as" />
<text>' cannot pull in external classification `</text>
<value-of select="$cname" />
<text>'</text>
</message>
</if>
</if>
<!-- process the @on -->
<call-template name="preproc:depgen-c-normal">

View File

@ -241,18 +241,12 @@
All terminiating classifications defined in the package must yield false
for the package to be eligible.
N.B. This checks to ensure @extclass is not set; this prevents errors when
the eligibility classification attempts to pull in a terminating
classification marked as external to the classifier. There may or may not
be something we want to do about this in the future.
-->
<template match="preproc:sym[
not( @src )
and not( @pollute='true' )
and @type='class'
and @terminate='true'
and not( @extclass='true' )
]"
as="element( lv:match )"
priority="5"

View File

@ -687,46 +687,3 @@
</template>
</stylesheet>
<!--
Footnotes
What!? We need footnotes for this project!?
[0] This was a complicated issue to begin dealing with due to the information we
need and the information that is available. In particular, at this point, we
would like to exclude any non-external objects from appearing in the
rate-only output, but we cannot do that, since the preprocessor has not yet
reached that block! We cannot reorder, because the class order block depends
on the rate block!
(See the commit that introduced this footnote: In the past, the template at
this position passed an `external-only' flag to the template.)
Originally, the method was to ``guess'' based on the how the system was
currently being used (dangerous, but was meant to be temporary...though we
know how that goes...): implicit externals were ignored, meaning it may not
function as we would like. Now, this could be resolved in the short-term by
actually addinging explicit external attributes to everything that needed it
so that this code would run smoothly. Worked great! Well, so I had thought.
Then it came down to a certain classification that used the `frame'
classification. This classification was only used by an external
classification in scottsdale, but other companies used it for rating, so the
@external classifier was inappropriate. Of course, the system could easily
figure out if it was to be marked as external or not (it already does), but
we do not yet have access to that information. Therefore, what ended up
happening, was the frame classification was excluded from the classifier,
excluded from one of the iterations that this footnote references (because
it was not explicitly external) and included elsewhere where we didn't care
if it was external or not. When the dependency tree was flattened to
determine compilation order, the classification that uses `frame' was
compiled *before* the `frame' classification itself, due to that exclusion!
Since `frame' was excluded from the classifier, therefore, it was always
false! That is the situation I was trying to avoid with the explicit
@external attributes, but here, that solution would not work.
Therefore, checking for external-only here will not work; we must output
everything and work on post-processing the data once everything is said and
done, to remove the duplicates that are also present in the classifier.
-->

View File

@ -279,15 +279,11 @@
<variable name="parent-name" select="ancestor::lv:classify/@as" />
<variable name="yields" select="concat( 'is', $id )" />
<variable name="external" as="xs:string?"
select="ancestor::lv:classify/@external" />
<!-- this will be raised outside of the parent classification during
post-processing -->
<lv:classify as="{$id}" yields="{$yields}"
preproc:generated="true"
preproc:generated-from="{$parent-name}"
external="{$external}"
desc="(generated from predicate group of {$parent-name}">
<if test="local-name() = 'any'">
<attribute name="any" select="'true'" />

View File

@ -565,7 +565,6 @@
<param name="orig-root" />
<param name="package" select="@package" />
<param name="export" select="@export" />
<param name="no-extclass" select="@no-extclass" />
<param name="keep-classes" select="@keep-classes" />
<variable name="path" as="xs:string"
@ -618,15 +617,12 @@
will not be imported -->
<for-each select="
$syms/preproc:sym[
(
not( @local='true' )
or @pollute='true'
or (
( @type='class' or @type='cgen' )
and $keep-classes='true'
)
not( @local='true' )
or @pollute='true'
or (
( @type='class' or @type='cgen' )
and $keep-classes='true'
)
and not( $no-extclass='true' and @extclass='true' )
]
">
<copy>
@ -640,7 +636,7 @@
<when test="@pollute='true'
and @local='true'
and not( @extern='true' )">
<sequence select="@name, @src, @pollute, @parent, @extclass" />
<sequence select="@name, @src, @pollute, @parent" />
</when>
<!-- copy all the symbol information -->
@ -690,10 +686,7 @@
<template match="lv:rate" mode="preproc:symtable" priority="5">
<variable name="external" select="boolean( @external='true' )" />
<preproc:sym name="{@yields}" type="rate"
extclass="{$external}"
local="{@local}" dtype="float" dim="0" tex="{@sym}">
<if test="@preproc:generated = 'true'">
@ -762,14 +755,13 @@
<!-- note the @dim value; this is determined later from its dependencies -->
<template match="lv:classify" mode="preproc:symtable" priority="5">
<variable name="external" select="boolean( @external='true' )" />
<variable name="terminate" select="boolean( @terminate='true' )" />
<variable name="is-generated" as="xs:boolean"
select="@preproc:generated = 'true'" />
<preproc:sym name=":class:{@as}"
extclass="{$external}" terminate="{$terminate}"
terminate="{$terminate}"
type="class" dim="?" desc="{@desc}" yields="{@yields}"
orig-name="{@as}">
@ -787,7 +779,7 @@
<if test="@yields">
<preproc:sym name="{@yields}"
parent=":class:{@as}"
extclass="{$external}" terminate="{$terminate}"
terminate="{$terminate}"
type="cgen" dtype="boolean" dim="?" desc="{@desc}">
<if test="@preproc:yields-generated">

View File

@ -512,8 +512,6 @@
or @yields = current()/@yields )
and ( not( current()/@parent )
or @parent = current()/@parent )
and ( not( current()/@external )
or @external = current()/@external )
and ( not( current()/@imports = 'true' )
or not( @src ) )
and ( not( current()/@name-prefix )
@ -548,7 +546,6 @@
<lv:with-param name="@sym_desc@" value="{@desc}" />
<lv:with-param name="@sym_yields@" value="{@yields}" />
<lv:with-param name="@sym_parent@" value="{@parent}" />
<lv:with-param name="@sym_external@" value="{@external}" />
</lv:apply-template>
</for-each>
</template>

View File

@ -427,17 +427,6 @@
</xs:annotation>
</xs:attribute>
<xs:attribute name="no-extclass" type="xs:boolean">
<xs:annotation>
<xs:documentation xml:lang="en">
Do not import symbols flagged as external to the classifier.
This is of limited use outside of specialized settings, such as the
UI classifier.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="keep-classes" type="xs:boolean">
<xs:annotation>
<xs:documentation xml:lang="en">
@ -1908,15 +1897,6 @@
</xs:annotation>
</xs:attribute>
<xs:attribute name="no-extclass-keeps" type="xs:boolean">
<xs:annotation>
<xs:documentation xml:lang="en">
When importing @keep symbols from packages, ignore those flagged
as @extclass
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="auto-keep-imports" type="xs:boolean">
<xs:annotation>
<xs:documentation xml:lang="en">