support variable argument lists
This change is backward compatible, calls to "variadic" functions (like printf) must now be annotated (with ...).
This commit is contained in:
parent
8799dc30ac
commit
b99a8b0d07
8 changed files with 256 additions and 47 deletions
5
all.h
5
all.h
|
@ -256,6 +256,9 @@ enum Op {
|
|||
Oalloc,
|
||||
Oalloc1 = Oalloc + NAlign-1,
|
||||
|
||||
Ovastart,
|
||||
Ovaarg,
|
||||
|
||||
Ocopy,
|
||||
NPubOp,
|
||||
|
||||
|
@ -265,6 +268,7 @@ enum Op {
|
|||
Oarg,
|
||||
Oargc,
|
||||
Ocall,
|
||||
Ovacall,
|
||||
|
||||
/* reserved instructions */
|
||||
Onop,
|
||||
|
@ -442,6 +446,7 @@ struct Fn {
|
|||
bits reg;
|
||||
int slot;
|
||||
char export;
|
||||
char vararg;
|
||||
char name[NString];
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue