1# Copyright (c) 2021-2022 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 A <external> 15.function i32 A.get95_virt(A a0) <external> 16 17.record AotChaTest { } 18 19.function i32 AotChaTest.main() { 20 newobj v0, A 21 call.virt.short A.get95_virt, v0 22 return 23} 24 25#! CHECKER panda files with cha 26#! RUN_PAOC options: "--panda-files=../../basics_aot.checked/test.abc --paoc-use-cha=true --compiler-inlining=false" 27#! METHOD "AotChaTest::main" 28#! PASS_AFTER "Codegen" 29#! INST /CallVirtual.*A::get95_virt/ 30#! RUN options: "--panda-files=../../basics_aot.checked/test.abc", entry: "AotChaTest::main", result: 95 31#! EVENT /AotLoadedForClass,.*,AotChaTest/ 32 33#! CHECKER panda files no cha 34#! RUN_PAOC options: "--panda-files=../../basics_aot.checked/test.abc --paoc-use-cha=false --compiler-inlining=false" 35#! METHOD "AotChaTest::main" 36#! PASS_AFTER "Codegen" 37#! INST /CallVirtual.*A::get95_virt/ 38#! RUN options: "--panda-files=../../basics_aot.checked/test.abc", entry: "AotChaTest::main", result: 95 39#! EVENT /AotLoadedForClass,.*,AotChaTest/ 40 41#! CHECKER invalid aot panda files 42#! RUN_PAOC options: "--paoc-use-cha=true --compiler-inlining=false" 43#! METHOD "AotChaTest::main" 44#! PASS_AFTER "Codegen" 45#! INST /UnresolvedCallVirtual.*/ 46#! RUN options: "--panda-files=../../basics_aot.checked/test.abc", entry: "AotChaTest::main", abort: 6 47#! EVENT_NOT /AotLoadedForClass,.*,AotChaTest/ 48 49#! CHECKER invalid runtime panda files 50#! RUN_PAOC options: "--panda-files=../../basics_aot.checked/test.abc --paoc-use-cha=true --compiler-inlining=false" 51#! METHOD "AotChaTest::main" 52#! PASS_AFTER "Codegen" 53#! INST /CallVirtual.*A::get95_virt/ 54#! RUN options: "", entry: "AotChaTest::main", abort: 6 55#! EVENT_NOT /AotLoadedForClass,.*,AotChaTest/ 56