Commit graph

21 commits

Author SHA1 Message Date
Quentin Carbonneaux
a9d81338b1 add support for closure calls
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-15 20:17:13 -05:00
Quentin Carbonneaux
d9f1121763 tests for variable argument lists 2017-02-10 11:06:00 -05:00
Quentin Carbonneaux
b99a8b0d07 support variable argument lists
This change is backward compatible, calls to
"variadic" functions (like printf) must now be
annotated (with ...).
2017-02-10 11:05:54 -05:00
Quentin Carbonneaux
f5917c35bd attempt to fix cc flags in tests 2017-01-04 22:01:55 -05:00
Quentin Carbonneaux
b976b2da5c more performance improvements in the parser 2017-01-04 15:02:07 -05:00
Quentin Carbonneaux
103f427356 minor bugs in lexh tool 2016-12-31 14:17:11 -05:00
Quentin Carbonneaux
cd458524b3 new tool to improve lexing speed 2016-12-30 22:05:27 -05:00
Quentin Carbonneaux
8032339c59 disable pie (default on some os) 2016-12-05 02:50:08 -05:00
Quentin Carbonneaux
3e8a18dd1b return non-zero when tests fail 2016-10-24 14:36:35 -04:00
Quentin Carbonneaux
48896b0598 improve tests output for contbuild 2016-10-19 19:36:33 -04:00
Quentin Carbonneaux
490799b772 update help message of unit tester 2016-08-16 13:38:39 -07:00
Quentin Carbonneaux
479e946113 add tool to process afl results 2016-04-18 16:21:51 -04:00
Quentin Carbonneaux
3ea138853d get more entropy in callgen.ml 2016-03-29 10:28:21 -04:00
Quentin Carbonneaux
b75cb8388f new layout, put LICENSE in root 2016-03-29 10:10:22 -04:00
Quentin Carbonneaux
1b4943eb1f implement export control 2016-03-28 14:57:20 -04:00
Quentin Carbonneaux
54d734f6a4 mac os compatibility fixes in scripts 2016-03-27 19:35:19 -04:00
Quentin Carbonneaux
3406a5fb2f free memory in pmov test 2016-03-27 18:35:21 -04:00
Quentin Carbonneaux
2f2d99e63f fix path in regress 2016-03-27 18:26:14 -04:00
Quentin Carbonneaux
32590f3a6c fix wrong path in pmov 2016-03-27 18:21:29 -04:00
Quentin Carbonneaux
c21581647b compile pmov to cwd 2016-03-27 18:20:51 -04:00
Quentin Carbonneaux
da640c5a46 move tools to the root 2016-03-27 18:17:08 -04:00