• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6# http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14.record panda.String <external>
15.record panda.NullPointerException <external>
16
17.function panda.String panda.NullPointerException.getMessage(panda.NullPointerException a0) <external>
18
19.record R {
20    i32 f1
21}
22
23.function u1 main() {
24    mov.null v0
25    newobj v1, R
26    ldai 42
27    stobj v1, R.f1
28
29try_begin:
30    ldobj v0, R.f1
31    return
32try_end:
33    jmp exit
34try_begin_handler:
35    ldobj v1, R.f1
36    movi v2, 42
37    sub2 v2
38try_end_handler:
39    jmp try_end
40
41exit:
42    ldai 0
43    return
44
45.catchall try_begin, try_end, try_begin_handler
46.catchall try_begin_handler, try_end_handler, try_begin_handler
47}
48