Home
last modified time | relevance | path

Searched refs:methodDef (Results 1 – 19 of 19) sorted by relevance

/arkcompiler/ets_frontend/ets2panda/util/
DdeclgenEts2Ts.cpp212 …unctionType(const checker::ETSFunctionType *etsFunctionType, const ir::MethodDefinition *methodDef) in GenFunctionType() argument
214 const bool isConstructor = methodDef != nullptr ? methodDef->IsConstructor() : false; in GenFunctionType()
217 const auto loc = methodDef != nullptr ? methodDef->Start() : lexer::SourcePosition(); in GenFunctionType()
260 Out(methodDef != nullptr ? ": " : " => "); in GenFunctionType()
262 if (methodDef != nullptr && !state_.inInterface) { in GenFunctionType()
511 void TSDeclGen::GenMethodDeclaration(const ir::MethodDefinition *methodDef) in GenMethodDeclaration() argument
513 switch (methodDef->Kind()) { in GenMethodDeclaration()
516 ThrowError("Unsupported method kind", methodDef->Start()); in GenMethodDeclaration()
526 GenModifier(methodDef); in GenMethodDeclaration()
529 const auto methodName = GetKeyName(methodDef->Key()); in GenMethodDeclaration()
[all …]
DdeclgenEts2Ts.h51 …ype(const checker::ETSFunctionType *functionType, const ir::MethodDefinition *methodDef = nullptr);
61 void GenMethodDeclaration(const ir::MethodDefinition *methodDef);
Dhelpers.cpp552 const ir::MethodDefinition *methodDef = parent->AsMethodDefinition(); in FunctionName() local
554 if (methodDef->Key()->IsIdentifier()) { in FunctionName()
555 auto *ident = methodDef->Id(); in FunctionName()
/arkcompiler/ets_frontend/es2panda/ir/base/
DclassDefinition.cpp233 const auto *methodDef = prop->AsMethodDefinition(); in CreateClassPrivateBuffer() local
234 if (!methodDef->IsPrivate()) { in CreateClassPrivateBuffer()
238 …compiler::LiteralBuffer *literalBuf = methodDef->IsStatic() ? &staticBuf : (instancePropertyCount+… in CreateClassPrivateBuffer()
239 const ir::FunctionExpression *func = methodDef->Value()->AsFunctionExpression(); in CreateClassPrivateBuffer()
244 switch (methodDef->Kind()) { in CreateClassPrivateBuffer()
365 auto *methodDef = stmt->AsMethodDefinition(); in CompileComputedKeys() local
366 if (methodDef->Computed()) { in CompileComputedKeys()
368 methodDef->SetKeyReg(keyReg); in CompileComputedKeys()
369 methodDef->Key()->Compile(pg); in CompileComputedKeys()
370 pg->ToComputedPropertyKey(methodDef->Key()); in CompileComputedKeys()
[all …]
/arkcompiler/ets_frontend/ets2panda/compiler/core/
DETSemitter.h84 void GenInterfaceMethodDefinition(const ir::MethodDefinition *methodDef, bool external);
88 pandasm::AnnotationData GenAnnotationEnclosingMethod(const ir::MethodDefinition *methodDef);
DETSemitter.cpp119 const auto *methodDef = util::Helpers::GetContainingClassMethodDefinition(scriptFunc); in GenScriptFunction() local
120 func.metadata->SetAccessFlags(TranslateModifierFlags(methodDef->Modifiers())); in GenScriptFunction()
319 void ETSEmitter::GenInterfaceMethodDefinition(const ir::MethodDefinition *methodDef, bool external) in GenInterfaceMethodDefinition() argument
321 auto *scriptFunc = methodDef->Function(); in GenInterfaceMethodDefinition()
579 …asm::AnnotationData ETSEmitter::GenAnnotationEnclosingMethod(const ir::MethodDefinition *methodDef) in GenAnnotationEnclosingMethod() argument
586 methodDef->Function()->Scope()->InternalName().Mutf8()))); in GenAnnotationEnclosingMethod()
/arkcompiler/ets_frontend/ets2panda/checker/ets/
DaliveAnalyzer.cpp265 void AliveAnalyzer::AnalyzeMethodDef(const ir::MethodDefinition *methodDef) in AnalyzeMethodDef() argument
267 auto *func = methodDef->Function(); in AnalyzeMethodDef()
275 ASSERT(methodDef->TsType() && methodDef->TsType()->IsETSFunctionType()); in AnalyzeMethodDef()
276 …const auto *returnType = methodDef->TsType()->AsETSFunctionType()->FindSignature(func)->ReturnType… in AnalyzeMethodDef()
Denum.cpp176 auto *const methodDef = checker->Allocator()->New<ir::MethodDefinition>( in MakeMethodDef() local
178 methodDef->SetParent(varbinder->Program()->GlobalClass()); in MakeMethodDef()
179 functionExpr->SetParent(methodDef); in MakeMethodDef()
182 methodDef->Start(), checker->Allocator(), methodDef->Id()->Name(), methodDef)); in MakeMethodDef()
185 methodDef->Function()->Id()->SetVariable(methodVar); in MakeMethodDef()
DaliveAnalyzer.h66 void AnalyzeMethodDef(const ir::MethodDefinition *methodDef);
Dfunction.cpp1261 Signature *ETSChecker::GetSignatureFromMethodDefinition(const ir::MethodDefinition *methodDef) in GetSignatureFromMethodDefinition() argument
1263 ASSERT(methodDef->TsType() && methodDef->TsType()->IsETSFunctionType()); in GetSignatureFromMethodDefinition()
1265 for (auto *it : methodDef->TsType()->AsETSFunctionType()->CallSignatures()) { in GetSignatureFromMethodDefinition()
1266 if (it->Function() == methodDef->Function()) { in GetSignatureFromMethodDefinition()
Dhelpers.cpp297 auto *methodDef = iter->AsMethodDefinition(); in GetTypeOfVariable() local
298 ASSERT(methodDef->TsType()); in GetTypeOfVariable()
299 Context().SetContainingSignature(methodDef->Function()->Signature()); in GetTypeOfVariable()
/arkcompiler/ets_frontend/ets2panda/varbinder/
DETSBinder.cpp264 void ETSBinder::BuildMethodDefinition(ir::MethodDefinition *methodDef) in BuildMethodDefinition() argument
266 if (methodDef->Function()->TypeParams() != nullptr) { in BuildMethodDefinition()
267 …auto scopeCtx = LexicalScope<LocalScope>::Enter(this, methodDef->Function()->TypeParams()->Scope()… in BuildMethodDefinition()
268 ResolveReferences(methodDef->Function()->TypeParams()); in BuildMethodDefinition()
269 ResolveMethodDefinition(methodDef); in BuildMethodDefinition()
273 ResolveMethodDefinition(methodDef); in BuildMethodDefinition()
276 void ETSBinder::ResolveMethodDefinition(ir::MethodDefinition *methodDef) in ResolveMethodDefinition() argument
278 auto *func = methodDef->Function(); in ResolveMethodDefinition()
279 ResolveReferences(methodDef); in ResolveMethodDefinition()
281 if (methodDef->IsStatic() || func->IsStaticBlock()) { in ResolveMethodDefinition()
DETSBinder.h121 void BuildMethodDefinition(ir::MethodDefinition *methodDef);
146 void ResolveMethodDefinition(ir::MethodDefinition *methodDef);
/arkcompiler/ets_frontend/es2panda/typescript/extractor/
DtypeSystem.h462 auto methodDef = node->AsMethodDefinition(); in FunctionType() local
463 auto modifiers = methodDef->Modifiers(); in FunctionType()
470 FillMethodModifier(methodDef); in FunctionType()
471 fn(methodDef->Function()); in FunctionType()
535 void FillMethodModifier(const ir::MethodDefinition *methodDef) in FillMethodModifier() argument
537 if (methodDef->IsStatic()) { in FillMethodModifier()
540 if (methodDef->IsAccessor()) { in FillMethodModifier()
543 if (methodDef->IsAbstract()) { in FillMethodModifier()
781 auto methodDef = const_cast<ir::ClassDefinition *>(classDef)->Ctor(); in FillFieldsandMethods() local
782 ASSERT(methodDef->IsMethodDefinition()); in FillFieldsandMethods()
[all …]
/arkcompiler/ets_frontend/es2panda/binder/
Dscope.cpp229 auto *methodDef = stmt->AsMethodDefinition(); in AddPrivateName() local
230 … uint32_t *start = methodDef->IsStatic() ? &staticPrivateMethodSlot : &instancePrivateMethodSlot; in AddPrivateName()
231 auto name = methodDef->Key()->AsPrivateIdentifier()->Name(); in AddPrivateName()
232 switch (methodDef->Kind()) { in AddPrivateName()
/arkcompiler/ets_frontend/es2panda/util/
Dhelpers.cpp506 const ir::MethodDefinition *methodDef = parent->AsMethodDefinition(); in FunctionName() local
508 if (methodDef->Key()->IsIdentifier()) { in FunctionName()
509 return methodDef->Key()->AsIdentifier()->Name(); in FunctionName()
/arkcompiler/ets_frontend/es2panda/parser/
DparserImpl.cpp2510 auto *methodDef = stmt->AsMethodDefinition(); in ValidatePrivateProperty() local
2511 if (!methodDef->IsPrivate()) { in ValidatePrivateProperty()
2514 auto name = methodDef->Key()->AsPrivateIdentifier()->Name(); in ValidatePrivateProperty()
2516 if (methodDef->Kind() == ir::MethodDefinitionKind::METHOD) { in ValidatePrivateProperty()
2518 … ThrowSyntaxError({"Redeclaration of class private property #", name.Utf8()}, methodDef->Start()); in ValidatePrivateProperty()
2524 ASSERT(methodDef->Kind() != ir::MethodDefinitionKind::CONSTRUCTOR); in ValidatePrivateProperty()
2525 PrivateGetterSetterType type = (methodDef->Kind() == ir::MethodDefinitionKind::GET) ? in ValidatePrivateProperty()
2527 PrivateGetterSetterType unusedType = (methodDef->Kind() == ir::MethodDefinitionKind::GET) ? in ValidatePrivateProperty()
2530 if (methodDef->IsStatic()) { in ValidatePrivateProperty()
2543 … ThrowSyntaxError({"Redeclaration of class private property #", name.Utf8()}, methodDef->Start()); in ValidatePrivateProperty()
/arkcompiler/ets_frontend/ets2panda/checker/
DETSchecker.h347 Signature *GetSignatureFromMethodDefinition(const ir::MethodDefinition *methodDef);
/arkcompiler/ets_frontend/ets2panda/parser/
DETSparser.cpp4676 auto *methodDef = BuildImplicitConstructor(ir::ClassDefinitionModifiers::SET_CTOR_ID, startLoc); in CreateImplicitConstructor() local
4677 properties.push_back(methodDef); in CreateImplicitConstructor()