Mercurial > repos > rhope
annotate ctobin @ 174:0c7c5671fcd3
Start work on interpreter
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Thu, 19 May 2011 23:30:07 -0700 |
parents | 7bbdc034e347 |
children |
rev | line source |
---|---|
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:
diff
changeset
|
1 #!/bin/sh |
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:
diff
changeset
|
2 |
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:
diff
changeset
|
3 if test ! -f "$1.c"; 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:
diff
changeset
|
4 echo "C file missing! Maybe you need to do a full compile?" |
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:
diff
changeset
|
5 exit 1 |
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:
diff
changeset
|
6 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:
diff
changeset
|
7 |
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:
diff
changeset
|
8 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:
diff
changeset
|
9 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:
diff
changeset
|
10 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:
diff
changeset
|
11 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:
diff
changeset
|
12 |
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:
diff
changeset
|
13 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:
diff
changeset
|
14 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:
diff
changeset
|
15 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:
diff
changeset
|
16 |
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:
diff
changeset
|
17 if test -z $CC; 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:
diff
changeset
|
18 CC="gcc" |
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:
diff
changeset
|
19 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:
diff
changeset
|
20 |
125
e556416e9c91
Update compilation scripts
Mike Pavone <pavone@retrodev.com>
parents:
105
diff
changeset
|
21 file=$1 |
e556416e9c91
Update compilation scripts
Mike Pavone <pavone@retrodev.com>
parents:
105
diff
changeset
|
22 shift |
142
7bbdc034e347
Fix some bugs. Get basic network code working (epoll listener + accept connections). Start porting webserver.
Mike Pavone <pavone@retrodev.com>
parents:
139
diff
changeset
|
23 echo "$CC -o $bin $@ $file.c blueprint.c context.c fixed_alloc.c object.c transaction.c net.c" |
7bbdc034e347
Fix some bugs. Get basic network code working (epoll listener + accept connections). Start porting webserver.
Mike Pavone <pavone@retrodev.com>
parents:
139
diff
changeset
|
24 $CC -o $bin $@ "$file.c" blueprint.c context.c fixed_alloc.c object.c transaction.c net.c |
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:
diff
changeset
|
25 |
81
dbe95bfec970
Very basic file access is now working; however, there's a bug involving assigning a literal to a named pipe inside a conditional block that needs fixing
Mike Pavone <pavone@retrodev.com>
parents:
75
diff
changeset
|
26 cd .. |
dbe95bfec970
Very basic file access is now working; however, there's a bug involving assigning a literal to a named pipe inside a conditional block that needs fixing
Mike Pavone <pavone@retrodev.com>
parents:
75
diff
changeset
|
27 |