diff options
author | Ori Bernstein <ori@eigenstate.org> | 2013-05-28 01:11:51 -0400 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2013-05-28 14:55:17 -0400 |
commit | b0a47993a1361f133ca52302eae06b223c36c2ca (patch) | |
tree | d0884df1cf30f8709ac35ccaa15b716afc8a9da5 | |
parent | e2f62755339d913f59d08ceafaa24849cf9da803 (diff) | |
download | mc-b0a47993a1361f133ca52302eae06b223c36c2ca.tar.gz |
Edit quotes in error message.
This makes it clearer to see what the label is, vs where the error
message sis.
-rw-r--r-- | libstd/sleq.myr | 18 | ||||
-rw-r--r-- | mi/cfg.c | 4 |
2 files changed, 20 insertions, 2 deletions
diff --git a/libstd/sleq.myr b/libstd/sleq.myr new file mode 100644 index 0000000..8ad881d --- /dev/null +++ b/libstd/sleq.myr @@ -0,0 +1,18 @@ +pkg std = + generic sleq : (a : @a[:], b : @a[:] -> bool) +;; + +generic sleq = { + var i + + if a.len != b.len + -> false + ;; + + for i = 0; i < a.len; i++ + if a[i] != b[i] + -> false + ;; + ;; + -> true +} @@ -135,14 +135,14 @@ Cfg *mkcfg(Node **nl, size_t nn) if (a) { targ = htget(cfg->lblmap, lblstr(a)); if (!targ) - die("No bb with label %s", lblstr(a)); + die("No bb with label \"%s\"", lblstr(a)); bsput(bb->succ, targ->id); bsput(targ->pred, bb->id); } if (b) { targ = htget(cfg->lblmap, lblstr(b)); if (!targ) - die("No bb with label %s", lblstr(b)); + die("No bb with label \"%s\"", lblstr(b)); bsput(bb->succ, targ->id); bsput(targ->pred, bb->id); } |