10 months ago | Paul Boddie | raw annotate files changeset graph | Permit the replacement of floating-point values in locally-referenced objects. To achieve this, a result target parameter has been introduced in callable signatures alongside the existing context parameter so that references to objects can be propagated to operations that are able to replace the value of such objects. Result target objects are currently supported only for locals and intermediate results in functions and methods, with assignments to locals or the storage of intermediate results involving the copying of any given floating-point objects instead of merely referencing them. Such distinct copies may then be used as result targets when locals or intermediate result locations are subsequently reused. Value replacement avoids the allocation of temporary objects that can quickly dominate execution time in programs repeatedly performing large numbers of floating-point calculations. | value-replacement |
1 #!/bin/sh 2 3 DIRNAME=`dirname "$0"` 4 PROGNAME=`basename "$0"` 5 6 if [ ! "$1" ] || [ "$1" = '--help' ] ; then 7 cat 1>&2 <<EOF 8 Usage: $PROGNAME <archive directory> [ -f ] 9 10 Sign archives in the given archive directory, invoking GPG to produce a 11 detached signature. If a signature already exists for an archive, it is not 12 regenerated unless the -f (force) option is given. 13 14 All newly-created signature filenames are emitted on standard output. 15 EOF 16 exit 1 17 fi 18 19 OUTDIR=$1 20 FORCE=$2 21 22 if [ "$FORCE" != '-f' ]; then 23 FORCE= 24 fi 25 26 if [ ! -e "$OUTDIR" ]; then 27 cat 1>&2 <<EOF 28 No archive directory to process. 29 EOF 30 exit 1 31 fi 32 33 for FILENAME in "$OUTDIR/"*".tar.bz2" ; do 34 OUTFILE="$FILENAME.asc" 35 if [ ! -e "$OUTFILE" ] || [ "$FORCE" ]; then 36 gpg --sign -a -b "$FILENAME" 37 echo "$OUTFILE" 38 fi 39 done