Mercurial > repos > rhope
annotate compile @ 92:e73a93fb5de1
Beginning of port of compiler to itself, some bugfixes and a refcount optimization
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 02 Aug 2010 00:58:55 -0400 |
parents | 0083b2f7b3c7 |
children | 25a205094f9b |
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 |
70af7fa155d0
Cleaned up some C warnings and added a simple compile script
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
7 ./rhope -t 1 parser_old.rhope $1 |
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 |