diff options
author | Eric Holk <eholk@google.com> | 2019-07-26 09:37:46 -0700 |
---|---|---|
committer | Eric Holk <eholk@google.com> | 2019-07-26 09:46:18 -0700 |
commit | 70445d0d89cb2b730e148cdb92e580585c1ef9c6 (patch) | |
tree | 0d5d2895a2921aa644d35ec65c6d5a76e7c09ccc /startop/view_compiler/dex_builder.h | |
parent | 3092f99ae63f12f5c18d40f21616c98f2b6c62af (diff) |
[viewcompiler] Add support for static field put to DexBuilder
Bug: 111895153
Change-Id: I12b38fa520790debec545d7d1f6b3522a65ce03b
Diffstat (limited to 'startop/view_compiler/dex_builder.h')
-rw-r--r-- | startop/view_compiler/dex_builder.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/startop/view_compiler/dex_builder.h b/startop/view_compiler/dex_builder.h index a7ccb4a9452b..3f9ac43ae532 100644 --- a/startop/view_compiler/dex_builder.h +++ b/startop/view_compiler/dex_builder.h @@ -163,6 +163,7 @@ class Instruction { kNew, kReturn, kReturnObject, + kSetStaticField }; //////////////////////// @@ -237,6 +238,11 @@ class Instruction { return Instruction{Op::kGetStaticField, field_id, dest}; } + static inline Instruction SetStaticField(size_t field_id, Value value) { + return Instruction{Op::kSetStaticField, field_id, /*result_is_object=*/false, /*dest=*/{}, value}; + } + + /////////////// // Accessors // /////////////// |