|author||Mike Gerwitz <email@example.com>||2017-07-12 15:21:43 -0400|
|committer||Mike Gerwitz <firstname.lastname@example.org>||2017-07-12 15:58:37 -0400|
Remove @keep support from linker
And everything else. This is a big (important) change; it addresses one of the greatest pains of the system. Keeps were added during the DSL rewrite (to support symbols and such) to work around the issue that there was no symbol-driven map; it allowed symbols to persist disjoint from the `__yield' dependency graph so that they could be mapped back and used by external systems. The problem with that is that it's both messy (coupling the concept of external dependencies with the actual code) and difficult to work with. It had a huge performance impact on the linker for two reasons: - Checking whether a package had already been seen and importing the keeps on first visit was expensive because of tree searching and manipulation; and - _every_ keep was imported and processed by the linker, even if it wouldn't end up being used by a particular program. The later especially had huge performance impacts on the entire system. The entire dependency graph is now map-driven, with the exception of the implicit `__yield' (which will eventually be moved into the map as well and the magic `lv:yield' removed in favor of a template). Performance-wise: our largest program ("dwelling") has many thousands of symbols and the largest package imported the majority of them, many of them unneeded, as the result of @keep subgraphs. Compilation of the largest package within that (for the UI) took about a minute and a half and ate up ~6GiB of RAM, for what really is a trivial task of resolving externs, some basic symbol processing, a topological sort, and ordering code fragments. After this change, it takes ~15s and less than 2GiB of RAM. Still a lot---and more improvements can be made---but much, much better. @keep and friends was left in rater.xsd so that nothing breaks while code is cleaned up; it'll be removed in the future. * src/current/compiler/linker.xsl: Remove @keep support. * src/current/dot/attr-keep.xsl: Remove now-unneeded template. * src/current/dot/defnode.xsl: Remove @keep and related. * src/current/include/preproc/eligclass.xsl: Remove @keep and related. * src/current/include/preproc/expand.xsl: Remove @keep and related. * src/current/include/preproc/macros.xsl: Remove @keep and related. * src/current/include/preproc/symtable.xsl: Remove @keep and related. * src/current/rater.xsd: Add TODO to remove @keep and friends.
Diffstat (limited to 'src/current/dot')
2 files changed, 0 insertions, 51 deletions
diff --git a/src/current/dot/attr-keep.xsl b/src/current/dot/attr-keep.xsl
deleted file mode 100644
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
- Styles node based on keep flag
- Copyright (C) 2016 LoVullo Associates, Inc.
- This file is part of TAME.
- TAME is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program. If not, see
- External nodes should be styled as such
-<xsl:template mode="dot:attr-keep" priority="5" match="
- *[ @keep='true' ]
- <dot:attr name="fontcolor">red</dot:attr>
- Default node attributes
-<xsl:template match="preproc:sym" mode="dot:defnode-keep" priority="1">
diff --git a/src/current/dot/defnode.xsl b/src/current/dot/defnode.xsl
index 1cf6501..6e350df 100644
@@ -92,7 +92,6 @@
<xsl:apply-templates select="." mode="dot:attr-extern" />
<xsl:apply-templates select="." mode="dot:attr-color" />
<xsl:apply-templates select="." mode="dot:attr-shape" />
- <xsl:apply-templates select="." mode="dot:attr-keep" />