From f0c45c0576f53b81c80a7d868d54fad41a7bae8b Mon Sep 17 00:00:00 2001 From: wangmingming1 Date: Tue, 15 Oct 2024 20:15:17 +0800 Subject: fix inliner bug I see field index of a class member variable is 0xFFFF which will cause TryPatternSubstitution throw away the iput-xxx instruction ```code void zyb.(com.mi.fitness.netproxy.NetProxyManager) (dex_method_idx=20258) DEX CODE: 0x0000: 7010 273f 0000 | invoke-direct {v0}, void java.lang.Object.() // method@16167 0x0003: 5b01 ffff | iput-object v1, v0, Lcom/mi/fitness/netproxy/NetProxyManager; zyb.a // field@65535 0x0005: 0e00 | return-void ``` Bug: 368471540 Test: the above bug doesn't reproduce Change-Id: I6bee31e07e17982e00e0e22d476a36f554081c3d Signed-off-by: wangmingming1 --- compiler/dex/inline_method_analyser.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/dex/inline_method_analyser.h') diff --git a/compiler/dex/inline_method_analyser.h b/compiler/dex/inline_method_analyser.h index 4cd5b824f1..68e8912c93 100644 --- a/compiler/dex/inline_method_analyser.h +++ b/compiler/dex/inline_method_analyser.h @@ -76,7 +76,7 @@ struct InlineConstructorData { uint16_t iput0_arg : 4; uint16_t iput1_arg : 4; uint16_t iput2_arg : 4; - uint16_t reserved : 4; + uint16_t iput_count: 4; }; static_assert(sizeof(InlineConstructorData) == sizeof(uint64_t), "Invalid size of InlineConstructorData"); -- cgit v1.2.3-59-g8ed1b