summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2019-03-25 23:28:47 +0000
committerRui Ueyama <ruiu@google.com>2019-03-25 23:28:47 +0000
commite6c24299d2373b2c809e4577bae8c308a971485c (patch)
tree0c4c01036b87d784d300c5200585177bf5e2bd4e /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
parentea40d5b05b8b7a08ec60d01d2381748390aeafe9 (diff)
downloadbcm5719-llvm-e6c24299d2373b2c809e4577bae8c308a971485c.tar.gz
bcm5719-llvm-e6c24299d2373b2c809e4577bae8c308a971485c.zip
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 llvm-svn: 356966
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud