diff options
author | David Brazdil <dbrazdil@google.com> | 2015-04-16 15:42:27 +0100 |
---|---|---|
committer | David Brazdil <dbrazdil@google.com> | 2015-04-16 16:16:08 +0100 |
commit | f4687e7b4d239937c3cfdb6c877799df1a715fd2 (patch) | |
tree | 96b970a3a0e3f5ca305fc333b39b0f71b5c06132 /test/475-regression-inliner-ids/smali | |
parent | 05144f4322eed049f4878015bf1f0381d419b785 (diff) | |
download | art-f4687e7b4d239937c3cfdb6c877799df1a715fd2.zip art-f4687e7b4d239937c3cfdb6c877799df1a715fd2.tar.gz art-f4687e7b4d239937c3cfdb6c877799df1a715fd2.tar.bz2 |
ART: Adds a regression test for an inliner issue
Regression test for CL Ieddadcd94135930a1f29ad64ad57349a384da07f.
Change-Id: Ibc8fd827a4b8b3d0cddf7f7590a689ec99bf1329
Diffstat (limited to 'test/475-regression-inliner-ids/smali')
-rw-r--r-- | test/475-regression-inliner-ids/smali/TestCase.smali | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/test/475-regression-inliner-ids/smali/TestCase.smali b/test/475-regression-inliner-ids/smali/TestCase.smali new file mode 100644 index 0000000..efbe00f --- /dev/null +++ b/test/475-regression-inliner-ids/smali/TestCase.smali @@ -0,0 +1,76 @@ +# Copyright (C) 2015 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +.class public LTestCase; + +.super Ljava/lang/Object; + +.method private static flagToString(I)Ljava/lang/String; + .registers 2 + + # The bug is triggered when inlining a method with few Load/StoreLocals but + # many constants. The switch instruction helps with that. + + sparse-switch p0, :sswitch_data_1a + const/4 v0, 0x0 + + :goto_4 + return-object v0 + + :sswitch_5 + const-string v0, "DEFAULT" + goto :goto_4 + + :sswitch_8 + const-string v0, "FLAG_INCLUDE_NOT_IMPORTANT_VIEWS" + goto :goto_4 + + :sswitch_b + const-string v0, "FLAG_REQUEST_TOUCH_EXPLORATION_MODE" + goto :goto_4 + + :sswitch_e + const-string v0, "FLAG_REQUEST_ENHANCED_WEB_ACCESSIBILITY" + goto :goto_4 + + :sswitch_11 + const-string v0, "FLAG_REPORT_VIEW_IDS" + goto :goto_4 + + :sswitch_14 + const-string v0, "FLAG_REQUEST_FILTER_KEY_EVENTS" + goto :goto_4 + + :sswitch_17 + const-string v0, "FLAG_RETRIEVE_INTERACTIVE_WINDOWS" + goto :goto_4 + + :sswitch_data_1a + .sparse-switch + 0x1 -> :sswitch_5 + 0x2 -> :sswitch_8 + 0x4 -> :sswitch_b + 0x8 -> :sswitch_e + 0x10 -> :sswitch_11 + 0x20 -> :sswitch_14 + 0x40 -> :sswitch_17 + .end sparse-switch +.end method + +.method public static testCase(I)Ljava/lang/String; + .registers 2 + invoke-static {v1}, LTestCase;->flagToString(I)Ljava/lang/String; + move-result-object v0 + return-object v0 +.end method |