1/* 2 * Copyright (c) 2024 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#ifndef ECMASCRIPT_COMPILER_BUILTINS_REGEXP_STUB_BUILDER_H 17#define ECMASCRIPT_COMPILER_BUILTINS_REGEXP_STUB_BUILDER_H 18#include "ecmascript/compiler/builtins/builtins_stubs.h" 19 20namespace panda::ecmascript::kungfu { 21 22class BuiltinsRegExpStubBuilder : public BuiltinsStubBuilder { 23public: 24 explicit BuiltinsRegExpStubBuilder(StubBuilder *parent) 25 : BuiltinsStubBuilder(parent) {} 26 BuiltinsRegExpStubBuilder(CallSignature *callSignature, Environment *env) 27 : BuiltinsStubBuilder(callSignature, env) {} 28 explicit BuiltinsRegExpStubBuilder(Environment* env): BuiltinsStubBuilder(env) {} 29 ~BuiltinsRegExpStubBuilder() override = default; 30 NO_MOVE_SEMANTIC(BuiltinsRegExpStubBuilder); 31 NO_COPY_SEMANTIC(BuiltinsRegExpStubBuilder); 32 void GenerateCircuit() override {} 33 GateRef TryToFastGetProperty(GateRef glue, GateRef thisValue, ConstantIndex constIndex); 34 35#define DECLARE_BUILTINS_REGEXP_STUB_BUILDER(method, ...) \ 36 void method(GateRef glue, GateRef thisValue, GateRef numArgs, Variable *res, Label *exit, Label *slowPath); 37BUILTINS_WITH_REGEXP_STUB_BUILDER(DECLARE_BUILTINS_REGEXP_STUB_BUILDER) 38#undef DECLARE_BUILTINS_REGEXP_STUB_BUILDER 39}; 40} // namespace panda::ecmascript::kungfu 41#endif // ECMASCRIPT_COMPILER_BUILTINS_REGEXP_STUB_BUILDER_H 42