summary refs log tree commit diff
path: root/parse.c
AgeCommit message (Collapse)Author
2017-02-17stricter class constraints for store & vastartQuentin Carbonneaux
2017-02-15add support for closure callsQuentin Carbonneaux
Compiling languages with closures often requires passing an extra environment parameter to the called function. One solution is to use a convention, and reserve, say, the first argument for that purpose. However, that makes binding to C a little less smooth. Alternatively, QBE now provides a way to remain fully ABI compatible with C by having a "hidden" environment argument (marked with the keyword 'env'). Calling a function expecting an environment from C will make the contents of the environment undefined, but the normal arguments will be passed without alteration. Conversely, calling a C function like it is a closure by passing it an environemnt will work smoothly.
2017-02-14minor cleanup in all.hQuentin Carbonneaux
2017-02-10support variable argument listsQuentin Carbonneaux
This change is backward compatible, calls to "variadic" functions (like printf) must now be annotated (with ...).
2017-01-12use a less obtuse api for vnew()Quentin Carbonneaux
2017-01-04more performance improvements in the parserQuentin Carbonneaux
2016-12-31use a perfect hash for lexingQuentin Carbonneaux
2016-12-28fix escapes handling (patch from ac)Quentin Carbonneaux
2016-09-27accept "ret" for functions with a return typeQuentin Carbonneaux
This happens to be needed for C. The standard mandates that a return value is used if the caller uses it. Surprisingly, if the return "value" is not used, the callee can use "return;". A better solution is to add an "undef" value and return it, "undef" would also have other use cases for compiling C.
2016-08-16add support for unions in sysv abiQuentin Carbonneaux
2016-08-16parse union typesQuentin Carbonneaux
2016-08-15specify the allocation function in vnewQuentin Carbonneaux
2016-08-14couple of case fixes in tokensQuentin Carbonneaux
2016-08-14use an enum for aggregate segmentsQuentin Carbonneaux
2016-04-25fix type size computations in parserQuentin Carbonneaux
The type sizes are important to get right because the ABI relies on them when it emits memory blits to pass/return structs.
2016-04-22refine fp conversion instructionsQuentin Carbonneaux
2016-04-22make sure type sizes never overflowQuentin Carbonneaux
2016-04-20disallow phi nodes in the start blockQuentin Carbonneaux
AFL found this bug.
2016-04-20support calls with no returnQuentin Carbonneaux
I thought it would be harder (and maybe it is). My fear was that a call must be always followed by a parallel move from machine registers (this is an assumption in both spill and rega). This however remains true, because the ABI code generates a dummy "copy RAX" by accident!
2016-04-20normalize case in token namesQuentin Carbonneaux
2016-04-20match jumps/ops with il textQuentin Carbonneaux
2016-04-18factor some subtyping logic in clsmerge()Quentin Carbonneaux
2016-04-16support trailing , in types/args/paramsOri Bernstein
2016-04-16fix relic error messageQuentin Carbonneaux
2016-04-13check types on assignmentsQuentin Carbonneaux
2016-04-12bug in checking of multiple definitionsQuentin Carbonneaux
2016-04-12add missing idiv in opdesc[]Quentin Carbonneaux
2016-04-12avoid a few hangs in parsing codeQuentin Carbonneaux
2016-04-12check invalid instruction typesQuentin Carbonneaux
2016-04-12add simple il validationQuentin Carbonneaux
2016-04-07add a canfold field to opdescQuentin Carbonneaux
2016-04-04fat il!Quentin Carbonneaux
2016-03-31move abi code in a new fileQuentin Carbonneaux
2016-03-31cleanup error handlingQuentin Carbonneaux
2016-03-29new layout, put LICENSE in rootQuentin Carbonneaux