diff options
author | Sebastien Hertz <shertz@google.com> | 2013-07-26 08:03:55 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-07-26 08:03:55 +0000 |
commit | 56eb9bc9da8d3863fef02891c2f4f2e4d996204d (patch) | |
tree | f29dbceb959ff35760924c9b9023639d84781f96 /runtime/dex_instruction.h | |
parent | a6dd03ff8003d459ec8607d5449340c4b00fd8cb (diff) | |
parent | b0f3f485c81266feff536ecafe26c164d21c5a43 (diff) | |
download | art-56eb9bc9da8d3863fef02891c2f4f2e4d996204d.tar.gz art-56eb9bc9da8d3863fef02891c2f4f2e4d996204d.tar.bz2 art-56eb9bc9da8d3863fef02891c2f4f2e4d996204d.zip |
Merge "Avoid fetching instruction's first 16 bits twice." into dalvik-dev
Diffstat (limited to 'runtime/dex_instruction.h')
-rw-r--r-- | runtime/dex_instruction.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/runtime/dex_instruction.h b/runtime/dex_instruction.h index b0d85e672e..74789bbad3 100644 --- a/runtime/dex_instruction.h +++ b/runtime/dex_instruction.h @@ -281,9 +281,7 @@ class Instruction { // Returns the opcode field of the instruction. Code Opcode() const { - const uint16_t* insns = reinterpret_cast<const uint16_t*>(this); - int opcode = *insns & 0xFF; - return static_cast<Code>(opcode); + return static_cast<Code>(Fetch16(0) & 0xFF); } void SetOpcode(Code opcode) { |