diff options
author | 2016-08-05 11:44:32 +0100 | |
---|---|---|
committer | 2016-08-09 13:47:49 +0100 | |
commit | 14832efeb92334c562ebedef34e920d30e3cee69 (patch) | |
tree | 57d10c24966a46ae1c01861ee579ac6000326c45 /runtime/interpreter/interpreter_common.cc | |
parent | c984725d0035e1925371757c38fed339b409e525 (diff) |
Revert experimental lambda feature.
This is a revert of the following changes :
30c475a2046951a81769c2db0b2dad66cd71e189.
lambda: Minor capture-variable/liberate-variable clean-up after post-merge reviews.
6918bf13eb855b3aa8ccdddda2d27ae8c60cec56.
lambda: Experimental support for capture-variable and liberate-variable
fc1ccd740b7c8e96dfac675cfc580122cd1b40a6.
lambda: Infrastructure to support capture/liberate-variable dex opcodes
e2facc5b18cd756a8b5500fb3d90da69c9ee0fb7.
runtime: Add lambda box/unbox object equality
2ee54e249ad21c74f29a161e248bebe7d22fddf1.
runtime: Partially implement box-lambda and unbox-lambda experimental opcodes
158f35c98e2ec0d40d2c032b8cdce5fb60944a7f.
interpreter: Add experimental lambda opcodes for invoke/create-lambda
a3bb72036f5454e410467f7151dc89f725ae1151.
Added format 25x to dexdump(2).
Plus surrounding cleanups.
Test: make test-art
Change-Id: Ic6f999ad17385ef933f763641049cf721510b202
Diffstat (limited to 'runtime/interpreter/interpreter_common.cc')
-rw-r--r-- | runtime/interpreter/interpreter_common.cc | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/runtime/interpreter/interpreter_common.cc b/runtime/interpreter/interpreter_common.cc index 11b7ef433d..ac146b317d 100644 --- a/runtime/interpreter/interpreter_common.cc +++ b/runtime/interpreter/interpreter_common.cc @@ -30,9 +30,6 @@ namespace art { namespace interpreter { -// All lambda closures have to be a consecutive pair of virtual registers. -static constexpr size_t kLambdaVirtualRegisterWidth = 2; - void ThrowNullPointerExceptionFromInterpreter() { ThrowNullPointerExceptionFromDexPC(); } @@ -732,7 +729,6 @@ static inline bool DoCallCommon(ArtMethod* called_method, // Fast path: no extra checks. if (is_range) { - // TODO: Implement the range version of invoke-lambda uint16_t first_src_reg = vregC; for (size_t src_reg = first_src_reg, dest_reg = first_dest_reg; dest_reg < num_regs; @@ -772,34 +768,6 @@ static inline bool DoCallCommon(ArtMethod* called_method, } template<bool is_range, bool do_assignability_check> -bool DoLambdaCall(ArtMethod* called_method, Thread* self, ShadowFrame& shadow_frame, - const Instruction* inst, uint16_t inst_data ATTRIBUTE_UNUSED, JValue* result) { - const uint4_t num_additional_registers = inst->VRegB_25x(); - // Argument word count. - const uint16_t number_of_inputs = num_additional_registers + kLambdaVirtualRegisterWidth; - // The lambda closure register is always present and is not encoded in the count. - // Furthermore, the lambda closure register is always wide, so it counts as 2 inputs. - - // TODO: find a cleaner way to separate non-range and range information without duplicating - // code. - uint32_t arg[Instruction::kMaxVarArgRegs25x]; // only used in invoke-XXX. - uint32_t vregC = 0; // only used in invoke-XXX-range. - if (is_range) { - vregC = inst->VRegC_3rc(); - } else { - // TODO(iam): See if it's possible to remove inst_data dependency from 35x to avoid this path - inst->GetAllArgs25x(arg); - } - - // TODO: if there's an assignability check, throw instead? - DCHECK(called_method->IsStatic()); - - return DoCallCommon<is_range, do_assignability_check>( - called_method, self, shadow_frame, - result, number_of_inputs, arg, vregC); -} - -template<bool is_range, bool do_assignability_check> bool DoCall(ArtMethod* called_method, Thread* self, ShadowFrame& shadow_frame, const Instruction* inst, uint16_t inst_data, JValue* result) { // Argument word count. @@ -947,20 +915,6 @@ EXPLICIT_DO_CALL_TEMPLATE_DECL(true, false); EXPLICIT_DO_CALL_TEMPLATE_DECL(true, true); #undef EXPLICIT_DO_CALL_TEMPLATE_DECL -// Explicit DoLambdaCall template function declarations. -#define EXPLICIT_DO_LAMBDA_CALL_TEMPLATE_DECL(_is_range, _do_assignability_check) \ - template SHARED_REQUIRES(Locks::mutator_lock_) \ - bool DoLambdaCall<_is_range, _do_assignability_check>(ArtMethod* method, Thread* self, \ - ShadowFrame& shadow_frame, \ - const Instruction* inst, \ - uint16_t inst_data, \ - JValue* result) -EXPLICIT_DO_LAMBDA_CALL_TEMPLATE_DECL(false, false); -EXPLICIT_DO_LAMBDA_CALL_TEMPLATE_DECL(false, true); -EXPLICIT_DO_LAMBDA_CALL_TEMPLATE_DECL(true, false); -EXPLICIT_DO_LAMBDA_CALL_TEMPLATE_DECL(true, true); -#undef EXPLICIT_DO_LAMBDA_CALL_TEMPLATE_DECL - // Explicit DoFilledNewArray template function declarations. #define EXPLICIT_DO_FILLED_NEW_ARRAY_TEMPLATE_DECL(_is_range_, _check, _transaction_active) \ template SHARED_REQUIRES(Locks::mutator_lock_) \ |