summaryrefslogtreecommitdiff
path: root/runtime/lambda/closure_builder.cc
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.cc
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.cc')
-rw-r--r--runtime/lambda/closure_builder.cc13
1 files changed, 0 insertions, 13 deletions
diff --git a/runtime/lambda/closure_builder.cc b/runtime/lambda/closure_builder.cc
index 739e965238..9c37db8fcc 100644
--- a/runtime/lambda/closure_builder.cc
+++ b/runtime/lambda/closure_builder.cc
@@ -64,8 +64,6 @@ void ClosureBuilder::CaptureVariableObject(mirror::Object* object) {
UNIMPLEMENTED(FATAL) << "can't yet safely capture objects with read barrier";
}
}
-
- shorty_types_ += ShortyFieldType::kObject;
}
void ClosureBuilder::CaptureVariableLambda(Closure* closure) {
@@ -80,8 +78,6 @@ void ClosureBuilder::CaptureVariableLambda(Closure* closure) {
// A closure may be sized dynamically, so always query it for the true size.
size_ += closure->GetSize();
-
- shorty_types_ += ShortyFieldType::kLambda;
}
size_t ClosureBuilder::GetSize() const {
@@ -89,15 +85,9 @@ size_t ClosureBuilder::GetSize() const {
}
size_t ClosureBuilder::GetCaptureCount() const {
- DCHECK_EQ(values_.size(), shorty_types_.size());
return values_.size();
}
-const std::string& ClosureBuilder::GetCapturedVariableShortyTypes() const {
- DCHECK_EQ(values_.size(), shorty_types_.size());
- return shorty_types_;
-}
-
Closure* ClosureBuilder::CreateInPlace(void* memory, ArtLambdaMethod* target_method) const {
DCHECK(memory != nullptr);
DCHECK(target_method != nullptr);
@@ -148,14 +138,11 @@ size_t ClosureBuilder::WriteValues(ArtLambdaMethod* target_method,
size_t variables_size) const {
size_t total_size = header_size;
const char* shorty_types = target_method->GetCapturedVariablesShortyTypeDescriptor();
- DCHECK_STREQ(shorty_types, shorty_types_.c_str());
size_t variables_offset = 0;
size_t remaining_size = variables_size;
const size_t shorty_count = target_method->GetNumberOfCapturedVariables();
- DCHECK_EQ(shorty_count, GetCaptureCount());
-
for (size_t i = 0; i < shorty_count; ++i) {
ShortyFieldType shorty{shorty_types[i]}; // NOLINT [readability/braces] [4]