Home
last modified time | relevance | path

Searched full:context (Results 1 – 25 of 1393) sorted by relevance

12345678910>>...56

/arkcompiler/ets_frontend/ets2panda/test/unit/plugin/
Dplugin_proceed_to_state_misc_expr.cpp58 static es2panda_Context *context = nullptr; variable
62 es2panda_AstNode *callee = CreateIdentifierFromString(context, "add"); in CheckFuncCall()
63 es2panda_AstNode *arg1 = impl->CreateNumberLiteral(context, 1); in CheckFuncCall()
64 es2panda_AstNode *arg2 = impl->CreateNumberLiteral(context, 2); in CheckFuncCall()
66 static_cast<es2panda_AstNode **>(impl->AllocMemory(context, 2, sizeof(es2panda_AstNode *))); in CheckFuncCall()
69 …es2panda_AstNode *callExpr = impl->CreateCallExpression(context, callee, callArgs, 2, nullptr, fal… in CheckFuncCall()
70 es2panda_AstNode *callStat = impl->CreateExpressionStatement(context, callExpr); in CheckFuncCall()
71 impl->AstNodeSetParent(context, callee, callExpr); in CheckFuncCall()
72 impl->AstNodeSetParent(context, arg1, callExpr); in CheckFuncCall()
73 impl->AstNodeSetParent(context, arg2, callExpr); in CheckFuncCall()
[all …]
Dplugin_proceed_to_state_misc_expression.cpp58 static es2panda_Context *context = nullptr; variable
62 es2panda_AstNode *callee = CreateIdentifierFromString(context, "add"); in CheckFuncCall()
63 es2panda_AstNode *arg1 = impl->CreateNumberLiteral(context, 1); in CheckFuncCall()
64 es2panda_AstNode *arg2 = impl->CreateNumberLiteral(context, 2); in CheckFuncCall()
66 static_cast<es2panda_AstNode **>(impl->AllocMemory(context, 2, sizeof(es2panda_AstNode *))); in CheckFuncCall()
69 …es2panda_AstNode *callExpr = impl->CreateCallExpression(context, callee, callArgs, 2, nullptr, fal… in CheckFuncCall()
70 es2panda_AstNode *callStat = impl->CreateExpressionStatement(context, callExpr); in CheckFuncCall()
71 impl->AstNodeSetParent(context, callee, callExpr); in CheckFuncCall()
72 impl->AstNodeSetParent(context, arg1, callExpr); in CheckFuncCall()
73 impl->AstNodeSetParent(context, arg2, callExpr); in CheckFuncCall()
[all …]
Dplugin_proceed_to_state_run_verifier.cpp78 es2panda_Context *context = static_cast<es2panda_Context *>(arg); in SetRightParent() local
79 newCtx = context; in SetRightParent()
81 impl->AstNodeIterateConst(context, node, changeParent); in SetRightParent()
84 bool Verify(es2panda_Context *context) in Verify() argument
87 …auto *memForCheckerPhaseName = static_cast<char *>(impl->AllocMemory(context, checkerPhaseName.siz… in Verify()
91 …auto *memForScopesPhaseName = static_cast<char *>(impl->AllocMemory(context, scopesPhaseName.size(… in Verify()
94 auto verifier = impl->CreateASTVerifier(context, impl->ContextProgram(context)); in Verify()
95 impl->ASTVerifierIntroduceNewInvariants(context, verifier, memForScopesPhaseName); in Verify()
96 impl->ASTVerifierVerify(context, verifier, memForScopesPhaseName); in Verify()
97 impl->ASTVerifierIntroduceNewInvariants(context, verifier, memForCheckerPhaseName); in Verify()
[all …]
Dplugin_proceed_to_state_member_expression.cpp64 static es2panda_Context *context = nullptr; variable
71 es2panda_AstNode *definition = impl->ClassDeclarationDefinition(context, node); in FindClass()
75 es2panda_AstNode *identifier = impl->ClassDefinitionIdent(context, definition); in FindClass()
79 if (strcmp(impl->IdentifierName(context, identifier), "A") == 0) { in FindClass()
87 impl->AstNodeIterateConst(context, ast, FindMemberExpression); in FindMemberExpression()
95 es2panda_AstNode *instanceName = CreateIdentifierFromString(context, "a"); in CreateMemberExpression()
96 es2panda_AstNode *memberName = CreateIdentifierFromString(context, "age"); in CreateMemberExpression()
98 …impl->CreateMemberExpression(context, instanceName, memberName, MEMBER_EXPRESSION_KIND_NONE, false… in CreateMemberExpression()
99 impl->AstNodeSetParent(context, instanceName, memberExpr); in CreateMemberExpression()
100 impl->AstNodeSetParent(context, memberName, memberExpr); in CreateMemberExpression()
[all …]
Dplugin_proceed_to_state_this_into_method.cpp71 static es2panda_Context *context = nullptr; variable
76 es2panda_AstNode *thisExpr = impl->CreateThisExpression(context); in CreateThisExpression()
83 es2panda_AstNode *memberName = CreateIdentifierFromString(context, "x"); in CreateMemberExpression()
85 …impl->CreateMemberExpression(context, thisExpr, memberName, MEMBER_EXPRESSION_KIND_NONE, false, fa… in CreateMemberExpression()
86 impl->AstNodeSetParent(context, thisExpr, memberExpr); in CreateMemberExpression()
87 impl->AstNodeSetParent(context, memberName, memberExpr); in CreateMemberExpression()
94 es2panda_AstNode *num2 = impl->CreateNumberLiteral(context, 2); in CreateAssignmentExpression()
97 … impl->CreateAssignmentExpression(context, memberExpr, num2, TOKEN_TYPE_PUNCTUATOR_SUBSTITUTION); in CreateAssignmentExpression()
99 impl->AstNodeSetParent(context, memberExpr, assignmentExpr); in CreateAssignmentExpression()
100 impl->AstNodeSetParent(context, num2, assignmentExpr); in CreateAssignmentExpression()
[all …]
Dplugin_proceed_to_state_rebind.cpp29 …* void (*AstNodeIterateConst)(es2panda_Context *context, es2panda_AstNode *classInstance, NodeTr…
31 …* es2panda_AstNode *(*MethodDefinitionFunction)(es2panda_Context *context, es2panda_AstNode *cla…
32 * char *(*IdentifierName)(es2panda_Context *context, es2panda_AstNode *classInstance);
33 …* es2panda_AstNode *(*ScriptFunctionId)(es2panda_Context *context, es2panda_AstNode *classInstan…
34 …* void (*AstNodeSetParent)(es2panda_Context *context, es2panda_AstNode *classInstance, es2panda_…
35 * char *(*AstNodeDumpJSONConst)(es2panda_Context *context, es2panda_AstNode *classInstance);
36 …* es2panda_AstNode *(*ScriptFunctionBody)(es2panda_Context *context, es2panda_AstNode *classInst…
37 * es2panda_AstNode *(*CreateIdentifier1)(es2panda_Context *context, char *name);
38 …* es2panda_AstNode *(*CreateVariableDeclarator1)(es2panda_Context *context, Es2pandaVariableDecl…
40 …* es2panda_AstNode *(*VariableDeclaratorInit)(es2panda_Context *context, es2panda_AstNode *class…
[all …]
Dplugin_proceed_to_state_update_class.cpp67 es2panda_Context *context = nullptr; variable
75 es2panda_AstNode *definition = impl->ClassDeclarationDefinition(context, node); in FindClass()
79 es2panda_AstNode *identifier = impl->ClassDefinitionIdent(context, definition); in FindClass()
83 if (strcmp(impl->IdentifierName(context, identifier), "A") == 0) { in FindClass()
90 es2panda_AstNode *classDef = impl->ClassDeclarationDefinition(context, classDecl); in FindBarMethod()
92 es2panda_AstNode **body = impl->ClassDefinitionBody(context, classDef, &bodySize); in FindBarMethod()
95 es2panda_AstNode *key = impl->ClassElementKey(context, methodDef); in FindBarMethod()
96 if (strcmp(impl->IdentifierName(context, key), "bar") == 0) { in FindBarMethod()
105 es2panda_AstNode *voidType = impl->CreateETSPrimitiveType(context, PRIMITIVE_TYPE_VOID); in CreateFuncSignature()
106 …es2panda_FunctionSignature *sig = impl->CreateFunctionSignature(context, nullptr, nullptr, 0, void… in CreateFuncSignature()
[all …]
Dplugin_proceed_to_state_create_function_type_ir.cpp26 es2panda_AstNode *CreateFunctionTypeIr(es2panda_Context *context, es2panda_AstNode *program) in CreateFunctionTypeIr() argument
30 auto *statements = impl->BlockStatementStatements(context, program, &sizeOfStatements); in CreateFunctionTypeIr()
32 …static_cast<es2panda_AstNode **>(impl->AllocMemory(context, sizeOfStatements + 1, sizeof(es2panda_… in CreateFunctionTypeIr()
36 auto signature = impl->CreateFunctionSignature(context, nullptr, nullptr, 0, in CreateFunctionTypeIr()
37 … impl->CreateETSPrimitiveType(context, PRIMITIVE_TYPE_INT), false); in CreateFunctionTypeIr()
39 auto *id = impl->CreateIdentifier1(context, const_cast<char *>("foo")); in CreateFunctionTypeIr()
41 …auto *functionTypeIr = impl->CreateETSFunctionTypeIr(context, signature, SCRIPT_FUNCTION_FLAGS_NON… in CreateFunctionTypeIr()
42 …auto *typeAliasDeclaration = impl->CreateTSTypeAliasDeclaration(context, id, nullptr, functionType… in CreateFunctionTypeIr()
43 impl->AstNodeSetParent(context, id, typeAliasDeclaration); in CreateFunctionTypeIr()
44 impl->AstNodeSetParent(context, functionTypeIr, typeAliasDeclaration); in CreateFunctionTypeIr()
[all …]
Dplugin_proceed_to_state_rerun_scopes_after_lowered.cpp78 es2panda_Context *context = static_cast<es2panda_Context *>(arg); in SetRightParent() local
79 newCtx = context; in SetRightParent()
81 impl->AstNodeIterateConst(context, node, changeParent); in SetRightParent()
84 static bool ChangeAst(es2panda_Context *context, es2panda_AstNode *ast) in ChangeAst() argument
86 std::cout << impl->AstNodeDumpJSONConst(context, ast) << std::endl; in ChangeAst()
88 ctx = context; in ChangeAst()
89 impl->AstNodeIterateConst(context, ast, FindLet); in ChangeAst()
90 impl->AstNodeIterateConst(context, ast, FindAssert); in ChangeAst()
91 impl->AstNodeIterateConst(context, ast, FindMainDef); in ChangeAst()
95 auto mainFuncBody = impl->ScriptFunctionBody(context, mainScriptFunc); in ChangeAst()
[all …]
Dplugin_proceed_to_state_new_expression.cpp63 static es2panda_Context *context = nullptr; variable
72 es2panda_AstNode *definition = impl->ClassDeclarationDefinition(context, node); in FindClass()
76 es2panda_AstNode *identifier = impl->ClassDefinitionIdent(context, definition); in FindClass()
80 if (strcmp(impl->IdentifierName(context, identifier), "A") == 0) { in FindClass()
88 impl->AstNodeIterateConst(context, ast, FindVariableDeclaration); in FindVariableDeclaration()
96 es2panda_AstNode *className = CreateIdentifierFromString(context, "A"); in CreateNewExpr()
97 es2panda_AstNode *part = impl->CreateETSTypeReferencePart1(context, className); in CreateNewExpr()
98 impl->AstNodeSetParent(context, className, part); in CreateNewExpr()
99 es2panda_AstNode *typeRef = impl->CreateETSTypeReference(context, part); in CreateNewExpr()
100 impl->AstNodeSetParent(context, part, typeRef); in CreateNewExpr()
[all …]
Dplugin_proceed_to_state_update_statements.cpp30 void createClassDeclaration(es2panda_Context *context, char *className, es2panda_AstNode *program) in createClassDeclaration() argument
34 auto *statements = impl->BlockStatementStatements(context, program, &sizeOfStatements); in createClassDeclaration()
36 …static_cast<es2panda_AstNode **>(impl->AllocMemory(context, sizeOfStatements + 1, sizeof(es2panda_… in createClassDeclaration()
40 auto *identifier = impl->CreateIdentifier1(context, className); in createClassDeclaration()
42context, identifier, nullptr, 0, Es2pandaClassDefinitionModifiers::CLASS_DEFINITION_MODIFIERS_CLAS… in createClassDeclaration()
44 auto *classDeclaration = impl->CreateClassDeclaration(context, classDefinition); in createClassDeclaration()
45 impl->AstNodeSetParent(context, classDefinition, classDeclaration); in createClassDeclaration()
46 impl->AstNodeSetParent(context, identifier, classDefinition); in createClassDeclaration()
48 impl->BlockStatementSetStatements(context, program, newStatements, sizeOfStatements + 1); in createClassDeclaration()
49 impl->AstNodeSetParent(context, classDeclaration, program); in createClassDeclaration()
[all …]
Dplugin_proceed_to_state_create_import.cpp32 static es2panda_AstNode *CreateImportDecl(es2panda_Context *context, es2panda_Program *program, con… in CreateImportDecl() argument
35 auto *importPath = g_impl->CreateStringLiteral1(context, const_cast<char *>(importPathStr)); in CreateImportDecl()
38 auto *importId = g_impl->CreateIdentifier1(context, const_cast<char *>(importIdStr)); in CreateImportDecl()
39 auto *importAlias = g_impl->CreateIdentifier1(context, const_cast<char *>(importAliasStr)); in CreateImportDecl()
40 auto *importSpecifier = g_impl->CreateImportSpecifier(context, importId, importAlias); in CreateImportDecl()
41 g_impl->AstNodeSetParent(context, importId, importSpecifier); in CreateImportDecl()
42 g_impl->AstNodeSetParent(context, importAlias, importSpecifier); in CreateImportDecl()
46 …g_impl->ETSParserBuildImportDeclaration(context, Es2pandaImportKinds::IMPORT_KINDS_ALL, specifiers… in CreateImportDecl()
51 void InsertStatementInFunctionBody(es2panda_Context *context, es2panda_AstNode *func) in InsertStatementInFunctionBody() argument
53 auto *blockStmt = g_impl->ScriptFunctionBody(context, func); in InsertStatementInFunctionBody()
[all …]
Dplugin_proceed_to_state_ast_node_check.cpp45 static bool TestAstNodeCheck(es2panda_Context *context, es2panda_AstNode *root) in TestAstNodeCheck() argument
47 std::cout << impl->AstNodeDumpJSONConst(context, root) << std::endl; in TestAstNodeCheck()
48 ctx = context; in TestAstNodeCheck()
49 impl->AstNodeIterateConst(context, root, FindBinaryExpression); in TestAstNodeCheck()
54 auto *mainType = impl->AstNodeCheck(context, binExpr); in TestAstNodeCheck()
55 std::cout << impl->TypeToStringConst(context, mainType) << std::endl; in TestAstNodeCheck()
72 auto context = impl->CreateContextFromString(config, source.data(), argv[argc - 1]); in main() local
73 if (context != nullptr) { in main()
74 std::cout << "CREATE CONTEXT SUCCESS" << std::endl; in main()
77 impl->ProceedToState(context, ES2PANDA_STATE_PARSED); in main()
[all …]
Dplugin_proceed_to_state_update_statements_lambda.cpp49 auto context = impl->CreateContextFromString(config, source.data(), argv[argc - 1]); in main() local
50 if (context == nullptr) { in main()
51 std::cerr << "FAILED TO CREATE CONTEXT" << std::endl; in main()
55 impl->ProceedToState(context, ES2PANDA_STATE_PARSED); in main()
56 CheckForErrors("PARSE", context); in main()
58 auto *programNode = impl->ProgramAst(context, impl->ContextProgram(context)); in main()
60 std::cout << impl->AstNodeDumpJSONConst(context, programNode) << std::endl; in main()
65 es2panda_AstNode **statements = impl->BlockStatementStatements(context, programNode, &n); in main()
67 auto *expression = impl->ExpressionStatementGetExpression(context, statements[1]); in main()
69 statements[1] = impl->UpdateExpressionStatement(context, statements[1], expression); in main()
[all …]
Dplugin_proceed_to_state_test_import_external_sources.cpp29 static bool CheckExternalSources(es2panda_Context *context, es2panda_Program *pgm) in CheckExternalSources() argument
32 auto externalSources = impl->ProgramExternalSources(context, pgm, &n); in CheckExternalSources()
41 if (impl->ProgramIsStdLibConst(context, extPrograms[k])) { in CheckExternalSources()
44 … findImport |= std::string(impl->ProgramFileNameConst(context, extPrograms[k])) == "export" && in CheckExternalSources()
45 … impl->ProgramKindConst(context, extPrograms[k]) == Es2pandaScriptKind::SCRIPT_KIND_SCRIPT; in CheckExternalSources()
64 auto context = impl->CreateContextFromFile(config, argv[argc - 1]); in main() local
65 if (context != nullptr) { in main()
66 std::cout << "CREATE CONTEXT SUCCESS" << std::endl; in main()
69 impl->ProceedToState(context, ES2PANDA_STATE_PARSED); in main()
70 CheckForErrors("PARSE", context); in main()
[all …]
Dplugin_proceed_to_state_test_number_literal.cpp54 auto context = impl->CreateContextFromString(config, source.data(), argv[argc - 1]); in main() local
55 if (context == nullptr) { in main()
56 std::cerr << "FAILED TO CREATE CONTEXT" << std::endl; in main()
60 impl->ProceedToState(context, ES2PANDA_STATE_PARSED); in main()
61 CheckForErrors("PARSE", context); in main()
63 auto Ast = impl->ProgramAst(context, impl->ContextProgram(context)); in main()
64 ctx = context; in main()
69 auto binExpr = AssertStatementTest(context, assertStatement); in main()
70 auto newNumLiteral = impl->CreateNumberLiteral(context, 10); in main()
71 impl->BinaryExpressionSetLeft(context, binExpr, newNumLiteral); in main()
[all …]
Dutil.cpp55 void CheckForErrors(const std::string &stateName, es2panda_Context *context) in CheckForErrors() argument
57 if (g_implPtr->ContextState(context) == ES2PANDA_STATE_ERROR) { in CheckForErrors()
59 std::cout << g_implPtr->ContextErrorMessage(context) << std::endl; in CheckForErrors()
65 es2panda_AstNode *CreateIdentifierFromString(es2panda_Context *context, const std::string_view &nam… in CreateIdentifierFromString() argument
68 auto *memForName = static_cast<char *>(impl->AllocMemory(context, name.size() + 1, 1)); in CreateIdentifierFromString()
70 auto *identifier = impl->CreateIdentifier1(context, memForName); in CreateIdentifierFromString()
74 void AppendStatementToProgram(es2panda_Context *context, es2panda_AstNode *program, es2panda_AstNod… in AppendStatementToProgram() argument
78 auto *statements = impl->BlockStatementStatements(context, program, &sizeOfStatements); in AppendStatementToProgram()
80 …static_cast<es2panda_AstNode **>(impl->AllocMemory(context, sizeOfStatements + 1, sizeof(es2panda_… in AppendStatementToProgram()
85 impl->BlockStatementSetStatements(context, program, newStatements, sizeOfStatements + 1); in AppendStatementToProgram()
[all …]
Dplugin_proceed_to_state_create_annotation.cpp47 es2panda_Context *context = nullptr; variable
51 es2panda_AstNode *annotationId = CreateIdentifierFromString(context, "Component"); in CreateAnnotationDeclaration()
52 es2panda_AstNode *annotation = impl->CreateAnnotationDeclaration(context, annotationId); in CreateAnnotationDeclaration()
53 impl->AstNodeSetParent(context, annotationId, annotation); in CreateAnnotationDeclaration()
71 context = impl->CreateContextFromString(config, source.data(), argv[argc - 1]); in main()
72 if (context == nullptr) { in main()
73 std::cerr << "FAILED TO CREATE CONTEXT" << std::endl; in main()
77 impl->ProceedToState(context, ES2PANDA_STATE_PARSED); in main()
78 CheckForErrors("PARSE", context); in main()
80 es2panda_AstNode *programNode = impl->ProgramAst(context, impl->ContextProgram(context)); in main()
[all …]
Dplugin_proceed_to_state_find_import_declaration.cpp33 auto *context = static_cast<es2panda_Context *>(arg); in CheckForImportDeclaration() local
38 auto specifiers = impl->ImportDeclarationSpecifiers(context, node, &n); in CheckForImportDeclaration()
44 auto id = impl->ImportSpecifierLocal(context, specifiers[i]); in CheckForImportDeclaration()
46 id = impl->ImportSpecifierImported(context, specifiers[i]); in CheckForImportDeclaration()
48 importDeclarationIdentifiers.push_back(std::string(impl->IdentifierName(context, id))); in CheckForImportDeclaration()
57 auto *context = static_cast<es2panda_Context *>(arg); in CheckForImportIdentifier() local
58 if (!impl->IsIdentifier(node) || (impl->AstNodeParent(context, node) != nullptr && in CheckForImportIdentifier()
59 … impl->IsImportSpecifier(impl->AstNodeParent(context, node)))) { in CheckForImportIdentifier()
63 … std::string(impl->IdentifierName(context, node))) == importDeclarationIdentifiers.end()) { in CheckForImportIdentifier()
66 …std::cout << "Imported identifier found: \"" << std::string(impl->IdentifierName(context, node)) <… in CheckForImportIdentifier()
[all …]
Dplugin_proceed_to_state_return_expression.cpp58 static es2panda_Context *context = nullptr; variable
63 es2panda_AstNode *arg = impl->CreateStringLiteral1(context, const_cast<char *>("hello")); in CreateReturnStatement()
64 es2panda_AstNode *returnStat = impl->CreateReturnStatement1(context, arg); in CreateReturnStatement()
65 impl->AstNodeSetParent(context, arg, returnStat); in CreateReturnStatement()
72 impl->AstNodeIterateConst(context, node, FindFooFunction); in FindFooFunction()
75 auto name = impl->ScriptFunctionId(context, node); in FindFooFunction()
76 if (strcmp(impl->IdentifierName(context, name), "foo") == 0) { in FindFooFunction()
79 impl->AstNodeIterateConst(context, node, FindFooFunction); in FindFooFunction()
85 es2panda_AstNode *body = impl->ScriptFunctionBody(context, fooFunction); in CheckReturnStatement()
89 impl->AstNodeSetParent(context, returnStat, body); in CheckReturnStatement()
[all …]
/arkcompiler/ets_frontend/ets2panda/test/parser/ets/
Dregression-target-type-context-expected.txt15 "program": "regression-target-type-context.ets"
20 "program": "regression-target-type-context.ets"
87 "program": "regression-target-type-context.ets"
92 "program": "regression-target-type-context.ets"
101 "program": "regression-target-type-context.ets"
106 "program": "regression-target-type-context.ets"
114 "program": "regression-target-type-context.ets"
119 "program": "regression-target-type-context.ets"
134 "program": "regression-target-type-context.ets"
139 "program": "regression-target-type-context.ets"
[all …]
/arkcompiler/ets_frontend/ets2panda/linter/arkanalyzer/src/callgraph/pointerAnalysis/
DContext.ts21 class Context { class
23 static sEmptyCtx: Context = new Context([]);
29 static newEmpty(): Context {
30 return new Context();
33 static new(contextElems: number[]): Context {
34 return new Context(contextElems);
37 // use old context and a new element to create a new k-limited Context
38 static newKLimitedContext(oldCtx: Context, elem: number, k: number): Context {
48 return new Context(elems);
51 static kLimitedContext(ctx: Context, k: number): Context {
[all …]
/arkcompiler/ets_frontend/ets2panda/lsp/src/
Dapi.cpp50 DefinitionInfo GetDefinitionAtPosition(es2panda_Context *context, size_t position) in GetDefinitionAtPosition() argument
52 auto declInfo = GetDefinitionAtPositionImpl(context, position); in GetDefinitionAtPosition()
76 DefinitionInfo GetImplementationAtPosition(es2panda_Context *context, size_t position) in GetImplementationAtPosition() argument
78 return GetDefinitionAtPosition(context, position); in GetImplementationAtPosition()
81 bool IsPackageModule(es2panda_Context *context) in IsPackageModule() argument
83 return reinterpret_cast<public_lib::Context *>(context)->parserProgram->IsPackage(); in IsPackageModule()
86 CompletionEntryKind GetAliasScriptElementKind(es2panda_Context *context, size_t position) in GetAliasScriptElementKind() argument
88 auto result = GetAliasScriptElementKindImpl(context, position); in GetAliasScriptElementKind()
92 References GetFileReferences(char const *fileName, es2panda_Context *context, bool isPackageModule) in GetFileReferences() argument
94 return GetFileReferencesImpl(context, fileName, isPackageModule); in GetFileReferences()
[all …]
/arkcompiler/ets_frontend/ets2panda/test/unit/plugin_ut/
Dplugin_ut_binary_expression_api.cpp120 es2panda_Context *context = static_cast<es2panda_Context *>(arg); in SetRightParent() local
121 newCtx = context; in SetRightParent()
123 g_impl->AstNodeIterateConst(context, node, changeParent); in SetRightParent()
126 static bool SetAndGetBinaryExpressionValue(es2panda_Context *context) in SetAndGetBinaryExpressionValue() argument
128 …anda_AstNode *leftValue = static_cast<es2panda_AstNode *>(g_impl->CreateNumberLiteral(context, 8)); in SetAndGetBinaryExpressionValue()
129 g_impl->BinaryExpressionSetLeft(context, binExpr, leftValue); in SetAndGetBinaryExpressionValue()
130 …nda_AstNode *rightValue = static_cast<es2panda_AstNode *>(g_impl->CreateNumberLiteral(context, 7)); in SetAndGetBinaryExpressionValue()
131 g_impl->BinaryExpressionSetRight(context, binExpr, rightValue); in SetAndGetBinaryExpressionValue()
132 …es2panda_AstNode *result = static_cast<es2panda_AstNode *>(g_impl->CreateNumberLiteral(context, 15… in SetAndGetBinaryExpressionValue()
133 g_impl->BinaryExpressionSetResult(context, binExpr, result); in SetAndGetBinaryExpressionValue()
[all …]
/arkcompiler/ets_frontend/ets2panda/compiler/core/
DcompilerImpl.cpp57 void CompilerImpl::HandleContextLiterals(public_lib::Context *context) in HandleContextLiterals() argument
59 auto *emitter = context->emitter; in HandleContextLiterals()
62 for (const auto &buff : context->contextLiterals) { in HandleContextLiterals()
66 emitter->LiteralBufferIndex() += context->contextLiterals.size(); in HandleContextLiterals()
69 ark::pandasm::Program *CompilerImpl::Emit(public_lib::Context *context) in Emit() argument
71 HandleContextLiterals(context); in Emit()
73 queue_.Schedule(context); in Emit()
77 auto *emitter = context->emitter; in Emit()
80 return emitter->Finalize(context->config->options->IsDumpDebugInfo(), Signatures::ETS_GLOBAL); in Emit()
84 static public_lib::Context::CodeGenCb MakeCompileJob() in MakeCompileJob()
[all …]

12345678910>>...56