Home
last modified time | relevance | path

Searched refs:functionScope (Results 1 – 15 of 15) sorted by relevance

/arkcompiler/ets_frontend/ts2panda/tests/expression/
DthisKeyWord.test.ts55 let functionScope = functionPg!.getScope(); variable
56 let insns = compileMainSnippet("this;", pandaGen, functionScope);
62 let thisVar = functionScope!.findLocal("this");
/arkcompiler/ets_frontend/es2panda/parser/
Dcommonjs.cpp83 auto *functionScope = functionCtx.GetScope(); in ParseCommonjs() local
84 functionScope->BindParamScope(funcParamScope); in ParseCommonjs()
85 funcParamScope->BindFunctionScope(functionScope); in ParseCommonjs()
90 … AllocNode<ir::ScriptFunction>(functionScope, std::move(params), nullptr, program_.Ast(), nullptr, in ParseCommonjs()
92 functionScope->BindNode(funcNode); in ParseCommonjs()
DexpressionParser.cpp377 … binder::FunctionScope *functionScope, in ParseArrowFunctionExpressionBody() argument
384 functionScope->BindParamScope(desc->paramScope); in ParseArrowFunctionExpressionBody()
385 desc->paramScope->BindFunctionScope(functionScope); in ParseArrowFunctionExpressionBody()
401 body = AllocNode<ir::BlockStatement>(functionScope, std::move(statements)); in ParseArrowFunctionExpressionBody()
412 …funcNode = AllocNode<ir::ScriptFunction>(functionScope, std::move(desc->params), typeParamDecl, bo… in ParseArrowFunctionExpressionBody()
416 functionScope->BindNode(funcNode); in ParseArrowFunctionExpressionBody()
DparserImpl.cpp3889 auto *functionScope = functionCtx.GetScope(); in ParseFunction() local
3890 functionScope->BindParamScope(funcParamScope); in ParseFunction()
3891 funcParamScope->BindFunctionScope(functionScope); in ParseFunction()
3920 body = ParseBlockStatement(functionScope); in ParseFunction()
3925 …AllocNode<ir::ScriptFunction>(functionScope, std::move(params), typeParamDecl, body, returnTypeAnn… in ParseFunction()
3928 functionScope->BindNode(funcNode); in ParseFunction()
DparserImpl.h395 … binder::FunctionScope *functionScope, in DEFINE_BITOPS()
/arkcompiler/ets_frontend/ets2panda/compiler/lowering/ets/
DinterfacePropertyDeclarations.cpp37 …auto *functionScope = checker->Allocator()->New<varbinder::FunctionScope>(checker->Allocator(), pa… in GenerateGetterOrSetter() local
39 functionScope->BindParamScope(paramScope); in GenerateGetterOrSetter()
40 paramScope->BindFunctionScope(functionScope); in GenerateGetterOrSetter()
74 func->SetScope(functionScope); in GenerateGetterOrSetter()
78 auto var = functionScope->AddDecl(checker->Allocator(), decl, ScriptExtension::ETS); in GenerateGetterOrSetter()
94 functionScope->BindNode(func); in GenerateGetterOrSetter()
/arkcompiler/ets_frontend/ts2panda/tests/statements/
DvariableDeclaration.test.ts169 let functionScope = <FunctionScope>funcPg!.getScope(); variable
178 let i = functionScope.findLocal("i");
188 let functionScope = <FunctionScope>funcPg!.getScope(); variable
196 let i = functionScope.findLocal("i");
205 let functionScope = <FunctionScope>funcPg!.getScope(); variable
213 let i = functionScope.findLocal("i");
DfunctionDeclaration.test.ts97 let functionScope = functionPg!.getScope(); variable
100 let foo = functionScope!.findLocal("foo");
/arkcompiler/ets_frontend/ts2panda/src/
Drecorder.ts125 … let functionScope = this.buildVariableScope(scope, <ts.FunctionLikeDeclaration>childNode);
126 this.recordOtherFunc(<ts.FunctionLikeDeclaration>childNode, functionScope);
127 this.recordInfo(childNode, functionScope);
131 … let functionScope = this.buildVariableScope(scope, <ts.FunctionLikeDeclaration>childNode);
147 this.recordInfo(childNode, functionScope);
280 let functionScope = new FunctionScope(curScope, <ts.FunctionLikeDeclaration>node);
282 functionScope.setParentVariableScope(parentVariableScope);
283 parentVariableScope.addChildVariableScope(functionScope);
284 this.setScopeMap(node, functionScope);
285 return functionScope;
DaddVariable2Scope.ts158 let functionScope = <Scope>recorder.getScopeOfNode(funcNode);
159 v = functionScope.add(decl, VarDeclarationKind.FUNCTION);
Dscope.ts534 let functionScope = this.getNearestVariableScope();
535 v = functionScope!.add(name, declKind);
Dcompiler.ts190 let functionScope = this.recorder.getScopeOfNode(rootNode);
193 let v = functionScope.find(funcName);
194 if (v.scope === functionScope) {
/arkcompiler/ets_frontend/ets2panda/checker/ets/
Denum.cpp144 …auto *const functionScope = varbinder->Allocator()->New<varbinder::FunctionScope>(checker->Allocat… in MakeFunction() local
145 functionScope->BindParamScope(paramScope); in MakeFunction()
146 paramScope->BindFunctionScope(functionScope); in MakeFunction()
149 bodyBlock->SetScope(functionScope); in MakeFunction()
160 function->SetScope(functionScope); in MakeFunction()
165 functionScope->BindNode(function); in MakeFunction()
Dfunction.cpp1422 auto *functionScope = functionCtx.GetScope(); in CreateInvokeFunction() local
1423 functionScope->BindParamScope(funcParamScope); in CreateInvokeFunction()
1424 funcParamScope->BindFunctionScope(functionScope); in CreateInvokeFunction()
1431 func->SetScope(functionScope); in CreateInvokeFunction()
1432 functionScope->BindNode(func); in CreateInvokeFunction()
/arkcompiler/ets_frontend/ets2panda/compiler/lowering/scopesInit/
DscopesInitPhase.cpp77 auto *functionScope = functionCtx.GetScope(); in HandleFunction() local
78 BindFunctionScopes(functionScope, funcParamScope); in HandleFunction()
81 HandleBlockStmt(function->Body()->AsBlockStatement(), functionScope); in HandleFunction()
85 BindScopeNode(functionScope, function); in HandleFunction()