Fix space leak in BinIface.getSymbolTable
authorDouglas Wilson <douglas.wilson@gmail.com>
Wed, 25 Oct 2017 18:20:06 +0000 (14:20 -0400)
committerBen Gamari <ben@smart-cactus.org>
Wed, 25 Oct 2017 19:47:25 +0000 (15:47 -0400)
commit1c15d8ed112bccf2635d571767733b2a26d8fb21
treea952104e64fd898c8698a0c6e75c81c944a96651
parent980e1270ed7f681ef666ca36fe291cfb8613348c
Fix space leak in BinIface.getSymbolTable

Replace a call to mapAccumR, which uses linear stack space, with a
gadget that uses constant space.

Remove an unused parameter from fromOnDiskName.

The tests T1292_imports and T4239 are now reporting imported names in a
different order. I don't completely understand why, but I presume it is
because the symbol tables are now read more strictly. The new order
seems better in T1792_imports, and equally random in T4239.

There are several performance test improvements.

Test Plan: ./validate

Reviewers: austin, bgamari

Reviewed By: bgamari

Subscribers: alexbiehl, rwbarton, thomie

Differential Revision: https://phabricator.haskell.org/D4124
compiler/iface/BinIface.hs
testsuite/tests/perf/compiler/all.T
testsuite/tests/rename/should_compile/T1792_imports.stdout
testsuite/tests/rename/should_compile/T4239.stdout