annotate compile @ 121:1af91ceaaf49

Fixed memory leak when an output is only attached to a single null input
author Mike Pavone <pavone@retrodev.com>
date Thu, 28 Oct 2010 21:04:12 -0400
parents 25a205094f9b
children e556416e9c91
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
53
70af7fa155d0 Cleaned up some C warnings and added a simple compile script
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
1 #!/bin/sh
70af7fa155d0 Cleaned up some C warnings and added a simple compile script
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
2
70af7fa155d0 Cleaned up some C warnings and added a simple compile script
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
3 if test -f "$1.c"; then
70af7fa155d0 Cleaned up some C warnings and added a simple compile script
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
4 rm "$1.c"
70af7fa155d0 Cleaned up some C warnings and added a simple compile script
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
5 fi
70af7fa155d0 Cleaned up some C warnings and added a simple compile script
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
6
114
25a205094f9b More performance optimizations
Mike Pavone <pavone@retrodev.com>
parents: 75
diff changeset
7 ./rhope -t 1 compile_old.rhope $1
53
70af7fa155d0 Cleaned up some C warnings and added a simple compile script
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
8
70af7fa155d0 Cleaned up some C warnings and added a simple compile script
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
9 if test ! -f "$1.c"; then
70af7fa155d0 Cleaned up some C warnings and added a simple compile script
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
10 echo "Compilation to C failed"
70af7fa155d0 Cleaned up some C warnings and added a simple compile script
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
11 exit 1
70af7fa155d0 Cleaned up some C warnings and added a simple compile script
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
12 fi
70af7fa155d0 Cleaned up some C warnings and added a simple compile script
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
13
75
0083b2f7b3c7 Partially working implementation of List. Modified build scripts to allow use of other compilers. Fixed some bugs involving method implementations on different types returning different numbers of outputs. Added Fold to the 'builtins' in the comipler.
Mike Pavone <pavone@retrodev.com>
parents: 53
diff changeset
14 ./ctobin $@
0083b2f7b3c7 Partially working implementation of List. Modified build scripts to allow use of other compilers. Fixed some bugs involving method implementations on different types returning different numbers of outputs. Added Fold to the 'builtins' in the comipler.
Mike Pavone <pavone@retrodev.com>
parents: 53
diff changeset
15 #cp runtime/* build/
0083b2f7b3c7 Partially working implementation of List. Modified build scripts to allow use of other compilers. Fixed some bugs involving method implementations on different types returning different numbers of outputs. Added Fold to the 'builtins' in the comipler.
Mike Pavone <pavone@retrodev.com>
parents: 53
diff changeset
16 #cp "$1.c" build/
0083b2f7b3c7 Partially working implementation of List. Modified build scripts to allow use of other compilers. Fixed some bugs involving method implementations on different types returning different numbers of outputs. Added Fold to the 'builtins' in the comipler.
Mike Pavone <pavone@retrodev.com>
parents: 53
diff changeset
17 #cd build
0083b2f7b3c7 Partially working implementation of List. Modified build scripts to allow use of other compilers. Fixed some bugs involving method implementations on different types returning different numbers of outputs. Added Fold to the 'builtins' in the comipler.
Mike Pavone <pavone@retrodev.com>
parents: 53
diff changeset
18 #bin=`echo $1 | sed s/\.rhope//`
0083b2f7b3c7 Partially working implementation of List. Modified build scripts to allow use of other compilers. Fixed some bugs involving method implementations on different types returning different numbers of outputs. Added Fold to the 'builtins' in the comipler.
Mike Pavone <pavone@retrodev.com>
parents: 53
diff changeset
19 #
0083b2f7b3c7 Partially working implementation of List. Modified build scripts to allow use of other compilers. Fixed some bugs involving method implementations on different types returning different numbers of outputs. Added Fold to the 'builtins' in the comipler.
Mike Pavone <pavone@retrodev.com>
parents: 53
diff changeset
20 #if test -f "$bin"; then
0083b2f7b3c7 Partially working implementation of List. Modified build scripts to allow use of other compilers. Fixed some bugs involving method implementations on different types returning different numbers of outputs. Added Fold to the 'builtins' in the comipler.
Mike Pavone <pavone@retrodev.com>
parents: 53
diff changeset
21 # rm "$bin"
0083b2f7b3c7 Partially working implementation of List. Modified build scripts to allow use of other compilers. Fixed some bugs involving method implementations on different types returning different numbers of outputs. Added Fold to the 'builtins' in the comipler.
Mike Pavone <pavone@retrodev.com>
parents: 53
diff changeset
22 #fi
0083b2f7b3c7 Partially working implementation of List. Modified build scripts to allow use of other compilers. Fixed some bugs involving method implementations on different types returning different numbers of outputs. Added Fold to the 'builtins' in the comipler.
Mike Pavone <pavone@retrodev.com>
parents: 53
diff changeset
23 #gcc -Wformat=0 -o $bin $2 "$1.c" blueprint.c context.c fixed_alloc.c object.c
53
70af7fa155d0 Cleaned up some C warnings and added a simple compile script
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
24