summaryrefslogtreecommitdiffstats
path: root/js/src/regexp/update-headers.py
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/regexp/update-headers.py')
-rw-r--r--js/src/regexp/update-headers.py38
1 files changed, 0 insertions, 38 deletions
diff --git a/js/src/regexp/update-headers.py b/js/src/regexp/update-headers.py
deleted file mode 100644
index 0cff9d6ae..000000000
--- a/js/src/regexp/update-headers.py
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/usr/bin/env python
-
-# 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/.
-
-#
-# This script modifies V8 regexp source files to make them suitable for
-# inclusion in SpiderMonkey. Specifically, it:
-#
-# 1. Rewrites all #includes of V8 regexp headers to point to their location in
-# the SM tree: src/regexp/* --> regexp/*
-# 2. Removes all #includes of other V8 src/* headers. The required definitions
-# will be provided by regexp-shim.h.
-#
-# Usage:
-# cd js/src/regexp
-# find . -name "*.h" -o -name "*.cc" | xargs ./update_headers.py
-#
-
-import fileinput
-import re
-import sys
-
-# 1. Rewrite includes of V8 regexp headers
-regexp_include = re.compile('#include "src/regexp')
-regexp_include_new = '#include "regexp'
-
-# 2. Remove includes of other V8 headers
-other_include = re.compile('#include "src/')
-
-for line in fileinput.input(inplace=1):
- if regexp_include.search(line):
- sys.stdout.write(re.sub(regexp_include, regexp_include_new, line))
- elif other_include.search(line):
- pass
- else:
- sys.stdout.write(line)