diff options
author | Igor Murashkin <iam@google.com> | 2015-07-10 13:49:08 -0700 |
---|---|---|
committer | Igor Murashkin <iam@google.com> | 2015-07-20 15:11:59 -0700 |
commit | e2facc5b18cd756a8b5500fb3d90da69c9ee0fb7 (patch) | |
tree | 595a3c807e1cbaa4b8c22b93685d70faa4ff0f5a /compiler/optimizing/graph_visualizer.cc | |
parent | e07300b712f44397ecbfed1ef7f880686e46274a (diff) |
runtime: Add lambda box/unbox object equality
A lambda that is boxed with box-lambda is now stored as a weak reference
in a global runtime table (lambda::BoxTable). Repeatedly boxing the same
lambda closure value will always return the same java.lang.Object back.
Since there is no way to observe the address of an object, a GC can
happen and clean up the table of any dead boxed lambdas, which can also
shrink the table to prevent the memory use from growing too much.
(Note that a lambda closure is immutable, so hashing over it is
guaranteed safe.)
Change-Id: I786c1323ff14eed937936b303d511875f9642524
Diffstat (limited to 'compiler/optimizing/graph_visualizer.cc')
0 files changed, 0 insertions, 0 deletions