From 457e874459ae638145cab6d572e34d48480e39d2 Mon Sep 17 00:00:00 2001 From: Igor Murashkin Date: Thu, 22 Oct 2015 17:37:50 -0700 Subject: 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 --- runtime/lambda/closure.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'runtime/lambda/closure.cc') diff --git a/runtime/lambda/closure.cc b/runtime/lambda/closure.cc index 179e4ee7f2..f935e049fd 100644 --- a/runtime/lambda/closure.cc +++ b/runtime/lambda/closure.cc @@ -20,9 +20,6 @@ #include "lambda/art_lambda_method.h" #include "runtime/mirror/object_reference.h" -static constexpr const bool kClosureSupportsReferences = false; -static constexpr const bool kClosureSupportsGarbageCollection = false; - namespace art { namespace lambda { @@ -128,6 +125,10 @@ ArtMethod* Closure::GetTargetMethod() const { return const_cast(lambda_info_->GetArtMethod()); } +ArtLambdaMethod* Closure::GetLambdaInfo() const { + return const_cast(lambda_info_); +} + uint32_t Closure::GetHashCode() const { // Start with a non-zero constant, a prime number. uint32_t result = 17; -- cgit v1.2.3-59-g8ed1b