factor some subtyping logic in clsmerge()

This commit is contained in:
Quentin Carbonneaux 2016-04-18 14:03:06 -04:00
parent c6f3adc52d
commit c43a07086b
4 changed files with 32 additions and 18 deletions

2
all.h
View file

@ -190,6 +190,7 @@ enum FCmp {
};
enum Class {
Kx = -1, /* "top" class (see usecheck() and clsmerge()) */
Kw,
Kl,
Ks,
@ -488,6 +489,7 @@ void idup(Ins **, Ins *, ulong);
Ins *icpy(Ins *, Ins *, ulong);
void *vnew(ulong, size_t);
void vgrow(void *, ulong);
int clsmerge(short *, short);
int phicls(int, Tmp *);
Ref newtmp(char *, int, Fn *);
void chuse(Ref, int, Fn *);