mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-22 03:39:03 +00:00
ExecutionEngine::create no longer takes a TraceMode argument.
CurFrame, TraceMode, and the CachedWriter are history. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9492 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9718e96228
commit
a824f42074
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
/// create - Create a new interpreter object. This can never fail.
|
/// create - Create a new interpreter object. This can never fail.
|
||||||
///
|
///
|
||||||
ExecutionEngine *Interpreter::create(Module *M, bool TraceMode){
|
ExecutionEngine *Interpreter::create(Module *M){
|
||||||
bool isLittleEndian = false;
|
bool isLittleEndian = false;
|
||||||
switch (M->getEndianness()) {
|
switch (M->getEndianness()) {
|
||||||
case Module::LittleEndian: isLittleEndian = true; break;
|
case Module::LittleEndian: isLittleEndian = true; break;
|
||||||
@ -41,23 +41,21 @@ ExecutionEngine *Interpreter::create(Module *M, bool TraceMode){
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Interpreter(M, isLittleEndian, isLongPointer, TraceMode);
|
return new Interpreter(M, isLittleEndian, isLongPointer);
|
||||||
}
|
}
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// Interpreter ctor - Initialize stuff
|
// Interpreter ctor - Initialize stuff
|
||||||
//
|
//
|
||||||
Interpreter::Interpreter(Module *M, bool isLittleEndian, bool isLongPointer,
|
Interpreter::Interpreter(Module *M, bool isLittleEndian, bool isLongPointer)
|
||||||
bool TraceMode)
|
: ExecutionEngine(M), ExitCode(0),
|
||||||
: ExecutionEngine(M), ExitCode(0), Trace(TraceMode),
|
TD("lli", isLittleEndian, isLongPointer ? 8 : 4, isLongPointer ? 8 : 4,
|
||||||
CurFrame(-1), TD("lli", isLittleEndian, isLongPointer ? 8 : 4,
|
isLongPointer ? 8 : 4) {
|
||||||
isLongPointer ? 8 : 4, isLongPointer ? 8 : 4) {
|
|
||||||
|
|
||||||
setTargetData(TD);
|
setTargetData(TD);
|
||||||
// Initialize the "backend"
|
// Initialize the "backend"
|
||||||
initializeExecutionEngine();
|
initializeExecutionEngine();
|
||||||
initializeExternalFunctions();
|
initializeExternalFunctions();
|
||||||
CW.setModule(M); // Update Writer
|
|
||||||
emitGlobals();
|
emitGlobals();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,16 +82,12 @@ GenericValue Interpreter::run(Function *F,
|
|||||||
// though.
|
// though.
|
||||||
std::vector<GenericValue> ActualArgs;
|
std::vector<GenericValue> ActualArgs;
|
||||||
const unsigned ArgCount = F->getFunctionType()->getParamTypes().size();
|
const unsigned ArgCount = F->getFunctionType()->getParamTypes().size();
|
||||||
for (unsigned i = 0; i < ArgCount; ++i) {
|
for (unsigned i = 0; i < ArgCount; ++i)
|
||||||
ActualArgs.push_back (ArgValues[i]);
|
ActualArgs.push_back (ArgValues[i]);
|
||||||
}
|
|
||||||
|
|
||||||
// Set up the function call.
|
// Set up the function call.
|
||||||
callFunction(F, ActualArgs);
|
callFunction(F, ActualArgs);
|
||||||
|
|
||||||
// Reset the current frame location to the top of stack
|
|
||||||
CurFrame = ECStack.size()-1;
|
|
||||||
|
|
||||||
// Start executing the function.
|
// Start executing the function.
|
||||||
run();
|
run();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user