commit 94a7bd4e32a5d3f6daa7f0c0f21191d24374129d
parent fed5bc4e066a9aa2304b854d8fd7fe3c34f71e3b
Author: Eyal Sawady <ecs@d2evs.net>
Date: Sat, 13 Mar 2021 21:15:40 -0500
Drop workarounds for lack of forward references
Diffstat:
2 files changed, 13 insertions(+), 16 deletions(-)
diff --git a/gen-stdlib b/gen-stdlib
@@ -179,12 +179,11 @@ encoding_hex() {
}
encoding_utf8() {
- # XXX: Also has ordering issues
printf '# encoding::utf8\n'
gen_srcs encoding::utf8 \
- rune.ha \
decode.ha \
- encode.ha
+ encode.ha \
+ rune.ha
gen_ssa encoding::utf8 types
}
@@ -303,19 +302,17 @@ hash_fnv() {
gensrcs_io() {
gen_srcs io \
'arch$(ARCH).ha' \
- types.ha \
copy.ha \
+ limit.ha \
println.ha \
stream.ha \
- limit.ha \
strings.ha \
tee.ha \
+ types.ha \
$*
}
io() {
- # XXX: Sort me only after fixing forward references to alias types
- # Sort it to see what the problem is if you don't understand
printf '# io\n'
if [ $testing -eq 0 ]
then
diff --git a/stdlib.mk b/stdlib.mk
@@ -255,9 +255,9 @@ $(HARECACHE)/encoding/hex/encoding_hex.ssa: $(stdlib_encoding_hex_srcs) $(stdlib
# encoding::utf8
stdlib_encoding_utf8_srcs= \
- $(STDLIB)/encoding/utf8/rune.ha \
$(STDLIB)/encoding/utf8/decode.ha \
- $(STDLIB)/encoding/utf8/encode.ha
+ $(STDLIB)/encoding/utf8/encode.ha \
+ $(STDLIB)/encoding/utf8/rune.ha
$(HARECACHE)/encoding/utf8/encoding_utf8.ssa: $(stdlib_encoding_utf8_srcs) $(stdlib_rt) $(stdlib_types)
@printf 'HAREC \t$@\n'
@@ -389,13 +389,13 @@ $(HARECACHE)/hash/fnv/hash_fnv.ssa: $(stdlib_hash_fnv_srcs) $(stdlib_rt) $(stdli
# io
stdlib_io_srcs= \
$(STDLIB)/io/arch$(ARCH).ha \
- $(STDLIB)/io/types.ha \
$(STDLIB)/io/copy.ha \
+ $(STDLIB)/io/limit.ha \
$(STDLIB)/io/println.ha \
$(STDLIB)/io/stream.ha \
- $(STDLIB)/io/limit.ha \
$(STDLIB)/io/strings.ha \
- $(STDLIB)/io/tee.ha
+ $(STDLIB)/io/tee.ha \
+ $(STDLIB)/io/types.ha
$(HARECACHE)/io/io.ssa: $(stdlib_io_srcs) $(stdlib_rt) $(stdlib_strings)
@printf 'HAREC \t$@\n'
@@ -806,9 +806,9 @@ $(TESTCACHE)/encoding/hex/encoding_hex.ssa: $(testlib_encoding_hex_srcs) $(testl
# encoding::utf8
testlib_encoding_utf8_srcs= \
- $(STDLIB)/encoding/utf8/rune.ha \
$(STDLIB)/encoding/utf8/decode.ha \
- $(STDLIB)/encoding/utf8/encode.ha
+ $(STDLIB)/encoding/utf8/encode.ha \
+ $(STDLIB)/encoding/utf8/rune.ha
$(TESTCACHE)/encoding/utf8/encoding_utf8.ssa: $(testlib_encoding_utf8_srcs) $(testlib_rt) $(testlib_types)
@printf 'HAREC \t$@\n'
@@ -942,13 +942,13 @@ $(TESTCACHE)/hash/fnv/hash_fnv.ssa: $(testlib_hash_fnv_srcs) $(testlib_rt) $(tes
# io
testlib_io_srcs= \
$(STDLIB)/io/arch$(ARCH).ha \
- $(STDLIB)/io/types.ha \
$(STDLIB)/io/copy.ha \
+ $(STDLIB)/io/limit.ha \
$(STDLIB)/io/println.ha \
$(STDLIB)/io/stream.ha \
- $(STDLIB)/io/limit.ha \
$(STDLIB)/io/strings.ha \
$(STDLIB)/io/tee.ha \
+ $(STDLIB)/io/types.ha \
$(STDLIB)/io/+test/copy.ha \
$(STDLIB)/io/+test/limit.ha \
$(STDLIB)/io/+test/stream.ha \