diff options
author | Brian Gaeke <gaeke@uiuc.edu> | 2003-09-04 22:21:24 +0000 |
---|---|---|
committer | Brian Gaeke <gaeke@uiuc.edu> | 2003-09-04 22:21:24 +0000 |
commit | e80e5ba7f8c6d0c2ea404d2c56aecfae0bb9681d (patch) | |
tree | a27dbcf913b26290964190cb4c3e9c0e482f26b2 /llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp | |
parent | 4bd3bd5b5aad9cb32f1cd268cfa5e8b8df0ec368 (diff) | |
download | bcm5719-llvm-e80e5ba7f8c6d0c2ea404d2c56aecfae0bb9681d.tar.gz bcm5719-llvm-e80e5ba7f8c6d0c2ea404d2c56aecfae0bb9681d.zip |
Interpreter cleanups:
Get rid of support for DebugMode (make it always off).
Mung some comments.
Get rid of interpreter's PROFILE_STRUCTURE_FIELDS and PerformExitStuff
which have been disabled forever.
Get rid of -abort-on-exception (make it always on).
Get rid of user interaction stuff (debug mode innards).
Simplify Interpreter's callMainFunction().
llvm-svn: 8344
Diffstat (limited to 'llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp')
-rw-r--r-- | llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp b/llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp index 6f540e2d1a8..4f8c407340a 100644 --- a/llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp +++ b/llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp @@ -11,7 +11,7 @@ /// create - Create a new interpreter object. This can never fail. /// -ExecutionEngine *Interpreter::create(Module *M, bool DebugMode, bool TraceMode){ +ExecutionEngine *Interpreter::create(Module *M, bool TraceMode){ bool isLittleEndian; switch (M->getEndianness()) { case Module::LittleEndian: isLittleEndian = true; break; @@ -32,15 +32,15 @@ ExecutionEngine *Interpreter::create(Module *M, bool DebugMode, bool TraceMode){ break; } - return new Interpreter(M, isLittleEndian, isLongPointer, DebugMode,TraceMode); + return new Interpreter(M, isLittleEndian, isLongPointer, TraceMode); } //===----------------------------------------------------------------------===// // Interpreter ctor - Initialize stuff // Interpreter::Interpreter(Module *M, bool isLittleEndian, bool isLongPointer, - bool DebugMode, bool TraceMode) - : ExecutionEngine(M), ExitCode(0), Debug(DebugMode), Trace(TraceMode), + bool TraceMode) + : ExecutionEngine(M), ExitCode(0), Trace(TraceMode), CurFrame(-1), TD("lli", isLittleEndian, isLongPointer ? 8 : 4, isLongPointer ? 8 : 4, isLongPointer ? 8 : 4) { @@ -59,17 +59,12 @@ int Interpreter::run(const std::string &MainFunction, const char ** envp) { // Start interpreter into the main function... // - if (!callMainFunction(MainFunction, Args) && !Debug) { - // If not in debug mode and if the call succeeded, run the code now... + if (!callMainFunction(MainFunction, Args)) { + // If the call succeeded, run the code now... run(); } do { - // If debug mode, allow the user to interact... also, if the user pressed - // ctrl-c or execution hit an error, enter the event loop... - if (Debug || isStopped()) - handleUserInput(); - // If the program has exited, run atexit handlers... if (ECStack.empty() && !AtExitHandlers.empty()) { callFunction(AtExitHandlers.back(), std::vector<GenericValue>()); @@ -78,7 +73,6 @@ int Interpreter::run(const std::string &MainFunction, } } while (!ECStack.empty()); - PerformExitStuff(); return ExitCode; } |