view compile @ 68:3a169ebb3224

Change strategy for handling true and false to avoid some initialization order problems and improve performance. Add support for negative integer literals. Update samples to reflect true/false change.
author Mike Pavone <pavone@retrodev.com>
date Sat, 14 Jul 2012 16:14:01 -0700
parents 3b0503a67165
children 7f635666c73d
line wrap: on
line source

#!/bin/sh

cname=`basename $1`.c

if test -f "$cname"; then
	rm "$cname"
fi

d8 tpc.js -- $1 > $cname

if test ! -s "$cname"; then
	echo "Compilation to C failed"
	exit 1
fi

bin=`echo $1 | sed s/\.tp//`
shift
gcc $@ -o $bin $cname runtime/object.c