clang
15.0.0git
|
Interpreter context. More...
#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/AST/Interp/InterpState.h"
Public Member Functions | |
InterpState (State &Parent, Program &P, InterpStack &Stk, Context &Ctx, SourceMapper *M=nullptr) | |
~InterpState () | |
Frame * | getSplitFrame () |
Frame * | getCurrentFrame () override |
unsigned | getCallStackDepth () override |
const Frame * | getBottomFrame () const override |
Expr::EvalStatus & | getEvalStatus () const override |
ASTContext & | getCtx () const override |
bool | checkingForUndefinedBehavior () const override |
bool | keepEvaluatingAfterFailure () const override |
bool | checkingPotentialConstantExpression () const override |
bool | noteUndefinedBehavior () override |
bool | hasActiveDiagnostic () override |
void | setActiveDiagnostic (bool Flag) override |
void | setFoldFailureDiagnostic (bool Flag) override |
bool | hasPriorDiagnostic () override |
bool | reportOverflow (const Expr *E, const llvm::APSInt &Value) |
Reports overflow and return true if evaluation should continue. More... | |
void | deallocate (Block *B) |
Deallocates a pointer. More... | |
SourceInfo | getSource (Function *F, CodePtr PC) const override |
Delegates source mapping to the mapper. More... | |
![]() | |
virtual | ~State () |
OptionalDiagnostic | FFDiag (SourceLocation Loc, diag::kind DiagId=diag::note_invalid_subexpr_in_const_expr, unsigned ExtraNotes=0) |
OptionalDiagnostic | FFDiag (const Expr *E, diag::kind DiagId=diag::note_invalid_subexpr_in_const_expr, unsigned ExtraNotes=0) |
OptionalDiagnostic | FFDiag (const SourceInfo &SI, diag::kind DiagId=diag::note_invalid_subexpr_in_const_expr, unsigned ExtraNotes=0) |
OptionalDiagnostic | CCEDiag (SourceLocation Loc, diag::kind DiagId=diag::note_invalid_subexpr_in_const_expr, unsigned ExtraNotes=0) |
Diagnose that the evaluation does not produce a C++11 core constant expression. More... | |
OptionalDiagnostic | CCEDiag (const Expr *E, diag::kind DiagId=diag::note_invalid_subexpr_in_const_expr, unsigned ExtraNotes=0) |
OptionalDiagnostic | CCEDiag (const SourceInfo &SI, diag::kind DiagId=diag::note_invalid_subexpr_in_const_expr, unsigned ExtraNotes=0) |
OptionalDiagnostic | Note (SourceLocation Loc, diag::kind DiagId) |
Add a note to a prior diagnostic. More... | |
void | addNotes (ArrayRef< PartialDiagnosticAt > Diags) |
Add a stack of notes to a prior diagnostic. More... | |
DiagnosticBuilder | report (SourceLocation Loc, diag::kind DiagId) |
Directly reports a diagnostic message. More... | |
const LangOptions & | getLangOpts () const |
![]() | |
virtual | ~SourceMapper () |
const Expr * | getExpr (Function *F, CodePtr PC) const |
Returns the expression if an opcode belongs to one, null otherwise. More... | |
SourceLocation | getLocation (Function *F, CodePtr PC) const |
Returns the location from which an opcode originates. More... | |
Public Attributes | |
Program & | P |
Reference to the module containing all bytecode. More... | |
InterpStack & | Stk |
Temporary stack. More... | |
Context & | Ctx |
Interpreter Context. More... | |
InterpFrame * | Current = nullptr |
The current frame. More... | |
unsigned | CallStackDepth |
Call stack depth. More... | |
Interpreter context.
Definition at line 34 of file InterpState.h.
InterpState::InterpState | ( | State & | Parent, |
Program & | P, | ||
InterpStack & | Stk, | ||
Context & | Ctx, | ||
SourceMapper * | M = nullptr |
||
) |
Definition at line 24 of file InterpState.cpp.
InterpState::~InterpState | ( | ) |
Definition at line 29 of file InterpState.cpp.
References Current.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
void InterpState::deallocate | ( | Block * | B | ) |
Deallocates a pointer.
Definition at line 57 of file InterpState.cpp.
References clang::interp::Block::data(), clang::interp::Descriptor::DtorFn, clang::interp::Block::getDescriptor(), clang::interp::Block::getSize(), clang::interp::Block::hasPointers(), and clang::interp::Descriptor::MoveFn.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Implements clang::interp::State.
Definition at line 44 of file InterpState.h.
References CallStackDepth.
|
inlineoverridevirtual |
|
overridevirtual |
Implements clang::interp::State.
Definition at line 43 of file InterpState.cpp.
References clang::interp::InterpFrame::Caller, Current, and clang::interp::State::getCurrentFrame().
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Delegates source mapping to the mapper.
Implements clang::interp::SourceMapper.
Definition at line 84 of file InterpState.h.
References clang::interp::SourceMapper::getSource(), and clang::interp::Function::getSource().
|
inline |
Definition at line 42 of file InterpState.h.
References Parent.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Implements clang::interp::State.
Definition at line 65 of file InterpState.h.
References Parent.
Referenced by reportOverflow().
bool InterpState::reportOverflow | ( | const Expr * | E, |
const llvm::APSInt & | Value | ||
) |
Reports overflow and return true if evaluation should continue.
Definition at line 51 of file InterpState.cpp.
References clang::interp::State::CCEDiag(), clang::Expr::getType(), and noteUndefinedBehavior().
|
inlineoverridevirtual |
|
inlineoverridevirtual |
unsigned clang::interp::InterpState::CallStackDepth |
Context& clang::interp::InterpState::Ctx |
Definition at line 102 of file InterpState.h.
InterpFrame* clang::interp::InterpState::Current = nullptr |
The current frame.
Definition at line 104 of file InterpState.h.
Referenced by getCurrentFrame(), and ~InterpState().
Program& clang::interp::InterpState::P |
Reference to the module containing all bytecode.
Definition at line 98 of file InterpState.h.
InterpStack& clang::interp::InterpState::Stk |
Temporary stack.
Definition at line 100 of file InterpState.h.
Referenced by clang::interp::EvalEmitter::jumpFalse(), and clang::interp::EvalEmitter::jumpTrue().