OSDN Git Service

interpreter: Add experimental lambda opcodes for invoke/create-lambda
authorIgor Murashkin <iam@google.com>
Wed, 10 Jun 2015 22:55:30 +0000 (15:55 -0700)
committerIgor Murashkin <iam@google.com>
Thu, 18 Jun 2015 17:22:27 +0000 (10:22 -0700)
commit158f35c98e2ec0d40d2c032b8cdce5fb60944a7f
tree63bb3bbed85b0add42c7fdc714cd611424d8af2e
parentc449e8b79aaaf156ce055524c41474cc1200ed5a
interpreter: Add experimental lambda opcodes for invoke/create-lambda

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 invoke/create-lambda, and a
new opcode format 25x.

* Does not verify, in fact verification will soft fail when we see those opcodes.
* Compilers will punt to interpreter since they don't support new opcodes.
* As there is no way to capture/liberate variables yet, the "closure" is just
  an ArtMethod for the time being.

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

For example:
  dalvikvm ... -Xexperimental-lambdas ...
  dex2oat --runtime-arg -Xexperimental-lambdas ...

Change-Id: I6c996ca32a9b54ec45ec21d7a959b84dfb8a24eb
24 files changed:
cmdline/cmdline_parser_test.cc
compiler/dex/mir_graph.cc
compiler/dex/quick/quick_compiler.cc
runtime/dex_instruction-inl.h
runtime/dex_instruction.cc
runtime/dex_instruction.h
runtime/dex_instruction_list.h
runtime/interpreter/interpreter_common.cc
runtime/interpreter/interpreter_common.h
runtime/interpreter/interpreter_goto_table_impl.cc
runtime/interpreter/interpreter_switch_impl.cc
runtime/parsed_options.cc
runtime/runtime.cc
runtime/runtime.h
runtime/runtime_options.def
runtime/verifier/method_verifier.cc
runtime/verifier/method_verifier.h
test/955-lambda-smali/expected.txt [new file with mode: 0644]
test/955-lambda-smali/info.txt [new file with mode: 0644]
test/955-lambda-smali/run [new file with mode: 0755]
test/955-lambda-smali/smali/Main.smali [new file with mode: 0644]
test/955-lambda-smali/smali/SanityCheck.smali [new file with mode: 0644]
test/955-lambda-smali/smali/TrivialHelloWorld.smali [new file with mode: 0644]
test/etc/default-build