commit | 00c733ab74fb44e10a22af8333f014c984b9b406 | [log] [tgz] |
---|---|---|
author | Rui Ueyama <ruiu@google.com> | Mon Mar 25 23:28:47 2019 +0000 |
committer | Rui Ueyama <ruiu@google.com> | Mon Mar 25 23:28:47 2019 +0000 |
tree | 7ea730ab70fab7752dfc554187baebf631f60d39 | |
parent | 62c565867520a050331ba15a18028318148a5854 [diff] |
Use a class instead of lambda-based callbacks to organize garbage collector. lld's mark-sweep garbage collector was written in the visitor pattern. There are functions that traverses a given graph, and the functions calls callback functions to dispatch according to node type. The code was originaly pretty simple, and lambdas worked pretty well. However, as we add more features to the garbage collector, that became more like a callback hell. We now have a callback function that wraps another callback function, for example. It is not easy to follow the flow of the control. This patch rewrites it as a regular class. What was once a lambda is now a regular class member function. I think this change fixes the readability issue. No functionality change intended. Differential Revision: https://reviews.llvm.org/D59800 git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@356966 91177308-0d34-0410-b5e6-96231b3b80d8
This directory and its subdirectories contain source code for the LLVM Linker, a modular cross platform linker which is built as part of the LLVM compiler infrastructure project.
lld is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt.
In order to make sure various developers can evaluate patches over the same tests, we create a collection of self contained programs.
It is hosted at https://s3-us-west-2.amazonaws.com/linker-tests/lld-speed-test.tar.xz
The current sha256 is 10eec685463d5a8bbf08d77f4ca96282161d396c65bd97dc99dbde644a31610f.