lambda: Add support for invoke-interface for boxed innate lambdas
Lambda closures created with the 'create-lambda' instruction
(termed "innate lambdas") can be turned into an object with 'box-lambda'.
This CL enables support for those kinds of lambdas to work with
'invoke-interface' by generating a proxy class for the lambda.
Note: MIPS32/64 support not included.
Bug: 24618608
Bug: 25107649
Change-Id: Ic8f1bb66ebeaed4097e758a50becf1cff6ccaefb
diff --git a/runtime/mirror/class_loader-inl.h b/runtime/mirror/class_loader-inl.h
index e22ddd7..3139117 100644
--- a/runtime/mirror/class_loader-inl.h
+++ b/runtime/mirror/class_loader-inl.h
@@ -21,6 +21,7 @@
#include "base/mutex-inl.h"
#include "class_table-inl.h"
+#include "lambda/box_class_table-inl.h"
namespace art {
namespace mirror {
@@ -35,6 +36,10 @@
if (class_table != nullptr) {
class_table->VisitRoots(visitor);
}
+ lambda::BoxClassTable* const lambda_box_class_table = GetLambdaProxyCache();
+ if (lambda_box_class_table != nullptr) {
+ lambda_box_class_table->VisitRoots(visitor);
+ }
}
} // namespace mirror