Debian Codegraph @

test/2248-checker-smali-remove-try-until-the-end/smali/b_260387991.smali

raw
1 #
2 # Copyright (C) 2022 The Android Open Source Project
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 # http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 .class public LB260387991;
16
17 .super Ljava/lang/Object;
18
19 # When eliminating the unnecessary try and its catch block we turn the
20 # TryBoundary instructions into Goto instructions. If one of these
21 # instructions is pointing to the exit block, we use its single
22 # predecessor instead. If this TryBoundary-turned-into-Goto instruction
23 # was the only one pointing to the Exit, we also have to update the dominators.
24
25 ## CHECK-START: void B260387991.testInfiniteCatch() dead_code_elimination$initial (before)
26 ## CHECK: TryBoundary
27 ## CHECK: TryBoundary
28
29 ## CHECK-START: void B260387991.testInfiniteCatch() dead_code_elimination$initial (after)
30 ## CHECK-NOT: TryBoundary
31 .method public static testInfiniteCatch()V
32 .registers 4
33 const/4 v0, 0x2
34 const/4 v1, 0x4
35 :try_start
36 div-int v0, v1, v0
37 return-void
38 :try_end
39 .catchall {:try_start .. :try_end} :catch_all
40
41 # Infinite catch block which does not lead to the exit block.
42 :catch_all
43 nop
44 goto :catch_all
45 .end method