summaryrefslogtreecommitdiff
path: root/runtime/lambda/art_lambda_method.cc
diff options
context:
space:
mode:
author Igor Murashkin <iam@google.com> 2015-11-21 00:55:35 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2015-11-21 00:55:35 +0000
commitb48cb936e6fa52d0ded29bac4f1f654cdf112ac6 (patch)
treeb192c4698c4889ae90db6abe2652199802213fe6 /runtime/lambda/art_lambda_method.cc
parent3944f7175dcf60316ba58a42698ccf23c65ac57c (diff)
parent457e874459ae638145cab6d572e34d48480e39d2 (diff)
Merge "lambda: Add support for invoke-interface for boxed innate lambdas"
Diffstat (limited to 'runtime/lambda/art_lambda_method.cc')
-rw-r--r--runtime/lambda/art_lambda_method.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/runtime/lambda/art_lambda_method.cc b/runtime/lambda/art_lambda_method.cc
index 6f9f8bbb59..0690cd1a31 100644
--- a/runtime/lambda/art_lambda_method.cc
+++ b/runtime/lambda/art_lambda_method.cc
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+#include "art_method-inl.h"
#include "lambda/art_lambda_method.h"
#include "base/logging.h"
@@ -73,5 +74,12 @@ ArtLambdaMethod::ArtLambdaMethod(ArtMethod* target_method,
}
}
+size_t ArtLambdaMethod::GetArgumentVRegCount() const {
+ DCHECK(GetArtMethod()->IsStatic()); // Instance methods don't have receiver in shorty.
+ const char* method_shorty = GetArtMethod()->GetShorty();
+ DCHECK_NE(*method_shorty, '\0') << method_shorty;
+ return ShortyFieldType::CountVirtualRegistersRequired(method_shorty + 1); // skip return type
+}
+
} // namespace lambda
} // namespace art