summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authortrav90 <travawine@protonmail.ch>2015-12-04 17:07:29 -0600
committertrav90 <travawine@protonmail.ch>2015-12-04 17:07:29 -0600
commit773b1154970428172e80ea737d5f4506a2823493 (patch)
tree9b2f3c8f8f7e6aaa512ac492a32e7e5702c5d6c1 /config
parent5e7e0080bb7452e3c63b5f990fa6f6ee3d3c3aeb (diff)
downloadpalemoon-gre-773b1154970428172e80ea737d5f4506a2823493.tar.gz
Remove GCC-dehydra support
Diffstat (limited to 'config')
-rw-r--r--config/static-checking-config.mk32
-rw-r--r--config/static-checking.js147
2 files changed, 0 insertions, 179 deletions
diff --git a/config/static-checking-config.mk b/config/static-checking-config.mk
index b134f916d..747283efd 100644
--- a/config/static-checking-config.mk
+++ b/config/static-checking-config.mk
@@ -5,38 +5,6 @@
# The entire tree should be subject to static analysis using the XPCOM
# script. Additional scripts may be added by specific subdirectories.
-DEHYDRA_SCRIPT = $(topsrcdir)/config/static-checking.js
-
-DEHYDRA_MODULES = \
- $(topsrcdir)/xpcom/analysis/final.js \
- $(topsrcdir)/xpcom/analysis/must-override.js \
- $(NULL)
-
-TREEHYDRA_MODULES = \
- $(topsrcdir)/xpcom/analysis/outparams.js \
- $(topsrcdir)/xpcom/analysis/stack.js \
- $(topsrcdir)/xpcom/analysis/flow.js \
- $(topsrcdir)/xpcom/analysis/static-init.js \
- $(topsrcdir)/js/src/jsstack.js \
- $(topsrcdir)/layout/generic/frame-verify.js \
- $(NULL)
-
-DEHYDRA_ARG_PREFIX=-fplugin-arg-gcc_treehydra-
-
-DEHYDRA_ARGS = \
- $(DEHYDRA_ARG_PREFIX)script=$(DEHYDRA_SCRIPT) \
- $(DEHYDRA_ARG_PREFIX)topsrcdir=$(topsrcdir) \
- $(DEHYDRA_ARG_PREFIX)objdir=$(DEPTH) \
- $(DEHYDRA_ARG_PREFIX)dehydra-modules=$(subst $(NULL) ,$(COMMA),$(strip $(DEHYDRA_MODULES))) \
- $(DEHYDRA_ARG_PREFIX)treehydra-modules=$(subst $(NULL) ,$(COMMA),$(strip $(TREEHYDRA_MODULES))) \
- $(NULL)
-
-DEHYDRA_FLAGS = -fplugin=$(DEHYDRA_PATH) $(DEHYDRA_ARGS)
-
-ifdef DEHYDRA_PATH
-OS_CXXFLAGS += $(DEHYDRA_FLAGS)
-endif
-
ifdef ENABLE_CLANG_PLUGIN
CLANG_PLUGIN := $(DEPTH)/build/clang-plugin/$(DLL_PREFIX)clang-plugin$(DLL_SUFFIX)
OS_CXXFLAGS += -Xclang -load -Xclang $(CLANG_PLUGIN) -Xclang -add-plugin -Xclang moz-check
diff --git a/config/static-checking.js b/config/static-checking.js
deleted file mode 100644
index 9e59741ba..000000000
--- a/config/static-checking.js
+++ /dev/null
@@ -1,147 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/**
- * A script for GCC-dehydra to analyze the Mozilla codebase and catch
- * patterns that are incorrect, but which cannot be detected by a compiler. */
-
-/**
- * Activate Treehydra outparams analysis if running in Treehydra.
- */
-
-function treehydra_enabled() {
- return this.hasOwnProperty('TREE_CODE');
-}
-
-sys.include_path.push(options.topsrcdir);
-
-include('string-format.js');
-
-let modules = [];
-
-function LoadModules(modulelist)
-{
- if (modulelist == "")
- return;
-
- let modulenames = modulelist.split(',');
- for each (let modulename in modulenames) {
- let module = { __proto__: this };
- include(modulename, module);
- modules.push(module);
- }
-}
-
-LoadModules(options['dehydra-modules']);
-if (treehydra_enabled())
- LoadModules(options['treehydra-modules']);
-
-function process_type(c)
-{
- for each (let module in modules)
- if (module.hasOwnProperty('process_type'))
- module.process_type(c);
-}
-
-function hasAttribute(c, attrname)
-{
- var attr;
-
- if (c.attributes === undefined)
- return false;
-
- for each (attr in c.attributes)
- if (attr.name == 'user' && attr.value[0] == attrname)
- return true;
-
- return false;
-}
-
-// This is useful for detecting method overrides
-function signaturesMatch(m1, m2)
-{
- if (m1.shortName != m2.shortName)
- return false;
-
- if ((!!m1.isVirtual) != (!!m2.isVirtual))
- return false;
-
- if (m1.isStatic != m2.isStatic)
- return false;
-
- let p1 = m1.type.parameters;
- let p2 = m2.type.parameters;
-
- if (p1.length != p2.length)
- return false;
-
- for (let i = 0; i < p1.length; ++i)
- if (!params_match(p1[i], p2[i]))
- return false;
-
- return true;
-}
-
-function params_match(p1, p2)
-{
- [p1, p2] = unwrap_types(p1, p2);
-
- for (let i in p1)
- if (i == "type" && !types_match(p1.type, p2.type))
- return false;
- else if (i != "type" && p1[i] !== p2[i])
- return false;
-
- for (let i in p2)
- if (!(i in p1))
- return false;
-
- return true;
-}
-
-function types_match(t1, t2)
-{
- if (!t1 || !t2)
- return false;
-
- [t1, t2] = unwrap_types(t1, t2);
-
- return t1 === t2;
-}
-
-function unwrap_types(t1, t2)
-{
- while (t1.variantOf)
- t1 = t1.variantOf;
-
- while (t2.variantOf)
- t2 = t2.variantOf;
-
- return [t1, t2];
-}
-
-const forward_functions = [
- 'process_type',
- 'process_tree_type',
- 'process_decl',
- 'process_tree_decl',
- 'process_function',
- 'process_tree',
- 'process_cp_pre_genericize',
- 'input_end'
-];
-
-function setup_forwarding(n)
-{
- this[n] = function() {
- for each (let module in modules) {
- if (module.hasOwnProperty(n)) {
- module[n].apply(this, arguments);
- }
- }
- }
-}
-
-for each (let n in forward_functions)
- setup_forwarding(n);