OSDN Git Service

runtime: Partially implement box-lambda and unbox-lambda experimental opcodes
authorIgor Murashkin <iam@google.com>
Thu, 18 Jun 2015 17:05:11 +0000 (10:05 -0700)
committerIgor Murashkin <iam@google.com>
Mon, 22 Jun 2015 21:13:30 +0000 (14:13 -0700)
commit2ee54e249ad21c74f29a161e248bebe7d22fddf1
tree125465dd7a6d23f83ecbf2d3454f21471868422c
parent158f35c98e2ec0d40d2c032b8cdce5fb60944a7f
runtime: Partially implement box-lambda and unbox-lambda experimental opcodes

These opcodes are not yet fully specified, and *will* change before they become shippable.
Do not write production code against experimental opcodes.

--

Implement partial interpreter support for new dex instructions box/unbox-lambda.
* box-lambda will take a closure and convert it into an Object
* unbox-lambda will take an Object and convert it to a closure

(Currently does not implement object identity or variable capture).

All new opcodes are disabled by default, use runtime option -Xexperimental-lambdas to enable them.

Change-Id: I3c15ccf8a26ccecd1d35808a8c1b4149220f6019
compiler/dex/quick/quick_compiler.cc
runtime/dex_instruction_list.h
runtime/interpreter/interpreter_common.h
runtime/interpreter/interpreter_goto_table_impl.cc
runtime/interpreter/interpreter_switch_impl.cc
runtime/verifier/method_verifier.cc
test/955-lambda-smali/expected.txt
test/955-lambda-smali/smali/BoxUnbox.smali [new file with mode: 0644]
test/955-lambda-smali/smali/Main.smali