clang  10.0.0svn
Namespaces | Macros | Functions
Interp.cpp File Reference
#include "Interp.h"
#include <limits>
#include <vector>
#include "Function.h"
#include "InterpFrame.h"
#include "InterpStack.h"
#include "Opcode.h"
#include "PrimType.h"
#include "Program.h"
#include "State.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/ASTDiagnostic.h"
#include "clang/AST/CXXInheritance.h"
#include "clang/AST/Expr.h"
#include "clang/AST/ExprCXX.h"
#include "llvm/ADT/APSInt.h"
#include "Opcodes.inc"
Include dependency graph for Interp.cpp:

Go to the source code of this file.

Namespaces

 clang
 Dataflow Directional Tag Classes.
 
 clang::interp
 

Macros

#define GET_INTERP
 

Functions

template<PrimType Name, class T = typename PrimConv<Name>::T>
static bool Ret (InterpState &S, CodePtr &PC, APValue &Result)
 
static bool RetVoid (InterpState &S, CodePtr &PC, APValue &Result)
 
static bool RetValue (InterpState &S, CodePtr &Pt, APValue &Result)
 
static bool Jmp (InterpState &S, CodePtr &PC, int32_t Offset)
 
static bool Jt (InterpState &S, CodePtr &PC, int32_t Offset)
 
static bool Jf (InterpState &S, CodePtr &PC, int32_t Offset)
 
static bool CheckInitialized (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK)
 
static bool CheckActive (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK)
 
static bool CheckTemporary (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK)
 
static bool CheckGlobal (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 
bool clang::interp::CheckExtern (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 Checks if the variable has externally defined storage. More...
 
bool clang::interp::CheckArray (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 Checks if the array is offsetable. More...
 
bool clang::interp::CheckLive (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK)
 Checks if a pointer is live and accesible. More...
 
bool clang::interp::CheckNull (InterpState &S, CodePtr OpPC, const Pointer &Ptr, CheckSubobjectKind CSK)
 Checks if a pointer is null. More...
 
bool clang::interp::CheckRange (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK)
 Checks if a pointer is in range. More...
 
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. More...
 
bool clang::interp::CheckConst (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 Checks if a pointer points to const storage. More...
 
bool clang::interp::CheckMutable (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 Checks if a pointer points to a mutable field. More...
 
bool clang::interp::CheckLoad (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 Checks if a value can be loaded from a block. More...
 
bool clang::interp::CheckStore (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 Checks if a value can be stored in a block. More...
 
bool clang::interp::CheckInvoke (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 Checks if a method can be invoked on an object. More...
 
bool clang::interp::CheckInit (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 Checks if a value can be initialized. More...
 
bool clang::interp::CheckCallable (InterpState &S, CodePtr OpPC, Function *F)
 Checks if a method can be called. More...
 
bool clang::interp::CheckThis (InterpState &S, CodePtr OpPC, const Pointer &This)
 Checks the 'this' pointer. More...
 
bool clang::interp::CheckPure (InterpState &S, CodePtr OpPC, const CXXMethodDecl *MD)
 Checks if a method is pure virtual. More...
 
bool clang::interp::Interpret (InterpState &S, APValue &Result)
 Interpreter entry point. More...
 

Macro Definition Documentation

◆ GET_INTERP

#define GET_INTERP

Function Documentation

◆ CheckActive()

static bool CheckActive ( InterpState S,
CodePtr  OpPC,
const Pointer Ptr,
AccessKinds  AK 
)
static

Definition at line 112 of file Interp.cpp.

◆ CheckGlobal()

static bool CheckGlobal ( InterpState S,
CodePtr  OpPC,
const Pointer Ptr 
)
static

Definition at line 164 of file Interp.cpp.

◆ CheckInitialized()

static bool CheckInitialized ( InterpState S,
CodePtr  OpPC,
const Pointer Ptr,
AccessKinds  AK 
)
static

Definition at line 101 of file Interp.cpp.

◆ CheckTemporary()

static bool CheckTemporary ( InterpState S,
CodePtr  OpPC,
const Pointer Ptr,
AccessKinds  AK 
)
static

Definition at line 144 of file Interp.cpp.

◆ Jf()

static bool Jf ( InterpState S,
CodePtr PC,
int32_t  Offset 
)
static

Definition at line 94 of file Interp.cpp.

◆ Jmp()

static bool Jmp ( InterpState S,
CodePtr PC,
int32_t  Offset 
)
static

Definition at line 82 of file Interp.cpp.

◆ Jt()

static bool Jt ( InterpState S,
CodePtr PC,
int32_t  Offset 
)
static

Definition at line 87 of file Interp.cpp.

◆ Ret()

template<PrimType Name, class T = typename PrimConv<Name>::T>
static bool Ret ( InterpState S,
CodePtr PC,
APValue Result 
)
static

◆ RetValue()

static bool RetValue ( InterpState S,
CodePtr Pt,
APValue Result 
)
static

Definition at line 74 of file Interp.cpp.

◆ RetVoid()

static bool RetVoid ( InterpState S,
CodePtr PC,
APValue Result 
)
static

Definition at line 56 of file Interp.cpp.