summaryrefslogtreecommitdiff
path: root/parse/infer.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2018-01-17 13:53:44 -0800
committerOri Bernstein <ori@markovcorp.com>2018-01-17 13:53:44 -0800
commitc7ad247d35a719539fc4df4e7a78d07e77a6f538 (patch)
tree81b9ebd0c54b366101ed98f50c4f86c71ea24f77 /parse/infer.c
parentb5c63138b4f40766dacc40e8ce91d44abdbb3b0e (diff)
downloadmc-c7ad247d35a719539fc4df4e7a78d07e77a6f538.tar.gz
Infer after generating init functions.
Pull out the usefile loading, so we can call it separately from inference. Then shuffle the infer() call to after we generate init().
Diffstat (limited to 'parse/infer.c')
-rw-r--r--parse/infer.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/parse/infer.c b/parse/infer.c
index 1b81bb1..548c1f2 100644
--- a/parse/infer.c
+++ b/parse/infer.c
@@ -1314,16 +1314,6 @@ unifyparams(Node *ctx, Type *a, Type *b)
unify(ctx, a->arg[i], b->arg[i]);
}
-static void
-loaduses(void)
-{
- size_t i;
-
- /* uses only allowed at top level. Do we want to keep it this way? */
- for (i = 0; i < file->file.nuses; i++)
- readuse(file->file.uses[i], file->file.globls, Visintern);
-}
-
static Type *
initvar(Node *n, Node *s)
{
@@ -2957,7 +2947,6 @@ void
infer(void)
{
delayed = mkht(tyhash, tyeq);
- loaduses();
initimpl();
/* do the inference */