Commit 138e4546 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Misc non-code changes

Experimenting with vim+make integration
Changed installation instructions slightly
Added rlwrap support for repl
parent c1a98b34
......@@ -40,3 +40,5 @@ find_problem.status
*.so
*.pch
compile.log
set wildignore+=*.expected_cache,*.pyc,*.out,*.bc,*.d,*.o
let g:pyston_top = expand('<sfile>:p:h')
command! M execute ":make -C " . g:pyston_top . "/src -j1 COLOR=0 USE_DISTCC=0"
command! L execute ":cfile " . g:pyston_top . "/src/compile.log"
ca m M
ca l L
......@@ -181,6 +181,7 @@ gold is highly recommended as a faster linker, and Pyston contains build-system
```
cd ~/pyston_deps
sudo apt-get install bison
wget http://ftp.gnu.org/gnu/binutils/binutils-2.24.tar.gz
tar xvf binutils-2.24.tar.gz
mkdir binutils-2.24-build
......@@ -189,8 +190,6 @@ cd binutils-2.24-build
make all-gold -j4
```
If that last step fails due to complaints about YYSTYPE, try upgrading or installing bison (`sudo apt-get install bison`), removing the binutils-2.24-build directory, and configure + make again.
### perf
The `perf` tool is the best way we've found to profile JIT'd code; you can find more details in docs/PROFILING.
......@@ -200,3 +199,11 @@ sudo apt-get install linux-tools-`uname -r`
# may need to strip off the -generic from that last one
```
### rlwrap
The Pyston repl (`make run`) doesn't currently support any typical terminal features; it simply reads stdin as a raw stream. Some day we will add it, but for now you can use "rlwrap" to provide these features as a wrapper around Pyston. Simply
```
sudo apt-get install rlwrap
```
and when you do `make run`, the Make system will invoke rlwrap. If you want to invoke the repl manually, you can do `rlwrap ./pyston`
......@@ -678,7 +678,7 @@ pyston_oprof: $(OPT_OBJS) codegen/profiling/oprofile.o $(LLVM_DEPS)
pyston_pprof: $(OPT_OBJS) codegen/profiling/pprof.release.o $(LLVM_DEPS)
$(ECHO) Linking $@
$(VERB) $(CXX) $(OPT_OBJS) codegen/profiling/pprof.release.o $(LDFLAGS_RELEASE) -lprofiler -o $@
pyston_prof: $(PROFILE_OBJS) $(LLVM_PROFILE_DEPS)
pyston_prof: $(PROFILE_OBJS) $(LLVM_DEPS)
$(ECHO) Linking $@
$(VERB) $(CXX) $(PROFILE_OBJS) $(LDFLAGS) -pg -o $@
pyston_profile: $(PROFILE_OBJS) $(LLVM_PROFILE_DEPS)
......@@ -709,8 +709,12 @@ endef
RUN_DEPS := ext
.PHONY: run run_release profile
run: pyston_dbg $(RUN_DEPS)
./pyston_dbg $(ARGS)
run: $(RUN_DEPS)
if which rlwrap >/dev/null; then\
rlwrap ./pyston_dbg $(ARGS) ;\
else \
./pyston_dbg $(ARGS) ;\
fi
run_release: pyston $(RUN_DEPS)
./pyston $(ARGS)
profile: pyston_profile $(RUN_DEPS)
......@@ -822,12 +826,14 @@ opreportcg:
watch_%:
@ ( ulimit -t 60; ulimit -d $(MAK_MEM_KB); ulimit -v $(MAK_MEM_KB); \
TARGET=$(dir $@)$(patsubst watch_%,%,$(notdir $@)); \
clear; $(MAKE) $$TARGET; true; \
clear; $(MAKE) $$TARGET $(WATCH_ARGS); true; \
while inotifywait -q -e modify -e attrib -e move -e move_self -e create -e delete -e delete_self \
Makefile $$(find .. \( -name '*.cpp' -o -name '*.h' -o -name '*.py' \) ); do clear; $(MAKE) $$TARGET; done )
Makefile $$(find .. \( -name '*.cpp' -o -name '*.h' -o -name '*.py' \) ); do clear; $(MAKE) $$TARGET $(WATCH_ARGS); done )
# Makefile $$(find \( -name '*.cpp' -o -name '*.h' -o -name '*.py' \) -o -type d ); do clear; $(MAKE) $(patsubst watch_%,%,$@); done )
# -r . ; do clear; $(MAKE) $(patsubst watch_%,%,$@); done
watch: watch_pyston_dbg
watch_vim:
$(MAKE) watch WATCH_ARGS='COLOR=0 USE_DISTCC=0 -j1 2>&1 | tee compile.log'
wdbg_%:
$(MAKE) $(patsubst wdbg_%,watch_dbg_%,$@) GDB_CMDS="--ex quit"
......
......@@ -4,3 +4,4 @@
movsd %xmm0, %xmm1
movsd %xmm0, %xmm9
sub $123, %rsp
sub $129, %rsp
import test
print test
test.store([])
# TODO this should work even if we don't keep a reference to l;
# it doesn't currently always work, but it sometimes works, so it's hard
# to mark this case as "expected: fail".
# Instead just weaken the test, and add this TODO to add the harder test back
# later.
l = []
test.store(l)
print test.load()
class C(object):
......
......@@ -106,6 +106,9 @@ def run_test(fn, check_stats, run_memcheck):
jit_args = ["-csrq"] + EXTRA_JIT_ARGS
expected = "success"
for l in open(fn):
l = l.strip()
if not l:
continue
if not l.startswith("#"):
break
if l.startswith("# statcheck:"):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment