Home
last modified time | relevance | path

Searched refs:pg_ (Results 1 – 25 of 25) sorted by relevance

/arkcompiler/ets_frontend/es2panda/compiler/function/
DasyncGeneratorFunctionBuilder.cpp25 RegScope rs(pg_); in Prepare()
27 VReg completionType = pg_->AllocReg(); in Prepare()
28 VReg completionValue = pg_->AllocReg(); in Prepare()
30 pg_->CreateAsyncGeneratorObj(node, callee); in Prepare()
31 pg_->StoreAccumulator(node, funcObj_); in Prepare()
33 pg_->SetLabel(node, catchTable_->LabelSet().TryBegin()); in Prepare()
35 pg_->LoadConst(node, Constant::JS_UNDEFINED); in Prepare()
43 RegScope rs(pg_); in CleanUp()
44 VReg retVal = pg_->AllocReg(); in CleanUp()
46 pg_->SetLabel(node, labelSet.TryEnd()); in CleanUp()
[all …]
DfunctionBuilder.cpp29 : pg_(pg), catchTable_(catchTable), funcObj_(pg_->AllocReg()) in FunctionBuilder()
40 pg_->NotifyConcurrentResult(node); in DirectReturn()
41 pg_->EmitReturn(node); in DirectReturn()
46 const auto *rootNode = pg_->RootNode(); in ImplicitReturn()
49 if (pg_->isDebuggerEvaluateExpressionMode()) { in ImplicitReturn()
50 pg_->NotifyConcurrentResult(node); in ImplicitReturn()
51 pg_->EmitReturn(node); in ImplicitReturn()
54 pg_->LoadConst(node, Constant::JS_UNDEFINED); in ImplicitReturn()
55 pg_->NotifyConcurrentResult(node); in ImplicitReturn()
56 pg_->EmitReturnUndefined(node); in ImplicitReturn()
[all …]
DgeneratorFunctionBuilder.cpp27 VReg completionType = pg_->AllocReg(); in Prepare()
28 VReg completionValue = pg_->AllocReg(); in Prepare()
30 pg_->CreateGeneratorObj(node, callee); in Prepare()
31 pg_->StoreAccumulator(node, funcObj_); in Prepare()
32 pg_->LoadConst(node, Constant::JS_UNDEFINED); in Prepare()
41 pg_->SetLabel(node, labelSet.TryEnd()); in CleanUp()
42 pg_->SetLabel(node, labelSet.CatchBegin()); in CleanUp()
43 pg_->EmitThrow(node); in CleanUp()
44 pg_->SetLabel(node, labelSet.CatchEnd()); in CleanUp()
49 pg_->EmitReturn(node); in DirectReturn()
[all …]
DasyncFunctionBuilder.cpp26 pg_->AsyncFunctionResolve(node, funcObj_); // retVal is in acc in DirectReturn()
27 pg_->NotifyConcurrentResult(node); in DirectReturn()
28 pg_->EmitReturn(node); in DirectReturn()
33 pg_->LoadConst(node, Constant::JS_UNDEFINED); in ImplicitReturn()
44 pg_->AsyncFunctionEnter(node); in Prepare()
45 pg_->StoreAccumulator(node, funcObj_); in Prepare()
46 pg_->SetLabel(node, catchTable_->LabelSet().TryBegin()); in Prepare()
51 RegScope rs(pg_); in CleanUp()
54 pg_->SetLabel(node, labelSet.TryEnd()); in CleanUp()
55 pg_->SetLabel(node, labelSet.CatchBegin()); in CleanUp()
[all …]
DfunctionBuilder.h81 PandaGen *pg_; variable
/arkcompiler/ets_frontend/es2panda/compiler/base/
Diterators.cpp27 …: pg_(pg), node_(node), closed_(pg->AllocReg()), method_(pg->AllocReg()), iterator_(pg->AllocReg()… in Iterator()
31 pg_->GetAsyncIterator(node); in Iterator()
33 pg_->GetIterator(node); in Iterator()
36 pg_->StoreAccumulator(node, iterator_); in Iterator()
37 pg_->LoadObjByName(node_, iterator_, "next"); in Iterator()
38 pg_->StoreAccumulator(node_, method_); in Iterator()
39 pg_->StoreConst(node_, closed_, Constant::JS_FALSE); in Iterator()
44 pg_->LoadObjByName(node_, iterator_, name); in GetMethod()
45 pg_->StoreAccumulator(node_, method_); in GetMethod()
50 pg_->CallThis(node_, method_, 2); in CallMethodWithValue()
[all …]
DoptionalChain.cpp21 OptionalChain::OptionalChain(PandaGen *pg, const ir::AstNode *node) : pg_(pg), node_(node), prev_(p… in OptionalChain()
23 pg_->optionalChain_ = this; in OptionalChain()
29 pg_->SetLabel(node_, label_); in ~OptionalChain()
31 pg_->optionalChain_ = prev_; in ~OptionalChain()
41 label_ = pg_->AllocLabel(); in CheckNullish()
44 RegScope rs(pg_); in CheckNullish()
46 auto *notNullish = pg_->AllocLabel(); in CheckNullish()
47 auto *nullish = pg_->AllocLabel(); in CheckNullish()
49 pg_->LoadConst(node_, Constant::JS_NULL); in CheckNullish()
50 pg_->Condition(node_, lexer::TokenType::PUNCTUATOR_NOT_STRICT_EQUAL, obj, nullish); in CheckNullish()
[all …]
Dlreference.cpp36 : node_(node), pg_(pg), refKind_(refKind), res_(res), isDeclaration_(isDeclaration) in LReference()
39 obj_ = pg_->AllocReg(); in LReference()
41 node_->AsMemberExpression()->CompileObject(pg_, obj_); in LReference()
42 prop_ = node->AsMemberExpression()->CompileKey(pg_); in LReference()
50 pg_->LoadVar(node_->AsIdentifier(), res_); in GetValue()
54 pg_->LoadObjProperty(node_, obj_, prop_); in GetValue()
67 pg_->StoreVar(node_, res_, isDeclaration_); in SetValue()
72 pg_->StoreSuperProperty(node_, obj_, prop_); in SetValue()
74 pg_->StoreObjProperty(node_, obj_, prop_); in SetValue()
80 Destructuring::Compile(pg_, node_->AsExpression()); in SetValue()
DoptionalChain.h37 PandaGen *pg_ {};
Dlreference.h58 PandaGen *pg_; variable
Diterators.h68 PandaGen *pg_;
/arkcompiler/ets_frontend/es2panda/compiler/core/
DregScope.cpp29 RegScope::RegScope(PandaGen *pg) : pg_(pg), regBase_(pg_->usedRegs_) {} in RegScope()
33 pg_->totalRegs_ = std::max(pg_->totalRegs_, pg_->usedRegs_); in ~RegScope()
34 pg_->usedRegs_ = regBase_; in ~RegScope()
39 if (!pg_->IsDebug()) { in DebuggerCloseScope()
43 pg_->scope_->SetScopeEnd(pg_->insns_.back()); in DebuggerCloseScope()
52 prevScope_ = pg_->scope_; in LocalRegScope()
53 pg_->scope_ = scope; in LocalRegScope()
62 if (pg_->IsDebug()) { in LocalRegScope()
63 pg_->scope_->SetScopeStart(pg_->insns_.back()); in LocalRegScope()
64 pg_->debugInfo_.variableDebugInfo.push_back(pg_->scope_); in LocalRegScope()
[all …]
DdynamicContext.cpp26 …ontext::DynamicContext(PandaGen *pg, LabelTarget target) : pg_(pg), target_(target), prev_(pg_->dy… in DynamicContext()
28 pg_->dynamicContext_ = this; in DynamicContext()
33 pg_->dynamicContext_ = prev_; in ~DynamicContext()
53 pg_->SetLabel(labelledStmt_, label_); in ~LabelContext()
63 catchTable_ = pg_->CreateCatchTable(); in LexEnvContext()
67 pg_->SetLabel(node, labelSet.TryBegin()); in LexEnvContext()
79 pg_->SetLabel(node, labelSet.TryEnd()); in ~LexEnvContext()
80 pg_->Branch(node, labelSet.CatchEnd()); in ~LexEnvContext()
82 pg_->SetLabel(node, labelSet.CatchBegin()); in ~LexEnvContext()
83 pg_->PopLexEnv(node); in ~LexEnvContext()
[all …]
DenvScope.cpp23 ScopeContext::ScopeContext(PandaGen *pg, binder::Scope *newScope) : pg_(pg), prevScope_(pg_->scope_) in ScopeContext()
25 pg_->scope_ = newScope; in ScopeContext()
30 pg_->scope_ = prevScope_; in ~ScopeContext()
35 pg_ = pg; in Initialize()
36 prev_ = pg_->envScope_; in Initialize()
37 pg_->envScope_ = this; in Initialize()
42 if (!pg_) { in ~EnvScope()
46 pg_->envScope_ = prev_; in ~EnvScope()
57 pg_->NewLexicalEnv(scope_->Node(), scope->LexicalSlots(), scope_); in InitLoopContext()
67 RegScope rs(pg_); in CopyPerIterationCtx()
[all …]
DswitchBuilder.cpp29 …: pg_(pg), end_(pg->AllocLabel()), labelCtx_(pg, LabelTarget(end_, LabelTarget::BREAK_LABEL)), stm… in SwitchBuilder()
32 caseLabels_.push_back(pg_->AllocLabel()); in SwitchBuilder()
38 pg_->SetLabel(stmt_, end_); in ~SwitchBuilder()
43 pg_->SetLabel(stmt_->Cases()[index], caseLabels_[index]); in SetCaseTarget()
48 stmt_->Discriminant()->Compile(pg_); in CompileTagOfSwitch()
49 pg_->StoreAccumulator(stmt_->Discriminant(), tag); in CompileTagOfSwitch()
55 stmt->Compile(pg_); in CompileCaseStatements()
62 caseTarget->Test()->Compile(pg_); in JumpIfCase()
63pg_->Condition(caseTarget, lexer::TokenType::PUNCTUATOR_NOT_STRICT_EQUAL, tag, caseLabels_[index]); in JumpIfCase()
69 pg_->Branch(defaultTarget, caseLabels_[defaultIndex]); in JumpToDefault()
[all …]
DregAllocator.cpp27 : pg_(pg), insn_(std::move(pg_->Insns()), pg_->Allocator()->Adapter()) in FrontAllocator()
33 pg_->Insns().splice(pg_->Insns().end(), std::move(insn_)); in ~FrontAllocator()
40 pg_->Insns().push_back(ins); in PushBack()
45 return pg_->Allocator(); in Allocator()
55 auto inc = node->SetIcSlot(pg_->GetCurrentSlot()); in UpdateIcSlot()
56 pg_->IncreaseCurrentSlot(inc); in UpdateIcSlot()
61 …const auto *lastInsNode = pg_->Insns().empty() ? FIRST_NODE_OF_FUNCTION : pg_->Insns().back()->Nod… in AllocLabel()
68 pg_->TypedInsns()[ins] = typeIndex; in Run()
111 if ((spillRegs_ + pg_->TotalRegsNum()) > UINT16_MAX) { in AdjustInsRegWhenHasSpill()
116 auto &insns = pg_->Insns(); in AdjustInsRegWhenHasSpill()
[all …]
DenvScope.h43 PandaGen *pg_;
65 PandaGen *pg_ {};
DregAllocator.h34 : pg_(pg), sourceLocationFlag_(lexer::SourceLocationFlag::VALID_SOURCE_LOCATION) in RegAllocator()
144 PandaGen *pg_; variable
161 PandaGen *pg_;
DswitchBuilder.h45 PandaGen *pg_;
DregScope.h44 PandaGen *pg_; variable
DdynamicContext.h80 PandaGen *pg_; variable
/arkcompiler/ets_frontend/es2panda/compiler/core/emitter/
DtypeExtractorEmitter.cpp33 …er::TypeExtractorEmitter(const PandaGen *pg, panda::pandasm::Function *func) : pg_(pg), func_(func) in TypeExtractorEmitter()
35 auto prog = pg_->Context()->GetEmitter()->GetProgram(); in TypeExtractorEmitter()
37 if (IsFuncMain0(func->name, pg_->Context()->IsMergeAbc())) { in TypeExtractorEmitter()
38 if (pg_->Context()->TypeRecorder()->ExportType().size() > 0U) { in TypeExtractorEmitter()
41 if (pg_->Context()->TypeRecorder()->DeclareType().size() > 0U) { in TypeExtractorEmitter()
51 expectedName = std::string(pg_->Context()->RecordName()) + "." + expectedName; in IsFuncMain0()
92 auto recorder = pg_->Context()->TypeRecorder(); in GenFunctionTypeInfo()
94 typedInsns.reserve(pg_->TypedInsns().size() * 4U); // Expand to 4 pieces of information in GenFunctionTypeInfo()
97 for (const auto *ins : pg_->Insns()) { in GenFunctionTypeInfo()
103 auto t = pg_->TypedInsns().find(ins); in GenFunctionTypeInfo()
[all …]
Demitter.cpp47 : pg_(pg), literalBuffers_(allocator->Adapter()) in FunctionEmitter()
73 patchFixHelper->ProcessFunction(pg_, func_, literalBuffers_); in Generate()
79 return pg_->Strings(); in Strings()
84 func_->SetFunctionKind(static_cast<panda::panda_file::FunctionKind>(pg_->GetFunctionKind())); in GenFunctionKind()
89 func_->SetSlotsNum(pg_->GetCurrentSlot()); in GenIcSize()
99 if (pg_->RootNode()->IsProgram()) { in SourceCode()
100 return pg_->Binder()->Program()->SourceCode(); in SourceCode()
102 return static_cast<const ir::ScriptFunction *>(pg_->RootNode())->SourceCode(pg_->Binder()); in SourceCode()
107 return const_cast<lexer::LineIndex &>(pg_->Binder()->Program()->GetLineIndex()); in GetLineIndex()
167 astNode = pg_->Debuginfo().firstStmt; in GenInstructionDebugInfo()
[all …]
DtypeExtractorEmitter.h55 const PandaGen *pg_; variable
Demitter.h96 const PandaGen *pg_; variable