summaryrefslogtreecommitdiff
path: root/6
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 /6
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 '6')
-rw-r--r--6/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/6/main.c b/6/main.c
index 2f54284..a153b8b 100644
--- a/6/main.c
+++ b/6/main.c
@@ -274,9 +274,10 @@ main(int argc, char **argv)
/* before we do anything to the parse */
if (debugopt['T'])
dump(file, stdout);
- infer();
+ loaduses();
if (hasmain(file))
geninit();
+ infer();
tagexports(0);
/* after all type inference */
if (debugopt['t'])