clang 20.0.0git
|
Stack frame storing temporaries and parameters. More...
#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/AST/ByteCode/InterpStack.h"
Public Member Functions | |
InterpStack () | |
~InterpStack () | |
Destroys the stack, freeing up storage. | |
template<typename T , typename... Tys> | |
void | push (Tys &&...Args) |
Constructs a value in place on the top of the stack. | |
template<typename T > | |
T | pop () |
Returns the value from the top of the stack and removes it. | |
template<typename T > | |
void | discard () |
Discards the top value from the stack. | |
template<typename T > | |
T & | peek () const |
Returns a reference to the value on the top of the stack. | |
template<typename T > | |
T & | peek (size_t Offset) const |
void * | top () const |
Returns a pointer to the top object. | |
size_t | size () const |
Returns the size of the stack in bytes. | |
void | clear () |
Clears the stack without calling any destructors. | |
bool | empty () const |
Returns whether the stack is empty. | |
void | dump () const |
dump the stack contents to stderr. | |
Stack frame storing temporaries and parameters.
Definition at line 27 of file InterpStack.h.
|
inline |
Definition at line 29 of file InterpStack.h.
InterpStack::~InterpStack | ( | ) |
Destroys the stack, freeing up storage.
Definition at line 21 of file InterpStack.cpp.
References clear().
void InterpStack::clear | ( | ) |
Clears the stack without calling any destructors.
Definition at line 23 of file InterpStack.cpp.
Referenced by clang::interp::Context::evaluate(), clang::interp::Context::evaluateAsInitializer(), clang::interp::Context::evaluateAsRValue(), clang::interp::interp__builtin_constant_p(), and ~InterpStack().
|
inline |
Discards the top value from the stack.
Definition at line 56 of file InterpStack.h.
References clang::T.
Referenced by clang::interp::InterpFrame::popArgs().
void InterpStack::dump | ( | ) | const |
dump the stack contents to stderr.
Definition at line 86 of file InterpStack.cpp.
References clang::interp::align(), clang::interp::primSize(), size(), clang::T, TYPE_SWITCH, and V.
|
inline |
Returns whether the stack is empty.
Definition at line 91 of file InterpStack.h.
Referenced by clang::interp::Context::evaluate(), clang::interp::Context::evaluateAsInitializer(), clang::interp::Context::evaluateAsRValue(), and clang::interp::Context::isPotentialConstantExpr().
Returns a reference to the value on the top of the stack.
Definition at line 68 of file InterpStack.h.
Referenced by clang::interp::peekToAPSInt().
Definition at line 76 of file InterpStack.h.
References clang::interp::aligned(), and clang::T.
Returns the value from the top of the stack and removes it.
Definition at line 43 of file InterpStack.h.
References clang::T.
Referenced by clang::interp::EvalEmitter::jumpFalse(), and clang::interp::EvalEmitter::jumpTrue().
|
inline |
Constructs a value in place on the top of the stack.
Definition at line 35 of file InterpStack.h.
References clang::T.
|
inline |
Returns the size of the stack in bytes.
Definition at line 85 of file InterpStack.h.
Referenced by dump().
|
inline |
Returns a pointer to the top object.
Definition at line 82 of file InterpStack.h.