Home
last modified time | relevance | path

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

12345678910>>...41

/arkcompiler/ets_runtime/ecmascript/
Decma_handle_scope.cpp26 auto context = thread_->GetCurrentEcmaContext(); in EcmaHandleScope() local
27 OpenHandleScope(context); in EcmaHandleScope()
28 OpenPrimitiveScope(context); in EcmaHandleScope()
37 void EcmaHandleScope::OpenHandleScope(EcmaContext *context) in OpenHandleScope() argument
39 prevNext_ = context->handleScopeStorageNext_; in OpenHandleScope()
40 prevEnd_ = context->handleScopeStorageEnd_; in OpenHandleScope()
41 prevHandleStorageIndex_ = context->currentHandleStorageIndex_; in OpenHandleScope()
44 void EcmaHandleScope::OpenPrimitiveScope(EcmaContext *context) in OpenPrimitiveScope() argument
46 prevPrimitiveNext_ = context->primitiveScopeStorageNext_; in OpenPrimitiveScope()
47 prevPrimitiveEnd_ = context->primitiveScopeStorageEnd_; in OpenPrimitiveScope()
[all …]
/arkcompiler/ets_frontend/ets2panda/test/unit/plugin/
Dplugin_proceed_to_state_update_statements.cpp59 void createClassDeclaration(es2panda_Context *context, char *className, es2panda_AstNode *program) in createClassDeclaration() argument
63 auto *statements = impl->BlockStatementStatements(context, program, &sizeOfStatements); in createClassDeclaration()
65 …static_cast<es2panda_AstNode **>(impl->AllocMemory(context, sizeOfStatements + 1, sizeof(es2panda_… in createClassDeclaration()
69 auto *identifier = impl->CreateIdentifier1(context, className); in createClassDeclaration()
71context, identifier, nullptr, 0, Es2pandaClassDefinitionModifiers::CLASS_DEFINITION_MODIFIERS_CLAS… in createClassDeclaration()
73 auto *classDeclaration = impl->CreateClassDeclaration(context, classDefinition); in createClassDeclaration()
74 impl->AstNodeSetParent(context, classDefinition, classDeclaration); in createClassDeclaration()
75 impl->AstNodeSetParent(context, identifier, classDefinition); in createClassDeclaration()
77 impl->BlockStatementSetStatements(context, program, newStatements, sizeOfStatements + 1); in createClassDeclaration()
78 impl->AstNodeSetParent(context, classDeclaration, program); in createClassDeclaration()
[all …]
Dplugin_proceed_to_state_find_import_declaration.cpp64 auto *context = static_cast<es2panda_Context *>(arg); in CheckForImportDeclaration() local
69 auto specifiers = impl->ImportDeclarationSpecifiers(context, node, &n); in CheckForImportDeclaration()
75 auto id = impl->ImportSpecifierLocal(context, specifiers[i]); in CheckForImportDeclaration()
77 id = impl->ImportSpecifierImported(context, specifiers[i]); in CheckForImportDeclaration()
79 importDeclarationIdentifiers.push_back(std::string(impl->IdentifierName(context, id))); in CheckForImportDeclaration()
88 auto *context = static_cast<es2panda_Context *>(arg); in CheckForImportIdentifier() local
89 if (!impl->IsIdentifier(node) || (impl->AstNodeParent(context, node) != nullptr && in CheckForImportIdentifier()
90 … impl->IsImportSpecifier(impl->AstNodeParent(context, node)))) { in CheckForImportIdentifier()
94 … std::string(impl->IdentifierName(context, node))) == importDeclarationIdentifiers.end()) { in CheckForImportIdentifier()
97 …std::cout << "Imported identifier found: \"" << std::string(impl->IdentifierName(context, node)) <… in CheckForImportIdentifier()
[all …]
Dplugin_proceed_to_state_update_statements_lambda.cpp65 void CheckForErrors(std::string StateName, es2panda_Context *context) in CheckForErrors() argument
67 if (impl->ContextState(context) == ES2PANDA_STATE_ERROR) { in CheckForErrors()
88 auto context = impl->CreateContextFromString(config, source.data(), argv[argc - 1]); in main() local
89 if (context != nullptr) { in main()
90 std::cout << "CREATE CONTEXT SUCCESS" << std::endl; in main()
93 impl->ProceedToState(context, ES2PANDA_STATE_PARSED); in main()
94 CheckForErrors("PARSE", context); in main()
96 auto *programNode = impl->ProgramAst(impl->ContextProgram(context)); in main()
98 std::cout << impl->AstNodeDumpJSONConst(context, programNode) << std::endl; in main()
103 es2panda_AstNode **statements = impl->BlockStatementStatements(context, programNode, &n); in main()
[all …]
Dplugin_proceed_to_state.cpp58 void CheckForErrors(std::string StateName, es2panda_Context *context) in CheckForErrors() argument
60 if (impl->ContextState(context) == ES2PANDA_STATE_ERROR) { in CheckForErrors()
82 auto context = impl->CreateContextFromFile(config, argv[argc - 1]); in main() local
83 if (context != nullptr) { in main()
84 std::cout << "CREATE CONTEXT SUCCESS" << std::endl; in main()
87 impl->ProceedToState(context, ES2PANDA_STATE_PARSED); in main()
88 CheckForErrors("PARSE", context); in main()
90 impl->ProceedToState(context, ES2PANDA_STATE_SCOPE_INITED); in main()
91 CheckForErrors("SCOPE INITED", context); in main()
93 impl->ProceedToState(context, ES2PANDA_STATE_CHECKED); in main()
[all …]
Dplugin_proceed_to_state_change_func.cpp35 void CheckForErrors(std::string StateName, es2panda_Context *context) in CheckForErrors() argument
37 if (impl->ContextState(context) == ES2PANDA_STATE_ERROR) { in CheckForErrors()
124 auto context = impl->CreateContextFromFile(config, argv[argc - 1]); in main() local
125 if (context != nullptr) { in main()
126 std::cout << "CREATE CONTEXT SUCCESS" << std::endl; in main()
129 impl->ProceedToState(context, ES2PANDA_STATE_PARSED); in main()
130 CheckForErrors("PARSE", context); in main()
132 auto *programNode = impl->ProgramAst(impl->ContextProgram(context)); in main()
134 std::cout << impl->AstNodeDumpEtsSrcConst(context, programNode) << std::endl << std::endl; in main()
135 auto *mainScriptFunc = FindMain(programNode, context); in main()
[all …]
Dplugin_proceed_to_state_change_call_lambda.cpp104 void CheckForErrors(std::string StateName, es2panda_Context *context) in CheckForErrors() argument
106 if (impl->ContextState(context) == ES2PANDA_STATE_ERROR) { in CheckForErrors()
129 auto context = impl->CreateContextFromString(config, src.c_str(), argv[argc - 1]); in main() local
130 if (context != nullptr) { in main()
131 std::cout << "CREATE CONTEXT SUCCESS" << std::endl; in main()
134 impl->ProceedToState(context, ES2PANDA_STATE_PARSED); in main()
135 CheckForErrors("PARSE", context); in main()
137 auto *programNode = impl->ProgramAst(impl->ContextProgram(context)); in main()
139 std::cout << impl->AstNodeDumpEtsSrcConst(context, programNode) << std::endl << std::endl; in main()
140 UpdateCall(programNode, context); in main()
[all …]
/arkcompiler/ets_frontend/ets2panda/compiler/core/
DcompilerImpl.cpp50 void CompilerImpl::HandleContextLiterals(public_lib::Context *context) in HandleContextLiterals() argument
52 auto *emitter = context->emitter; in HandleContextLiterals()
55 for (const auto &buff : context->contextLiterals) { in HandleContextLiterals()
59 emitter->LiteralBufferIndex() += context->contextLiterals.size(); in HandleContextLiterals()
62 ark::pandasm::Program *CompilerImpl::Emit(public_lib::Context *context) in Emit() argument
64 HandleContextLiterals(context); in Emit()
66 queue_.Schedule(context); in Emit()
70 auto *emitter = context->emitter; in Emit()
73 …return emitter->Finalize(context->config->options->CompilerOptions().dumpDebugInfo, Signatures::ET… in Emit()
106 ASTVerificationRunner(ArenaAllocator &allocator, const public_lib::Context &context) in ASTVerificationRunner() argument
[all …]
/arkcompiler/ets_runtime/ecmascript/pgo_profiler/types/
Dpgo_profile_type.cpp24 ProfileTypeRef::ProfileTypeRef(PGOContext &context, const ProfileType &type) in ProfileTypeRef() argument
27 context.GetProfileTypePool()->TryAdd(type, apId); in ProfileTypeRef()
31 ProfileTypeRef &ProfileTypeRef::Remap([[maybe_unused]] const PGOContext &context) in Remap() argument
37 ProfileType::ProfileType(PGOContext &context, ProfileTypeRef typeRef) in ProfileType() argument
39 if (!context.GetHeader()->SupportWideProfileType()) { in ProfileType()
44 const auto *typeEntry = context.GetProfileTypePool()->GetEntry(typeRef.GetId()); in ProfileType()
53 std::optional<ProfileType> ProfileType::CreateFromProfileTypeRef(PGOContext &context, ProfileTypeRe… in CreateFromProfileTypeRef() argument
55 if (!context.GetHeader()->SupportWideProfileType()) { in CreateFromProfileTypeRef()
63 const auto *typeEntry = context.GetProfileTypePool()->GetEntry(typeRef.GetId()); in CreateFromProfileTypeRef()
70 ProfileType &ProfileType::Remap([[maybe_unused]]const PGOContext &context) in Remap() argument
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/stdlib-templates/std/core/
Dstd_core_array.sts20 {% include 'utils/test_core_array_lib.j2' with context %}
27 {% include 'utils/test_core_array_lib.j2' with context %}
34 {% include 'utils/test_core_array_lib.j2' with context %}
41 {% include 'utils/test_core_array_lib.j2' with context %}
48 {% include 'utils/test_core_array_lib.j2' with context %}
55 {% include 'utils/test_core_array_lib.j2' with context %}
62 {% include 'utils/test_core_array_lib.j2' with context %}
69 {% include 'utils/test_core_array_lib.j2' with context %}
76 {% include 'utils/test_core_array_lib.j2' with context %}
83 {% include 'utils/test_core_array_lib.j2' with context %}
[all …]
/arkcompiler/runtime_core/static_core/runtime/fibers/
Dfiber_context.h37 * This set of functions implements user mode context switch functionality.
41 * - retrieve current context
43 * - update the saved context with a new stack (allocated manually elsewhere) and an entrypoint
51 /// @brief Saves current usermode context to the provided buffer in memory.
55 * @brief Saves current context and switches to the target one.
56 * @param from the buffer to save the current context in
57 * @param to the buffer to load the new context from
62 * @brief Updates the previously saved context with a new stack and a new entry point.
64 * @param ctx a buffer with a valid saved context (via GetCurrentContext() or SwitchContext())
65 …* @param func the new entry point. After a context switch to ctx with SwitchContext(), the control…
[all …]
/arkcompiler/runtime_core/static_core/assembler/
Dcontext.cpp22 void Context::Make(const std::vector<ark::pandasm::Token> &t) in Make()
40 size_t Context::Len() const in Len()
45 bool Context::ValidateFoundedRegisterName(char c, size_t n) const in ValidateFoundedRegisterName()
70 bool Context::ValidateRegisterName(char c, size_t n) const in ValidateRegisterName()
79 bool Context::ValidateParameterName(size_t numberOfParamsAlreadyIs) const in ValidateParameterName()
98 std::string_view Context::GiveToken() in GiveToken()
103 Token::Type Context::Next() in Next()
112 void Context::UpSignOperation() in UpSignOperation()
117 Token::Type Context::WaitFor() in WaitFor()
122 bool Context::Mask() in Mask()
[all …]
/arkcompiler/runtime_core/static_core/verification/util/parser/
Dparser.h59 template <typename Context, typename Type, typename Char, typename Iter>
60 struct BaseParser : public verifier::callable<bool(Context &, Iter &, Iter)> {
63 constexpr BaseParser(const F &f) : verifier::callable<bool(Context &, Iter &, Iter)> {f}
67 using Ctx = Context;
73 using Next = BaseParser<Context, type_sum<NType, T>, Char, Iter>;
75 using P = BaseParser<Context, type_sum<op_next, T>, Char, Iter>;
79 static const auto L = [c](Context &, Iter &start, Iter end) {
95 static const auto L = [=](Context &, Iter &start, Iter end) {
113 static const auto L = [=](Context &, Iter &start, Iter end) {
138 static const auto L = [](Context &, Iter &start, Iter end) { return start == end; };
[all …]
/arkcompiler/runtime_core/assembler/
Dcontext.cpp21 void Context::Make(const std::vector<panda::pandasm::Token> &t) in Make()
39 size_t Context::Len() const in Len()
44 bool Context::ValidateRegisterName(char c, size_t n) const in ValidateRegisterName()
73 bool Context::ValidateParameterName(size_t number_of_params_already_is) const in ValidateParameterName()
92 std::string_view Context::GiveToken() in GiveToken()
97 Token::Type Context::Next() in Next()
106 void Context::UpSignOperation() in UpSignOperation()
111 Token::Type Context::WaitFor() in WaitFor()
116 bool Context::Mask() in Mask()
121 bool Context::NextMask() in NextMask()
[all …]
/arkcompiler/runtime_core/static_core/runtime/
Dsignal_handler.cpp46 [[maybe_unused]] const void *context) in DumpStackTrace() argument
70 static bool CallSignalActionHandler(int sig, siginfo_t *info, void *context) in CallSignalActionHandler() argument
72 return Runtime::GetCurrent()->GetSignalManager()->SignalActionHandler(sig, info, context); in CallSignalActionHandler()
75 bool SignalManager::SignalActionHandler(int sig, siginfo_t *info, void *context) in SignalActionHandler() argument
78 if (InOatCode(info, context, true)) { in SignalActionHandler()
80 if (handler->Action(sig, info, context)) { in SignalActionHandler()
87 if (InOtherCode(sig, info, context)) { in SignalActionHandler()
96 …Manager::InOatCode([[maybe_unused]] const siginfo_t *siginfo, [[maybe_unused]] const void *context, in InOatCode() argument
104 [[maybe_unused]] const void *context) const in InOtherCode()
170 [[maybe_unused]] const void *context, in GetMethodAndReturnPcAndSp() argument
[all …]
/arkcompiler/runtime_core/static_core/runtime/fibers/arch/aarch64/
Dupdate.S44 // context->PC = func
46 // context->LR = FiberExitBridge (for the case when Fiber returns)
49 // context->X0 = argument
61 // context->SP = %x8
63 // context->FP = 0
78 // %x8 = context->PC
80 // context->PC = func
82 // context->X0 = argument
85 // pretend that we called the func(), i.e. put context's PC to LR
86 // context->LR = %x8
/arkcompiler/runtime_core/static_core/runtime/fibers/arch/arm/
Dupdate.S44 // context->PC = func
47 // context->LR = FiberExitBridge (for the case when Fiber returns)
50 // context->R0 = argument
63 // context->SP = r1
65 // context->FP = 0
81 // r4 = context->PC
83 // context->PC = func
85 // context->R0 = argument
88 // pretend that we called the func(), i.e. put context's PC to LR
89 // context->LR = r4
/arkcompiler/ets_frontend/ets2panda/compiler/lowering/ets/
DdefaultParameterLowering.h26 …eterDeclaration *CreateParameterDeclaraion(ir::MethodDefinition *method, public_lib::Context *ctx);
28 public_lib::Context *ctx);
30 public_lib::Context *ctx);
31 ir::BlockStatement *CreateFunctionBody(ir::MethodDefinition *method, public_lib::Context *ctx,
33 …unctionExpression *CreateFunctionExpression(ir::MethodDefinition *method, public_lib::Context *ctx,
37 … ArenaVector<ir::Expression *> funcDefinitionArgs, public_lib::Context *ctx);
39 void ProcessGlobalFunctionDefinition(ir::MethodDefinition *method, public_lib::Context *ctx);
46 bool Perform(public_lib::Context *ctx, parser::Program *program) override;
/arkcompiler/runtime_core/static_core/compiler/aot/
Daot_manager.cpp81 static void FancyClassContextPrint(std::string_view context) in FancyClassContextPrint() argument
85 size_t end = context.find(DELIMITER, start); in FancyClassContextPrint()
87 LOG(ERROR, AOT) << "\t\t" << context.substr(start, end - start); in FancyClassContextPrint()
89 end = context.find(DELIMITER, start); in FancyClassContextPrint()
91 LOG(ERROR, AOT) << "\t\t" << context.substr(start); in FancyClassContextPrint()
94 static bool CheckFilesInClassContext(std::string_view context, std::string_view aotContext) in CheckFilesInClassContext() argument
101 if (context.find(fileContext) == std::string::npos) { in CheckFilesInClassContext()
102 LOG(ERROR, AOT) << "Cannot found file " << fileContext << " in runtime context"; in CheckFilesInClassContext()
121 auto context = aotFile->IsBootPandaFile() ? bootClassContext_ : completeContext; in VerifyClassHierarchy() local
125 // Aot file context must be prefix of current runtime context in VerifyClassHierarchy()
[all …]
/arkcompiler/runtime_core/panda_guard/tests/unittest/
Dguard_context_test.cpp29 * @tc.desc: test context init is right
41 auto context = guard::GuardContext::GetInstance(); variable
42 context->Init(argc, const_cast<const char **>(argv));
43 EXPECT_EQ(context->IsDebugMode(), true);
45 auto nameMapping = context->GetNameMapping();
58 * @tc.desc: test context init with invalid config
69 auto context = guard::GuardContext::GetInstance(); variable
70 EXPECT_DEATH(context->Init(argc, const_cast<const char **>(argv)), "");
/arkcompiler/ets_frontend/ets2panda/public/
Des2panda_lib.h128 …panda_Context *(*ProceedToState)(es2panda_Context *context, es2panda_ContextState state); // cont…
129 void (*DestroyContext)(es2panda_Context *context);
131 es2panda_ContextState (*ContextState)(es2panda_Context *context);
132 char const *(*ContextErrorMessage)(es2panda_Context *context);
134 es2panda_Program *(*ContextProgram)(es2panda_Context *context);
150 void *(*AllocMemory)(es2panda_Context *context, size_t numberOfElements, size_t sizeOfElement);
151 …es2panda_SourcePosition *(*CreateSourcePosition)(es2panda_Context *context, size_t index, size_t l…
152 …es2panda_SourceRange *(*CreateSourceRange)(es2panda_Context *context, es2panda_SourcePosition *sta…
154 size_t (*SourcePositionIndex)(es2panda_Context *context, es2panda_SourcePosition *position);
155 size_t (*SourcePositionLine)(es2panda_Context *context, es2panda_SourcePosition *position);
[all …]
Des2panda_lib.cpp51 #include "parser/context/parserContext.h"
233 static void CompileJob(public_lib::Context *context, varbinder::FunctionScope *scope, in CompileJob() argument
239 …compiler::ETSGen cg {&allocator, &regSpiller, context, std::make_tuple(scope, programElement, &ast… in CompileJob()
248 auto *res = new Context; in CreateContext()
292 auto *res = new Context; in CreateContextFromFile()
300 auto *res = new Context; in CreateContextFromFile()
315 __attribute__((unused)) static Context *Parse(Context *ctx) in Parse()
346 __attribute__((unused)) static Context *InitScopes(Context *ctx) in InitScopes()
375 __attribute__((unused)) static Context *Check(Context *ctx) in Check()
415 __attribute__((unused)) static Context *Lower(Context *ctx) in Lower()
[all …]
/arkcompiler/runtime_core/static_core/runtime/fibers/arch/amd64/
Dupdate.S45 // context->RIP = func
47 // context->RDI = argument
61 // context->RSP = %rax
80 // %r10 = context->RIP
82 // context->RIP = func
84 // context->RDI = argument
87 // pretend that we called the func(), i.e. push context's RIP to context's stack:
88 // %rax = context->RSP
94 // context->RSP = %rax
/arkcompiler/runtime_core/static_core/verification/config/parse/
Dconfig_parse.cpp33 struct Context { struct
40 using P = ark::parser::Parser<Context, const char, const char *>;
55 static bool HandleLine(Action a, Context &c, PandaString &&s) in HandleLine()
65 static bool HandleSection(Action a, Context &c) in HandleSection()
97 static const auto NAME_HANDLER = [](auto a, Context &c, auto from, auto to) { in ParseConfig()
108 static const auto LINE_HANDLER = [](auto a, Context &c, auto from, auto to) { in ParseConfig()
119 static const auto SECTION_HANDLER = [](auto a, Context &c) { return HandleSection(a, c); }; in ParseConfig()
128 Context context; in ParseConfig() local
130 context.current.name = "config"; in ParseConfig()
132 if (SECTION(context, str, &str[std::strlen(str)])) { // NOLINT in ParseConfig()
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/09.constant_string_to_char_conversion/
Dstr2char_n1.params.yaml20 // assignment-like context, variable declaration
28 // assignment-like context, constant declaration
35 // assignment-like context, field declaration
48 // assignment-like context, variable assignment
55 // assignment-like context, field assignment
65 // call context, function
75 // call context, method
88 // call context, constructor
101 // call context, lambda

12345678910>>...41