diff options
author | Brian Gaeke <gaeke@uiuc.edu> | 2003-11-07 19:26:23 +0000 |
---|---|---|
committer | Brian Gaeke <gaeke@uiuc.edu> | 2003-11-07 19:26:23 +0000 |
commit | 2cb474c8ad8d9d5fe65e801e19e1d96e2c3128b4 (patch) | |
tree | d73a1cd397c385604e02513092c44dbfa350ca8d /lib/ExecutionEngine/Interpreter/Execution.cpp | |
parent | f1972c6aa2629d64edff0baba84a00d171557bdc (diff) |
Use CallSites for call sites, instead of CallInsts. A revolutionary concept.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9784 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/Interpreter/Execution.cpp')
-rw-r--r-- | lib/ExecutionEngine/Interpreter/Execution.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/ExecutionEngine/Interpreter/Execution.cpp b/lib/ExecutionEngine/Interpreter/Execution.cpp index 4d1a3e66ce..739e57c8b3 100644 --- a/lib/ExecutionEngine/Interpreter/Execution.cpp +++ b/lib/ExecutionEngine/Interpreter/Execution.cpp @@ -453,10 +453,10 @@ void Interpreter::popStackAndReturnValueToCaller (const Type *RetTy, // If we have a previous stack frame, and we have a previous call, // fill in the return value... ExecutionContext &CallingSF = ECStack.back(); - if (CallingSF.Caller) { - if (CallingSF.Caller->getType() != Type::VoidTy) // Save result... - SetValue(CallingSF.Caller, Result, CallingSF); - CallingSF.Caller = 0; // We returned from the call... + if (CallingSF.Caller.getInstruction()) { + if (CallingSF.Caller.getType() != Type::VoidTy) // Save result... + SetValue(CallingSF.Caller.getInstruction(), Result, CallingSF); + CallingSF.Caller = CallSite(); // We returned from the call... } } } @@ -639,7 +639,7 @@ void Interpreter::visitStoreInst(StoreInst &I) { void Interpreter::visitCallInst(CallInst &I) { ExecutionContext &SF = ECStack.back(); - SF.Caller = &I; + SF.Caller = CallSite(&I); std::vector<GenericValue> ArgVals; ArgVals.reserve(I.getNumOperands()-1); for (unsigned i = 1; i < I.getNumOperands(); ++i) { @@ -804,8 +804,8 @@ void Interpreter::visitVANextInst(VANextInst &I) { // void Interpreter::callFunction(Function *F, const std::vector<GenericValue> &ArgVals) { - assert((ECStack.empty() || ECStack.back().Caller == 0 || - ECStack.back().Caller->getNumOperands()-1 == ArgVals.size()) && + assert((ECStack.empty() || ECStack.back().Caller.getInstruction() == 0 || + ECStack.back().Caller.arg_size() == ArgVals.size()) && "Incorrect number of arguments passed into function call!"); // Make a new stack frame... and fill it in. ECStack.push_back(ExecutionContext()); |