summaryrefslogtreecommitdiff
path: root/mbld
diff options
context:
space:
mode:
authorLucas Gabriel Vuotto <lvuotto92@gmail.com>2017-11-01 16:53:26 -0300
committerOri Bernstein <ori@markovcorp.com>2017-11-14 13:50:39 -0800
commit83d26331a5419033927800760e8a59f1bd84d2b9 (patch)
treed5985e8e5a32e673f549fcaa8eb23b5335f4f74d /mbld
parent8a662861ad3ded8e965ab43e5bc254dd7ee85815 (diff)
downloadmc-83d26331a5419033927800760e8a59f1bd84d2b9.tar.gz
Use new traits to implement hash tables
Signed-off-by: Lucas Gabriel Vuotto <lvuotto92@gmail.com>
Diffstat (limited to 'mbld')
-rw-r--r--mbld/deps.myr4
-rw-r--r--mbld/libs.myr6
-rw-r--r--mbld/main.myr12
-rw-r--r--mbld/parse.myr4
-rw-r--r--mbld/syssel.myr4
5 files changed, 15 insertions, 15 deletions
diff --git a/mbld/deps.myr b/mbld/deps.myr
index c67bef0..8bea55c 100644
--- a/mbld/deps.myr
+++ b/mbld/deps.myr
@@ -362,8 +362,8 @@ const resolve = {b
;;
stk = [][:]
- visited = std.mkht(std.ptrhash, std.ptreq)
- looped = std.mkht(std.ptrhash, std.ptreq)
+ visited = std.mkht()
+ looped = std.mkht()
for n : g.nodes
checkloop(g, n, visited, looped, &stk)
;;
diff --git a/mbld/libs.myr b/mbld/libs.myr
index d1307ff..544181a 100644
--- a/mbld/libs.myr
+++ b/mbld/libs.myr
@@ -119,9 +119,9 @@ const addlibs = {b, sl, libs, incs
var added, diradded, looped
var lo
- added = std.mkht(std.strhash, std.streq)
- looped = std.mkht(std.strhash, std.streq)
- diradded = std.mkht(std.strhash, std.streq)
+ added = std.mkht()
+ looped = std.mkht()
+ diradded = std.mkht()
lo = sl#.len
for l : libs
diff --git a/mbld/main.myr b/mbld/main.myr
index 606ae3b..3362d3a 100644
--- a/mbld/main.myr
+++ b/mbld/main.myr
@@ -140,13 +140,13 @@ const mkbuild = {tags
var b
b = std.zalloc()
- b.libs = std.mkht(std.strhash, std.streq)
- b.proc = std.mkht(std.inthash, std.inteq)
- b.targs = std.mkht(std.strhash, std.streq)
- b.tags = std.mkht(std.strhash, std.streq)
+ b.libs = std.mkht()
+ b.proc = std.mkht()
+ b.targs = std.mkht()
+ b.tags = std.mkht()
b.deps = std.mk([
- .targs = std.mkht(std.strhash, std.streq),
- .gen = std.mkht(std.strhash, std.streq),
+ .targs = std.mkht(),
+ .gen = std.mkht(),
.leaves = [][:],
.nodes = [][:],
])
diff --git a/mbld/parse.myr b/mbld/parse.myr
index 96e47d5..5f82c05 100644
--- a/mbld/parse.myr
+++ b/mbld/parse.myr
@@ -61,8 +61,8 @@ const sortdeps = {b
var all
all = [][:]
- looped = std.mkht(std.strhash, std.streq)
- marked = std.mkht(std.strhash, std.streq)
+ looped = std.mkht()
+ marked = std.mkht()
for dep : b.all
match gettarg(b.targs, dep)
| `Bin _: all = visit(all, b, "all", dep, looped, marked)
diff --git a/mbld/syssel.myr b/mbld/syssel.myr
index 9208d71..93ac581 100644
--- a/mbld/syssel.myr
+++ b/mbld/syssel.myr
@@ -27,8 +27,8 @@ generic mksyssel = {b, file, line, targ
.file = file,
.line = line,
.targ = targ,
- ._match = std.mkht(std.strhash, std.streq),
- ._best = std.mkht(std.strhash, std.streq),
+ ._match = std.mkht(),
+ ._best = std.mkht(),
.sysattrs = b.tags
])
-> syssel