ref: a986d1d8ae4c6f75384b62347c733a226edcafba
parent: dff9fe20898ba0d2165dd55b2e47486acbef45c1
author: Ori Bernstein <ori@eigenstate.org>
date: Mon May 2 17:21:49 EDT 2016
Regenerate bootstrap
--- a/lib/std/bld.sub
+++ b/lib/std/bld.sub
@@ -43,6 +43,7 @@
pathjoin.myr
putint.myr
rand.myr
+ readall.myr
result.myr
search.myr
slcp.myr
--- /dev/null
+++ b/lib/std/readall.myr
@@ -1,0 +1,26 @@
+use "errno"
+use "result"
+use "option"
+use "syswrap"
+use "types"
+
+pkg std =
+ const readall : (fd : fd, dst : byte[:] -> result(size, errno))
+;;
+
+const readall = {fd, dst
+ var sz
+
+ sz = dst.len
+ while dst.len != 0
+ match std.read(fd, dst)
+ | `Ok 0:
+ break
+ | `Ok n:
+ dst = dst[n:]
+ | `Fail e:
+ -> `Fail e
+ ;;
+ ;;
+ -> `Ok sz - dst.len
+}
--- a/mk/bootstrap/bootstrap+FreeBSD-amd64.sh
+++ b/mk/bootstrap/bootstrap+FreeBSD-amd64.sh
@@ -34,6 +34,7 @@
echo $pwd/6/6m -I ../sys -I . sldup.myr && $pwd/6/6m -I ../sys -I . sldup.myr &&\
echo $pwd/6/6m -I ../sys -I . slfill.myr && $pwd/6/6m -I ../sys -I . slfill.myr &&\
echo $pwd/6/6m -I ../sys -I . slpush.myr && $pwd/6/6m -I ../sys -I . slpush.myr &&\
+echo $pwd/6/6m -I ../sys -I . strfind.myr && $pwd/6/6m -I ../sys -I . strfind.myr &&\
echo $pwd/6/6m -I ../sys -I . striter.myr && $pwd/6/6m -I ../sys -I . striter.myr &&\
echo $pwd/6/6m -I ../sys -I . bigint.myr && $pwd/6/6m -I ../sys -I . bigint.myr &&\
echo $pwd/6/6m -I ../sys -I . fltbits.myr && $pwd/6/6m -I ../sys -I . fltbits.myr &&\
@@ -43,7 +44,6 @@
echo $pwd/6/6m -I ../sys -I . htab.myr && $pwd/6/6m -I ../sys -I . htab.myr &&\
echo $pwd/6/6m -I ../sys -I . intparse.myr && $pwd/6/6m -I ../sys -I . intparse.myr &&\
echo $pwd/6/6m -I ../sys -I . introspect.myr && $pwd/6/6m -I ../sys -I . introspect.myr &&\
-echo $pwd/6/6m -I ../sys -I . strfind.myr && $pwd/6/6m -I ../sys -I . strfind.myr &&\
echo $pwd/6/6m -I ../sys -I . strsplit.myr && $pwd/6/6m -I ../sys -I . strsplit.myr &&\
echo $pwd/6/6m -I ../sys -I . syswrap-ss+freebsd.myr && $pwd/6/6m -I ../sys -I . syswrap-ss+freebsd.myr &&\
echo $pwd/6/6m -I ../sys -I . varargs.myr && $pwd/6/6m -I ../sys -I . varargs.myr &&\
@@ -53,6 +53,7 @@
echo $pwd/6/6m -I ../sys -I . now.myr && $pwd/6/6m -I ../sys -I . now.myr &&\
echo $pwd/6/6m -I ../sys -I . rand.myr && $pwd/6/6m -I ../sys -I . rand.myr &&\
echo $pwd/6/6m -I ../sys -I . sljoin.myr && $pwd/6/6m -I ../sys -I . sljoin.myr &&\
+echo $pwd/6/6m -I ../sys -I . readall.myr && $pwd/6/6m -I ../sys -I . readall.myr &&\
echo $pwd/6/6m -I ../sys -I . slurp.myr && $pwd/6/6m -I ../sys -I . slurp.myr &&\
echo $pwd/6/6m -I ../sys -I . dirname.myr && $pwd/6/6m -I ../sys -I . dirname.myr &&\
echo $pwd/6/6m -I ../sys -I . optparse.myr && $pwd/6/6m -I ../sys -I . optparse.myr &&\
@@ -90,8 +91,8 @@
echo $pwd/6/6m -I ../sys -I . swap.myr && $pwd/6/6m -I ../sys -I . swap.myr &&\
echo $pwd/6/6m -I ../sys -I . dial+posixy.myr && $pwd/6/6m -I ../sys -I . dial+posixy.myr &&\
echo as -g -o memops-impl.o memops-impl+posixy-x64.s && as -g -o memops-impl.o memops-impl+posixy-x64.s &&\
-echo $pwd/muse/muse -o std fmtfuncs.use fmt.use try.use pathjoin.use strjoin.use sljoin.use slpush.use strstrip.use htab.use now.use getcwd.use rand.use slurp.use varargs.use listen.use strbuf.use clear.use slput.use strsplit.use introspect.use mktemp.use alloc.use optparse.use memops.use fltbits.use striter.use sldup.use fltfmt.use extremum.use option.use slcp.use errno.use wait.use writeall.use putint.use consts.use syswrap.use sort.use dir.use blat.use diriter.use mk.use swap.use hassuffix.use execvp.use ipparse.use types.use slpop.use strfind.use utf.use dialparse.use cstrconv.use search.use die.use units.use result.use bitset.use env.use resolve.use intparse.use hasprefix.use mkpath.use getint.use dirname.use sleq.use endian.use iterutil.use spork.use assert.use cmp.use syswrap-ss.use chartype.use bigint.use hashfuncs.use slfill.use fndup.use dial.use && $pwd/muse/muse -o std fmtfuncs.use fmt.use try.use pathjoin.use strjoin.use sljoin.use slpush.use strstrip.use htab.use now.use getcwd.use rand.use slurp.use varargs.use listen.use strbuf.use clear.use slput.use strsplit.use introspect.use mktemp.use alloc.use optparse.use memops.use fltbits.use striter.use sldup.use fltfmt.use extremum.use option.use slcp.use errno.use wait.use writeall.use putint.use consts.use syswrap.use sort.use dir.use blat.use diriter.use mk.use swap.use hassuffix.use execvp.use ipparse.use types.use slpop.use strfind.use utf.use dialparse.use cstrconv.use search.use die.use units.use result.use bitset.use env.use resolve.use intparse.use hasprefix.use mkpath.use getint.use dirname.use sleq.use endian.use iterutil.use spork.use assert.use cmp.use syswrap-ss.use chartype.use bigint.use hashfuncs.use slfill.use fndup.use dial.use &&\
-echo ar -rcs libstd.a fmtfuncs.o fmt.o try.o pathjoin.o strjoin.o memops-impl.o sljoin.o slpush.o strstrip.o htab.o now.o getcwd.o rand.o slurp.o varargs.o listen.o strbuf.o clear.o slput.o strsplit.o introspect.o mktemp.o alloc.o optparse.o memops.o fltbits.o striter.o sldup.o fltfmt.o extremum.o option.o slcp.o errno.o wait.o writeall.o putint.o consts.o syswrap.o sort.o dir.o blat.o diriter.o mk.o swap.o hassuffix.o execvp.o ipparse.o types.o slpop.o strfind.o utf.o dialparse.o cstrconv.o search.o die.o units.o result.o bitset.o env.o resolve.o intparse.o hasprefix.o mkpath.o getint.o dirname.o sleq.o endian.o iterutil.o spork.o assert.o cmp.o syswrap-ss.o chartype.o bigint.o hashfuncs.o slfill.o fndup.o dial.o && ar -rcs libstd.a fmtfuncs.o fmt.o try.o pathjoin.o strjoin.o memops-impl.o sljoin.o slpush.o strstrip.o htab.o now.o getcwd.o rand.o slurp.o varargs.o listen.o strbuf.o clear.o slput.o strsplit.o introspect.o mktemp.o alloc.o optparse.o memops.o fltbits.o striter.o sldup.o fltfmt.o extremum.o option.o slcp.o errno.o wait.o writeall.o putint.o consts.o syswrap.o sort.o dir.o blat.o diriter.o mk.o swap.o hassuffix.o execvp.o ipparse.o types.o slpop.o strfind.o utf.o dialparse.o cstrconv.o search.o die.o units.o result.o bitset.o env.o resolve.o intparse.o hasprefix.o mkpath.o getint.o dirname.o sleq.o endian.o iterutil.o spork.o assert.o cmp.o syswrap-ss.o chartype.o bigint.o hashfuncs.o slfill.o fndup.o dial.o &&\
+echo $pwd/muse/muse -o std fmtfuncs.use fmt.use try.use pathjoin.use strjoin.use sljoin.use slpush.use strstrip.use htab.use now.use getcwd.use rand.use slurp.use varargs.use listen.use strbuf.use clear.use slput.use strsplit.use introspect.use mktemp.use alloc.use optparse.use memops.use fltbits.use striter.use sldup.use fltfmt.use extremum.use option.use errno.use wait.use slcp.use writeall.use putint.use consts.use syswrap.use readall.use sort.use dir.use blat.use diriter.use mk.use swap.use hassuffix.use execvp.use ipparse.use types.use slpop.use strfind.use utf.use dialparse.use cstrconv.use search.use die.use units.use result.use bitset.use env.use resolve.use intparse.use hasprefix.use mkpath.use getint.use dirname.use sleq.use endian.use iterutil.use spork.use assert.use cmp.use syswrap-ss.use chartype.use bigint.use hashfuncs.use slfill.use fndup.use dial.use && $pwd/muse/muse -o std fmtfuncs.use fmt.use try.use pathjoin.use strjoin.use sljoin.use slpush.use strstrip.use htab.use now.use getcwd.use rand.use slurp.use varargs.use listen.use strbuf.use clear.use slput.use strsplit.use introspect.use mktemp.use alloc.use optparse.use memops.use fltbits.use striter.use sldup.use fltfmt.use extremum.use option.use errno.use wait.use slcp.use writeall.use putint.use consts.use syswrap.use readall.use sort.use dir.use blat.use diriter.use mk.use swap.use hassuffix.use execvp.use ipparse.use types.use slpop.use strfind.use utf.use dialparse.use cstrconv.use search.use die.use units.use result.use bitset.use env.use resolve.use intparse.use hasprefix.use mkpath.use getint.use dirname.use sleq.use endian.use iterutil.use spork.use assert.use cmp.use syswrap-ss.use chartype.use bigint.use hashfuncs.use slfill.use fndup.use dial.use &&\
+echo ar -rcs libstd.a fmtfuncs.o fmt.o try.o pathjoin.o strjoin.o memops-impl.o sljoin.o slpush.o strstrip.o htab.o now.o getcwd.o rand.o slurp.o varargs.o listen.o strbuf.o clear.o slput.o strsplit.o introspect.o mktemp.o alloc.o optparse.o memops.o fltbits.o striter.o sldup.o fltfmt.o extremum.o option.o errno.o wait.o slcp.o writeall.o putint.o consts.o syswrap.o readall.o sort.o dir.o blat.o diriter.o mk.o swap.o hassuffix.o execvp.o ipparse.o types.o slpop.o strfind.o utf.o dialparse.o cstrconv.o search.o die.o units.o result.o bitset.o env.o resolve.o intparse.o hasprefix.o mkpath.o getint.o dirname.o sleq.o endian.o iterutil.o spork.o assert.o cmp.o syswrap-ss.o chartype.o bigint.o hashfuncs.o slfill.o fndup.o dial.o && ar -rcs libstd.a fmtfuncs.o fmt.o try.o pathjoin.o strjoin.o memops-impl.o sljoin.o slpush.o strstrip.o htab.o now.o getcwd.o rand.o slurp.o varargs.o listen.o strbuf.o clear.o slput.o strsplit.o introspect.o mktemp.o alloc.o optparse.o memops.o fltbits.o striter.o sldup.o fltfmt.o extremum.o option.o errno.o wait.o slcp.o writeall.o putint.o consts.o syswrap.o readall.o sort.o dir.o blat.o diriter.o mk.o swap.o hassuffix.o execvp.o ipparse.o types.o slpop.o strfind.o utf.o dialparse.o cstrconv.o search.o die.o units.o result.o bitset.o env.o resolve.o intparse.o hasprefix.o mkpath.o getint.o dirname.o sleq.o endian.o iterutil.o spork.o assert.o cmp.o syswrap-ss.o chartype.o bigint.o hashfuncs.o slfill.o fndup.o dial.o &&\
echo cd $pwd/lib/regex && cd $pwd/lib/regex &&\
echo $pwd/6/6m -I ../std -I ../sys types.myr && $pwd/6/6m -I ../std -I ../sys types.myr &&\
echo $pwd/6/6m -I ../std -I ../sys interp.myr && $pwd/6/6m -I ../std -I ../sys interp.myr &&\