diff options
author | 2015-09-27 19:19:06 -0700 | |
---|---|---|
committer | 2015-09-27 19:19:23 -0700 | |
commit | 6918bf13eb855b3aa8ccdddda2d27ae8c60cec56 (patch) | |
tree | 907f504a4d004ac1e44b73c3984e365e889407e8 /runtime/lambda/closure.h | |
parent | 446ca43e8f876dcc1ee90fcf432d6392c44a3f60 (diff) |
Revert "Revert "lambda: Experimental support for capture-variable and liberate-variable""
This reverts commit 7bbb80ab52c203e44d2ded2c947b3b03b4b31ec4.
Change-Id: If806ce5c6c5e96fdb2c3761dee096f74e7e5b001
Diffstat (limited to 'runtime/lambda/closure.h')
-rw-r--r-- | runtime/lambda/closure.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/runtime/lambda/closure.h b/runtime/lambda/closure.h index 60d117e9e2..31ff1944d2 100644 --- a/runtime/lambda/closure.h +++ b/runtime/lambda/closure.h @@ -49,6 +49,19 @@ struct PACKED(sizeof(ArtLambdaMethod*)) Closure { // The target_size must be at least as large as GetSize(). void CopyTo(void* target, size_t target_size) const; + // Get the target method, i.e. the method that will be dispatched into with invoke-lambda. + ArtMethod* GetTargetMethod() const; + + // Calculates the hash code. Value is recomputed each time. + uint32_t GetHashCode() const SHARED_REQUIRES(Locks::mutator_lock_); + + // Is this the same closure as other? e.g. same target method, same variables captured. + // + // Determines whether the two Closures are interchangeable instances. + // Does *not* call Object#equals recursively. If two Closures compare ReferenceEquals true that + // means that they are interchangeable values (usually for the purpose of boxing/unboxing). + bool ReferenceEquals(const Closure* other) const SHARED_REQUIRES(Locks::mutator_lock_); + // How many variables were captured? size_t GetNumberOfCapturedVariables() const; |