Use a better strategy for determining the offset applied to foreign function argument...
authorAndrew Martin <andrew.thaddeus@gmail.com>
Sat, 25 May 2019 19:36:14 +0000 (15:36 -0400)
committerMarge Bot <ben+marge-bot@smart-cactus.org>
Tue, 4 Jun 2019 05:09:43 +0000 (01:09 -0400)
commitdb78ac6f5d69618ff143ab4b572e7f58a1805687
treebfff3f99e6710e1a5cad691d3bf6fba42d1d3419
parent286827be471f9efa67303d57b979e0c32cb8936e
Use a better strategy for determining the offset applied to foreign function arguments that have an unlifted boxed type. We used to use the type of the argument. We now use the type of the foreign function. Add a test to confirm that the roundtrip conversion between an unlifted boxed type and Any is sound in the presence of a foreign function call.
23 files changed:
compiler/codeGen/StgCmmExpr.hs
compiler/codeGen/StgCmmForeign.hs
compiler/codeGen/StgCmmPrim.hs
compiler/stgSyn/CoreToStg.hs
compiler/stgSyn/StgSyn.hs
testsuite/tests/ffi/should_compile/ReducingFfiSignature.hs [new file with mode: 0644]
testsuite/tests/ffi/should_compile/all.T
testsuite/tests/ffi/should_fail/NonreducingFfiSignature.hs [new file with mode: 0644]
testsuite/tests/ffi/should_fail/NonreducingFfiSignature.stderr [new file with mode: 0644]
testsuite/tests/ffi/should_fail/all.T
testsuite/tests/ffi/should_run/T16650a.hs [new file with mode: 0644]
testsuite/tests/ffi/should_run/T16650a.stdout [new file with mode: 0644]
testsuite/tests/ffi/should_run/T16650a_c.c [new file with mode: 0644]
testsuite/tests/ffi/should_run/T16650b.hs [new file with mode: 0644]
testsuite/tests/ffi/should_run/T16650b.stdout [new file with mode: 0644]
testsuite/tests/ffi/should_run/T16650b_c.c [new file with mode: 0644]
testsuite/tests/ffi/should_run/T16650c.hs [new file with mode: 0644]
testsuite/tests/ffi/should_run/T16650c.stdout [new file with mode: 0644]
testsuite/tests/ffi/should_run/T16650c_c.c [new file with mode: 0644]
testsuite/tests/ffi/should_run/T16650d.hs [new file with mode: 0644]
testsuite/tests/ffi/should_run/T16650d.stdout [new file with mode: 0644]
testsuite/tests/ffi/should_run/T16650d_c.c [new file with mode: 0644]
testsuite/tests/ffi/should_run/all.T