diff options
| author | Roberto I <roberto@inf.puc-rio.br> | 2025-11-28 15:12:51 -0300 |
|---|---|---|
| committer | Roberto I <roberto@inf.puc-rio.br> | 2025-11-28 15:12:51 -0300 |
| commit | a07f6a824197d7dc01c321599d3bc71936a2590e (patch) | |
| tree | a3c4c0aff91e4175c31806727190803f250bf3e6 /lobject.h | |
| parent | f33cc4ddec886ea499d7d41dd60cac5ddc5687db (diff) | |
| download | lua-a07f6a824197d7dc01c321599d3bc71936a2590e.tar.gz lua-a07f6a824197d7dc01c321599d3bc71936a2590e.tar.bz2 lua-a07f6a824197d7dc01c321599d3bc71936a2590e.zip | |
Functions with vararg tables don't need hidden args.
Vararg functions with vararg tables don't use the arguments hidden in
the stack; therfore, it doesn't need to build/keep them.
Diffstat (limited to 'lobject.h')
| -rw-r--r-- | lobject.h | 10 |
1 files changed, 9 insertions, 1 deletions
| @@ -583,10 +583,18 @@ typedef struct AbsLineInfo { | |||
| 583 | /* | 583 | /* |
| 584 | ** Flags in Prototypes | 584 | ** Flags in Prototypes |
| 585 | */ | 585 | */ |
| 586 | #define PF_ISVARARG 1 /* function is vararg */ | 586 | #define PF_VAHID 1 /* function has hidden vararg arguments */ |
| 587 | #define PF_VATAB 2 /* function has vararg table */ | 587 | #define PF_VATAB 2 /* function has vararg table */ |
| 588 | #define PF_FIXED 4 /* prototype has parts in fixed memory */ | 588 | #define PF_FIXED 4 /* prototype has parts in fixed memory */ |
| 589 | 589 | ||
| 590 | /* a vararg function either has hidden args. or a vararg table */ | ||
| 591 | #define isvararg(p) ((p)->flag & (PF_VAHID | PF_VATAB)) | ||
| 592 | |||
| 593 | /* | ||
| 594 | ** mark that a function needs a vararg table. (The flag PF_VAHID will | ||
| 595 | ** be cleared later.) | ||
| 596 | */ | ||
| 597 | #define needvatab(p) ((p)->flag |= PF_VATAB) | ||
| 590 | 598 | ||
| 591 | /* | 599 | /* |
| 592 | ** Function Prototypes | 600 | ** Function Prototypes |
