Skip to content
This repository has been archived by the owner on Nov 21, 2018. It is now read-only.

extend process.sh to support patch stages #22

Merged
merged 6 commits into from
Nov 23, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions futures-rs-test-all/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ touch:
rm -f target/debug/all-*
clean:
cargo clean
patches:
@echo ''
2 changes: 2 additions & 0 deletions helloworld/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ touch:
find . -name '*.rs' | xargs touch
clean:
cargo clean
patches:
@echo ''
2 changes: 2 additions & 0 deletions html5ever-2016-08-25/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ touch:
find . -name '*.rs' | xargs touch
clean:
cargo clean
patches:
@echo ''
2 changes: 2 additions & 0 deletions hyper.0.5.0/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ touch:
find . -name '*.rs' | xargs touch
clean:
cargo clean
patches:
@echo ''
2 changes: 2 additions & 0 deletions inflate-0.1.0/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ touch:
find . -name '*.rs' | xargs touch
clean:
cargo clean
patches:
@echo ''
2 changes: 2 additions & 0 deletions issue-32062-equality-relations-complexity/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ touch:
find . -name '*.rs' | xargs touch
clean:
cargo clean
patches:
@echo ''
2 changes: 2 additions & 0 deletions issue-32278-big-array-of-strings/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ touch:
find . -name '*.rs' | xargs touch
clean:
cargo clean
patches:
@echo ''
2 changes: 2 additions & 0 deletions jld-day15-parser/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ touch:
find . -name '*.rs' | xargs touch
clean:
cargo clean
patches:
@echo ''
2 changes: 2 additions & 0 deletions piston-image-0.10.3/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ touch:
find . -name '*.rs' | xargs touch
clean:
cargo clean
patches:
@echo ''
57 changes: 43 additions & 14 deletions process.sh
Original file line number Diff line number Diff line change
@@ -1,37 +1,66 @@
#!/bin/bash

TIMES_DIR=/home/ncameron/times
SCRIPTS_DIR=/home/ncameron/times-scripts
if [ -z "$TIMES_DIR" ]; then
TIMES_DIR=/home/ncameron/times
fi
if [ -z "$SCRIPTS_DIR" ]; then
SCRIPTS_DIR=/home/ncameron/times-scripts
fi

echo TIMES_DIR=$TIMES_DIR
echo SCRIPTS_DIR=$SCRIPTS_DIR

START=$(pwd)
export CARGO_RUSTC_OPTS="-Ztime-passes -Zinput-stats"
export PATH=$RUSTC_DIR/bin:$PATH

for dir in *; do
# Check if user provided list of directories;
# else process them all.
if [ "$1" != "" ]; then
DIRS="$@"
else
DIRS="*"
fi

for dir in $DIRS; do
if [[ -d $dir ]]; then
echo "Processing $dir"

cd $START/$dir
PATCHES=($(make patches))
if [ ! "${PATCHES[*]}" ]; then
PATCHES=('')
fi

echo Patches: ${PATCHES[*]}

for i in 0 1 2 3 4 5
do
cd $RUST_DIR
git show HEAD -s >$TIMES_DIR/raw/$dir--$DATE--$i.log
cd $START/$dir
echo "rustc: ./$dir" >>$TIMES_DIR/raw/$dir--$DATE--$i.log
make >>$TIMES_DIR/raw/$dir--$DATE--$i.log
echo "done" >>$TIMES_DIR/raw/$dir--$DATE--$i.log

for PATCH in "${PATCHES[@]}"; do
cd $RUST_DIR
git show HEAD -s >$TIMES_DIR/raw/$dir$PATCH--$DATE--$i.log
cd $START/$dir
echo "rustc: ./$dir" >>$TIMES_DIR/raw/$dir$PATCH--$DATE--$i.log
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I need to actually to change this to rustc: ./$dir$PATH, but that will presumably require updating process.py as well

make all$PATCH >>$TIMES_DIR/raw/$dir$PATCH--$DATE--$i.log
echo "done" >>$TIMES_DIR/raw/$dir$PATCH--$DATE--$i.log
done
make touch >/dev/null
done

make clean >/dev/null

cd $TIMES_DIR
python $SCRIPTS_DIR/process.py $dir $DATE 6
for PATCH in "${PATCHES[@]}"; do
python $SCRIPTS_DIR/process.py "$dir$PATCH" "$DATE" 6
done

for i in 0 1 2 3 4 5
do
git add raw/$dir--$DATE--$i.log
git add raw/orbit-$dir--$DATE--$i.log
git add processed/$dir--$DATE--$i.json
for PATCH in "${PATCHES[@]}"; do
git add "raw/$dir$PATCH--$DATE--$i.log"
git add "raw/orbit-$dir$PATCH--$DATE--$i.log"
git add "processed/$dir$PATCH--$DATE--$i.json"
done
done

cd $START
Expand Down
6 changes: 6 additions & 0 deletions regex-0.1.80/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
target
Cargo.lock
bench-log
.*.swp
wiki
tags
53 changes: 53 additions & 0 deletions regex-0.1.80/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
language: rust
rust:
- 1.3.0
- stable
- beta
- nightly
sudo: false
script:
- cargo build --verbose
- if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then
cargo build --verbose --manifest-path=regex-debug/Cargo.toml;
RUSTFLAGS="-C target-feature=+ssse3" cargo test --verbose --features 'simd-accel pattern';
else
travis_wait cargo test --verbose;
fi
- ./run-shootout-test
- cargo doc --verbose
- cargo test --verbose --manifest-path=regex-syntax/Cargo.toml
- cargo doc --verbose --manifest-path=regex-syntax/Cargo.toml
- if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then
(cd regex-capi && cargo build --verbose);
(cd regex-capi/ctest && ./compile && LD_LIBRARY_PATH=../target/debug ./test);
(cd regex-capi/examples && ./compile && LD_LIBRARY_PATH=../target/release ./iter);
(cd bench && travis_wait ./run rust);
(cd bench && travis_wait ./run rust-bytes --no-run);
(cd bench && travis_wait ./run pcre1 --no-run);
(cd bench && travis_wait ./run onig --no-run);
travis_wait cargo test --verbose --manifest-path=regex_macros/Cargo.toml;
fi
addons:
apt:
packages:
- libcurl4-openssl-dev
- libelf-dev
- libdw-dev
- binutils-dev
after_success: |
[ $TRAVIS_BRANCH = master ] &&
[ $TRAVIS_PULL_REQUEST = false ] &&
[ $TRAVIS_RUST_VERSION = nightly ] &&
echo '<meta http-equiv=refresh content=0;url=regex/index.html>' > target/doc/index.html &&
pip install ghp-import --user $USER &&
$HOME/.local/bin/ghp-import -n target/doc &&
git push -qf https://${TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages &&
wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz &&
tar xzf master.tar.gz && mkdir kcov-master/build && cd kcov-master/build && cmake .. && make && make install DESTDIR=../tmp && cd ../.. &&
PATH="./kcov-master/tmp/usr/local/bin:$PATH" ./run-kcov --coveralls-id $TRAVIS_JOB_ID
env:
global:
secure: VvIrYRW/a8FmBA61hn1bDrqWwR92tANOT6PCeLYd9A9ViQrN07PE6uGsnd9iwr8itck10Ctl1mThZYUkK8BDFEmlvSxOFJ/Po5eRe6A1CYuFF40zizJ+3NllVkN20kwoQDe0kxwZVDGO9Yi1icHUrbRPWDfS+1tfobO/UT8Dlng=
notifications:
email:
on_success: never
13 changes: 13 additions & 0 deletions regex-0.1.80/030-compile_one.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/regex-0.1.80/src/compile.rs b/regex-0.1.80/src/compile.rs
index 9db743f..ef1948e 100644
--- a/regex-0.1.80/src/compile.rs
+++ b/regex-0.1.80/src/compile.rs
@@ -137,6 +137,8 @@ impl Compiler {
}

fn compile_one(mut self, expr: &Expr) -> result::Result<Program, Error> {
+ {} // @030
+
// If we're compiling a forward DFA and we aren't anchored, then
// add a `.*?` before the first capture group.
// Other matching engines handle this by baking the logic into the
12 changes: 12 additions & 0 deletions regex-0.1.80/040-is_valid_cap_letter.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/regex-0.1.80/src/expand.rs b/regex-0.1.80/src/expand.rs
index 9bea703..3b6ae94 100644
--- a/regex-0.1.80/src/expand.rs
+++ b/regex-0.1.80/src/expand.rs
@@ -84,6 +84,7 @@ fn find_cap_ref(mut replacement: &[u8]) -> Option<CaptureRef> {
}

fn is_valid_cap_letter(b: &u8) -> bool {
+ { }
match *b {
b'0' ... b'9' | b'a' ... b'z' | b'A' ... b'Z' | b'_' => true,
_ => false,
12 changes: 12 additions & 0 deletions regex-0.1.80/050-expand.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/regex-0.1.80/src/expand.rs b/regex-0.1.80/src/expand.rs
index 9bea703..a28b82d 100644
--- a/regex-0.1.80/src/expand.rs
+++ b/regex-0.1.80/src/expand.rs
@@ -5,6 +5,7 @@ use memchr::memchr;
use bytes::Captures;

pub fn expand(caps: &Captures, mut replacement: &[u8], dst: &mut Vec<u8>) {
+ { }
while !replacement.is_empty() {
match memchr(b'$', replacement) {
None => break,
12 changes: 12 additions & 0 deletions regex-0.1.80/060-Compiler-new.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/regex-0.1.80/src/compile.rs b/regex-0.1.80/src/compile.rs
index 9db743f..fb812ae 100644
--- a/regex-0.1.80/src/compile.rs
+++ b/regex-0.1.80/src/compile.rs
@@ -54,6 +54,7 @@ impl Compiler {
///
/// Various options can be set before calling `compile` on an expression.
pub fn new() -> Self {
+ {}
Compiler {
insts: vec![],
compiled: Program::new(),
12 changes: 12 additions & 0 deletions regex-0.1.80/060-reverse.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/regex-0.1.80/src/compile.rs b/regex-0.1.80/src/compile.rs
index 9db743f..4e56c2d 100644
--- a/regex-0.1.80/src/compile.rs
+++ b/regex-0.1.80/src/compile.rs
@@ -114,6 +114,7 @@ impl Compiler {
/// When set, the machine returned is suitable for matching text in
/// reverse. In particular, all concatenations are flipped.
pub fn reverse(mut self, yes: bool) -> Self {
+ {}
self.compiled.is_reverse = yes;
self
}
13 changes: 13 additions & 0 deletions regex-0.1.80/070-BYTE_FREQUENCIES.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/regex-0.1.80/src/freqs.rs b/regex-0.1.80/src/freqs.rs
index 92bafc1..6eb5799 100644
--- a/regex-0.1.80/src/freqs.rs
+++ b/regex-0.1.80/src/freqs.rs
@@ -12,7 +12,7 @@
// edit directly

pub const BYTE_FREQUENCIES: [u8; 256] = [
- 55, // '\x00'
+ 54+1, // '\x00'
52, // '\x01'
51, // '\x02'
50, // '\x03'
20 changes: 20 additions & 0 deletions regex-0.1.80/080-SparseSet.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/regex-0.1.80/src/sparse.rs b/regex-0.1.80/src/sparse.rs
index 34c05e7..ef5188e 100644
--- a/regex-0.1.80/src/sparse.rs
+++ b/regex-0.1.80/src/sparse.rs
@@ -16,13 +16,13 @@ pub struct SparseSet {
/// Dense contains the instruction pointers in the order in which they
/// were inserted. Accessing elements >= self.size is illegal.
dense: Vec<usize>,
+ /// The number of elements in the set.
+ size: usize,
/// Sparse maps instruction pointers to their location in dense.
///
/// An instruction pointer is in the set if and only if
/// sparse[ip] < size && ip == dense[sparse[ip]].
sparse: Vec<usize>,
- /// The number of elements in the set.
- size: usize,
}

impl SparseSet {
14 changes: 14 additions & 0 deletions regex-0.1.80/090-Job.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/regex-0.1.80/src/backtrack.rs b/regex-0.1.80/src/backtrack.rs
index 3c06254..4b72fd4 100644
--- a/regex-0.1.80/src/backtrack.rs
+++ b/regex-0.1.80/src/backtrack.rs
@@ -82,8 +82,8 @@ impl Cache {
/// stack to do it.
#[derive(Clone, Copy, Debug)]
enum Job {
- Inst { ip: InstPtr, at: InputAt },
SaveRestore { slot: usize, old_pos: Option<usize> },
+ Inst { ip: InstPtr, at: InputAt },
}

impl<'a, 'm, 'r, 's, I: Input> Bounded<'a, 'm, 'r, 's, I> {
Loading