1/** 2 * Copyright (c) 2023-2025 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16// Autogenerated file -- DO NOT EDIT! 17 18% instructions = Panda::instructions.select{ |b| b.namespace == "ets" && b.intrinsic_name } 19% if instructions.first 20% instructions = instructions.group_by(&:intrinsic_name) 21% end 22% lowerings = [["ets.ldobj.name", "VisitEtsLdObjByName"], 23% ["ets.stobj.name", "VisitEtsStObjByName"], 24% ["ets.equals", "VisitEtsEquals<false>"], 25% ["ets.strictequals", "VisitEtsEquals<true>"], 26% ["ets.typeof", "VisitEtsTypeof"], 27% ["ets.istrue", "VisitEtsIstrue"] 28% ] 29% instructions.each do |intrinsic_name, group| 30% inst = group.first 31% lowering = lowerings.detect{ |l| inst.sig.start_with?(l[0]) } 32% next unless lowering 33% params_arr = inst.operands 34% if inst.intrinsic_name.class == Array 35% inst.intrinsic_name.each do | intrinsic_name | 36 case compiler::RuntimeInterface::IntrinsicId::<%= intrinsic_name %>: 37% end 38% else 39 case compiler::RuntimeInterface::IntrinsicId::<%= intrinsic_name %>: 40% end 41 { 42 BytecodeGen::<%= lowering[1] %>(enc, inst); 43 break; 44 } 45% end 46