summaryrefslogtreecommitdiffstats
path: root/runtime/interpreter/interpreter_common.cc
diff options
context:
space:
mode:
authorSebastien Hertz <shertz@google.com>2015-04-03 16:07:05 +0200
committerSebastien Hertz <shertz@google.com>2015-04-03 16:27:19 +0200
commit45b1597c152af90f6d5792d02b64fd4e7c81ac9d (patch)
tree3cbb498c91067657169e4ee2aaba9cbf286e3788 /runtime/interpreter/interpreter_common.cc
parentd43f160dc294655885a2c273307d34585c4ce97b (diff)
downloadart-45b1597c152af90f6d5792d02b64fd4e7c81ac9d.zip
art-45b1597c152af90f6d5792d02b64fd4e7c81ac9d.tar.gz
art-45b1597c152af90f6d5792d02b64fd4e7c81ac9d.tar.bz2
Use va_list argument to abort transaction
Creates AbortTransactionV taking a va_list argument and renames AbortTransaction to AbortTransactionF which calls AbortTransactionV. This fixes the compiler_driver_test under valgrind. Change-Id: Ia1c57330091c055ae9e46585a944ce0b78864920
Diffstat (limited to 'runtime/interpreter/interpreter_common.cc')
-rw-r--r--runtime/interpreter/interpreter_common.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/runtime/interpreter/interpreter_common.cc b/runtime/interpreter/interpreter_common.cc
index 582843c..375d644 100644
--- a/runtime/interpreter/interpreter_common.cc
+++ b/runtime/interpreter/interpreter_common.cc
@@ -467,16 +467,20 @@ static inline void AssignRegister(ShadowFrame* new_shadow_frame, const ShadowFra
}
}
-void AbortTransaction(Thread* self, const char* fmt, ...) {
- CHECK(Runtime::Current()->IsActiveTransaction());
- // Constructs abort message.
+void AbortTransactionF(Thread* self, const char* fmt, ...) {
va_list args;
va_start(args, fmt);
+ AbortTransactionV(self, fmt, args);
+ va_end(args);
+}
+
+void AbortTransactionV(Thread* self, const char* fmt, va_list args) {
+ CHECK(Runtime::Current()->IsActiveTransaction());
+ // Constructs abort message.
std::string abort_msg;
StringAppendV(&abort_msg, fmt, args);
// Throws an exception so we can abort the transaction and rollback every change.
Runtime::Current()->AbortTransactionAndThrowAbortError(self, abort_msg);
- va_end(args);
}
template<bool is_range, bool do_assignability_check>