1# Copyright (c) 2024 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 14slotNum = 0x3 15.language ECMAScript 16.function any .#*#classTest(any a0, any a1, any a2) { 17label_1: 18label_0: 19 ldhole 20 sta v0 21 defineclasswithbuffer 0x0, .#*@0~C=#C, _2, 0x0, v0 22 ldobjbyname 0x1, prototype 23 returnundefined 24label_2: 25} 26 27slotNum = 0x0 28.language ECMAScript 29.function any .#*@0~C=#C(any a0, any a1, any a2) { 30label_1: 31label_0: 32 lda a2 33 return 34label_2: 35} 36 37slotNum = 0x3 38.language ECMAScript 39.function any .#*@0~C>#ccc(any a0, any a1, any a2) { 40label_1: 41label_0: 42 tryldglobalbyname 0x0, print 43 sta v0 44 lda.str ccc 45 sta v1 46 lda v0 47 callarg1 0x1, v1 48 returnundefined 49label_2: 50} 51 52slotNum = 0x3 53.language ECMAScript 54.function any .#*@0~C>#name(any a0, any a1, any a2) { 55label_1: 56label_0: 57 tryldglobalbyname 0x0, print 58 sta v0 59 lda.str name 60 sta v1 61 lda v0 62 callarg1 0x1, v1 63 returnundefined 64label_2: 65} 66 67slotNum = 0x1 68.language ECMAScript 69.function any .func_main_0(any a0, any a1, any a2) { 70label_1: 71label_0: 72 definefunc 0x0, .#*#classTest, 0x0 73 returnundefined 74label_2: 75} 76 77 78