clang
19.0.0git
|
#include "ByteCodeEmitter.h"
#include "Context.h"
#include "Floating.h"
#include "IntegralAP.h"
#include "Opcode.h"
#include "Program.h"
#include "clang/AST/ASTLambda.h"
#include "clang/AST/Attr.h"
#include "clang/AST/DeclCXX.h"
#include "clang/Basic/Builtins.h"
#include <type_traits>
#include "Opcodes.inc"
Go to the source code of this file.
Macros | |
#define | GET_LINK_IMPL |
Functions | |
static bool | isUnevaluatedBuiltin (unsigned BuiltinID) |
Unevaluated builtins don't get their arguments put on the stack automatically. More... | |
template<typename T > | |
static void | emit (Program &P, std::vector< std::byte > &Code, const T &Val, bool &Success) |
Helper to write bytecode and bail out if 32-bit offsets become invalid. More... | |
template<typename T > | |
static void | emitSerialized (std::vector< std::byte > &Code, const T &Val, bool &Success) |
Emits a serializable value. More... | |
template<> | |
void | emit (Program &P, std::vector< std::byte > &Code, const Floating &Val, bool &Success) |
template<> | |
void | emit (Program &P, std::vector< std::byte > &Code, const IntegralAP< false > &Val, bool &Success) |
template<> | |
void | emit (Program &P, std::vector< std::byte > &Code, const IntegralAP< true > &Val, bool &Success) |
#define GET_LINK_IMPL |
Definition at line 331 of file ByteCodeEmitter.cpp.
void emit | ( | Program & | P, |
std::vector< std::byte > & | Code, | ||
const Floating & | Val, | ||
bool & | Success | ||
) |
Definition at line 279 of file ByteCodeEmitter.cpp.
References emitSerialized().
void emit | ( | Program & | P, |
std::vector< std::byte > & | Code, | ||
const IntegralAP< false > & | Val, | ||
bool & | Success | ||
) |
Definition at line 285 of file ByteCodeEmitter.cpp.
References emitSerialized().
void emit | ( | Program & | P, |
std::vector< std::byte > & | Code, | ||
const IntegralAP< true > & | Val, | ||
bool & | Success | ||
) |
Definition at line 291 of file ByteCodeEmitter.cpp.
References emitSerialized().
|
static |
Helper to write bytecode and bail out if 32-bit offsets become invalid.
Pointers will be automatically marshalled as 32-bit IDs.
Definition at line 229 of file ByteCodeEmitter.cpp.
References clang::interp::align(), clang::interp::aligned(), ID, max(), P, and clang::T.
|
static |
Emits a serializable value.
These usually (potentially) contain heap-allocated memory and aren't trivially copyable.
Definition at line 260 of file ByteCodeEmitter.cpp.
References clang::interp::align(), clang::interp::aligned(), and max().
Referenced by emit().
Unevaluated builtins don't get their arguments put on the stack automatically.
They instead operate on the AST of their Call Expression. Similar information is available via ASTContext::BuiltinInfo, but that is not correct for our use cases.
Definition at line 29 of file ByteCodeEmitter.cpp.
Referenced by clang::interp::ByteCodeEmitter::compileFunc().