diff options
author | Igor Murashkin <iam@google.com> | 2015-02-18 17:38:30 -0800 |
---|---|---|
committer | Igor Murashkin <iam@google.com> | 2015-03-16 11:40:58 -0700 |
commit | 144951a9e9e6c87866245f2bdeebf0ebedaa0e38 (patch) | |
tree | bdbc5c4f2ad3ea320798ade74888490123c30ad5 /smali/src/test/resources | |
parent | f70084bdfeba10dfb68c2c63eb1bedd4e42b4b0f (diff) | |
download | smali-144951a9e9e6c87866245f2bdeebf0ebedaa0e38.tar.gz |
Add lambda experimental dalvik opcodes
* Add new -X/--experimental flag to [dis]assemble opcodes not in art yet
* Add new opcodes liberate-variable, box-lambda, unbox-lambda,
capture-variable, create-lambda, invoke-lambda
* Add support for encoding 25x instructions
* Adds LambdaTest to check new opcodes assemble/disassemble properly
TODO: invoke-lambda-range
Change-Id: I5c8bcbfa8b6cb9a13ef2017fce2d1b7fda6e11c3
Diffstat (limited to 'smali/src/test/resources')
-rw-r--r-- | smali/src/test/resources/LexerTest/InstructionTest.smali | 6 | ||||
-rw-r--r-- | smali/src/test/resources/LexerTest/InstructionTest.tokens | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/smali/src/test/resources/LexerTest/InstructionTest.smali b/smali/src/test/resources/LexerTest/InstructionTest.smali index 2247adc0..f6dcbb1e 100644 --- a/smali/src/test/resources/LexerTest/InstructionTest.smali +++ b/smali/src/test/resources/LexerTest/InstructionTest.smali @@ -84,6 +84,8 @@ const-string check-cast new-instance const-class +capture-variable +create-lambda const/high16 const-wide/high16 const/16 @@ -122,6 +124,8 @@ iput-wide-volatile iput-object-volatile instance-of new-array +unbox-lambda +liberate-variable iget-quick iget-wide-quick iget-object-quick @@ -144,6 +148,7 @@ if-le move/from16 move-wide/from16 move-object/from16 +box-lambda cmpl-float cmpg-float cmpl-double @@ -194,6 +199,7 @@ add-double sub-double mul-double div-double +invoke-lambda goto/32 const-string/jumbo const diff --git a/smali/src/test/resources/LexerTest/InstructionTest.tokens b/smali/src/test/resources/LexerTest/InstructionTest.tokens index a5574ab4..fb5503b5 100644 --- a/smali/src/test/resources/LexerTest/InstructionTest.tokens +++ b/smali/src/test/resources/LexerTest/InstructionTest.tokens @@ -84,6 +84,8 @@ INSTRUCTION_FORMAT21c_STRING("const-string") INSTRUCTION_FORMAT21c_TYPE("check-cast") INSTRUCTION_FORMAT21c_TYPE("new-instance") INSTRUCTION_FORMAT21c_TYPE("const-class") +INSTRUCTION_FORMAT21c_LAMBDA("capture-variable") +INSTRUCTION_FORMAT21c_METHOD("create-lambda") INSTRUCTION_FORMAT21ih("const/high16") INSTRUCTION_FORMAT21lh("const-wide/high16") INSTRUCTION_FORMAT21s("const/16") @@ -122,6 +124,8 @@ INSTRUCTION_FORMAT22c_FIELD_ODEX("iput-wide-volatile") INSTRUCTION_FORMAT22c_FIELD_ODEX("iput-object-volatile") INSTRUCTION_FORMAT22c_TYPE("instance-of") INSTRUCTION_FORMAT22c_TYPE("new-array") +INSTRUCTION_FORMAT22c_TYPE("unbox-lambda") +INSTRUCTION_FORMAT22c_STRING("liberate-variable") INSTRUCTION_FORMAT22cs_FIELD("iget-quick") INSTRUCTION_FORMAT22cs_FIELD("iget-wide-quick") INSTRUCTION_FORMAT22cs_FIELD("iget-object-quick") @@ -144,6 +148,7 @@ INSTRUCTION_FORMAT22t("if-le") INSTRUCTION_FORMAT22x("move/from16") INSTRUCTION_FORMAT22x("move-wide/from16") INSTRUCTION_FORMAT22x("move-object/from16") +INSTRUCTION_FORMAT22x("box-lambda") INSTRUCTION_FORMAT23x("cmpl-float") INSTRUCTION_FORMAT23x("cmpg-float") INSTRUCTION_FORMAT23x("cmpl-double") @@ -194,6 +199,7 @@ INSTRUCTION_FORMAT23x("add-double") INSTRUCTION_FORMAT23x("sub-double") INSTRUCTION_FORMAT23x("mul-double") INSTRUCTION_FORMAT23x("div-double") +INSTRUCTION_FORMAT25x("invoke-lambda") INSTRUCTION_FORMAT30t("goto/32") INSTRUCTION_FORMAT31c("const-string/jumbo") INSTRUCTION_FORMAT31i_OR_ID("const") |