llvm/clang/lib/AST/ByteCode/EvalEmitter.cpp

//===--- EvalEmitter.cpp - Instruction emitter for the VM -------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "EvalEmitter.h"
#include "Context.h"
#include "IntegralAP.h"
#include "Interp.h"
#include "Opcode.h"
#include "clang/AST/DeclCXX.h"

usingnamespaceclang;
usingnamespaceclang::interp;

EvalEmitter::EvalEmitter(Context &Ctx, Program &P, State &Parent,
                         InterpStack &Stk)
    :{}

EvalEmitter::~EvalEmitter() {}

/// Clean up all our resources. This needs to done in failed evaluations before
/// we call InterpStack::clear(), because there might be a Pointer on the stack
/// pointing into a Block in the EvalEmitter.
void EvalEmitter::cleanup() {}

EvaluationResult EvalEmitter::interpretExpr(const Expr *E,
                                            bool ConvertResultToRValue,
                                            bool DestroyToplevelScope) {}

EvaluationResult EvalEmitter::interpretDecl(const VarDecl *VD,
                                            bool CheckFullyInitialized) {}

void EvalEmitter::emitLabel(LabelTy Label) {}

EvalEmitter::LabelTy EvalEmitter::getLabel() {}

Scope::Local EvalEmitter::createLocal(Descriptor *D) {}

bool EvalEmitter::jumpTrue(const LabelTy &Label) {}

bool EvalEmitter::jumpFalse(const LabelTy &Label) {}

bool EvalEmitter::jump(const LabelTy &Label) {}

bool EvalEmitter::fallthrough(const LabelTy &Label) {}

static bool checkReturnState(InterpState &S) {}

template <PrimType OpType> bool EvalEmitter::emitRet(const SourceInfo &Info) {}

template <> bool EvalEmitter::emitRet<PT_Ptr>(const SourceInfo &Info) {}
template <> bool EvalEmitter::emitRet<PT_FnPtr>(const SourceInfo &Info) {}

bool EvalEmitter::emitRetVoid(const SourceInfo &Info) {}

bool EvalEmitter::emitRetValue(const SourceInfo &Info) {}

bool EvalEmitter::emitGetPtrLocal(uint32_t I, const SourceInfo &Info) {}

template <PrimType OpType>
bool EvalEmitter::emitGetLocal(uint32_t I, const SourceInfo &Info) {}

template <PrimType OpType>
bool EvalEmitter::emitSetLocal(uint32_t I, const SourceInfo &Info) {}

bool EvalEmitter::emitDestroy(uint32_t I, const SourceInfo &Info) {}

/// Global temporaries (LifetimeExtendedTemporary) carry their value
/// around as an APValue, which codegen accesses.
/// We set their value once when creating them, but we don't update it
/// afterwards when code changes it later.
/// This is what we do here.
void EvalEmitter::updateGlobalTemporaries() {}

//===----------------------------------------------------------------------===//
// Opcode evaluators
//===----------------------------------------------------------------------===//

#define GET_EVAL_IMPL
#include "Opcodes.inc"
#undef GET_EVAL_IMPL