clang 18.0.0git
|
Classes | |
class | ArrayIndexScope |
class | AutoScope |
Like a regular LocalScope, except that the destructors of all local variables are automatically emitted when the AutoScope is destroyed. More... | |
class | Block |
A memory block, either on the stack or in the heap. More... | |
class | BlockScope |
Scope for storage declared in a compound statement. More... | |
class | Boolean |
Wrapper around boolean types. More... | |
class | ByteCodeEmitter |
An emitter which links the program to bytecode for later use. More... | |
class | ByteCodeExprGen |
Compilation context for expressions. More... | |
struct | ByteCodeGenError |
Error thrown by the compiler. More... | |
class | ByteCodeStmtGen |
Compilation context for statements. More... | |
class | CodePtr |
Pointer into the code segment. More... | |
class | Context |
Holds all information required to evaluate constexpr code in a module. More... | |
class | DeadBlock |
Descriptor for a dead block. More... | |
class | DeclScope |
Scope used to handle temporaries in toplevel variable declarations. More... | |
struct | Descriptor |
Describes a memory block created by an allocation site. More... | |
class | DestructorScope |
Emits the destructors of the variables of. More... | |
class | EvalEmitter |
An emitter which evaluates opcodes as they are emitted. More... | |
class | ExprScope |
Expression scope which tracks potentially lifetime extended temporaries which are hoisted to the parent scope on exit. More... | |
class | Floating |
class | Frame |
Base class for stack frames, shared between VM and walker. More... | |
class | Function |
Bytecode function. More... | |
class | FunctionPointer |
struct | InitMap |
Bitfield tracking the initialisation status of elements of primitive arrays. More... | |
struct | InlineDescriptor |
Inline descriptor embedded in structures and arrays. More... | |
class | Integral |
Wrapper around numeric types. More... | |
class | IntegralAP |
class | InterpFrame |
Frame storing local variables. More... | |
class | InterpStack |
Stack frame storing temporaries and parameters. More... | |
class | InterpState |
Interpreter context. More... | |
class | LabelScope |
Scope managing label targets. More... | |
class | LocalScope |
Generic scope for local variables. More... | |
class | LoopScope |
Sets the context for break/continue statements. More... | |
class | OptionScope |
Scope used to handle initialization methods. More... | |
struct | ParamOffset |
class | Pointer |
A pointer to a memory block, live or dead. More... | |
struct | PrimConv |
Mapping from primitive types to their representation. More... | |
struct | PrimConv< PT_Bool > |
struct | PrimConv< PT_Float > |
struct | PrimConv< PT_FnPtr > |
struct | PrimConv< PT_IntAP > |
struct | PrimConv< PT_IntAPS > |
struct | PrimConv< PT_Ptr > |
struct | PrimConv< PT_Sint16 > |
struct | PrimConv< PT_Sint32 > |
struct | PrimConv< PT_Sint64 > |
struct | PrimConv< PT_Sint8 > |
struct | PrimConv< PT_Uint16 > |
struct | PrimConv< PT_Uint32 > |
struct | PrimConv< PT_Uint64 > |
struct | PrimConv< PT_Uint8 > |
class | Program |
The program contains and links the bytecode for all functions. More... | |
class | Record |
Structure/Class descriptor. More... | |
class | RecordScope |
struct | Repr |
struct | Repr< 16, false > |
struct | Repr< 16, true > |
struct | Repr< 32, false > |
struct | Repr< 32, true > |
struct | Repr< 64, false > |
struct | Repr< 64, true > |
struct | Repr< 8, false > |
struct | Repr< 8, true > |
class | Scope |
Describes a scope block. More... | |
class | SourceInfo |
Describes the statement/declaration an opcode was generated from. More... | |
class | SourceLocScope |
class | SourceMapper |
Interface for classes which map locations to sources. More... | |
class | State |
Interface for the VM to interact with the AST walker's context. More... | |
class | SwitchScope |
class | VariableScope |
Scope chain managing the variable lifetimes. More... | |
Typedefs | |
using | DeclTy = llvm::PointerUnion< const Decl *, const Expr * > |
using | BlockCtorFn = void(*)(Block *Storage, std::byte *FieldPtr, bool IsConst, bool IsMutable, bool IsActive, const Descriptor *FieldDesc) |
Invoked whenever a block is created. | |
using | BlockDtorFn = void(*)(Block *Storage, std::byte *FieldPtr, const Descriptor *FieldDesc) |
Invoked when a block is destroyed. | |
using | BlockMoveFn = void(*)(Block *Storage, const std::byte *SrcFieldPtr, std::byte *DstFieldPtr, const Descriptor *FieldDesc) |
Invoked when a block with pointers referencing it goes out of scope. | |
using | APFloat = llvm::APFloat |
using | APSInt = llvm::APSInt |
using | APInt = llvm::APInt |
using | CompareFn = llvm::function_ref< bool(ComparisonCategoryResult)> |
using | SourceMap = std::vector< std::pair< unsigned, SourceInfo > > |
Enumerations | |
enum class | ArithOp { Add , Sub } |
enum class | PushVal : bool { No , Yes } |
enum class | IncDecOp { Inc , Dec } |
enum | Opcode : uint32_t |
enum | PrimType : unsigned { PT_Sint8 , PT_Uint8 , PT_Sint16 , PT_Uint16 , PT_Sint32 , PT_Uint32 , PT_Sint64 , PT_Uint64 , PT_IntAP , PT_IntAPS , PT_Bool , PT_Float , PT_Ptr , PT_FnPtr } |
Enumeration of the primitive types of the VM. More... | |
enum class | CastKind : uint8_t { Reinterpret } |
Functions | |
llvm::raw_ostream & | operator<< (llvm::raw_ostream &OS, const Boolean &B) |
llvm::raw_ostream & | operator<< (llvm::raw_ostream &OS, Floating F) |
Floating | getSwappedBytes (Floating F) |
llvm::raw_ostream & | operator<< (llvm::raw_ostream &OS, FunctionPointer FP) |
template<unsigned Bits, bool Signed> | |
llvm::raw_ostream & | operator<< (llvm::raw_ostream &OS, Integral< Bits, Signed > I) |
template<bool Signed> | |
llvm::raw_ostream & | operator<< (llvm::raw_ostream &OS, IntegralAP< Signed > I) |
bool | popBuiltinArgs (InterpState &S, CodePtr OpPC) |
Pop arguments of builtins defined as func-name(...). | |
bool | CheckExtern (InterpState &S, CodePtr OpPC, const Pointer &Ptr) |
Checks if the variable has externally defined storage. | |
bool | CheckArray (InterpState &S, CodePtr OpPC, const Pointer &Ptr) |
Checks if the array is offsetable. | |
bool | CheckLive (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK) |
Checks if a pointer is live and accessible. | |
bool | CheckNull (InterpState &S, CodePtr OpPC, const Pointer &Ptr, CheckSubobjectKind CSK) |
Checks if a pointer is null. | |
bool | CheckRange (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK) |
Checks if a pointer is in range. | |
bool | CheckRange (InterpState &S, CodePtr OpPC, const Pointer &Ptr, CheckSubobjectKind CSK) |
Checks if a field from which a pointer is going to be derived is valid. | |
bool | CheckSubobject (InterpState &S, CodePtr OpPC, const Pointer &Ptr, CheckSubobjectKind CSK) |
Checks if Ptr is a one-past-the-end pointer. | |
bool | CheckConst (InterpState &S, CodePtr OpPC, const Pointer &Ptr) |
Checks if a pointer points to const storage. | |
bool | CheckMutable (InterpState &S, CodePtr OpPC, const Pointer &Ptr) |
Checks if a pointer points to a mutable field. | |
bool | CheckInitialized (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK) |
bool | CheckLoad (InterpState &S, CodePtr OpPC, const Pointer &Ptr) |
Checks if a value can be loaded from a block. | |
bool | CheckStore (InterpState &S, CodePtr OpPC, const Pointer &Ptr) |
Checks if a value can be stored in a block. | |
bool | CheckInvoke (InterpState &S, CodePtr OpPC, const Pointer &Ptr) |
Checks if a method can be invoked on an object. | |
bool | CheckInit (InterpState &S, CodePtr OpPC, const Pointer &Ptr) |
Checks if a value can be initialized. | |
bool | CheckCallable (InterpState &S, CodePtr OpPC, const Function *F) |
Checks if a method can be called. | |
bool | CheckCallDepth (InterpState &S, CodePtr OpPC) |
Checks if calling the currently active function would exceed the allowed call depth. | |
bool | CheckThis (InterpState &S, CodePtr OpPC, const Pointer &This) |
Checks the 'this' pointer. | |
bool | CheckPure (InterpState &S, CodePtr OpPC, const CXXMethodDecl *MD) |
Checks if a method is pure virtual. | |
static void | DiagnoseUninitializedSubobject (InterpState &S, const SourceInfo &SI, const FieldDecl *SubObjDecl) |
static bool | CheckFieldsInitialized (InterpState &S, CodePtr OpPC, const Pointer &BasePtr, const Record *R) |
static bool | CheckArrayInitialized (InterpState &S, CodePtr OpPC, const Pointer &BasePtr, const ConstantArrayType *CAT) |
bool | CheckCtorCall (InterpState &S, CodePtr OpPC, const Pointer &This) |
Checks that all fields are initialized after a constructor call. | |
bool | CheckPotentialReinterpretCast (InterpState &S, CodePtr OpPC, const Pointer &Ptr) |
Checks if reinterpret casts are legal in the current context. | |
bool | CheckFloatResult (InterpState &S, CodePtr OpPC, const Floating &Result, APFloat::opStatus Status) |
Checks if the result of a floating-point operation is valid in the current context. | |
bool | CheckDeclRef (InterpState &S, CodePtr OpPC, const DeclRefExpr *DR) |
We aleady know the given DeclRefExpr is invalid for some reason, now figure out why and print appropriate diagnostics. | |
bool | Interpret (InterpState &S, APValue &Result) |
Interpreter entry point. | |
template<typename T > | |
bool | ReturnValue (const T &V, APValue &R) |
Convert a value to an APValue. | |
bool | SetThreeWayComparisonField (InterpState &S, CodePtr OpPC, const Pointer &Ptr, const APSInt &IntValue) |
Sets the given integral value to the pointer, which is of a std::{weak,partial,strong}_ordering type. | |
template<typename LT , typename RT > | |
bool | CheckShift (InterpState &S, CodePtr OpPC, const LT &LHS, const RT &RHS, unsigned Bits) |
Checks if the shift operation is legal. | |
template<typename T > | |
bool | CheckDivRem (InterpState &S, CodePtr OpPC, const T &LHS, const T &RHS) |
Checks if Div/Rem operation on LHS and RHS is valid. | |
bool | InterpretBuiltin (InterpState &S, CodePtr OpPC, const Function *F, const CallExpr *Call) |
Interpret a builtin function. | |
bool | InterpretOffsetOf (InterpState &S, CodePtr OpPC, const OffsetOfExpr *E, llvm::ArrayRef< int64_t > ArrayIndices, int64_t &Result) |
Interpret an offsetof operation. | |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | Ret (InterpState &S, CodePtr &PC, APValue &Result) |
bool | RetVoid (InterpState &S, CodePtr &PC, APValue &Result) |
template<typename T , bool(*)(T, T, unsigned, T *) OpFW, template< typename U > class OpAP> | |
bool | AddSubMulHelper (InterpState &S, CodePtr OpPC, unsigned Bits, const T &LHS, const T &RHS) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | Add (InterpState &S, CodePtr OpPC) |
bool | Addf (InterpState &S, CodePtr OpPC, llvm::RoundingMode RM) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | Sub (InterpState &S, CodePtr OpPC) |
bool | Subf (InterpState &S, CodePtr OpPC, llvm::RoundingMode RM) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | Mul (InterpState &S, CodePtr OpPC) |
bool | Mulf (InterpState &S, CodePtr OpPC, llvm::RoundingMode RM) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | BitAnd (InterpState &S, CodePtr OpPC) |
1) Pops the RHS from the stack. | |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | BitOr (InterpState &S, CodePtr OpPC) |
1) Pops the RHS from the stack. | |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | BitXor (InterpState &S, CodePtr OpPC) |
1) Pops the RHS from the stack. | |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | Rem (InterpState &S, CodePtr OpPC) |
1) Pops the RHS from the stack. | |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | Div (InterpState &S, CodePtr OpPC) |
1) Pops the RHS from the stack. | |
bool | Divf (InterpState &S, CodePtr OpPC, llvm::RoundingMode RM) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | Inv (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | Neg (InterpState &S, CodePtr OpPC) |
template<typename T , IncDecOp Op, PushVal DoPush> | |
bool | IncDecHelper (InterpState &S, CodePtr OpPC, const Pointer &Ptr) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | Inc (InterpState &S, CodePtr OpPC) |
1) Pops a pointer from the stack 2) Load the value from the pointer 3) Writes the value increased by one back to the pointer 4) Pushes the original (pre-inc) value on the stack. | |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | IncPop (InterpState &S, CodePtr OpPC) |
1) Pops a pointer from the stack 2) Load the value from the pointer 3) Writes the value increased by one back to the pointer | |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | Dec (InterpState &S, CodePtr OpPC) |
1) Pops a pointer from the stack 2) Load the value from the pointer 3) Writes the value decreased by one back to the pointer 4) Pushes the original (pre-dec) value on the stack. | |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | DecPop (InterpState &S, CodePtr OpPC) |
1) Pops a pointer from the stack 2) Load the value from the pointer 3) Writes the value decreased by one back to the pointer | |
template<IncDecOp Op, PushVal DoPush> | |
bool | IncDecFloatHelper (InterpState &S, CodePtr OpPC, const Pointer &Ptr, llvm::RoundingMode RM) |
bool | Incf (InterpState &S, CodePtr OpPC, llvm::RoundingMode RM) |
bool | IncfPop (InterpState &S, CodePtr OpPC, llvm::RoundingMode RM) |
bool | Decf (InterpState &S, CodePtr OpPC, llvm::RoundingMode RM) |
bool | DecfPop (InterpState &S, CodePtr OpPC, llvm::RoundingMode RM) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | Comp (InterpState &S, CodePtr OpPC) |
1) Pops the value from the stack. | |
template<typename T > | |
bool | CmpHelper (InterpState &S, CodePtr OpPC, CompareFn Fn) |
template<typename T > | |
bool | CmpHelperEQ (InterpState &S, CodePtr OpPC, CompareFn Fn) |
template<> | |
bool | CmpHelper< FunctionPointer > (InterpState &S, CodePtr OpPC, CompareFn Fn) |
Function pointers cannot be compared in an ordered way. | |
template<> | |
bool | CmpHelperEQ< FunctionPointer > (InterpState &S, CodePtr OpPC, CompareFn Fn) |
template<> | |
bool | CmpHelper< Pointer > (InterpState &S, CodePtr OpPC, CompareFn Fn) |
template<> | |
bool | CmpHelperEQ< Pointer > (InterpState &S, CodePtr OpPC, CompareFn Fn) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | EQ (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | CMP3 (InterpState &S, CodePtr OpPC, const ComparisonCategoryInfo *CmpInfo) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | NE (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | LT (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | LE (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | GT (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | GE (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | InRange (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | Dup (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | Pop (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | Const (InterpState &S, CodePtr OpPC, const T &Arg) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | GetLocal (InterpState &S, CodePtr OpPC, uint32_t I) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | SetLocal (InterpState &S, CodePtr OpPC, uint32_t I) |
1) Pops the value from the stack. | |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | GetParam (InterpState &S, CodePtr OpPC, uint32_t I) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | SetParam (InterpState &S, CodePtr OpPC, uint32_t I) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | GetField (InterpState &S, CodePtr OpPC, uint32_t I) |
1) Peeks a pointer on the stack 2) Pushes the value of the pointer's field on the stack | |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | SetField (InterpState &S, CodePtr OpPC, uint32_t I) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | GetFieldPop (InterpState &S, CodePtr OpPC, uint32_t I) |
1) Pops a pointer from the stack 2) Pushes the value of the pointer's field on the stack | |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | GetThisField (InterpState &S, CodePtr OpPC, uint32_t I) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | SetThisField (InterpState &S, CodePtr OpPC, uint32_t I) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | GetGlobal (InterpState &S, CodePtr OpPC, uint32_t I) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | SetGlobal (InterpState &S, CodePtr OpPC, uint32_t I) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | InitGlobal (InterpState &S, CodePtr OpPC, uint32_t I) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | InitGlobalTemp (InterpState &S, CodePtr OpPC, uint32_t I, const LifetimeExtendedTemporaryDecl *Temp) |
1) Converts the value on top of the stack to an APValue 2) Sets that APValue on \Temp 3) Initialized global with index \I with that | |
bool | InitGlobalTempComp (InterpState &S, CodePtr OpPC, const LifetimeExtendedTemporaryDecl *Temp) |
1) Converts the value on top of the stack to an APValue 2) Sets that APValue on \Temp 3) Initialized global with index \I with that | |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | InitThisField (InterpState &S, CodePtr OpPC, uint32_t I) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | InitThisBitField (InterpState &S, CodePtr OpPC, const Record::Field *F) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | InitThisFieldActive (InterpState &S, CodePtr OpPC, uint32_t I) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | InitField (InterpState &S, CodePtr OpPC, uint32_t I) |
1) Pops the value from the stack 2) Peeks a pointer from the stack 3) Pushes the value to field I of the pointer on the stack | |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | InitBitField (InterpState &S, CodePtr OpPC, const Record::Field *F) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | InitFieldActive (InterpState &S, CodePtr OpPC, uint32_t I) |
bool | GetPtrLocal (InterpState &S, CodePtr OpPC, uint32_t I) |
bool | GetPtrParam (InterpState &S, CodePtr OpPC, uint32_t I) |
bool | GetPtrGlobal (InterpState &S, CodePtr OpPC, uint32_t I) |
bool | GetPtrField (InterpState &S, CodePtr OpPC, uint32_t Off) |
1) Pops a Pointer from the stack 2) Pushes Pointer.atField(Off) on the stack | |
bool | GetPtrThisField (InterpState &S, CodePtr OpPC, uint32_t Off) |
bool | GetPtrActiveField (InterpState &S, CodePtr OpPC, uint32_t Off) |
bool | GetPtrActiveThisField (InterpState &S, CodePtr OpPC, uint32_t Off) |
bool | GetPtrDerivedPop (InterpState &S, CodePtr OpPC, uint32_t Off) |
bool | GetPtrBase (InterpState &S, CodePtr OpPC, uint32_t Off) |
bool | GetPtrBasePop (InterpState &S, CodePtr OpPC, uint32_t Off) |
bool | GetPtrThisBase (InterpState &S, CodePtr OpPC, uint32_t Off) |
bool | VirtBaseHelper (InterpState &S, CodePtr OpPC, const RecordDecl *Decl, const Pointer &Ptr) |
bool | GetPtrVirtBase (InterpState &S, CodePtr OpPC, const RecordDecl *D) |
bool | GetPtrThisVirtBase (InterpState &S, CodePtr OpPC, const RecordDecl *D) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | Load (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | LoadPop (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | Store (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | StorePop (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | StoreBitField (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | StoreBitFieldPop (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | InitPop (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | InitElem (InterpState &S, CodePtr OpPC, uint32_t Idx) |
1) Pops the value from the stack 2) Peeks a pointer and gets its index \Idx 3) Sets the value on the pointer, leaving the pointer on the stack. | |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | InitElemPop (InterpState &S, CodePtr OpPC, uint32_t Idx) |
The same as InitElem, but pops the pointer as well. | |
template<class T , ArithOp Op> | |
bool | OffsetHelper (InterpState &S, CodePtr OpPC, const T &Offset, const Pointer &Ptr) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | AddOffset (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | SubOffset (InterpState &S, CodePtr OpPC) |
template<ArithOp Op> | |
static bool | IncDecPtrHelper (InterpState &S, CodePtr OpPC, const Pointer &Ptr) |
static bool | IncPtr (InterpState &S, CodePtr OpPC) |
static bool | DecPtr (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | SubPtr (InterpState &S, CodePtr OpPC) |
1) Pops a Pointer from the stack. | |
bool | Destroy (InterpState &S, CodePtr OpPC, uint32_t I) |
template<PrimType TIn, PrimType TOut> | |
bool | Cast (InterpState &S, CodePtr OpPC) |
bool | CastFP (InterpState &S, CodePtr OpPC, const llvm::fltSemantics *Sem, llvm::RoundingMode RM) |
1) Pops a Floating from the stack. | |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | CastIntegralFloating (InterpState &S, CodePtr OpPC, const llvm::fltSemantics *Sem, llvm::RoundingMode RM) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | CastFloatingIntegral (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | CastPointerIntegral (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | Zero (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | Null (InterpState &S, CodePtr OpPC) |
bool | This (InterpState &S, CodePtr OpPC) |
bool | RVOPtr (InterpState &S, CodePtr OpPC) |
template<PrimType NameL, PrimType NameR> | |
bool | Shr (InterpState &S, CodePtr OpPC) |
template<PrimType NameL, PrimType NameR> | |
bool | Shl (InterpState &S, CodePtr OpPC) |
bool | NoRet (InterpState &S, CodePtr OpPC) |
bool | NarrowPtr (InterpState &S, CodePtr OpPC) |
bool | ExpandPtr (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | ArrayElemPtr (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | ArrayElemPtrPop (InterpState &S, CodePtr OpPC) |
bool | CheckGlobalCtor (InterpState &S, CodePtr OpPC) |
bool | Call (InterpState &S, CodePtr OpPC, const Function *Func) |
bool | CallVirt (InterpState &S, CodePtr OpPC, const Function *Func) |
bool | CallBI (InterpState &S, CodePtr &PC, const Function *Func, const CallExpr *CE) |
bool | CallPtr (InterpState &S, CodePtr OpPC) |
bool | GetFnPtr (InterpState &S, CodePtr OpPC, const Function *Func) |
bool | Invalid (InterpState &S, CodePtr OpPC) |
Just emit a diagnostic. | |
bool | InvalidCast (InterpState &S, CodePtr OpPC, CastKind Kind) |
Same here, but only for casts. | |
bool | InvalidDeclRef (InterpState &S, CodePtr OpPC, const DeclRefExpr *DR) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | OffsetOf (InterpState &S, CodePtr OpPC, const OffsetOfExpr *E) |
template<typename T > | |
T | ReadArg (InterpState &S, CodePtr &OpPC) |
template<> | |
Floating | ReadArg< Floating > (InterpState &S, CodePtr &OpPC) |
template<typename T > | |
static T | getParam (const InterpFrame *Frame, unsigned Index) |
PrimType | getIntPrimType (const InterpState &S) |
static APSInt | peekToAPSInt (InterpStack &Stk, PrimType T, size_t Offset=0) |
Peek an integer value from the stack into an APSInt. | |
static void | pushInt (InterpState &S, int32_t Val) |
Pushes Val to the stack, as a target-dependent 'int'. | |
static bool | retInt (InterpState &S, CodePtr OpPC, APValue &Result) |
static void | pushSizeT (InterpState &S, uint64_t Val) |
static bool | retSizeT (InterpState &S, CodePtr OpPC, APValue &Result) |
static bool | interp__builtin_strcmp (InterpState &S, CodePtr OpPC, const InterpFrame *Frame) |
static bool | interp__builtin_strlen (InterpState &S, CodePtr OpPC, const InterpFrame *Frame) |
static bool | interp__builtin_nan (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F, bool Signaling) |
static bool | interp__builtin_inf (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F) |
static bool | interp__builtin_copysign (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F) |
static bool | interp__builtin_fmin (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F) |
static bool | interp__builtin_fmax (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func) |
static bool | interp__builtin_isnan (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F) |
Defined as __builtin_isnan(...), to accommodate the fact that it can take a float, double, long double, etc. | |
static bool | interp__builtin_isinf (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F, bool CheckSign) |
static bool | interp__builtin_isfinite (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F) |
static bool | interp__builtin_isnormal (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F) |
static bool | interp__builtin_isfpclass (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call) |
First parameter to __builtin_isfpclass is the floating value, the second one is an integral value. | |
static bool | interp__builtin_fpclassify (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func) |
Five int values followed by one floating value. | |
static bool | interp__builtin_fabs (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func) |
llvm::raw_ostream & | operator<< (llvm::raw_ostream &OS, const Pointer &P) |
template<typename T > | |
ComparisonCategoryResult | Compare (const T &X, const T &Y) |
Helper to compare two comparable types. | |
size_t | primSize (PrimType Type) |
Returns the size of a primitive type in bytes. | |
llvm::raw_ostream & | operator<< (llvm::raw_ostream &OS, interp::CastKind CK) |
constexpr bool | isIntegralType (PrimType T) |
constexpr size_t | align (size_t Size) |
Aligns a size to the pointer alignment. | |
constexpr bool | aligned (uintptr_t Value) |
static bool | aligned (const void *P) |
using clang::interp::APFloat = typedef llvm::APFloat |
Definition at line 23 of file Floating.h.
typedef llvm::APInt clang::interp::APInt |
Definition at line 29 of file Integral.h.
typedef llvm::APSInt clang::interp::APSInt |
Definition at line 24 of file Floating.h.
using clang::interp::BlockCtorFn = typedef void (*)(Block *Storage, std::byte *FieldPtr, bool IsConst, bool IsMutable, bool IsActive, const Descriptor *FieldDesc) |
Invoked whenever a block is created.
The constructor method fills in the inline descriptors of all fields and array elements. It also initializes all the fields which contain non-trivial types.
Definition at line 31 of file Descriptor.h.
using clang::interp::BlockDtorFn = typedef void (*)(Block *Storage, std::byte *FieldPtr, const Descriptor *FieldDesc) |
Invoked when a block is destroyed.
Invokes the destructors of all non-trivial nested fields of arrays and records.
Definition at line 37 of file Descriptor.h.
using clang::interp::BlockMoveFn = typedef void (*)(Block *Storage, const std::byte *SrcFieldPtr, std::byte *DstFieldPtr, const Descriptor *FieldDesc) |
Invoked when a block with pointers referencing it goes out of scope.
Such blocks are persisted: the move function copies all inline descriptors and non-trivial fields, as existing pointers might need to reference those descriptors. Data is not copied since it cannot be legally read.
Definition at line 44 of file Descriptor.h.
using clang::interp::CompareFn = typedef llvm::function_ref<bool(ComparisonCategoryResult)> |
using clang::interp::DeclTy = typedef llvm::PointerUnion<const Decl *, const Expr *> |
Definition at line 26 of file Descriptor.h.
using clang::interp::SourceMap = typedef std::vector<std::pair<unsigned, SourceInfo> > |
|
strong |
|
strong |
Enumerator | |
---|---|
Reinterpret |
Definition at line 49 of file PrimType.h.
|
strong |
enum clang::interp::Opcode : uint32_t |
enum clang::interp::PrimType : unsigned |
Enumeration of the primitive types of the VM.
Enumerator | |
---|---|
PT_Sint8 | |
PT_Uint8 | |
PT_Sint16 | |
PT_Uint16 | |
PT_Sint32 | |
PT_Uint32 | |
PT_Sint64 | |
PT_Uint64 | |
PT_IntAP | |
PT_IntAPS | |
PT_Bool | |
PT_Float | |
PT_Ptr | |
PT_FnPtr |
Definition at line 32 of file PrimType.h.
|
strong |
bool clang::interp::Add | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
|
inline |
Definition at line 313 of file Interp.h.
References clang::interp::Floating::add(), CheckFloatResult(), and clang::Result.
bool clang::interp::AddOffset | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
bool clang::interp::AddSubMulHelper | ( | InterpState & | S, |
CodePtr | OpPC, | ||
unsigned | Bits, | ||
const T & | LHS, | ||
const T & | RHS | ||
) |
Definition at line 270 of file Interp.h.
References clang::Expr::getExprLoc(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Result, and toString().
Aligns a size to the pointer alignment.
Definition at line 91 of file PrimType.h.
Referenced by aligned(), clang::interp::InitMap::allocate(), clang::interp::ByteCodeEmitter::compileFunc(), clang::interp::ByteCodeEmitter::createLocal(), clang::interp::InterpFrame::describe(), clang::interp::InterpStack::dump(), emit(), clang::interp::ByteCodeEmitter::emitLabel(), clang::interp::Program::getOrCreateRecord(), interp__builtin_fpclassify(), interp__builtin_isfpclass(), peekToAPSInt(), clang::interp::CodePtr::read(), ReadArg< Floating >(), and ReadArg< Floating >().
|
inlinestatic |
Definition at line 98 of file PrimType.h.
Definition at line 95 of file PrimType.h.
References align().
Referenced by aligned(), emit(), clang::interp::ByteCodeEmitter::emitLabel(), clang::interp::InterpStack::peek(), and clang::interp::CodePtr::read().
|
inline |
Definition at line 1733 of file Interp.h.
References NarrowPtr().
|
inline |
Definition at line 1744 of file Interp.h.
References NarrowPtr().
bool clang::interp::BitAnd | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
1) Pops the RHS from the stack.
2) Pops the LHS from the stack. 3) Pushes 'LHS & RHS' on the stack
Definition at line 362 of file Interp.h.
References clang::Result.
bool clang::interp::BitOr | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
1) Pops the RHS from the stack.
2) Pops the LHS from the stack. 3) Pushes 'LHS | RHS' on the stack
Definition at line 379 of file Interp.h.
References clang::Result.
bool clang::interp::BitXor | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
1) Pops the RHS from the stack.
2) Pops the LHS from the stack. 3) Pushes 'LHS ^ RHS' on the stack
Definition at line 396 of file Interp.h.
References clang::Result.
|
inline |
Definition at line 1759 of file Interp.h.
References Call(), CheckCallable(), CheckCallDepth(), CheckInvoke(), clang::interp::Function::getArgSize(), clang::interp::Function::hasRVO(), clang::interp::Function::hasThisPointer(), Interpret(), clang::interp::Function::isLambdaCallOperator(), primSize(), and PT_Ptr.
Referenced by Call(), CallPtr(), CallVirt(), interp__builtin_isfpclass(), and InterpretBuiltin().
|
inline |
Definition at line 1845 of file Interp.h.
References InterpretBuiltin().
|
inline |
Definition at line 1860 of file Interp.h.
References Call(), CallVirt(), and clang::interp::FunctionPointer::getFunction().
|
inline |
Definition at line 1807 of file Interp.h.
References Call(), clang::interp::Function::getArgSize(), clang::Type::getAsCXXRecordDecl(), clang::interp::Function::getDecl(), clang::interp::Pointer::getDeclDesc(), clang::interp::Pointer::getDeclPtr(), clang::interp::Pointer::getFieldDesc(), clang::interp::Function::getParentDecl(), clang::Stmt::getSourceRange(), clang::interp::Descriptor::getType(), clang::interp::Function::hasRVO(), clang::interp::Function::hasThisPointer(), clang::CXXRecordDecl::isDerivedFrom(), clang::CXXMethodDecl::isVirtual(), clang::interp::Function::isVirtual(), primSize(), and PT_Ptr.
Referenced by CallPtr().
bool clang::interp::Cast | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
bool clang::interp::CastFloatingIntegral | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
Definition at line 1579 of file Interp.h.
References CheckFloatResult(), clang::interp::Floating::convertToInteger(), clang::interp::Floating::getAPFloat(), clang::Expr::getType(), clang::interp::Floating::isFinite(), clang::interp::Floating::isNonZero(), and clang::Result.
|
inline |
1) Pops a Floating from the stack.
2) Pushes a new floating on the stack that uses the given semantics.
Definition at line 1556 of file Interp.h.
References clang::Result, and clang::interp::Floating::toSemantics().
bool clang::interp::CastIntegralFloating | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const llvm::fltSemantics * | Sem, | ||
llvm::RoundingMode | RM | ||
) |
Definition at line 1565 of file Interp.h.
References CheckFloatResult(), clang::interp::Floating::fromIntegral(), and clang::Result.
bool clang::interp::CastPointerIntegral | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
Definition at line 1605 of file Interp.h.
References CheckPotentialReinterpretCast(), and clang::interp::Pointer::getIntegerRepresentation().
bool clang::interp::CheckArray | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Pointer & | Ptr | ||
) |
Checks if the array is offsetable.
Definition at line 151 of file Interp.cpp.
References clang::interp::Pointer::isUnknownSizeArray().
Referenced by interp__builtin_strlen(), and OffsetHelper().
|
static |
Definition at line 415 of file Interp.cpp.
References clang::interp::Pointer::atIndex(), CheckArrayInitialized(), CheckFieldsInitialized(), DiagnoseUninitializedSubobject(), clang::ArrayType::getElementType(), clang::interp::Pointer::getElemRecord(), clang::interp::Pointer::getField(), clang::ConstantArrayType::getSize(), clang::interp::Pointer::isInitialized(), clang::Type::isRecordType(), clang::interp::Pointer::narrow(), and clang::Result.
Referenced by CheckArrayInitialized(), CheckCtorCall(), and CheckFieldsInitialized().
bool clang::interp::CheckCallable | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Function * | F | ||
) |
Checks if a method can be called.
Definition at line 320 of file Interp.cpp.
References bool, clang::interp::Function::getDecl(), clang::Sema::getLangOpts(), clang::Decl::getLocation(), clang::FunctionDecl::isConstexpr(), clang::interp::Function::isConstexpr(), and clang::interp::Function::isVirtual().
Referenced by Call().
bool clang::interp::CheckCallDepth | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
Checks if calling the currently active function would exceed the allowed call depth.
Definition at line 366 of file Interp.cpp.
References clang::Sema::getLangOpts().
Referenced by Call().
bool clang::interp::CheckConst | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Pointer & | Ptr | ||
) |
Checks if a pointer points to const storage.
Definition at line 226 of file Interp.cpp.
References clang::interp::Pointer::block(), clang::interp::Pointer::getType(), clang::interp::Pointer::isConst(), and clang::interp::Pointer::isLive().
Referenced by CheckStore().
bool clang::interp::CheckCtorCall | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Pointer & | This | ||
) |
Checks that all fields are initialized after a constructor call.
Definition at line 478 of file Interp.cpp.
References CheckArrayInitialized(), CheckFieldsInitialized(), and This().
Referenced by CheckGlobalCtor().
bool clang::interp::CheckDeclRef | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const DeclRefExpr * | DR | ||
) |
We aleady know the given DeclRefExpr is invalid for some reason, now figure out why and print appropriate diagnostics.
Checks why the given DeclRefExpr is invalid.
Definition at line 547 of file Interp.cpp.
References clang::DeclRefExpr::getDecl(), clang::Decl::getLocation(), and clang::Decl::getSourceRange().
Referenced by InvalidDeclRef().
bool clang::interp::CheckDivRem | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const T & | LHS, | ||
const T & | RHS | ||
) |
Checks if Div/Rem operation on LHS and RHS is valid.
Definition at line 158 of file Interp.h.
References clang::Expr::getType(), and toString().
bool clang::interp::CheckExtern | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Pointer & | Ptr | ||
) |
Checks if the variable has externally defined storage.
Definition at line 138 of file Interp.cpp.
References clang::interp::Descriptor::asValueDecl(), clang::interp::Pointer::getDeclDesc(), and clang::interp::Pointer::isExtern().
Referenced by CheckInvoke(), CheckLoad(), CheckStore(), and GetPtrField().
|
static |
Definition at line 446 of file Interp.cpp.
References clang::interp::Pointer::atField(), clang::interp::Record::bases(), CheckArrayInitialized(), CheckFieldsInitialized(), DiagnoseUninitializedSubobject(), clang::interp::Record::fields(), clang::Type::getAsArrayTypeUnsafe(), clang::interp::Pointer::getRecord(), clang::Type::isArrayType(), clang::interp::Pointer::isInitialized(), clang::Type::isRecordType(), P, and clang::Result.
Referenced by CheckArrayInitialized(), CheckCtorCall(), and CheckFieldsInitialized().
bool clang::interp::CheckFloatResult | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Floating & | Result, | ||
APFloat::opStatus | Status | ||
) |
Checks if the result of a floating-point operation is valid in the current context.
Definition at line 498 of file Interp.cpp.
References clang::interp::SourceInfo::asExpr(), clang::LangOptions::FPE_Ignore, clang::FPOptions::getExceptionMode(), clang::Expr::getFPFeaturesInEffect(), clang::Sema::getLangOpts(), clang::FPOptions::getRoundingMode(), and clang::Result.
Referenced by Addf(), CastFloatingIntegral(), CastIntegralFloating(), Divf(), IncDecFloatHelper(), Mulf(), and Subf().
|
inline |
Definition at line 1754 of file Interp.h.
References CheckCtorCall().
bool clang::interp::CheckInit | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Pointer & | Ptr | ||
) |
Checks if a value can be initialized.
Definition at line 312 of file Interp.cpp.
References clang::AK_Assign, CheckLive(), and CheckRange().
Referenced by InitElem(), InitElemPop(), and InitPop().
bool clang::interp::CheckInitialized | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Pointer & | Ptr, | ||
AccessKinds | AK | ||
) |
Definition at line 258 of file Interp.cpp.
References clang::interp::Pointer::isInitialized().
Referenced by CheckLoad(), Dec(), Decf(), DecfPop(), DecPop(), DecPtr(), Inc(), Incf(), IncfPop(), IncPop(), and IncPtr().
bool clang::interp::CheckInvoke | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Pointer & | Ptr | ||
) |
Checks if a method can be invoked on an object.
Definition at line 302 of file Interp.cpp.
References clang::AK_MemberCall, CheckExtern(), CheckLive(), and CheckRange().
Referenced by Call().
bool clang::interp::CheckLive | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Pointer & | Ptr, | ||
AccessKinds | AK | ||
) |
Checks if a pointer is live and accessible.
Definition at line 159 of file Interp.cpp.
References clang::CSK_Field, clang::interp::Pointer::getDeclLoc(), clang::interp::Pointer::isField(), clang::interp::Pointer::isLive(), clang::interp::Pointer::isTemporary(), and clang::interp::Pointer::isZero().
Referenced by CheckInit(), CheckInvoke(), CheckLoad(), CheckStore(), interp__builtin_strcmp(), and interp__builtin_strlen().
bool clang::interp::CheckLoad | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Pointer & | Ptr | ||
) |
Checks if a value can be loaded from a block.
Definition at line 270 of file Interp.cpp.
References clang::AK_Read, CheckActive(), CheckExtern(), CheckInitialized(), CheckLive(), CheckMutable(), CheckRange(), and CheckTemporary().
Referenced by GetField(), GetFieldPop(), GetLocal(), GetThisField(), interp__builtin_nan(), Load(), and LoadPop().
bool clang::interp::CheckMutable | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Pointer & | Ptr | ||
) |
Checks if a pointer points to a mutable field.
Definition at line 245 of file Interp.cpp.
References clang::AK_Read, clang::interp::Pointer::getField(), clang::interp::Pointer::isLive(), and clang::interp::Pointer::isMutable().
Referenced by CheckLoad().
bool clang::interp::CheckNull | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Pointer & | Ptr, | ||
CheckSubobjectKind | CSK | ||
) |
Checks if a pointer is null.
Definition at line 189 of file Interp.cpp.
References clang::interp::Pointer::isZero().
Referenced by GetField(), GetFieldPop(), GetPtrActiveField(), GetPtrBase(), GetPtrBasePop(), GetPtrDerivedPop(), GetPtrField(), GetPtrVirtBase(), OffsetHelper(), and SetField().
bool clang::interp::CheckPotentialReinterpretCast | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Pointer & | Ptr | ||
) |
Checks if reinterpret casts are legal in the current context.
Definition at line 487 of file Interp.cpp.
References clang::Sema::getLangOpts().
Referenced by CastPointerIntegral().
bool clang::interp::CheckPure | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const CXXMethodDecl * | MD | ||
) |
Checks if a method is pure virtual.
Definition at line 395 of file Interp.cpp.
References clang::Decl::getLocation(), and clang::FunctionDecl::isPure().
bool clang::interp::CheckRange | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Pointer & | Ptr, | ||
AccessKinds | AK | ||
) |
Checks if a pointer is in range.
Definition at line 198 of file Interp.cpp.
References clang::interp::Pointer::isOnePastEnd().
Referenced by CheckInit(), CheckInvoke(), CheckLoad(), CheckStore(), GetField(), GetFieldPop(), GetPtrActiveField(), GetPtrField(), interp__builtin_strcmp(), interp__builtin_strlen(), OffsetHelper(), and SetField().
bool clang::interp::CheckRange | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Pointer & | Ptr, | ||
CheckSubobjectKind | CSK | ||
) |
Checks if a field from which a pointer is going to be derived is valid.
Definition at line 207 of file Interp.cpp.
References clang::interp::Pointer::isElementPastEnd().
bool clang::interp::CheckShift | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const LT & | LHS, | ||
const RT & | RHS, | ||
unsigned | Bits | ||
) |
Checks if the shift operation is legal.
Definition at line 122 of file Interp.h.
References clang::Expr::getType().
bool clang::interp::CheckStore | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Pointer & | Ptr | ||
) |
Checks if a value can be stored in a block.
Definition at line 288 of file Interp.cpp.
References clang::AK_Assign, CheckConst(), CheckExtern(), CheckGlobal(), CheckLive(), and CheckRange().
Referenced by SetField(), SetThisField(), Store(), StoreBitField(), StoreBitFieldPop(), and StorePop().
bool clang::interp::CheckSubobject | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Pointer & | Ptr, | ||
CheckSubobjectKind | CSK | ||
) |
Checks if Ptr is a one-past-the-end pointer.
Definition at line 216 of file Interp.cpp.
References clang::interp::Pointer::isOnePastEnd().
Referenced by GetPtrBase(), GetPtrBasePop(), GetPtrDerivedPop(), and GetPtrField().
bool clang::interp::CheckThis | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Pointer & | This | ||
) |
Checks the 'this' pointer.
Definition at line 377 of file Interp.cpp.
References clang::interp::SourceInfo::asExpr(), clang::Sema::getLangOpts(), and This().
Referenced by GetPtrActiveThisField(), GetPtrThisBase(), GetPtrThisField(), GetPtrThisVirtBase(), GetThisField(), InitThisBitField(), InitThisField(), InitThisFieldActive(), SetThisField(), and This().
bool clang::interp::CMP3 | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const ComparisonCategoryInfo * | CmpInfo | ||
) |
Definition at line 794 of file Interp.h.
References clang::interp::Pointer::compare(), clang::ComparisonCategoryInfo::getValueInfo(), P, SetThreeWayComparisonField(), and clang::Unordered.
bool clang::interp::CmpHelper | ( | InterpState & | S, |
CodePtr | OpPC, | ||
CompareFn | Fn | ||
) |
|
inline |
Function pointers cannot be compared in an ordered way.
Definition at line 713 of file Interp.h.
References clang::interp::FunctionPointer::toDiagnosticString().
|
inline |
Definition at line 735 of file Interp.h.
References Compare(), clang::interp::Pointer::getByteOffset(), clang::interp::Pointer::hasSameBase(), and clang::interp::Pointer::toDiagnosticString().
bool clang::interp::CmpHelperEQ | ( | InterpState & | S, |
CodePtr | OpPC, | ||
CompareFn | Fn | ||
) |
|
inline |
Definition at line 726 of file Interp.h.
References clang::interp::FunctionPointer::compare(), and clang::interp::Boolean::from().
|
inline |
Definition at line 755 of file Interp.h.
References clang::interp::Pointer::atIndex(), Compare(), clang::Equal, clang::interp::Pointer::getByteOffset(), clang::interp::Pointer::hasSameBase(), clang::interp::Pointer::inArray(), clang::interp::Pointer::isRoot(), clang::interp::Pointer::isZero(), and clang::Unordered.
bool clang::interp::Comp | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
1) Pops the value from the stack.
2) Pushes the bitwise complemented value on the stack (~V).
Definition at line 680 of file Interp.h.
References clang::Result.
ComparisonCategoryResult clang::interp::Compare | ( | const T & | X, |
const T & | Y | ||
) |
Helper to compare two comparable types.
Definition at line 25 of file Primitives.h.
References clang::Equal, clang::Greater, clang::Less, and X.
Referenced by CmpHelper< Pointer >(), CmpHelperEQ< Pointer >(), clang::interp::Boolean::compare(), clang::interp::Integral< Bits, Signed >::compare(), and clang::interp::IntegralAP< Signed >::compare().
bool clang::interp::Const | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const T & | Arg | ||
) |
bool clang::interp::Dec | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
1) Pops a pointer from the stack 2) Load the value from the pointer 3) Writes the value decreased by one back to the pointer 4) Pushes the original (pre-dec) value on the stack.
Definition at line 599 of file Interp.h.
References clang::AK_Decrement, and CheckInitialized().
|
inline |
Definition at line 659 of file Interp.h.
References clang::AK_Decrement, and CheckInitialized().
|
inline |
Definition at line 668 of file Interp.h.
References clang::AK_Decrement, and CheckInitialized().
bool clang::interp::DecPop | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
1) Pops a pointer from the stack 2) Load the value from the pointer 3) Writes the value decreased by one back to the pointer
Definition at line 612 of file Interp.h.
References clang::AK_Decrement, and CheckInitialized().
|
inlinestatic |
Definition at line 1507 of file Interp.h.
References clang::AK_Decrement, and CheckInitialized().
|
inline |
|
static |
Definition at line 404 of file Interp.cpp.
References clang::Decl::getLocation().
Referenced by CheckArrayInitialized(), and CheckFieldsInitialized().
bool clang::interp::Div | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
1) Pops the RHS from the stack.
2) Pops the LHS from the stack. 3) Pushes 'LHS / RHS' on the stack
Definition at line 433 of file Interp.h.
References CheckDivRem(), and clang::Result.
|
inline |
Definition at line 449 of file Interp.h.
References CheckDivRem(), CheckFloatResult(), clang::interp::Floating::div(), and clang::Result.
bool clang::interp::Dup | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
bool clang::interp::EQ | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
Definition at line 787 of file Interp.h.
References clang::Equal.
|
inline |
Definition at line 1718 of file Interp.h.
References clang::interp::Pointer::expand().
bool clang::interp::GE | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
Definition at line 847 of file Interp.h.
References clang::Equal, and clang::Greater.
bool clang::interp::GetField | ( | InterpState & | S, |
CodePtr | OpPC, | ||
uint32_t | I | ||
) |
1) Peeks a pointer on the stack 2) Pushes the value of the pointer's field on the stack
Definition at line 934 of file Interp.h.
References clang::interp::Pointer::atField(), CheckLoad(), CheckNull(), CheckRange(), and clang::CSK_Field.
bool clang::interp::GetFieldPop | ( | InterpState & | S, |
CodePtr | OpPC, | ||
uint32_t | I | ||
) |
1) Pops a pointer from the stack 2) Pushes the value of the pointer's field on the stack
Definition at line 966 of file Interp.h.
References clang::interp::Pointer::atField(), CheckLoad(), CheckNull(), CheckRange(), and clang::CSK_Field.
|
inline |
bool clang::interp::GetGlobal | ( | InterpState & | S, |
CodePtr | OpPC, | ||
uint32_t | I | ||
) |
PrimType clang::interp::getIntPrimType | ( | const InterpState & | S | ) |
Definition at line 25 of file InterpBuiltin.cpp.
References clang::TargetInfo::getIntWidth(), PT_Sint16, and PT_Sint32.
Referenced by interp__builtin_fpclassify(), pushInt(), and retInt().
bool clang::interp::GetLocal | ( | InterpState & | S, |
CodePtr | OpPC, | ||
uint32_t | I | ||
) |
Definition at line 899 of file Interp.h.
References CheckLoad(), and clang::interp::Pointer::deref().
|
static |
Definition at line 19 of file InterpBuiltin.cpp.
bool clang::interp::GetParam | ( | InterpState & | S, |
CodePtr | OpPC, | ||
uint32_t | I | ||
) |
|
inline |
Definition at line 1182 of file Interp.h.
References clang::interp::Pointer::atField(), CheckNull(), CheckRange(), clang::CSK_Field, and clang::interp::Pointer::deactivate().
|
inline |
Definition at line 1195 of file Interp.h.
References CheckThis(), and This().
|
inline |
Definition at line 1218 of file Interp.h.
References clang::interp::Pointer::atField(), CheckNull(), CheckSubobject(), and clang::CSK_Base.
|
inline |
Definition at line 1228 of file Interp.h.
References clang::interp::Pointer::atField(), CheckNull(), CheckSubobject(), and clang::CSK_Base.
|
inline |
Definition at line 1208 of file Interp.h.
References clang::interp::Pointer::atFieldSub(), CheckNull(), CheckSubobject(), and clang::CSK_Derived.
|
inline |
1) Pops a Pointer from the stack 2) Pushes Pointer.atField(Off) on the stack
Definition at line 1157 of file Interp.h.
References clang::interp::Pointer::atField(), CheckExtern(), CheckNull(), CheckRange(), CheckSubobject(), and clang::CSK_Field.
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 1238 of file Interp.h.
References CheckThis(), and This().
|
inline |
Definition at line 1172 of file Interp.h.
References CheckThis(), and This().
|
inline |
Definition at line 1266 of file Interp.h.
References CheckThis(), This(), and VirtBaseHelper().
|
inline |
Definition at line 1259 of file Interp.h.
References CheckNull(), clang::CSK_Base, and VirtBaseHelper().
Definition at line 19 of file Floating.cpp.
bool clang::interp::GetThisField | ( | InterpState & | S, |
CodePtr | OpPC, | ||
uint32_t | I | ||
) |
Definition at line 980 of file Interp.h.
References CheckLoad(), CheckThis(), and This().
bool clang::interp::GT | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
Definition at line 840 of file Interp.h.
References clang::Greater.
bool clang::interp::Inc | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
1) Pops a pointer from the stack 2) Load the value from the pointer 3) Writes the value increased by one back to the pointer 4) Pushes the original (pre-inc) value on the stack.
Definition at line 572 of file Interp.h.
References clang::AK_Increment, and CheckInitialized().
bool clang::interp::IncDecFloatHelper | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Pointer & | Ptr, | ||
llvm::RoundingMode | RM | ||
) |
Definition at line 622 of file Interp.h.
References CheckFloatResult(), clang::interp::Floating::decrement(), clang::interp::Pointer::deref(), Inc, clang::interp::Floating::increment(), clang::Result, and Yes.
bool clang::interp::IncDecHelper | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Pointer & | Ptr | ||
) |
Definition at line 523 of file Interp.h.
References clang::interp::Pointer::deref(), clang::Expr::getExprLoc(), clang::Stmt::getSourceRange(), clang::Expr::getType(), Inc, clang::Result, toString(), and Yes.
|
inlinestatic |
Definition at line 1480 of file Interp.h.
References clang::interp::Pointer::deref(), and P.
|
inline |
Definition at line 641 of file Interp.h.
References clang::AK_Increment, and CheckInitialized().
|
inline |
Definition at line 650 of file Interp.h.
References clang::AK_Increment, and CheckInitialized().
bool clang::interp::IncPop | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
1) Pops a pointer from the stack 2) Load the value from the pointer 3) Writes the value increased by one back to the pointer
Definition at line 585 of file Interp.h.
References clang::AK_Increment, and CheckInitialized().
|
inlinestatic |
Definition at line 1498 of file Interp.h.
References clang::AK_Increment, and CheckInitialized().
bool clang::interp::InitBitField | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Record::Field * | F | ||
) |
Definition at line 1113 of file Interp.h.
References clang::interp::Record::Field::Decl, clang::FieldDecl::getBitWidthValue(), and clang::interp::Record::Field::Offset.
bool clang::interp::InitElem | ( | InterpState & | S, |
CodePtr | OpPC, | ||
uint32_t | Idx | ||
) |
1) Pops the value from the stack 2) Peeks a pointer and gets its index \Idx 3) Sets the value on the pointer, leaving the pointer on the stack.
Definition at line 1369 of file Interp.h.
References CheckInit().
bool clang::interp::InitElemPop | ( | InterpState & | S, |
CodePtr | OpPC, | ||
uint32_t | Idx | ||
) |
The same as InitElem, but pops the pointer as well.
Definition at line 1381 of file Interp.h.
References CheckInit().
bool clang::interp::InitField | ( | InterpState & | S, |
CodePtr | OpPC, | ||
uint32_t | I | ||
) |
bool clang::interp::InitFieldActive | ( | InterpState & | S, |
CodePtr | OpPC, | ||
uint32_t | I | ||
) |
bool clang::interp::InitGlobal | ( | InterpState & | S, |
CodePtr | OpPC, | ||
uint32_t | I | ||
) |
bool clang::interp::InitGlobalTemp | ( | InterpState & | S, |
CodePtr | OpPC, | ||
uint32_t | I, | ||
const LifetimeExtendedTemporaryDecl * | Temp | ||
) |
1) Converts the value on top of the stack to an APValue 2) Sets that APValue on \Temp 3) Initialized global with index \I with that
Definition at line 1033 of file Interp.h.
References clang::LifetimeExtendedTemporaryDecl::getOrCreateValue().
|
inline |
bool clang::interp::InitPop | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
Definition at line 1355 of file Interp.h.
References CheckInit(), and clang::interp::Pointer::initialize().
bool clang::interp::InitThisBitField | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Record::Field * | F | ||
) |
Definition at line 1072 of file Interp.h.
References CheckThis(), clang::interp::Record::Field::Decl, clang::FieldDecl::getBitWidthValue(), clang::interp::Record::Field::Offset, and This().
bool clang::interp::InitThisField | ( | InterpState & | S, |
CodePtr | OpPC, | ||
uint32_t | I | ||
) |
Definition at line 1059 of file Interp.h.
References CheckThis(), and This().
bool clang::interp::InitThisFieldActive | ( | InterpState & | S, |
CodePtr | OpPC, | ||
uint32_t | I | ||
) |
Definition at line 1086 of file Interp.h.
References CheckThis(), and This().
bool clang::interp::InRange | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
|
static |
Definition at line 242 of file InterpBuiltin.cpp.
References clang::Copy, and clang::interp::Floating::getAPFloat().
Referenced by InterpretBuiltin().
|
static |
Definition at line 392 of file InterpBuiltin.cpp.
References clang::interp::Floating::abs().
Referenced by InterpretBuiltin().
|
static |
Definition at line 274 of file InterpBuiltin.cpp.
References clang::interp::Floating::isNan(), clang::interp::Floating::isNegative(), clang::interp::Floating::isZero(), and clang::Result.
Referenced by InterpretBuiltin().
|
static |
Definition at line 255 of file InterpBuiltin.cpp.
References clang::interp::Floating::isNan(), clang::interp::Floating::isNegative(), clang::interp::Floating::isZero(), and clang::Result.
Referenced by InterpretBuiltin().
|
static |
Five int values followed by one floating value.
Definition at line 355 of file InterpBuiltin.cpp.
References align(), clang::interp::Floating::getCategory(), getIntPrimType(), clang::interp::Floating::isDenormal(), peekToAPSInt(), primSize(), PT_Float, and pushInt().
Referenced by InterpretBuiltin().
|
static |
Definition at line 233 of file InterpBuiltin.cpp.
References clang::interp::Function::getDecl(), clang::interp::Floating::getInf(), and clang::FunctionDecl::getReturnType().
Referenced by InterpretBuiltin().
|
static |
Definition at line 318 of file InterpBuiltin.cpp.
References clang::interp::Floating::isFinite(), and pushInt().
Referenced by InterpretBuiltin().
|
static |
First parameter to __builtin_isfpclass is the floating value, the second one is an integral value.
Definition at line 338 of file InterpBuiltin.cpp.
References align(), Call(), clang::interp::Floating::classify(), peekToAPSInt(), primSize(), PT_Float, pushInt(), and clang::Result.
Referenced by InterpretBuiltin().
|
static |
Definition at line 305 of file InterpBuiltin.cpp.
References clang::interp::Floating::isInf(), clang::interp::Floating::isNegative(), and pushInt().
Referenced by InterpretBuiltin().
|
static |
Defined as __builtin_isnan(...), to accommodate the fact that it can take a float, double, long double, etc.
But for us, that's all a Floating anyway.
Definition at line 297 of file InterpBuiltin.cpp.
References clang::interp::Floating::isNan(), and pushInt().
Referenced by InterpretBuiltin().
|
static |
Definition at line 327 of file InterpBuiltin.cpp.
References clang::interp::Floating::isNormal(), and pushInt().
Referenced by InterpretBuiltin().
|
static |
Definition at line 172 of file InterpBuiltin.cpp.
References clang::interp::Pointer::atIndex(), CheckLoad(), clang::interp::Pointer::deref(), clang::interp::Function::getDecl(), clang::interp::Pointer::getFieldDesc(), clang::interp::Pointer::getNumElems(), clang::FunctionDecl::getReturnType(), clang::interp::Descriptor::isPrimitiveArray(), and clang::Result.
Referenced by InterpretBuiltin().
|
static |
Definition at line 105 of file InterpBuiltin.cpp.
References clang::AK_Read, clang::interp::Pointer::atIndex(), CheckLive(), CheckRange(), clang::interp::Pointer::deref(), clang::interp::Pointer::getFieldDesc(), clang::interp::Pointer::getIndex(), clang::interp::Descriptor::isPrimitiveArray(), pushInt(), and clang::Result.
Referenced by InterpretBuiltin().
|
static |
Definition at line 144 of file InterpBuiltin.cpp.
References clang::AK_Read, clang::interp::Pointer::atIndex(), CheckArray(), CheckLive(), CheckRange(), clang::interp::Pointer::deref(), clang::interp::Pointer::getFieldDesc(), clang::interp::Pointer::getIndex(), clang::interp::Descriptor::isPrimitiveArray(), and pushSizeT().
Referenced by InterpretBuiltin().
bool clang::interp::Interpret | ( | InterpState & | S, |
APValue & | Result | ||
) |
Interpreter entry point.
Definition at line 577 of file Interp.cpp.
References clang::interp::CodePtr::read().
Referenced by Call().
bool clang::interp::InterpretBuiltin | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Function * | F, | ||
const CallExpr * | Call | ||
) |
Interpret a builtin function.
Definition at line 401 of file InterpBuiltin.cpp.
References Call(), clang::interp::Boolean::from(), clang::interp::Function::getBuiltinID(), interp__builtin_copysign(), interp__builtin_fabs(), interp__builtin_fmax(), interp__builtin_fmin(), interp__builtin_fpclassify(), interp__builtin_inf(), interp__builtin_isfinite(), interp__builtin_isfpclass(), interp__builtin_isinf(), interp__builtin_isnan(), interp__builtin_isnormal(), interp__builtin_nan(), interp__builtin_strcmp(), interp__builtin_strlen(), retInt(), retSizeT(), and RetVoid().
Referenced by CallBI().
bool clang::interp::InterpretOffsetOf | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const OffsetOfExpr * | E, | ||
llvm::ArrayRef< int64_t > | ArrayIndices, | ||
int64_t & | Result | ||
) |
Interpret an offsetof operation.
Definition at line 523 of file InterpBuiltin.cpp.
References clang::OffsetOfNode::Array, clang::OffsetOfNode::Base, clang::OffsetOfNode::Field, clang::Type::getAs(), clang::ASTRecordLayout::getBaseClassOffset(), clang::OffsetOfExpr::getComponent(), clang::RecordType::getDecl(), clang::ArrayType::getElementType(), clang::ASTRecordLayout::getFieldCount(), clang::FieldDecl::getFieldIndex(), clang::ASTRecordLayout::getFieldOffset(), clang::QualType::getNonReferenceType(), clang::OffsetOfExpr::getNumComponents(), clang::ValueDecl::getType(), clang::CXXBaseSpecifier::getType(), clang::TypeSourceInfo::getType(), clang::OffsetOfExpr::getTypeSourceInfo(), clang::OffsetOfNode::Identifier, clang::Decl::isInvalidDecl(), clang::CXXBaseSpecifier::isVirtual(), Node, and clang::Result.
Referenced by OffsetOf().
bool clang::interp::Inv | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
Definition at line 467 of file Interp.h.
References clang::interp::Boolean::inv().
|
inline |
|
inline |
|
inline |
Definition at line 1896 of file Interp.h.
References CheckDeclRef().
bool clang::interp::LE | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
Definition at line 832 of file Interp.h.
References clang::Equal, and clang::Less.
Referenced by clang::interp::ByteCodeExprGen< Emitter >::VisitIntegerLiteral().
bool clang::interp::Load | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
Definition at line 1281 of file Interp.h.
References CheckLoad(), and clang::interp::Pointer::deref().
bool clang::interp::LoadPop | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
Definition at line 1290 of file Interp.h.
References CheckLoad(), and clang::interp::Pointer::deref().
bool clang::interp::LT | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
Definition at line 825 of file Interp.h.
References clang::Less.
bool clang::interp::Mul | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
|
inline |
Definition at line 349 of file Interp.h.
References CheckFloatResult(), clang::interp::Floating::mul(), and clang::Result.
|
inline |
Definition at line 1712 of file Interp.h.
References clang::interp::Pointer::narrow().
Referenced by ArrayElemPtr(), and ArrayElemPtrPop().
bool clang::interp::NE | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
Definition at line 818 of file Interp.h.
References clang::Equal.
Referenced by ctorArrayTy(), dtorArrayTy(), and moveArrayTy().
bool clang::interp::Neg | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
Definition at line 483 of file Interp.h.
References clang::Expr::getExprLoc(), clang::Stmt::getSourceRange(), clang::Expr::getType(), isIntegralType(), clang::Result, and toString().
|
inline |
|
inline |
bool clang::interp::OffsetHelper | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const T & | Offset, | ||
const Pointer & | Ptr | ||
) |
Definition at line 1396 of file Interp.h.
References Add, clang::interp::Pointer::atIndex(), CheckArray(), CheckNull(), CheckRange(), clang::CSK_ArrayIndex, clang::CSK_ArrayToPointer, clang::interp::Pointer::getIndex(), clang::interp::Pointer::getNumElems(), clang::interp::Pointer::inArray(), and clang::Result.
|
inline |
Definition at line 1903 of file Interp.h.
References clang::OffsetOfExpr::getNumExpressions(), InterpretOffsetOf(), and clang::Result.
|
inline |
Definition at line 155 of file Boolean.h.
References clang::interp::Boolean::print().
|
inline |
llvm::raw_ostream & clang::interp::operator<< | ( | llvm::raw_ostream & | OS, |
Floating | F | ||
) |
Definition at line 14 of file Floating.cpp.
References clang::interp::Floating::print().
|
inline |
Definition at line 62 of file FunctionPointer.h.
References clang::interp::FunctionPointer::print().
llvm::raw_ostream & clang::interp::operator<< | ( | llvm::raw_ostream & | OS, |
Integral< Bits, Signed > | I | ||
) |
Definition at line 296 of file Integral.h.
References clang::interp::Integral< Bits, Signed >::print().
|
inline |
Definition at line 253 of file IntegralAP.h.
References clang::interp::IntegralAP< Signed >::print().
|
inline |
Definition at line 52 of file PrimType.h.
References Reinterpret.
|
static |
Peek an integer value from the stack into an APSInt.
Definition at line 37 of file InterpBuiltin.cpp.
References align(), INT_TYPE_SWITCH, clang::interp::InterpStack::peek(), and primSize().
Referenced by interp__builtin_fpclassify(), and interp__builtin_isfpclass().
bool clang::interp::Pop | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
bool clang::interp::popBuiltinArgs | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
Pop arguments of builtins defined as func-name(...).
Definition at line 125 of file Interp.cpp.
References clang::CallExpr::getArg(), clang::CallExpr::getNumArgs(), clang::Expr::getType(), PT_Ptr, and TYPE_SWITCH.
Referenced by Ret().
Returns the size of a primitive type in bytes.
Definition at line 22 of file PrimType.cpp.
References TYPE_SWITCH.
Referenced by Call(), CallVirt(), clang::interp::ByteCodeEmitter::compileFunc(), clang::interp::Program::createDescriptor(), clang::interp::InterpFrame::describe(), clang::interp::InterpStack::dump(), interp__builtin_fpclassify(), interp__builtin_isfpclass(), and peekToAPSInt().
|
static |
Pushes Val
to the stack, as a target-dependent 'int'.
Definition at line 51 of file InterpBuiltin.cpp.
References clang::interp::Integral< Bits, Signed >::from(), getIntPrimType(), PT_Sint16, and PT_Sint32.
Referenced by interp__builtin_fpclassify(), interp__builtin_isfinite(), interp__builtin_isfpclass(), interp__builtin_isinf(), interp__builtin_isnan(), interp__builtin_isnormal(), and interp__builtin_strcmp().
|
static |
Definition at line 70 of file InterpBuiltin.cpp.
References clang::interp::Integral< Bits, Signed >::from(), clang::TargetInfo::getSizeType(), and clang::TargetInfo::getTypeWidth().
Referenced by interp__builtin_strlen().
|
inline |
Definition at line 1921 of file Interp.h.
References ID, and clang::interp::CodePtr::read().
|
inline |
Definition at line 1930 of file Interp.h.
References align(), clang::interp::Floating::bytesToSerialize(), and clang::interp::Floating::deserialize().
bool clang::interp::Rem | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
1) Pops the RHS from the stack.
2) Pops the LHS from the stack. 3) Pushes 'LHS % RHS' on the stack (the remainder of dividing LHS by RHS).
Definition at line 413 of file Interp.h.
References CheckDivRem(), and clang::Result.
bool clang::interp::Ret | ( | InterpState & | S, |
CodePtr & | PC, | ||
APValue & | Result | ||
) |
Definition at line 207 of file Interp.h.
References popBuiltinArgs(), clang::Result, and Ret().
Referenced by Ret().
|
static |
Definition at line 61 of file InterpBuiltin.cpp.
References getIntPrimType(), PT_Sint16, PT_Sint32, and clang::Result.
Referenced by InterpretBuiltin().
|
static |
Definition at line 89 of file InterpBuiltin.cpp.
References clang::TargetInfo::getSizeType(), clang::TargetInfo::getTypeWidth(), and clang::Result.
Referenced by InterpretBuiltin().
|
inline |
Definition at line 248 of file Interp.h.
Referenced by InterpretBuiltin().
|
inline |
bool clang::interp::SetField | ( | InterpState & | S, |
CodePtr | OpPC, | ||
uint32_t | I | ||
) |
Definition at line 948 of file Interp.h.
References CheckNull(), CheckRange(), CheckStore(), and clang::CSK_Field.
bool clang::interp::SetGlobal | ( | InterpState & | S, |
CodePtr | OpPC, | ||
uint32_t | I | ||
) |
bool clang::interp::SetLocal | ( | InterpState & | S, |
CodePtr | OpPC, | ||
uint32_t | I | ||
) |
bool clang::interp::SetParam | ( | InterpState & | S, |
CodePtr | OpPC, | ||
uint32_t | I | ||
) |
bool clang::interp::SetThisField | ( | InterpState & | S, |
CodePtr | OpPC, | ||
uint32_t | I | ||
) |
Definition at line 994 of file Interp.h.
References CheckStore(), CheckThis(), and This().
bool clang::interp::SetThreeWayComparisonField | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Pointer & | Ptr, | ||
const APSInt & | IntValue | ||
) |
Sets the given integral value to the pointer, which is of a std::{weak,partial,strong}_ordering type.
Definition at line 597 of file InterpBuiltin.cpp.
References clang::interp::Pointer::atField(), clang::interp::Pointer::deref(), clang::interp::Record::getField(), clang::interp::Record::getNumFields(), clang::interp::Pointer::getRecord(), clang::interp::Pointer::getType(), clang::interp::Pointer::initialize(), INT_TYPE_SWITCH, and clang::interp::Record::Field::Offset.
Referenced by CMP3().
|
inline |
Definition at line 1681 of file Interp.h.
References CheckShift(), and LT.
|
inline |
Definition at line 1662 of file Interp.h.
References CheckShift(), and LT.
bool clang::interp::Store | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
Definition at line 1299 of file Interp.h.
References CheckStore(), and clang::interp::Pointer::initialize().
bool clang::interp::StoreBitField | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
Definition at line 1323 of file Interp.h.
References CheckStore(), and clang::interp::Pointer::initialize().
bool clang::interp::StoreBitFieldPop | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
Definition at line 1339 of file Interp.h.
References CheckStore(), and clang::interp::Pointer::initialize().
bool clang::interp::StorePop | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
Definition at line 1311 of file Interp.h.
References CheckStore(), and clang::interp::Pointer::initialize().
bool clang::interp::Sub | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
|
inline |
Definition at line 331 of file Interp.h.
References CheckFloatResult(), clang::Result, and clang::interp::Floating::sub().
bool clang::interp::SubOffset | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
|
inline |
1) Pops a Pointer from the stack.
2) Pops another Pointer from the stack. 3) Pushes the different of the indices of the two pointers on the stack.
Definition at line 1520 of file Interp.h.
References clang::interp::Pointer::getIndex(), and clang::interp::Pointer::hasSameArray().
|
inline |
Definition at line 1635 of file Interp.h.
References CheckThis(), and This().
Referenced by CheckCtorCall(), CheckThis(), GetPtrActiveThisField(), GetPtrThisBase(), GetPtrThisField(), GetPtrThisVirtBase(), GetThisField(), InitThisBitField(), InitThisField(), InitThisFieldActive(), SetThisField(), and This().
|
inline |
Definition at line 1248 of file Interp.h.
Referenced by GetPtrThisVirtBase(), and GetPtrVirtBase().