//
virtual void *getPointerToFunction(Function *F) = 0;
+ void StoreValueToMemory(GenericValue Val, GenericValue *Ptr, const Type *Ty);
+ void InitializeMemory(const Constant *Init, void *Addr);
+
protected:
void emitGlobals();
-
-public: // FIXME: protected: // API shared among subclasses
GenericValue getConstantValue(const Constant *C);
- void StoreValueToMemory(GenericValue Val, GenericValue *Ptr, const Type *Ty);
GenericValue LoadValueFromMemory(GenericValue *Ptr, const Type *Ty);
- void InitializeMemory(const Constant *Init, void *Addr);
};
#endif
const Type *Ty);
-static GenericValue getOperandValue(Value *V, ExecutionContext &SF) {
+GenericValue Interpreter::getOperandValue(Value *V, ExecutionContext &SF) {
if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) {
switch (CE->getOpcode()) {
case Instruction::Cast:
IMPLEMENT_CAST_CASE_FP_IMP(DESTTY, DESTCTY); \
IMPLEMENT_CAST_CASE_END()
-static GenericValue executeCastOperation(Value *SrcVal, const Type *Ty,
- ExecutionContext &SF) {
+GenericValue Interpreter::executeCastOperation(Value *SrcVal, const Type *Ty,
+ ExecutionContext &SF) {
const Type *SrcTy = SrcVal->getType();
GenericValue Dest, Src = getOperandValue(SrcVal, SF);
void initializeExecutionEngine();
void initializeExternalFunctions();
+ GenericValue getOperandValue(Value *V, ExecutionContext &SF);
+ GenericValue executeCastOperation(Value *SrcVal, const Type *Ty,
+ ExecutionContext &SF);
};
#endif