summaryrefslogtreecommitdiff
path: root/runtime/lambda/closure_builder.h
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2015-09-27 19:50:40 +0000
committer Nicolas Geoffray <ngeoffray@google.com> 2015-09-27 19:50:40 +0000
commit7bbb80ab52c203e44d2ded2c947b3b03b4b31ec4 (patch)
treeeb54c557467f1401c4bd5729fa2b9e8ae91e8ffd /runtime/lambda/closure_builder.h
parentb72123440d8541362ebdb131436f9dbdda5fd329 (diff)
Revert "lambda: Experimental support for capture-variable and liberate-variable"
Test fails. This reverts commit b72123440d8541362ebdb131436f9dbdda5fd329. Change-Id: Ic9ed92f8c826d8465eb36b746dc44af05caf041c
Diffstat (limited to 'runtime/lambda/closure_builder.h')
-rw-r--r--runtime/lambda/closure_builder.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/runtime/lambda/closure_builder.h b/runtime/lambda/closure_builder.h
index 23eb484529..542e12afaa 100644
--- a/runtime/lambda/closure_builder.h
+++ b/runtime/lambda/closure_builder.h
@@ -40,12 +40,13 @@ class ArtLambdaMethod; // forward declaration
//
// The mutator lock must be held for the duration of the lifetime of this object,
// since it needs to temporarily store heap references into an internal list.
-class ClosureBuilder {
+class ClosureBuilder : ValueObject {
public:
using ShortyTypeEnum = decltype(ShortyFieldType::kByte);
+
// Mark this primitive value to be captured as the specified type.
- template <typename T, ShortyTypeEnum kShortyType = ShortyFieldTypeSelectEnum<T>::value>
+ template <typename T, ShortyTypeEnum kShortyType>
void CaptureVariablePrimitive(T value);
// Mark this object reference to be captured.
@@ -62,9 +63,6 @@ class ClosureBuilder {
// Returns how many variables have been captured so far.
size_t GetCaptureCount() const;
- // Get the list of captured variables' shorty field types.
- const std::string& GetCapturedVariableShortyTypes() const;
-
// Creates a closure in-place and writes out the data into 'memory'.
// Memory must be at least 'GetSize' bytes large.
// All previously marked data to be captured is now written out.
@@ -95,7 +93,6 @@ class ClosureBuilder {
size_t size_ = kInitialSize;
bool is_dynamic_size_ = false;
std::vector<ShortyFieldTypeTraits::MaxType> values_;
- std::string shorty_types_;
};
} // namespace lambda