nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rta: resolve the open-types in a depth-first order to reach limit faster
[nit.git]
/
src
/
rapid_type_analysis.nit
diff --git
a/src/rapid_type_analysis.nit
b/src/rapid_type_analysis.nit
index
c072314
..
2d621e8
100644
(file)
--- a/
src/rapid_type_analysis.nit
+++ b/
src/rapid_type_analysis.nit
@@
-314,7
+314,9
@@
class RapidTypeAnalysis
if not check_depth(rt) then continue
#print "{ot}/{t} -> {rt}"
live_types.add(rt)
if not check_depth(rt) then continue
#print "{ot}/{t} -> {rt}"
live_types.add(rt)
- todo_types.add(rt)
+ # unshift means a deep-first visit.
+ # So that the `check_depth` limit is reached sooner.
+ todo_types.unshift(rt)
end
end
#print "MType {live_types.length}: {live_types.join(", ")}"
end
end
#print "MType {live_types.length}: {live_types.join(", ")}"