Commit c86205d1 authored by Taddeüs Kroes's avatar Taddeüs Kroes

Small tweaks and cleanup

parent 81955ca5
......@@ -183,8 +183,7 @@ let compile_c memsize program =
"#include <stdio.h>\n" ^
"#include <stdlib.h>\n" ^
"void _start() {\n" ^
" unsigned char mem[" ^ string_of_int memsize ^ "] = {};\n" ^
" unsigned char *p = mem;\n" ^
" unsigned char mem[" ^ string_of_int memsize ^ "] = {}, *p = mem;\n" ^
indent (compile_commands "" program) ^
" exit(0);\n" ^
"}\n"
......
......@@ -10,19 +10,18 @@ fi
mytime () {
(`which time` -f %e $1 > /dev/null) 2>&1
}
set -e
echo -n "compiling opt..."
make -s $basename-opt
echo done
compile () {
echo -n "compiling $1... "
t=`mytime "make -s $basename-$1"`
echo "took $t seconds"
}
echo -n "compiling c..."
make -s $basename-c
echo done
set -e
echo -n "compiling nayuki..."
make -s $basename-nayuki
echo done
compile opt
compile c
compile nayuki
echo "opt: `mytime ./$basename-opt`"
echo "c: `mytime ./$basename-c`"
......
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