Lines Matching +full:func +full:-

1 //===--- InterpFrame.cpp - Call Frame implementation for the VM -*- C++ -*-===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
25 InterpFrame::InterpFrame(InterpState &S, const Function *Func, in InterpFrame() argument
27 : Caller(Caller), S(S), Depth(Caller ? Caller->Depth + 1 : 0), Func(Func), in InterpFrame()
30 if (!Func) in InterpFrame()
33 unsigned FrameSize = Func->getFrameSize(); in InterpFrame()
38 for (auto &Scope : Func->scopes()) { in InterpFrame()
42 B->invokeCtor(); in InterpFrame()
48 InterpFrame::InterpFrame(InterpState &S, const Function *Func, CodePtr RetPC, in InterpFrame() argument
50 : InterpFrame(S, Func, S.Current, RetPC, Func->getArgSize() + VarArgSize) { in InterpFrame()
57 if (Func->hasRVO()) in InterpFrame()
60 if (Func->hasThisPointer()) { in InterpFrame()
61 if (Func->hasRVO()) in InterpFrame()
74 // This happens when the execution is interruped midway-through. in ~InterpFrame()
75 if (Func) { in ~InterpFrame()
76 for (auto &Scope : Func->scopes()) { in ~InterpFrame()
79 if (B->isInitialized()) in ~InterpFrame()
80 B->invokeDtor(); in ~InterpFrame()
87 for (auto &Local : Func->getScope(Idx).locals()) { in destroy()
93 for (PrimType Ty : Func->args_reverse()) in popArgs()
111 if (const auto *D = Desc->asDecl()) { in print()
122 if (const auto *E = Desc->asExpr()) { in print()
123 E->printPretty(OS, nullptr, Ctx.getPrintingPolicy()); in print()
129 if (!Ty->isReferenceType()) in print()
163 F && (F->isBuiltin() || F->isLambdaStaticInvoker())) in describe()
168 M && M->isInstance() && !isa<CXXConstructorDecl>(F)) { in describe()
169 print(OS, This, S.getCtx(), S.getCtx().getRecordType(M->getParent())); in describe()
170 OS << "->"; in describe()
173 F->getNameForDiagnostic(OS, S.getCtx().getPrintingPolicy(), in describe()
178 Off += Func->hasRVO() ? primSize(PT_Ptr) : 0; in describe()
179 Off += Func->hasThisPointer() ? primSize(PT_Ptr) : 0; in describe()
181 for (unsigned I = 0, N = F->getNumParams(); I < N; ++I) { in describe()
182 QualType Ty = F->getParamDecl(I)->getType(); in describe()
195 if (Caller->Caller) in getCaller()
201 if (!Caller->Func) { in getCallRange()
206 return S.getRange(Caller->Func, RetPC - sizeof(uintptr_t)); in getCallRange()
210 if (!Func) in getCallee()
212 return Func->getDecl(); in getCallee()
216 assert(Offset < Func->getFrameSize() && "Invalid local offset."); in getLocalPointer()
223 return Pointer(reinterpret_cast<Block *>(Pt->second.get())); in getParamPointer()
226 const auto &Desc = Func->getParamDescriptor(Off); in getParamPointer()
227 size_t BlockSize = sizeof(Block) + Desc.second->getAllocSize(); in getParamPointer()
230 B->invokeCtor(); in getParamPointer()
233 TYPE_SWITCH(Desc.first, new (B->data()) T(stackRef<T>(Off))); in getParamPointer()
243 if (Func && (!Func->hasBody() || Func->getDecl()->isImplicit()) && Caller) in getSource()
244 return Caller->getSource(RetPC); in getSource()
246 return S.getSource(Func, PC); in getSource()
250 if (Func && (!Func->hasBody() || Func->getDecl()->isImplicit()) && Caller) in getExpr()
251 return Caller->getExpr(RetPC); in getExpr()
253 return S.getExpr(Func, PC); in getExpr()
257 if (Func && (!Func->hasBody() || Func->getDecl()->isImplicit()) && Caller) in getLocation()
258 return Caller->getLocation(RetPC); in getLocation()
260 return S.getLocation(Func, PC); in getLocation()
264 if (Func && (!Func->hasBody() || Func->getDecl()->isImplicit()) && Caller) in getRange()
265 return Caller->getRange(RetPC); in getRange()
267 return S.getRange(Func, PC); in getRange()