summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/base/histogram_test.cc28
-rw-r--r--runtime/base/logging.cc2
-rw-r--r--runtime/base/logging.h4
-rw-r--r--runtime/base/macros.h2
-rw-r--r--runtime/base/mutex-inl.h2
-rw-r--r--runtime/base/mutex.cc10
-rw-r--r--runtime/base/unix_file/mapped_file_test.cc2
-rw-r--r--runtime/check_jni.cc56
-rw-r--r--runtime/class_linker.cc6
-rw-r--r--runtime/class_linker.h4
-rw-r--r--runtime/common_test.h8
-rw-r--r--runtime/compiled_method.cc2
-rw-r--r--runtime/debugger.cc44
-rw-r--r--runtime/debugger.h2
-rw-r--r--runtime/dex_file.cc2
-rw-r--r--runtime/dex_file.h2
-rw-r--r--runtime/dex_file_verifier.cc2
-rw-r--r--runtime/dex_instruction-inl.h8
-rw-r--r--runtime/dex_instruction.cc8
-rw-r--r--runtime/dex_instruction.h4
-rw-r--r--runtime/dex_instruction_list.h2
-rw-r--r--runtime/disassembler_arm.cc52
-rw-r--r--runtime/disassembler_mips.cc42
-rw-r--r--runtime/disassembler_x86.cc2
-rw-r--r--runtime/exception_test.cc2
-rw-r--r--runtime/gc/accounting/card_table.cc2
-rw-r--r--runtime/gc/accounting/space_bitmap-inl.h2
-rw-r--r--runtime/gc/collector/mark_sweep.cc4
-rw-r--r--runtime/gc/collector/mark_sweep.h2
-rw-r--r--runtime/gc/heap.cc2
-rw-r--r--runtime/gc/space/dlmalloc_space.cc4
-rw-r--r--runtime/gc/space/space.h2
-rw-r--r--runtime/hprof/hprof.cc18
-rw-r--r--runtime/indirect_reference_table.cc2
-rw-r--r--runtime/indirect_reference_table.h8
-rw-r--r--runtime/instrumentation.cc14
-rw-r--r--runtime/intern_table.cc8
-rw-r--r--runtime/intern_table_test.cc2
-rw-r--r--runtime/interpreter/interpreter.cc6
-rw-r--r--runtime/invoke_type.h10
-rw-r--r--runtime/jdwp/jdwp.h8
-rw-r--r--runtime/jdwp/jdwp_constants.h8
-rw-r--r--runtime/jdwp/jdwp_event.cc6
-rw-r--r--runtime/jdwp/jdwp_handler.cc6
-rw-r--r--runtime/jdwp/jdwp_priv.h4
-rw-r--r--runtime/jdwp/jdwp_request.cc2
-rw-r--r--runtime/jdwp/object_registry.cc6
-rw-r--r--runtime/jni_internal.cc26
-rw-r--r--runtime/jvalue.h4
-rw-r--r--runtime/locks.h2
-rw-r--r--runtime/log_severity.h2
-rw-r--r--runtime/mem_map.cc6
-rw-r--r--runtime/mirror/dex_cache.h2
-rw-r--r--runtime/mirror/field.cc2
-rw-r--r--runtime/mirror/throwable.h2
-rw-r--r--runtime/monitor.cc6
-rw-r--r--runtime/native/dalvik_system_VMDebug.cc4
-rw-r--r--runtime/native/dalvik_system_Zygote.cc2
-rw-r--r--runtime/native/java_lang_Thread.cc2
-rw-r--r--runtime/oat/runtime/arm/context_arm.cc2
-rw-r--r--runtime/oat/runtime/mips/context_mips.cc2
-rw-r--r--runtime/oat/runtime/support_interpreter.cc2
-rw-r--r--runtime/oat/runtime/support_jni.cc2
-rw-r--r--runtime/oat/runtime/support_stubs.cc4
-rw-r--r--runtime/oat/runtime/x86/oat_support_entrypoints_x86.cc12
-rw-r--r--runtime/oat_test.cc2
-rw-r--r--runtime/reference_table.cc2
-rw-r--r--runtime/reference_table.h2
-rw-r--r--runtime/reflection.cc2
-rw-r--r--runtime/runtime.cc32
-rw-r--r--runtime/runtime_linux.cc2
-rw-r--r--runtime/runtime_support.cc8
-rw-r--r--runtime/runtime_support_llvm_func_list.h2
-rw-r--r--runtime/safe_map.h2
-rw-r--r--runtime/scoped_thread_state_change.h2
-rw-r--r--runtime/signal_catcher.cc2
-rw-r--r--runtime/stack.cc8
-rw-r--r--runtime/stack.h6
-rw-r--r--runtime/thread.cc20
-rw-r--r--runtime/thread.h6
-rw-r--r--runtime/thread_linux.cc2
-rw-r--r--runtime/thread_list.cc6
-rw-r--r--runtime/thread_list.h4
-rw-r--r--runtime/thread_state.h40
-rw-r--r--runtime/trace.cc14
-rw-r--r--runtime/utils.cc34
-rw-r--r--runtime/verifier/dex_gc_map.h6
-rw-r--r--runtime/verifier/method_verifier.cc16
-rw-r--r--runtime/verifier/method_verifier.h22
-rw-r--r--runtime/verifier/reg_type_cache.cc2
-rw-r--r--runtime/verifier/reg_type_test.cc2
-rw-r--r--runtime/zip_archive.cc2
92 files changed, 378 insertions, 378 deletions
diff --git a/runtime/base/histogram_test.cc b/runtime/base/histogram_test.cc
index 5592f1cedc..218c022141 100644
--- a/runtime/base/histogram_test.cc
+++ b/runtime/base/histogram_test.cc
@@ -22,16 +22,16 @@
namespace art {
-//Simple usage:
-// Histogram *hist = new Histogram("SimplePercentiles");
-// Percentile PerValue
-// hist->AddValue(121);
-// hist->AddValue(132);
-// hist->AddValue(140);
-// hist->AddValue(145);
-// hist->AddValue(155);
-// hist->CreateHistogram();
-// PerValue = hist->PercentileVal(0.50); finds the 50th percentile(median).
+// Simple usage:
+// Histogram *hist = new Histogram("SimplePercentiles");
+// Percentile PerValue
+// hist->AddValue(121);
+// hist->AddValue(132);
+// hist->AddValue(140);
+// hist->AddValue(145);
+// hist->AddValue(155);
+// hist->CreateHistogram();
+// PerValue = hist->PercentileVal(0.50); finds the 50th percentile(median).
TEST(Histtest, MeanTest) {
UniquePtr<Histogram<uint64_t> > hist(new Histogram<uint64_t>("MeanTest"));
@@ -105,7 +105,7 @@ TEST(Histtest, UpdateRange) {
hist->AddValue(110);
hist->AddValue(121);
hist->AddValue(132);
- hist->AddValue(140); //Median value
+ hist->AddValue(140); // Median value
hist->AddValue(145);
hist->AddValue(155);
hist->AddValue(163);
@@ -148,7 +148,7 @@ TEST(Histtest, Reset) {
hist->AddValue(110);
hist->AddValue(121);
hist->AddValue(132);
- hist->AddValue(140); //Median value
+ hist->AddValue(140); // Median value
hist->AddValue(145);
hist->AddValue(155);
hist->AddValue(163);
@@ -188,7 +188,7 @@ TEST(Histtest, MultipleCreateHist) {
hist->AddValue(110);
hist->AddValue(121);
hist->AddValue(132);
- hist->AddValue(140); //Median value
+ hist->AddValue(140); // Median value
hist->AddValue(145);
hist->AddValue(155);
hist->AddValue(163);
@@ -265,4 +265,4 @@ TEST(Histtest, SpikyValues) {
EXPECT_EQ(expected, stream.str());
}
-} // namespace art
+} // namespace art
diff --git a/runtime/base/logging.cc b/runtime/base/logging.cc
index bf19e8d734..83ecca8c88 100644
--- a/runtime/base/logging.cc
+++ b/runtime/base/logging.cc
@@ -126,7 +126,7 @@ LogMessageData::LogMessageData(const char* file, int line, LogSeverity severity,
LogMessage::~LogMessage() {
if (data_->severity < gMinimumLogSeverity) {
- return; // No need to format something we're not going to output.
+ return; // No need to format something we're not going to output.
}
// Finish constructing the message.
diff --git a/runtime/base/logging.h b/runtime/base/logging.h
index af2cdb3d1c..d641ae4f2b 100644
--- a/runtime/base/logging.h
+++ b/runtime/base/logging.h
@@ -299,7 +299,7 @@ class ToStr {
// The members of this struct are the valid arguments to VLOG and VLOG_IS_ON in code,
// and the "-verbose:" command line argument.
struct LogVerbosity {
- bool class_linker; // Enabled with "-verbose:class".
+ bool class_linker; // Enabled with "-verbose:class".
bool compiler;
bool heap;
bool gc;
@@ -307,7 +307,7 @@ struct LogVerbosity {
bool jni;
bool monitor;
bool startup;
- bool third_party_jni; // Enabled with "-verbose:third-party-jni".
+ bool third_party_jni; // Enabled with "-verbose:third-party-jni".
bool threads;
};
diff --git a/runtime/base/macros.h b/runtime/base/macros.h
index 44a7f1e939..879c10c1ae 100644
--- a/runtime/base/macros.h
+++ b/runtime/base/macros.h
@@ -196,6 +196,6 @@ template<typename T> void UNUSED(const T&) {}
#define SHARED_TRYLOCK_FUNCTION(...)
#define UNLOCK_FUNCTION(...)
-#endif // defined(__SUPPORT_TS_ANNOTATION__)
+#endif // defined(__SUPPORT_TS_ANNOTATION__)
#endif // ART_RUNTIME_BASE_MACROS_H_
diff --git a/runtime/base/mutex-inl.h b/runtime/base/mutex-inl.h
index b3f5092c76..1337dff068 100644
--- a/runtime/base/mutex-inl.h
+++ b/runtime/base/mutex-inl.h
@@ -167,7 +167,7 @@ inline void ReaderWriterMutex::SharedUnlock(Thread* self) {
if (LIKELY(cur_state > 0)) {
// Reduce state by 1.
done = android_atomic_release_cas(cur_state, cur_state - 1, &state_) == 0;
- if (done && (cur_state - 1) == 0) { // cas may fail due to noise?
+ if (done && (cur_state - 1) == 0) { // cas may fail due to noise?
if (num_pending_writers_ > 0 || num_pending_readers_ > 0) {
// Wake any exclusive waiters as there are now no readers.
futex(&state_, FUTEX_WAKE, -1, NULL, NULL, 0);
diff --git a/runtime/base/mutex.cc b/runtime/base/mutex.cc
index 1a6020b89b..d822eedb67 100644
--- a/runtime/base/mutex.cc
+++ b/runtime/base/mutex.cc
@@ -400,7 +400,7 @@ void Mutex::ExclusiveUnlock(Thread* self) {
exclusive_owner_ = 0;
// Change state to 0.
done = android_atomic_release_cas(cur_state, 0, &state_) == 0;
- if (done) { // Spurious fail?
+ if (done) { // Spurious fail?
// Wake a contender
if (num_contenders_ > 0) {
futex(&state_, FUTEX_WAKE, 1, NULL, NULL, 0);
@@ -478,7 +478,7 @@ ReaderWriterMutex::ReaderWriterMutex(const char* name, LockLevel level)
#if ART_USE_FUTEXES
, state_(0), exclusive_owner_(0), num_pending_readers_(0), num_pending_writers_(0)
#endif
-{ // NOLINT(whitespace/braces)
+{ // NOLINT(whitespace/braces)
#if !ART_USE_FUTEXES
CHECK_MUTEX_CALL(pthread_rwlock_init, (&rwlock_, NULL));
#endif
@@ -551,7 +551,7 @@ void ReaderWriterMutex::ExclusiveUnlock(Thread* self) {
exclusive_owner_ = 0;
// Change state from -1 to 0.
done = android_atomic_release_cas(-1, 0, &state_) == 0;
- if (done) { // cmpxchg may fail due to noise?
+ if (done) { // cmpxchg may fail due to noise?
// Wake any waiters.
if (num_pending_readers_ > 0 || num_pending_writers_ > 0) {
futex(&state_, FUTEX_WAKE, -1, NULL, NULL, 0);
@@ -756,7 +756,7 @@ void ConditionVariable::Broadcast(Thread* self) {
DCHECK_EQ(guard_.GetExclusiveOwnerTid(), SafeGetTid(self));
#if ART_USE_FUTEXES
if (num_waiters_ > 0) {
- android_atomic_inc(&sequence_); // Indicate the broadcast occurred.
+ android_atomic_inc(&sequence_); // Indicate the broadcast occurred.
bool done = false;
do {
int32_t cur_sequence = sequence_;
@@ -782,7 +782,7 @@ void ConditionVariable::Signal(Thread* self) {
guard_.AssertExclusiveHeld(self);
#if ART_USE_FUTEXES
if (num_waiters_ > 0) {
- android_atomic_inc(&sequence_); // Indicate a signal occurred.
+ android_atomic_inc(&sequence_); // Indicate a signal occurred.
// Futex wake 1 waiter who will then come and in contend on mutex. It'd be nice to requeue them
// to avoid this, however, requeueing can only move all waiters.
int num_woken = futex(&sequence_, FUTEX_WAKE, 1, NULL, NULL, 0);
diff --git a/runtime/base/unix_file/mapped_file_test.cc b/runtime/base/unix_file/mapped_file_test.cc
index a3b097dcae..3dda02f59f 100644
--- a/runtime/base/unix_file/mapped_file_test.cc
+++ b/runtime/base/unix_file/mapped_file_test.cc
@@ -212,7 +212,7 @@ TEST_F(MappedFileTest, WriteMappedReadWrite) {
EXPECT_EQ(0, memcmp(kContent.c_str(), file.data(), kContent.size()));
}
-#if 0 // death tests don't work on android yet
+#if 0 // death tests don't work on android yet
class MappedFileDeathTest : public MappedFileTest {};
diff --git a/runtime/check_jni.cc b/runtime/check_jni.cc
index 7429ab11a9..089e306586 100644
--- a/runtime/check_jni.cc
+++ b/runtime/check_jni.cc
@@ -419,37 +419,37 @@ class ScopedCheck {
std::string msg;
for (const char* fmt = fmt0; *fmt;) {
char ch = *fmt++;
- if (ch == 'B') { // jbyte
+ if (ch == 'B') { // jbyte
jbyte b = va_arg(ap, int);
if (b >= 0 && b < 10) {
StringAppendF(&msg, "%d", b);
} else {
StringAppendF(&msg, "%#x (%d)", b, b);
}
- } else if (ch == 'C') { // jchar
+ } else if (ch == 'C') { // jchar
jchar c = va_arg(ap, int);
if (c < 0x7f && c >= ' ') {
StringAppendF(&msg, "U+%x ('%c')", c, c);
} else {
StringAppendF(&msg, "U+%x", c);
}
- } else if (ch == 'F' || ch == 'D') { // jfloat, jdouble
+ } else if (ch == 'F' || ch == 'D') { // jfloat, jdouble
StringAppendF(&msg, "%g", va_arg(ap, double));
- } else if (ch == 'I' || ch == 'S') { // jint, jshort
+ } else if (ch == 'I' || ch == 'S') { // jint, jshort
StringAppendF(&msg, "%d", va_arg(ap, int));
- } else if (ch == 'J') { // jlong
+ } else if (ch == 'J') { // jlong
StringAppendF(&msg, "%lld", va_arg(ap, jlong));
- } else if (ch == 'Z') { // jboolean
+ } else if (ch == 'Z') { // jboolean
StringAppendF(&msg, "%s", va_arg(ap, int) ? "true" : "false");
- } else if (ch == 'V') { // void
+ } else if (ch == 'V') { // void
msg += "void";
- } else if (ch == 'v') { // JavaVM*
+ } else if (ch == 'v') { // JavaVM*
JavaVM* vm = va_arg(ap, JavaVM*);
StringAppendF(&msg, "(JavaVM*)%p", vm);
- } else if (ch == 'E') { // JNIEnv*
+ } else if (ch == 'E') { // JNIEnv*
JNIEnv* env = va_arg(ap, JNIEnv*);
StringAppendF(&msg, "(JNIEnv*)%p", env);
- } else if (ch == 'L' || ch == 'a' || ch == 's') { // jobject, jarray, jstring
+ } else if (ch == 'L' || ch == 'a' || ch == 's') { // jobject, jarray, jstring
// For logging purposes, these are identical.
jobject o = va_arg(ap, jobject);
if (o == NULL) {
@@ -457,10 +457,10 @@ class ScopedCheck {
} else {
StringAppendF(&msg, "%p", o);
}
- } else if (ch == 'b') { // jboolean (JNI-style)
+ } else if (ch == 'b') { // jboolean (JNI-style)
jboolean b = va_arg(ap, int);
msg += (b ? "JNI_TRUE" : "JNI_FALSE");
- } else if (ch == 'c') { // jclass
+ } else if (ch == 'c') { // jclass
jclass jc = va_arg(ap, jclass);
mirror::Class* c = reinterpret_cast<mirror::Class*>(Thread::Current()->DecodeJObject(jc));
if (c == NULL) {
@@ -475,34 +475,34 @@ class ScopedCheck {
StringAppendF(&msg, " (%p)", jc);
}
}
- } else if (ch == 'f') { // jfieldID
+ } else if (ch == 'f') { // jfieldID
jfieldID fid = va_arg(ap, jfieldID);
mirror::Field* f = reinterpret_cast<mirror::Field*>(fid);
msg += PrettyField(f);
if (!entry) {
StringAppendF(&msg, " (%p)", fid);
}
- } else if (ch == 'z') { // non-negative jsize
+ } else if (ch == 'z') { // non-negative jsize
// You might expect jsize to be size_t, but it's not; it's the same as jint.
// We only treat this specially so we can do the non-negative check.
// TODO: maybe this wasn't worth it?
jint i = va_arg(ap, jint);
StringAppendF(&msg, "%d", i);
- } else if (ch == 'm') { // jmethodID
+ } else if (ch == 'm') { // jmethodID
jmethodID mid = va_arg(ap, jmethodID);
mirror::AbstractMethod* m = reinterpret_cast<mirror::AbstractMethod*>(mid);
msg += PrettyMethod(m);
if (!entry) {
StringAppendF(&msg, " (%p)", mid);
}
- } else if (ch == 'p') { // void* ("pointer")
+ } else if (ch == 'p') { // void* ("pointer")
void* p = va_arg(ap, void*);
if (p == NULL) {
msg += "NULL";
} else {
StringAppendF(&msg, "(void*) %p", p);
}
- } else if (ch == 'r') { // jint (release mode)
+ } else if (ch == 'r') { // jint (release mode)
jint releaseMode = va_arg(ap, jint);
if (releaseMode == 0) {
msg += "0";
@@ -513,7 +513,7 @@ class ScopedCheck {
} else {
StringAppendF(&msg, "invalid release mode %d", releaseMode);
}
- } else if (ch == 'u') { // const char* (Modified UTF-8)
+ } else if (ch == 'u') { // const char* (Modified UTF-8)
const char* utf = va_arg(ap, const char*);
if (utf == NULL) {
msg += "NULL";
@@ -573,11 +573,11 @@ class ScopedCheck {
} else if (ch == 'z') {
CheckLengthPositive(va_arg(ap, jsize));
} else if (strchr("BCISZbfmpEv", ch) != NULL) {
- va_arg(ap, uint32_t); // Skip this argument.
+ va_arg(ap, uint32_t); // Skip this argument.
} else if (ch == 'D' || ch == 'F') {
- va_arg(ap, double); // Skip this argument.
+ va_arg(ap, double); // Skip this argument.
} else if (ch == 'J') {
- va_arg(ap, uint64_t); // Skip this argument.
+ va_arg(ap, uint64_t); // Skip this argument.
} else if (ch == '.') {
} else {
LOG(FATAL) << "Unknown check format specifier: " << ch;
@@ -797,7 +797,7 @@ class ScopedCheck {
// Don't check here; we allow nested gets.
threadEnv->critical++;
break;
- case kFlag_CritRelease: // this is a "release" call
+ case kFlag_CritRelease: // this is a "release" call
threadEnv->critical--;
if (threadEnv->critical < 0) {
JniAbortF(function_name_, "thread %s called too many critical releases", ToStr<Thread>(*self).c_str());
@@ -1007,7 +1007,7 @@ struct GuardedCopy {
memcpy(buf, &pExtra->magic, 4);
JniAbortF(functionName,
"guard magic does not match (found 0x%02x%02x%02x%02x) -- incorrect data pointer %p?",
- buf[3], buf[2], buf[1], buf[0], dataBuf); // Assumes little-endian.
+ buf[3], buf[2], buf[1], buf[0], dataBuf); // Assumes little-endian.
}
size_t len = pExtra->original_length;
@@ -1529,7 +1529,7 @@ CALL(void, Void, , , VOID_RETURN, "V");
}
static jstring NewStringUTF(JNIEnv* env, const char* bytes) {
- CHECK_JNI_ENTRY(kFlag_NullableUtf, "Eu", env, bytes); // TODO: show pointer and truncate string.
+ CHECK_JNI_ENTRY(kFlag_NullableUtf, "Eu", env, bytes); // TODO: show pointer and truncate string.
return CHECK_JNI_EXIT("s", baseEnv(env)->NewStringUTF(env, bytes));
}
@@ -1547,11 +1547,11 @@ CALL(void, Void, , , VOID_RETURN, "V");
*isCopy = JNI_TRUE;
}
}
- return CHECK_JNI_EXIT("u", result); // TODO: show pointer and truncate string.
+ return CHECK_JNI_EXIT("u", result); // TODO: show pointer and truncate string.
}
static void ReleaseStringUTFChars(JNIEnv* env, jstring string, const char* utf) {
- CHECK_JNI_ENTRY(kFlag_ExcepOkay | kFlag_Release, "Esu", env, string, utf); // TODO: show pointer and truncate string.
+ CHECK_JNI_ENTRY(kFlag_ExcepOkay | kFlag_Release, "Esu", env, string, utf); // TODO: show pointer and truncate string.
if (sc.ForceCopy()) {
GuardedCopy::Check(__FUNCTION__, utf, false);
utf = reinterpret_cast<const char*>(GuardedCopy::Destroy(const_cast<char*>(utf)));
@@ -1681,7 +1681,7 @@ PRIMITIVE_ARRAY_FUNCTIONS(jdouble, Double, 'D');
static jint MonitorEnter(JNIEnv* env, jobject obj) {
CHECK_JNI_ENTRY(kFlag_Default, "EL", env, obj);
if (!sc.CheckInstance(ScopedCheck::kObject, obj)) {
- return JNI_ERR; // Only for jni_internal_test. Real code will have aborted already.
+ return JNI_ERR; // Only for jni_internal_test. Real code will have aborted already.
}
return CHECK_JNI_EXIT("I", baseEnv(env)->MonitorEnter(env, obj));
}
@@ -1689,7 +1689,7 @@ PRIMITIVE_ARRAY_FUNCTIONS(jdouble, Double, 'D');
static jint MonitorExit(JNIEnv* env, jobject obj) {
CHECK_JNI_ENTRY(kFlag_Default | kFlag_ExcepOkay, "EL", env, obj);
if (!sc.CheckInstance(ScopedCheck::kObject, obj)) {
- return JNI_ERR; // Only for jni_internal_test. Real code will have aborted already.
+ return JNI_ERR; // Only for jni_internal_test. Real code will have aborted already.
}
return CHECK_JNI_EXIT("I", baseEnv(env)->MonitorExit(env, obj));
}
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index 15d6d366ab..40033b7743 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -1422,7 +1422,7 @@ size_t ClassLinker::SizeOfClass(const DexFile& dex_file,
// follow with reference fields which must be contiguous at start
size += (num_ref * sizeof(uint32_t));
// if there are 64-bit fields to add, make sure they are aligned
- if (num_64 != 0 && size != RoundUp(size, 8)) { // for 64-bit alignment
+ if (num_64 != 0 && size != RoundUp(size, 8)) { // for 64-bit alignment
if (num_32 != 0) {
// use an available 32-bit field for padding
num_32--;
@@ -3476,7 +3476,7 @@ bool ClassLinker::LinkFields(SirtRef<mirror::Class>& klass, bool is_static) {
Primitive::Type type = fh.GetTypeAsPrimitiveType();
bool isPrimitive = type != Primitive::kPrimNot;
if (isPrimitive) {
- break; // past last reference, move on to the next phase
+ break; // past last reference, move on to the next phase
}
grouped_and_sorted_fields.pop_front();
num_reference_fields++;
@@ -3554,7 +3554,7 @@ bool ClassLinker::LinkFields(SirtRef<mirror::Class>& klass, bool is_static) {
bool is_primitive = type != Primitive::kPrimNot;
if (StringPiece(ClassHelper(klass.get(), this).GetDescriptor()) == "Ljava/lang/ref/Reference;" &&
StringPiece(fh.GetName()) == "referent") {
- is_primitive = true; // We lied above, so we have to expect a lie here.
+ is_primitive = true; // We lied above, so we have to expect a lie here.
}
if (is_primitive) {
if (!seen_non_ref) {
diff --git a/runtime/class_linker.h b/runtime/class_linker.h
index 3993cb214b..fdf75c2301 100644
--- a/runtime/class_linker.h
+++ b/runtime/class_linker.h
@@ -328,8 +328,8 @@ class ClassLinker {
const void* GetOatCodeFor(const DexFile& dex_file, uint32_t method_idx)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
- pid_t GetClassesLockOwner(); // For SignalCatcher.
- pid_t GetDexLockOwner(); // For SignalCatcher.
+ pid_t GetClassesLockOwner(); // For SignalCatcher.
+ pid_t GetDexLockOwner(); // For SignalCatcher.
bool IsDirty() const {
return is_dirty_;
diff --git a/runtime/common_test.h b/runtime/common_test.h
index 79710b4635..2c233401d2 100644
--- a/runtime/common_test.h
+++ b/runtime/common_test.h
@@ -55,11 +55,11 @@ static const byte kBase64Map[256] = {
255, 255, 255, 255, 255, 255, 255, 62, 255, 255, 255, 63,
52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 255, 255,
255, 254, 255, 255, 255, 0, 1, 2, 3, 4, 5, 6,
- 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, // NOLINT
- 19, 20, 21, 22, 23, 24, 25, 255, 255, 255, 255, 255, // NOLINT
+ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, // NOLINT
+ 19, 20, 21, 22, 23, 24, 25, 255, 255, 255, 255, 255, // NOLINT
255, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
- 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, // NOLINT
- 49, 50, 51, 255, 255, 255, 255, 255, 255, 255, 255, 255, // NOLINT
+ 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, // NOLINT
+ 49, 50, 51, 255, 255, 255, 255, 255, 255, 255, 255, 255, // NOLINT
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
diff --git a/runtime/compiled_method.cc b/runtime/compiled_method.cc
index 49706ae8eb..c64c71ed3f 100644
--- a/runtime/compiled_method.cc
+++ b/runtime/compiled_method.cc
@@ -121,7 +121,7 @@ CompiledMethod::CompiledMethod(InstructionSet instruction_set,
DCHECK_EQ(vmap_table.size(),
static_cast<uint32_t>(__builtin_popcount(core_spill_mask)
+ __builtin_popcount(fp_spill_mask)));
- CHECK_LE(vmap_table.size(), (1U << 16) - 1); // length must fit in 2^16-1
+ CHECK_LE(vmap_table.size(), (1U << 16) - 1); // length must fit in 2^16-1
std::vector<uint32_t> length_prefixed_mapping_table;
length_prefixed_mapping_table.push_back(mapping_table.size());
diff --git a/runtime/debugger.cc b/runtime/debugger.cc
index deed540cda..7ebd6a3ae0 100644
--- a/runtime/debugger.cc
+++ b/runtime/debugger.cc
@@ -56,8 +56,8 @@
namespace art {
-static const size_t kMaxAllocRecordStackDepth = 16; // Max 255.
-static const size_t kDefaultNumAllocRecords = 64*1024; // Must be a power of 2.
+static const size_t kMaxAllocRecordStackDepth = 16; // Max 255.
+static const size_t kDefaultNumAllocRecords = 64*1024; // Must be a power of 2.
struct AllocRecordStackTraceElement {
mirror::AbstractMethod* method;
@@ -72,7 +72,7 @@ struct AllocRecord {
mirror::Class* type;
size_t byte_count;
uint16_t thin_lock_id;
- AllocRecordStackTraceElement stack[kMaxAllocRecordStackDepth]; // Unused entries have NULL method.
+ AllocRecordStackTraceElement stack[kMaxAllocRecordStackDepth]; // Unused entries have NULL method.
size_t GetDepth() {
size_t depth = 0;
@@ -104,7 +104,7 @@ struct SingleStepControl {
JDWP::JdwpStepDepth step_depth;
const mirror::AbstractMethod* method;
- int32_t line_number; // Or -1 for native methods.
+ int32_t line_number; // Or -1 for native methods.
std::set<uint32_t> dex_pcs;
int stack_depth;
};
@@ -185,7 +185,7 @@ static ObjectRegistry* gRegistry = NULL;
// Recent allocation tracking.
static Mutex gAllocTrackerLock DEFAULT_MUTEX_ACQUIRED_AFTER("AllocTracker lock");
-AllocRecord* Dbg::recent_allocation_records_ PT_GUARDED_BY(gAllocTrackerLock) = NULL; // TODO: CircularBuffer<AllocRecord>
+AllocRecord* Dbg::recent_allocation_records_ PT_GUARDED_BY(gAllocTrackerLock) = NULL; // TODO: CircularBuffer<AllocRecord>
static size_t gAllocRecordMax GUARDED_BY(gAllocTrackerLock) = 0;
static size_t gAllocRecordHead GUARDED_BY(gAllocTrackerLock) = 0;
static size_t gAllocRecordCount GUARDED_BY(gAllocTrackerLock) = 0;
@@ -600,7 +600,7 @@ std::string Dbg::GetClassName(JDWP::RefTypeId class_id) {
return StringPrintf("invalid object %p", reinterpret_cast<void*>(class_id));
}
if (!o->IsClass()) {
- return StringPrintf("non-class %p", o); // This is only used for debugging output anyway.
+ return StringPrintf("non-class %p", o); // This is only used for debugging output anyway.
}
return DescriptorToName(ClassHelper(o->AsClass()).GetDescriptor());
}
@@ -1861,7 +1861,7 @@ JDWP::JdwpError Dbg::GetThreadFrames(JDWP::ObjectId thread_id, size_t start_fram
// annotalysis.
virtual bool VisitFrame() NO_THREAD_SAFETY_ANALYSIS {
if (GetMethod()->IsRuntimeMethod()) {
- return true; // The debugger can't do anything useful with a frame that has no Method*.
+ return true; // The debugger can't do anything useful with a frame that has no Method*.
}
if (depth_ >= start_frame_ + frame_count_) {
return false;
@@ -2511,14 +2511,14 @@ JDWP::JdwpError Dbg::ConfigureStep(JDWP::ObjectId thread_id, JDWP::JdwpStepSize
}
// Otherwise, if we're already in a valid range for this line,
// just keep going (shouldn't really happen)...
- } else if (context->last_pc_valid) { // and the line number is new
+ } else if (context->last_pc_valid) { // and the line number is new
// Add everything from the last entry up until here to the set
for (uint32_t dex_pc = context->last_pc; dex_pc < address; ++dex_pc) {
gSingleStepControl.dex_pcs.insert(dex_pc);
}
context->last_pc_valid = false;
}
- return false; // There may be multiple entries for any given line.
+ return false; // There may be multiple entries for any given line.
}
// TODO: Enable annotalysis. We know lock is held in constructor, but abstraction confuses
@@ -2655,7 +2655,7 @@ JDWP::JdwpError Dbg::InvokeMethod(JDWP::ObjectId thread_id, JDWP::ObjectId objec
}
if (suspend_count > 1) {
LOG(ERROR) << *targetThread << " suspend count too deep for method invocation: " << suspend_count;
- return JDWP::ERR_THREAD_SUSPENDED; // Probably not expected here.
+ return JDWP::ERR_THREAD_SUSPENDED; // Probably not expected here.
}
JDWP::JdwpError status;
@@ -3033,7 +3033,7 @@ void Dbg::DdmSetThreadNotification(bool enable) {
}
{
ScopedObjectAccess soa(self);
- typedef std::list<Thread*>::const_iterator It; // TODO: C++0x auto
+ typedef std::list<Thread*>::const_iterator It; // TODO: C++0x auto
for (It it = threads.begin(), end = threads.end(); it != end; ++it) {
Dbg::DdmSendThreadNotification(*it, CHUNK_TYPE("THCR"));
}
@@ -3144,11 +3144,11 @@ void Dbg::DdmSendHeapInfo(HpifWhen reason) {
gc::Heap* heap = Runtime::Current()->GetHeap();
std::vector<uint8_t> bytes;
JDWP::Append4BE(bytes, heap_count);
- JDWP::Append4BE(bytes, 1); // Heap id (bogus; we only have one heap).
+ JDWP::Append4BE(bytes, 1); // Heap id (bogus; we only have one heap).
JDWP::Append8BE(bytes, MilliTime());
JDWP::Append1BE(bytes, reason);
- JDWP::Append4BE(bytes, heap->GetMaxMemory()); // Max allowed heap size in bytes.
- JDWP::Append4BE(bytes, heap->GetTotalMemory()); // Current heap size in bytes.
+ JDWP::Append4BE(bytes, heap->GetMaxMemory()); // Max allowed heap size in bytes.
+ JDWP::Append4BE(bytes, heap->GetTotalMemory()); // Current heap size in bytes.
JDWP::Append4BE(bytes, heap->GetBytesAllocated());
JDWP::Append4BE(bytes, heap->GetObjectsAllocated());
CHECK_EQ(bytes.size(), 4U + (heap_count * (4 + 8 + 1 + 4 + 4 + 4 + 4)));
@@ -3207,11 +3207,11 @@ class HeapChunkContext {
}
// Start a new HPSx chunk.
- JDWP::Write4BE(&p_, 1); // Heap id (bogus; we only have one heap).
- JDWP::Write1BE(&p_, 8); // Size of allocation unit, in bytes.
+ JDWP::Write4BE(&p_, 1); // Heap id (bogus; we only have one heap).
+ JDWP::Write1BE(&p_, 8); // Size of allocation unit, in bytes.
- JDWP::Write4BE(&p_, reinterpret_cast<uintptr_t>(chunk_ptr)); // virtual address of segment start.
- JDWP::Write4BE(&p_, 0); // offset of this piece (relative to the virtual address).
+ JDWP::Write4BE(&p_, reinterpret_cast<uintptr_t>(chunk_ptr)); // virtual address of segment start.
+ JDWP::Write4BE(&p_, 0); // offset of this piece (relative to the virtual address).
// [u4]: length of piece, in allocation units
// We won't know this until we're done, so save the offset and stuff in a dummy value.
pieceLenField_ = p_;
@@ -3414,7 +3414,7 @@ void Dbg::DdmSendHeapSegments(bool native) {
// First, send a heap start chunk.
uint8_t heap_id[4];
- JDWP::Set4BE(&heap_id[0], 1); // Heap id (bogus; we only have one heap).
+ JDWP::Set4BE(&heap_id[0], 1); // Heap id (bogus; we only have one heap).
Dbg::DdmSendChunk(native ? CHUNK_TYPE("NHST") : CHUNK_TYPE("HPST"), sizeof(heap_id), heap_id);
// Send a series of heap segment chunks.
@@ -3600,7 +3600,7 @@ class StringTable {
}
size_t IndexOf(const char* s) const {
- typedef std::set<std::string>::const_iterator It; // TODO: C++0x auto
+ typedef std::set<std::string>::const_iterator It; // TODO: C++0x auto
It it = table_.find(s);
if (it == table_.end()) {
LOG(FATAL) << "IndexOf(\"" << s << "\") failed";
@@ -3613,7 +3613,7 @@ class StringTable {
}
void WriteTo(std::vector<uint8_t>& bytes) const {
- typedef std::set<std::string>::const_iterator It; // TODO: C++0x auto
+ typedef std::set<std::string>::const_iterator It; // TODO: C++0x auto
for (It it = table_.begin(); it != table_.end(); ++it) {
const char* s = (*it).c_str();
size_t s_len = CountModifiedUtf8Chars(s);
@@ -3730,7 +3730,7 @@ jbyteArray Dbg::GetRecentAllocations() {
// (2b) number of source file name strings
JDWP::Append2BE(bytes, gAllocRecordCount);
size_t string_table_offset = bytes.size();
- JDWP::Append4BE(bytes, 0); // We'll patch this later...
+ JDWP::Append4BE(bytes, 0); // We'll patch this later...
JDWP::Append2BE(bytes, class_names.Size());
JDWP::Append2BE(bytes, method_names.Size());
JDWP::Append2BE(bytes, filenames.Size());
diff --git a/runtime/debugger.h b/runtime/debugger.h
index 9005fda392..6b7e2ba6e8 100644
--- a/runtime/debugger.h
+++ b/runtime/debugger.h
@@ -270,7 +270,7 @@ class Dbg {
static JDWP::JdwpError GetThreadStatus(JDWP::ObjectId thread_id, JDWP::JdwpThreadStatus* pThreadStatus, JDWP::JdwpSuspendStatus* pSuspendStatus);
static JDWP::JdwpError GetThreadDebugSuspendCount(JDWP::ObjectId thread_id, JDWP::ExpandBuf* pReply);
- //static void WaitForSuspend(JDWP::ObjectId thread_id);
+ // static void WaitForSuspend(JDWP::ObjectId thread_id);
// Fills 'thread_ids' with the threads in the given thread group. If thread_group_id == 0,
// returns all threads.
diff --git a/runtime/dex_file.cc b/runtime/dex_file.cc
index cd34c3c89e..cbdc430b8c 100644
--- a/runtime/dex_file.cc
+++ b/runtime/dex_file.cc
@@ -234,7 +234,7 @@ const DexFile* DexFile::OpenMemory(const byte* base,
const std::string& location,
uint32_t location_checksum,
MemMap* mem_map) {
- CHECK_ALIGNED(base, 4); // various dex file structures must be word aligned
+ CHECK_ALIGNED(base, 4); // various dex file structures must be word aligned
UniquePtr<DexFile> dex_file(new DexFile(base, size, location, location_checksum, mem_map));
if (!dex_file->Init()) {
return NULL;
diff --git a/runtime/dex_file.h b/runtime/dex_file.h
index 8edeb18418..76947e5cee 100644
--- a/runtime/dex_file.h
+++ b/runtime/dex_file.h
@@ -62,7 +62,7 @@ class DexFile {
// Raw header_item.
struct Header {
uint8_t magic_[8];
- uint32_t checksum_; // See also location_checksum_
+ uint32_t checksum_; // See also location_checksum_
uint8_t signature_[kSha1DigestSize];
uint32_t file_size_; // size of entire file
uint32_t header_size_; // offset to start of next section
diff --git a/runtime/dex_file_verifier.cc b/runtime/dex_file_verifier.cc
index 6df4411565..09e929c2d0 100644
--- a/runtime/dex_file_verifier.cc
+++ b/runtime/dex_file_verifier.cc
@@ -1299,7 +1299,7 @@ bool DexFileVerifier::CheckIntraSection() {
}
bool DexFileVerifier::CheckOffsetToTypeMap(uint32_t offset, uint16_t type) {
- typedef SafeMap<uint32_t, uint16_t>::iterator It; // TODO: C++0x auto
+ typedef SafeMap<uint32_t, uint16_t>::iterator It; // TODO: C++0x auto
It it = offset_to_type_map_.find(offset);
if (it == offset_to_type_map_.end()) {
LOG(ERROR) << StringPrintf("No data map entry found @ %x; expected %x", offset, type);
diff --git a/runtime/dex_instruction-inl.h b/runtime/dex_instruction-inl.h
index 2cb5235417..6e21273358 100644
--- a/runtime/dex_instruction-inl.h
+++ b/runtime/dex_instruction-inl.h
@@ -131,7 +131,7 @@ inline uint16_t Instruction::VRegA_32x() const {
inline uint4_t Instruction::VRegA_35c() const {
DCHECK_EQ(FormatOf(Opcode()), k35c);
- return InstB(); // This is labeled A in the spec.
+ return InstB(); // This is labeled A in the spec.
}
inline uint8_t Instruction::VRegA_3rc() const {
@@ -295,7 +295,7 @@ inline void Instruction::GetArgs(uint32_t arg[5]) const {
* method constant (or equivalent) is always in vB.
*/
uint16_t regList = Fetch16(2);
- uint4_t count = InstB(); // This is labeled A in the spec.
+ uint4_t count = InstB(); // This is labeled A in the spec.
/*
* Copy the argument registers into the arg[] array, and
@@ -310,13 +310,13 @@ inline void Instruction::GetArgs(uint32_t arg[5]) const {
case 3: arg[2] = (regList >> 8) & 0x0f;
case 2: arg[1] = (regList >> 4) & 0x0f;
case 1: arg[0] = regList & 0x0f; break;
- case 0: break; // Valid, but no need to do anything.
+ case 0: break; // Valid, but no need to do anything.
default:
LOG(ERROR) << "Invalid arg count in 35c (" << count << ")";
return;
}
}
-} // namespace art
+} // namespace art
#endif // ART_RUNTIME_DEX_INSTRUCTION_INL_H_
diff --git a/runtime/dex_instruction.cc b/runtime/dex_instruction.cc
index dcaa4cc27e..09fa19e4d5 100644
--- a/runtime/dex_instruction.cc
+++ b/runtime/dex_instruction.cc
@@ -220,7 +220,7 @@ void Instruction::Decode(uint32_t &vA, uint32_t &vB, uint64_t &vB_wide, uint32_t
break;
case k11n: // op vA, #+B
vA = INST_A(insn);
- vB = (int32_t) (INST_B(insn) << 28) >> 28; // sign extend 4-bit value
+ vB = (int32_t) (INST_B(insn) << 28) >> 28; // sign extend 4-bit value
break;
case k11x: // op vAA
vA = INST_AA(insn);
@@ -302,7 +302,7 @@ void Instruction::Decode(uint32_t &vA, uint32_t &vB, uint64_t &vB_wide, uint32_t
uint16_t regList;
int count;
- vA = INST_B(insn); // This is labeled A in the spec.
+ vA = INST_B(insn); // This is labeled A in the spec.
vB = FETCH(1);
regList = FETCH(2);
@@ -321,7 +321,7 @@ void Instruction::Decode(uint32_t &vA, uint32_t &vB, uint64_t &vB_wide, uint32_t
case 3: arg[2] = (regList >> 8) & 0x0f;
case 2: arg[1] = (regList >> 4) & 0x0f;
case 1: vC = arg[0] = regList & 0x0f; break;
- case 0: break; // Valid, but no need to do anything.
+ case 0: break; // Valid, but no need to do anything.
default:
LOG(ERROR) << "Invalid arg count in 35c (" << count << ")";
return;
@@ -561,7 +561,7 @@ std::string Instruction::DumpString(const DexFile* file) const {
}
os << "v" << arg[i];
}
- os << "}, // vtable@" << method_idx;
+ os << "}, // vtable@" << method_idx;
break;
} // else fall-through
default:
diff --git a/runtime/dex_instruction.h b/runtime/dex_instruction.h
index 74789bbad3..13b0f1c270 100644
--- a/runtime/dex_instruction.h
+++ b/runtime/dex_instruction.h
@@ -82,7 +82,7 @@ class Instruction {
// TODO: the code layout below is deliberate to avoid this enum being picked up by
// generate-operator-out.py.
enum Code
- { // NOLINT(whitespace/braces)
+ { // NOLINT(whitespace/braces)
#define INSTRUCTION_ENUM(opcode, cname, p, f, r, i, a, v) cname = opcode,
#include "dex_instruction_list.h"
DEX_INSTRUCTION_LIST(INSTRUCTION_ENUM)
@@ -124,7 +124,7 @@ class Instruction {
kThrow = 0x08, // could cause an exception to be thrown
kReturn = 0x10, // returns, no additional statements
kInvoke = 0x20, // a flavor of invoke
- kUnconditional = 0x40, // unconditional branch
+ kUnconditional = 0x40, // unconditional branch
};
enum VerifyFlag {
diff --git a/runtime/dex_instruction_list.h b/runtime/dex_instruction_list.h
index 31d51c9b41..c2cd65ade5 100644
--- a/runtime/dex_instruction_list.h
+++ b/runtime/dex_instruction_list.h
@@ -302,4 +302,4 @@
V(k51l)
#endif // ART_RUNTIME_DEX_INSTRUCTION_LIST_H_
-#undef ART_RUNTIME_DEX_INSTRUCTION_LIST_H_ // the guard in this file is just for cpplint
+#undef ART_RUNTIME_DEX_INSTRUCTION_LIST_H_ // the guard in this file is just for cpplint
diff --git a/runtime/disassembler_arm.cc b/runtime/disassembler_arm.cc
index a7319a5486..879d3ac71c 100644
--- a/runtime/disassembler_arm.cc
+++ b/runtime/disassembler_arm.cc
@@ -133,7 +133,7 @@ struct Rm {
std::ostream& operator<<(std::ostream& os, const Rm& r) {
os << r.rm;
if (r.shift != 0) {
- os << "-shift-" << r.shift; // TODO
+ os << "-shift-" << r.shift; // TODO
}
return os;
}
@@ -185,16 +185,16 @@ void DisassemblerArm::DumpArm(std::ostream& os, const uint8_t* instr_ptr) {
std::ostringstream args;
switch (op1) {
case 0:
- case 1: // Data processing instructions.
+ case 1: // Data processing instructions.
{
- if ((instruction & 0x0ff000f0) == 0x01200070) { // BKPT
+ if ((instruction & 0x0ff000f0) == 0x01200070) { // BKPT
opcode = "bkpt";
uint32_t imm12 = (instruction >> 8) & 0xfff;
uint32_t imm4 = (instruction & 0xf);
args << '#' << ((imm12 << 4) | imm4);
break;
}
- if ((instruction & 0x0fffffd0) == 0x012fff10) { // BX and BLX (register)
+ if ((instruction & 0x0fffffd0) == 0x012fff10) { // BX and BLX (register)
opcode = (((instruction >> 5) & 1) ? "blx" : "bx");
args << ArmRegister(instruction & 0xf);
break;
@@ -203,7 +203,7 @@ void DisassemblerArm::DumpArm(std::ostream& os, const uint8_t* instr_ptr) {
bool s = (instruction & (1 << 20)) != 0;
uint32_t op = (instruction >> 21) & 0xf;
opcode = kDataProcessingOperations[op];
- bool implicit_s = ((op & ~3) == 8); // TST, TEQ, CMP, and CMN.
+ bool implicit_s = ((op & ~3) == 8); // TST, TEQ, CMP, and CMN.
if (implicit_s) {
// Rd is unused (and not shown), and we don't show the 's' suffix either.
} else {
@@ -219,7 +219,7 @@ void DisassemblerArm::DumpArm(std::ostream& os, const uint8_t* instr_ptr) {
}
}
break;
- case 2: // Load/store word and unsigned byte.
+ case 2: // Load/store word and unsigned byte.
{
bool p = (instruction & (1 << 24)) != 0;
bool b = (instruction & (1 << 22)) != 0;
@@ -249,7 +249,7 @@ void DisassemblerArm::DumpArm(std::ostream& os, const uint8_t* instr_ptr) {
}
}
break;
- case 4: // Load/store multiple.
+ case 4: // Load/store multiple.
{
bool p = (instruction & (1 << 24)) != 0;
bool u = (instruction & (1 << 23)) != 0;
@@ -259,12 +259,12 @@ void DisassemblerArm::DumpArm(std::ostream& os, const uint8_t* instr_ptr) {
args << ArmRegister(instruction, 16) << (w ? "!" : "") << ", " << RegisterList(instruction);
}
break;
- case 5: // Branch/branch with link.
+ case 5: // Branch/branch with link.
{
bool bl = (instruction & (1 << 24)) != 0;
opcode = (bl ? "bl" : "b");
int32_t imm26 = (instruction & 0xffffff) << 2;
- int32_t imm32 = (imm26 << 6) >> 6; // Sign extend.
+ int32_t imm32 = (imm26 << 6) >> 6; // Sign extend.
DumpBranchTarget(args, instr_ptr + 8, imm32);
}
break;
@@ -344,10 +344,10 @@ size_t DisassemblerArm::DumpThumb32(std::ostream& os, const uint8_t* instr_ptr)
}
args << RegisterList(instr);
}
- } else if ((op2 & 0x64) == 4) { // 00x x1xx
+ } else if ((op2 & 0x64) == 4) { // 00x x1xx
uint32_t op3 = (instr >> 23) & 3;
uint32_t op4 = (instr >> 20) & 3;
- //uint32_t op5 = (instr >> 4) & 0xF;
+ // uint32_t op5 = (instr >> 4) & 0xF;
ArmRegister Rn(instr, 16);
ArmRegister Rt(instr, 12);
uint32_t imm8 = instr & 0xFF;
@@ -495,8 +495,8 @@ size_t DisassemblerArm::DumpThumb32(std::ostream& os, const uint8_t* instr_ptr)
uint32_t op3 = (instr >> 20) & 0x3F;
uint32_t coproc = (instr >> 8) & 0xF;
uint32_t op4 = (instr >> 4) & 0x1;
- if ((op3 == 2 || op3 == 2 || op3 == 6 || op3 == 7) || // 00x1x
- (op3 >= 8 && op3 <= 15) || (op3 >= 16 && op3 <= 31)) { // 001xxx, 01xxxx
+ if ((op3 == 2 || op3 == 2 || op3 == 6 || op3 == 7) || // 00x1x
+ (op3 >= 8 && op3 <= 15) || (op3 >= 16 && op3 <= 31)) { // 001xxx, 01xxxx
// Extension register load/store instructions
// |111|1|110|00000|0000|1111|110|000000000|
// |5 3|2|109|87654|3 0|54 2|10 |87 54 0|
@@ -519,13 +519,13 @@ size_t DisassemblerArm::DumpThumb32(std::ostream& os, const uint8_t* instr_ptr)
uint32_t d = (S == 0 ? ((Vd << 1) | D) : (Vd | (D << 4)));
if (P == 0 && U == 0 && W == 0) {
// TODO: 64bit transfers between ARM core and extension registers.
- } else if (P == 0 && U == 1 && Rn.r == 13) { // VPOP
+ } else if (P == 0 && U == 1 && Rn.r == 13) { // VPOP
opcode << "vpop" << (S == 0 ? ".f64" : ".f32");
args << d << " .. " << (d + imm8);
} else if (P == 1 && W == 0) { // VLDR
opcode << "vldr" << (S == 0 ? ".f64" : ".f32");
args << d << ", [" << Rn << ", #" << imm8 << "]";
- } else { // VLDM
+ } else { // VLDM
opcode << "vldm" << (S == 0 ? ".f64" : ".f32");
args << Rn << ", " << d << " .. " << (d + imm8);
}
@@ -553,7 +553,7 @@ size_t DisassemblerArm::DumpThumb32(std::ostream& os, const uint8_t* instr_ptr)
uint32_t Vm = instr & 0xF;
bool dp_operation = sz == 1;
switch (opc2) {
- case 0x1: // Vneg/Vsqrt
+ case 0x1: // Vneg/Vsqrt
// 1110 11101 D 11 0001 dddd 101s o1M0 mmmm
opcode << (opc3 == 1 ? "vneg" : "vsqrt") << (dp_operation ? ".f64" : ".f32");
if (dp_operation) {
@@ -562,7 +562,7 @@ size_t DisassemblerArm::DumpThumb32(std::ostream& os, const uint8_t* instr_ptr)
args << "f" << ((Vd << 1) | D) << ", " << "f" << ((Vm << 1) | M);
}
break;
- case 0x4: case 0x5: { // Vector compare
+ case 0x4: case 0x5: { // Vector compare
// 1110 11101 D 11 0100 dddd 101 sE1M0 mmmm
opcode << (opc3 == 1 ? "vcmp" : "vcmpe") << (dp_operation ? ".f64" : ".f32");
if (dp_operation) {
@@ -733,7 +733,7 @@ size_t DisassemblerArm::DumpThumb32(std::ostream& os, const uint8_t* instr_ptr)
// |111|10| op2 | |1|op3|op4 | |
uint32_t op3 = (instr >> 12) & 7;
- //uint32_t op4 = (instr >> 8) & 0xF;
+ // uint32_t op4 = (instr >> 8) & 0xF;
switch (op3) {
case 0:
if ((op2 & 0x38) != 0x38) {
@@ -852,7 +852,7 @@ size_t DisassemblerArm::DumpThumb32(std::ostream& os, const uint8_t* instr_ptr)
// |---|--|---|---|-|----|----|------|------|
// |111|11|000|op3|0| | | op4 | |
uint32_t op3 = (instr >> 21) & 7;
- //uint32_t op4 = (instr >> 6) & 0x3F;
+ // uint32_t op4 = (instr >> 6) & 0x3F;
switch (op3) {
case 0x0: case 0x4: {
// STRB Rt,[Rn,#+/-imm8] - 111 11 00 0 0 00 0 nnnn tttt 1 PUWii ii iiii
@@ -931,7 +931,7 @@ size_t DisassemblerArm::DumpThumb32(std::ostream& os, const uint8_t* instr_ptr)
break;
}
- case 0x03: case 0x0B: case 0x13: case 0x1B: { // 00xx011
+ case 0x03: case 0x0B: case 0x13: case 0x1B: { // 00xx011
// Load halfword
// |111|11|10|0 0|00|0|0000|1111|110000|000000|
// |5 3|21|09|8 7|65|4|3 0|5 2|10 6|5 0|
@@ -975,7 +975,7 @@ size_t DisassemblerArm::DumpThumb32(std::ostream& os, const uint8_t* instr_ptr)
}
break;
}
- case 0x05: case 0x0D: case 0x15: case 0x1D: { // 00xx101
+ case 0x05: case 0x0D: case 0x15: case 0x1D: { // 00xx101
// Load word
// |111|11|10|0 0|00|0|0000|1111|110000|000000|
// |5 3|21|09|8 7|65|4|3 0|5 2|10 6|5 0|
@@ -1286,7 +1286,7 @@ size_t DisassemblerArm::DumpThumb16(std::ostream& os, const uint8_t* instr_ptr)
// Flesh out the base "it" opcode with the specific collection of 't's and 'e's,
// and store up the actual condition codes we'll want to add to the next few opcodes.
size_t count = 3 - CTZ(mask);
- it_conditions_.resize(count + 2); // Plus the implicit 't', plus the "" for the IT itself.
+ it_conditions_.resize(count + 2); // Plus the implicit 't', plus the "" for the IT itself.
for (size_t i = 0; i < count; ++i) {
bool positive_cond = ((first_cond & 1) != 0);
bool positive_mask = ((mask & (1 << (3 - i))) != 0);
@@ -1298,10 +1298,10 @@ size_t DisassemblerArm::DumpThumb16(std::ostream& os, const uint8_t* instr_ptr)
it_conditions_[i] = kConditionCodeNames[first_cond ^ 1];
}
}
- it_conditions_[count] = kConditionCodeNames[first_cond]; // The implicit 't'.
+ it_conditions_[count] = kConditionCodeNames[first_cond]; // The implicit 't'.
- it_conditions_[count + 1] = ""; // No condition code for the IT itself...
- DumpCond(args, first_cond); // ...because it's considered an argument.
+ it_conditions_[count + 1] = ""; // No condition code for the IT itself...
+ DumpCond(args, first_cond); // ...because it's considered an argument.
}
break;
}
@@ -1312,7 +1312,7 @@ size_t DisassemblerArm::DumpThumb16(std::ostream& os, const uint8_t* instr_ptr)
((instr & 0xE000) == 0x8000)) {
// Load/store single data item
uint16_t opA = instr >> 12;
- //uint16_t opB = (instr >> 9) & 7;
+ // uint16_t opB = (instr >> 9) & 7;
switch (opA) {
case 0x6: {
// STR Rt, [Rn, #imm] - 01100 iiiii nnn ttt
diff --git a/runtime/disassembler_mips.cc b/runtime/disassembler_mips.cc
index 7fba4a8678..25bbae68ef 100644
--- a/runtime/disassembler_mips.cc
+++ b/runtime/disassembler_mips.cc
@@ -59,13 +59,13 @@ static const MipsInstruction gMipsInstructions[] = {
{ kRTypeMask, 6, "srlv", "DTS", },
{ kRTypeMask, 7, "srav", "DTS", },
{ kRTypeMask, 8, "jr", "S", },
- { kRTypeMask | (0x1f << 11), 9 | (31 << 11), "jalr", "S", }, // rd = 31 is implicit.
- { kRTypeMask, 9, "jalr", "DS", }, // General case.
+ { kRTypeMask | (0x1f << 11), 9 | (31 << 11), "jalr", "S", }, // rd = 31 is implicit.
+ { kRTypeMask, 9, "jalr", "DS", }, // General case.
{ kRTypeMask | (0x1f << 6), 10, "movz", "DST", },
{ kRTypeMask | (0x1f << 6), 11, "movn", "DST", },
- { kRTypeMask, 12, "syscall", "", }, // TODO: code
- { kRTypeMask, 13, "break", "", }, // TODO: code
- { kRTypeMask, 15, "sync", "", }, // TODO: type
+ { kRTypeMask, 12, "syscall", "", }, // TODO: code
+ { kRTypeMask, 13, "break", "", }, // TODO: code
+ { kRTypeMask, 15, "sync", "", }, // TODO: type
{ kRTypeMask, 16, "mfhi", "D", },
{ kRTypeMask, 17, "mthi", "S", },
{ kRTypeMask, 18, "mflo", "D", },
@@ -99,7 +99,7 @@ static const MipsInstruction gMipsInstructions[] = {
{ kSpecial2Mask | 0xffff, (28 << kOpcodeShift) | 2, "mul", "DST" },
{ kSpecial2Mask | 0xffff, (28 << kOpcodeShift) | 4, "msub", "ST" },
{ kSpecial2Mask | 0xffff, (28 << kOpcodeShift) | 5, "msubu", "ST" },
- { kSpecial2Mask | 0x3f, (28 << kOpcodeShift) | 0x3f, "sdbbp", "" }, // TODO: code
+ { kSpecial2Mask | 0x3f, (28 << kOpcodeShift) | 0x3f, "sdbbp", "" }, // TODO: code
// J-type instructions.
{ kJTypeMask, 2 << kOpcodeShift, "j", "L" },
@@ -171,17 +171,17 @@ static uint32_t ReadU32(const uint8_t* ptr) {
static void DumpMips(std::ostream& os, const uint8_t* instr_ptr) {
uint32_t instruction = ReadU32(instr_ptr);
- uint32_t rs = (instruction >> 21) & 0x1f; // I-type, R-type.
- uint32_t rt = (instruction >> 16) & 0x1f; // I-type, R-type.
- uint32_t rd = (instruction >> 11) & 0x1f; // R-type.
- uint32_t sa = (instruction >> 6) & 0x1f; // R-type.
+ uint32_t rs = (instruction >> 21) & 0x1f; // I-type, R-type.
+ uint32_t rt = (instruction >> 16) & 0x1f; // I-type, R-type.
+ uint32_t rd = (instruction >> 11) & 0x1f; // R-type.
+ uint32_t sa = (instruction >> 6) & 0x1f; // R-type.
std::string opcode;
std::ostringstream args;
// TODO: remove this!
uint32_t op = (instruction >> 26) & 0x3f;
- uint32_t function = (instruction & 0x3f); // R-type.
+ uint32_t function = (instruction & 0x3f); // R-type.
opcode = StringPrintf("op=%d fn=%d", op, function);
for (size_t i = 0; i < arraysize(gMipsInstructions); ++i) {
@@ -189,22 +189,22 @@ static void DumpMips(std::ostream& os, const uint8_t* instr_ptr) {
opcode = gMipsInstructions[i].name;
for (const char* args_fmt = gMipsInstructions[i].args_fmt; *args_fmt; ++args_fmt) {
switch (*args_fmt) {
- case 'A': // sa (shift amount).
+ case 'A': // sa (shift amount).
args << sa;
break;
- case 'B': // Branch offset.
+ case 'B': // Branch offset.
{
int32_t offset = static_cast<int16_t>(instruction & 0xffff);
offset <<= 2;
- offset += 4; // Delay slot.
+ offset += 4; // Delay slot.
args << StringPrintf("%p ; %+d", instr_ptr + offset, offset);
}
break;
case 'D': args << 'r' << rd; break;
case 'd': args << 'f' << rd; break;
- case 'f': // Floating point "fmt".
+ case 'f': // Floating point "fmt".
{
- size_t fmt = (instruction >> 21) & 0x7; // TODO: other fmts?
+ size_t fmt = (instruction >> 21) & 0x7; // TODO: other fmts?
switch (fmt) {
case 0: opcode += ".s"; break;
case 1: opcode += ".d"; break;
@@ -213,16 +213,16 @@ static void DumpMips(std::ostream& os, const uint8_t* instr_ptr) {
case 6: opcode += ".ps"; break;
default: opcode += ".?"; break;
}
- continue; // No ", ".
+ continue; // No ", ".
}
break;
- case 'I': // Upper 16-bit immediate.
+ case 'I': // Upper 16-bit immediate.
args << reinterpret_cast<void*>((instruction & 0xffff) << 16);
break;
- case 'i': // Sign-extended lower 16-bit immediate.
+ case 'i': // Sign-extended lower 16-bit immediate.
args << static_cast<int16_t>(instruction & 0xffff);
break;
- case 'L': // Jump label.
+ case 'L': // Jump label.
{
// TODO: is this right?
uint32_t instr_index = (instruction & 0x1ffffff);
@@ -231,7 +231,7 @@ static void DumpMips(std::ostream& os, const uint8_t* instr_ptr) {
args << reinterpret_cast<void*>(target);
}
break;
- case 'O': // +x(rs)
+ case 'O': // +x(rs)
{
int32_t offset = static_cast<int16_t>(instruction & 0xffff);
args << StringPrintf("%+d(r%d)", offset, rs);
diff --git a/runtime/disassembler_x86.cc b/runtime/disassembler_x86.cc
index 48f7b6b6e9..e5cdb7b297 100644
--- a/runtime/disassembler_x86.cc
+++ b/runtime/disassembler_x86.cc
@@ -744,7 +744,7 @@ DISASSEMBLER_ENTRY(cmp,
prefixed_opcode.str().c_str())
<< args.str() << '\n';
return instr - begin_instr;
-} // NOLINT(readability/fn_size)
+} // NOLINT(readability/fn_size)
} // namespace x86
} // namespace art
diff --git a/runtime/exception_test.cc b/runtime/exception_test.cc
index 54341e3a45..a7a6d46c98 100644
--- a/runtime/exception_test.cc
+++ b/runtime/exception_test.cc
@@ -217,7 +217,7 @@ TEST_F(ExceptionTest, StackTraceElement) {
EXPECT_EQ(22, trace_array->Get(1)->GetLineNumber());
#if !defined(ART_USE_PORTABLE_COMPILER)
- thread->SetTopOfStack(NULL, 0); // Disarm the assertion that no code is running when we detach.
+ thread->SetTopOfStack(NULL, 0); // Disarm the assertion that no code is running when we detach.
#else
thread->PopShadowFrame();
thread->PopShadowFrame();
diff --git a/runtime/gc/accounting/card_table.cc b/runtime/gc/accounting/card_table.cc
index 4f2ae26c37..85034a0f27 100644
--- a/runtime/gc/accounting/card_table.cc
+++ b/runtime/gc/accounting/card_table.cc
@@ -88,7 +88,7 @@ CardTable::CardTable(MemMap* mem_map, byte* biased_begin, size_t offset)
void CardTable::ClearSpaceCards(space::ContinuousSpace* space) {
// TODO: clear just the range of the table that has been modified
byte* card_start = CardFromAddr(space->Begin());
- byte* card_end = CardFromAddr(space->End()); // Make sure to round up.
+ byte* card_end = CardFromAddr(space->End()); // Make sure to round up.
memset(reinterpret_cast<void*>(card_start), kCardClean, card_end - card_start);
}
diff --git a/runtime/gc/accounting/space_bitmap-inl.h b/runtime/gc/accounting/space_bitmap-inl.h
index d074a0f578..a4cfe3c567 100644
--- a/runtime/gc/accounting/space_bitmap-inl.h
+++ b/runtime/gc/accounting/space_bitmap-inl.h
@@ -59,7 +59,7 @@ void SpaceBitmap::VisitMarkedRange(uintptr_t visit_begin, uintptr_t visit_end,
const FingerVisitor& finger_visitor) const {
DCHECK_LT(visit_begin, visit_end);
- const size_t word_span = kAlignment * kBitsPerWord; // Equals IndexToOffset(1).
+ const size_t word_span = kAlignment * kBitsPerWord; // Equals IndexToOffset(1).
const size_t bit_index_start = (visit_begin - heap_begin_) / kAlignment;
const size_t bit_index_end = (visit_end - heap_begin_ - 1) / kAlignment;
diff --git a/runtime/gc/collector/mark_sweep.cc b/runtime/gc/collector/mark_sweep.cc
index 0cbd6fb267..89c768a34e 100644
--- a/runtime/gc/collector/mark_sweep.cc
+++ b/runtime/gc/collector/mark_sweep.cc
@@ -61,7 +61,7 @@ namespace collector {
// Performance options.
static const bool kParallelMarkStack = true;
-static const bool kDisableFinger = true; // TODO: Fix, bit rotten.
+static const bool kDisableFinger = true; // TODO: Fix, bit rotten.
static const bool kUseMarkStackPrefetch = true;
// Profiling and information flags.
@@ -1253,7 +1253,7 @@ void MarkSweep::ProcessMarkStackParallel() {
thread_pool->StartWorkers(self);
thread_pool->Wait(self, true, true);
mark_stack_->Reset();
- //LOG(INFO) << "Idle wait time " << PrettyDuration(thread_pool->GetWaitTime());
+ // LOG(INFO) << "Idle wait time " << PrettyDuration(thread_pool->GetWaitTime());
CHECK_EQ(work_chunks_created_, work_chunks_deleted_) << " some of the work chunks were leaked";
}
diff --git a/runtime/gc/collector/mark_sweep.h b/runtime/gc/collector/mark_sweep.h
index 34136d454d..d386fd6a64 100644
--- a/runtime/gc/collector/mark_sweep.h
+++ b/runtime/gc/collector/mark_sweep.h
@@ -424,7 +424,7 @@ class MarkSweep : public GarbageCollector {
bool clear_soft_references_;
- friend class AddIfReachesAllocSpaceVisitor; // Used by mod-union table.
+ friend class AddIfReachesAllocSpaceVisitor; // Used by mod-union table.
friend class CheckBitmapVisitor;
friend class CheckObjectVisitor;
friend class CheckReferenceVisitor;
diff --git a/runtime/gc/heap.cc b/runtime/gc/heap.cc
index b0ba8b6874..292fd290a6 100644
--- a/runtime/gc/heap.cc
+++ b/runtime/gc/heap.cc
@@ -523,7 +523,7 @@ bool Heap::IsHeapAddress(const mirror::Object* obj) {
}
bool Heap::IsLiveObjectLocked(const mirror::Object* obj) {
- //Locks::heap_bitmap_lock_->AssertReaderHeld(Thread::Current());
+ // Locks::heap_bitmap_lock_->AssertReaderHeld(Thread::Current());
if (obj == NULL) {
return false;
}
diff --git a/runtime/gc/space/dlmalloc_space.cc b/runtime/gc/space/dlmalloc_space.cc
index 550f44ba1e..de4917fcee 100644
--- a/runtime/gc/space/dlmalloc_space.cc
+++ b/runtime/gc/space/dlmalloc_space.cc
@@ -20,7 +20,7 @@
#include "thread.h"
#include "utils.h"
-//#include <valgrind/memcheck.h>
+// #include <valgrind/memcheck.h>
#include <valgrind.h>
namespace art {
@@ -49,7 +49,7 @@ class ValgrindDlMallocSpace : public DlMallocSpace {
virtual mirror::Object* AllocWithGrowth(Thread* self, size_t num_bytes) {
void* obj_with_rdz = DlMallocSpace::AllocWithGrowth(self, num_bytes + (2 * kValgrindRedZoneBytes));
if (obj_with_rdz != NULL) {
- //VALGRIND_MAKE_MEM_UNDEFINED();
+ // VALGRIND_MAKE_MEM_UNDEFINED();
mirror::Object* result = reinterpret_cast<mirror::Object*>(reinterpret_cast<byte*>(obj_with_rdz) +
kValgrindRedZoneBytes);
VALGRIND_MEMPOOL_ALLOC(GetMspace(), result, num_bytes);
diff --git a/runtime/gc/space/space.h b/runtime/gc/space/space.h
index 011e15567a..bc6e8185b1 100644
--- a/runtime/gc/space/space.h
+++ b/runtime/gc/space/space.h
@@ -36,7 +36,7 @@ namespace gc {
namespace accounting {
class SpaceBitmap;
-} // namespace accounting
+} // namespace accounting
class Heap;
diff --git a/runtime/hprof/hprof.cc b/runtime/hprof/hprof.cc
index 3c8099a917..d3bb2e8f5f 100644
--- a/runtime/hprof/hprof.cc
+++ b/runtime/hprof/hprof.cc
@@ -641,7 +641,7 @@ class Hprof {
// U4: low word of the 64-bit time.
U4_TO_BUF_BE(buf, 0, (uint32_t)(nowMs & 0xffffffffULL));
- fwrite(buf, 1, sizeof(uint32_t), header_fp_); //xxx fix the time
+ fwrite(buf, 1, sizeof(uint32_t), header_fp_); // xxx fix the time
}
void WriteStackTraces() {
@@ -665,7 +665,7 @@ class Hprof {
uint32_t gc_thread_serial_number_;
uint8_t gc_scan_state_;
- HprofHeapId current_heap_; // Which heap we're currently dumping.
+ HprofHeapId current_heap_; // Which heap we're currently dumping.
size_t objects_in_segment_;
FILE* header_fp_;
@@ -805,7 +805,7 @@ int Hprof::MarkRootObject(const mirror::Object* obj, jobject jniObj) {
rec->AddU1(heapTag);
rec->AddId((HprofObjectId)obj);
rec->AddU4(gc_thread_serial_number_);
- rec->AddU4((uint32_t)-1); //xxx
+ rec->AddU4((uint32_t)-1); // xxx
break;
case HPROF_CLASS_DUMP:
@@ -834,7 +834,7 @@ static int StackTraceSerialNumber(const mirror::Object* /*obj*/) {
int Hprof::DumpHeapObject(mirror::Object* obj) {
HprofRecord* rec = &current_record_;
- HprofHeapId desiredHeap = false ? HPROF_HEAP_ZYGOTE : HPROF_HEAP_APP; // TODO: zygote objects?
+ HprofHeapId desiredHeap = false ? HPROF_HEAP_ZYGOTE : HPROF_HEAP_APP; // TODO: zygote objects?
if (objects_in_segment_ >= OBJECTS_PER_SEGMENT || rec->Size() >= BYTES_PER_SEGMENT) {
StartNewHeapDumpSegment();
@@ -876,7 +876,7 @@ int Hprof::DumpHeapObject(mirror::Object* obj) {
// obj is a ClassObject.
size_t sFieldCount = thisClass->NumStaticFields();
if (sFieldCount != 0) {
- int byteLength = sFieldCount*sizeof(JValue); // TODO bogus; fields are packed
+ int byteLength = sFieldCount*sizeof(JValue); // TODO bogus; fields are packed
// Create a byte array to reflect the allocation of the
// StaticField array at the end of this class.
rec->AddU1(HPROF_PRIMITIVE_ARRAY_DUMP);
@@ -901,14 +901,14 @@ int Hprof::DumpHeapObject(mirror::Object* obj) {
if (thisClass->IsClassClass()) {
// ClassObjects have their static fields appended, so aren't all the same size.
// But they're at least this size.
- rec->AddU4(sizeof(mirror::Class)); // instance size
+ rec->AddU4(sizeof(mirror::Class)); // instance size
} else if (thisClass->IsArrayClass() || thisClass->IsPrimitive()) {
rec->AddU4(0);
} else {
- rec->AddU4(thisClass->GetObjectSize()); // instance size
+ rec->AddU4(thisClass->GetObjectSize()); // instance size
}
- rec->AddU2(0); // empty const pool
+ rec->AddU2(0); // empty const pool
FieldHelper fh;
@@ -1041,7 +1041,7 @@ int Hprof::DumpHeapObject(mirror::Object* obj) {
void Hprof::VisitRoot(const mirror::Object* obj) {
uint32_t threadId = 0; // TODO
- /*RootType*/ size_t type = 0; // TODO
+ /*RootType*/ size_t type = 0; // TODO
static const HprofHeapTag xlate[] = {
HPROF_ROOT_UNKNOWN,
diff --git a/runtime/indirect_reference_table.cc b/runtime/indirect_reference_table.cc
index 0287d745c5..0616d28802 100644
--- a/runtime/indirect_reference_table.cc
+++ b/runtime/indirect_reference_table.cc
@@ -309,7 +309,7 @@ bool IndirectReferenceTable::Remove(uint32_t cookie, IndirectRef iref) {
}
void IndirectReferenceTable::VisitRoots(RootVisitor* visitor, void* arg) {
- typedef IndirectReferenceTable::iterator It; // TODO: C++0x auto
+ typedef IndirectReferenceTable::iterator It; // TODO: C++0x auto
for (It it = begin(), end = this->end(); it != end; ++it) {
visitor(**it, arg);
}
diff --git a/runtime/indirect_reference_table.h b/runtime/indirect_reference_table.h
index 34b0f3abe2..97706b82bb 100644
--- a/runtime/indirect_reference_table.h
+++ b/runtime/indirect_reference_table.h
@@ -109,10 +109,10 @@ static mirror::Object* const kClearedJniWeakGlobal = reinterpret_cast<mirror::Ob
* For convenience these match up with enum jobjectRefType from jni.h.
*/
enum IndirectRefKind {
- kSirtOrInvalid = 0, // <<stack indirect reference table or invalid reference>>
- kLocal = 1, // <<local reference>>
- kGlobal = 2, // <<global reference>>
- kWeakGlobal = 3 // <<weak global reference>>
+ kSirtOrInvalid = 0, // <<stack indirect reference table or invalid reference>>
+ kLocal = 1, // <<local reference>>
+ kGlobal = 2, // <<global reference>>
+ kWeakGlobal = 3 // <<weak global reference>>
};
std::ostream& operator<<(std::ostream& os, const IndirectRefKind& rhs);
diff --git a/runtime/instrumentation.cc b/runtime/instrumentation.cc
index 8a05aa4725..e99fbd8d53 100644
--- a/runtime/instrumentation.cc
+++ b/runtime/instrumentation.cc
@@ -122,7 +122,7 @@ static void InstrumentationInstallStack(Thread* thread, void* arg)
LOG(INFO) << " Skipping upcall. Frame " << GetFrameId();
}
last_return_pc_ = 0;
- return true; // Ignore upcalls.
+ return true; // Ignore upcalls.
}
if (m->IsRuntimeMethod()) {
if (kVerboseInstrumentation) {
@@ -206,7 +206,7 @@ static void InstrumentationRestoreStack(Thread* thread, void* arg)
}
return true; // Ignore upcalls.
}
- typedef std::deque<instrumentation::InstrumentationStackFrame>::const_iterator It; // TODO: C++0x auto
+ typedef std::deque<instrumentation::InstrumentationStackFrame>::const_iterator It; // TODO: C++0x auto
bool removed_stub = false;
// TODO: make this search more efficient?
for (It it = instrumentation_stack_->begin(), end = instrumentation_stack_->end(); it != end;
@@ -407,7 +407,7 @@ const void* Instrumentation::GetQuickCodeFor(const mirror::AbstractMethod* metho
void Instrumentation::MethodEnterEventImpl(Thread* thread, mirror::Object* this_object,
const mirror::AbstractMethod* method,
uint32_t dex_pc) const {
- typedef std::list<InstrumentationListener*>::const_iterator It; // TODO: C++0x auto
+ typedef std::list<InstrumentationListener*>::const_iterator It; // TODO: C++0x auto
It it = method_entry_listeners_.begin();
bool is_end = (it == method_entry_listeners_.end());
// Implemented this way to prevent problems caused by modification of the list while iterating.
@@ -422,7 +422,7 @@ void Instrumentation::MethodEnterEventImpl(Thread* thread, mirror::Object* this_
void Instrumentation::MethodExitEventImpl(Thread* thread, mirror::Object* this_object,
const mirror::AbstractMethod* method,
uint32_t dex_pc, const JValue& return_value) const {
- typedef std::list<InstrumentationListener*>::const_iterator It; // TODO: C++0x auto
+ typedef std::list<InstrumentationListener*>::const_iterator It; // TODO: C++0x auto
It it = method_exit_listeners_.begin();
bool is_end = (it == method_exit_listeners_.end());
// Implemented this way to prevent problems caused by modification of the list while iterating.
@@ -438,7 +438,7 @@ void Instrumentation::MethodUnwindEvent(Thread* thread, mirror::Object* this_obj
const mirror::AbstractMethod* method,
uint32_t dex_pc) const {
if (have_method_unwind_listeners_) {
- typedef std::list<InstrumentationListener*>::const_iterator It; // TODO: C++0x auto
+ typedef std::list<InstrumentationListener*>::const_iterator It; // TODO: C++0x auto
for (It it = method_unwind_listeners_.begin(), end = method_unwind_listeners_.end(); it != end;
++it) {
(*it)->MethodUnwind(thread, method, dex_pc);
@@ -454,7 +454,7 @@ void Instrumentation::DexPcMovedEventImpl(Thread* thread, mirror::Object* this_o
// around the problem and in general we may have to move to something like reference counting to
// ensure listeners are deleted correctly.
std::list<InstrumentationListener*> copy(dex_pc_listeners_);
- typedef std::list<InstrumentationListener*>::const_iterator It; // TODO: C++0x auto
+ typedef std::list<InstrumentationListener*>::const_iterator It; // TODO: C++0x auto
for (It it = copy.begin(), end = copy.end(); it != end; ++it) {
(*it)->DexPcMoved(thread, this_object, method, dex_pc);
}
@@ -467,7 +467,7 @@ void Instrumentation::ExceptionCaughtEvent(Thread* thread, const ThrowLocation&
if (have_exception_caught_listeners_) {
DCHECK_EQ(thread->GetException(NULL), exception_object);
thread->ClearException();
- typedef std::list<InstrumentationListener*>::const_iterator It; // TODO: C++0x auto
+ typedef std::list<InstrumentationListener*>::const_iterator It; // TODO: C++0x auto
for (It it = exception_caught_listeners_.begin(), end = exception_caught_listeners_.end();
it != end; ++it) {
(*it)->ExceptionCaught(thread, throw_location, catch_method, catch_dex_pc, exception_object);
diff --git a/runtime/intern_table.cc b/runtime/intern_table.cc
index d1ad2dbadc..e2c1a64dec 100644
--- a/runtime/intern_table.cc
+++ b/runtime/intern_table.cc
@@ -40,7 +40,7 @@ void InternTable::DumpForSigQuit(std::ostream& os) const {
void InternTable::VisitRoots(RootVisitor* visitor, void* arg, bool clean_dirty) {
MutexLock mu(Thread::Current(), intern_table_lock_);
- typedef Table::const_iterator It; // TODO: C++0x auto
+ typedef Table::const_iterator It; // TODO: C++0x auto
for (It it = strong_interns_.begin(), end = strong_interns_.end(); it != end; ++it) {
visitor(it->second, arg);
}
@@ -52,7 +52,7 @@ void InternTable::VisitRoots(RootVisitor* visitor, void* arg, bool clean_dirty)
mirror::String* InternTable::Lookup(Table& table, mirror::String* s, uint32_t hash_code) {
intern_table_lock_.AssertHeld(Thread::Current());
- typedef Table::const_iterator It; // TODO: C++0x auto
+ typedef Table::const_iterator It; // TODO: C++0x auto
for (It it = table.find(hash_code), end = table.end(); it != end; ++it) {
mirror::String* existing_string = it->second;
if (existing_string->Equals(s)) {
@@ -75,7 +75,7 @@ void InternTable::RegisterStrong(mirror::String* s) {
void InternTable::Remove(Table& table, const mirror::String* s, uint32_t hash_code) {
intern_table_lock_.AssertHeld(Thread::Current());
- typedef Table::iterator It; // TODO: C++0x auto
+ typedef Table::iterator It; // TODO: C++0x auto
for (It it = table.find(hash_code), end = table.end(); it != end; ++it) {
if (it->second == s) {
table.erase(it);
@@ -166,7 +166,7 @@ bool InternTable::ContainsWeak(mirror::String* s) {
void InternTable::SweepInternTableWeaks(IsMarkedTester is_marked, void* arg) {
MutexLock mu(Thread::Current(), intern_table_lock_);
- typedef Table::iterator It; // TODO: C++0x auto
+ typedef Table::iterator It; // TODO: C++0x auto
for (It it = weak_interns_.begin(), end = weak_interns_.end(); it != end;) {
mirror::Object* object = it->second;
if (!is_marked(object, arg)) {
diff --git a/runtime/intern_table_test.cc b/runtime/intern_table_test.cc
index f6b040def2..ffb93eb672 100644
--- a/runtime/intern_table_test.cc
+++ b/runtime/intern_table_test.cc
@@ -58,7 +58,7 @@ class TestPredicate {
public:
bool IsMarked(const mirror::Object* s) const {
bool erased = false;
- typedef std::vector<const mirror::String*>::iterator It; // TODO: C++0x auto
+ typedef std::vector<const mirror::String*>::iterator It; // TODO: C++0x auto
for (It it = expected_.begin(), end = expected_.end(); it != end; ++it) {
if (*it == s) {
expected_.erase(it);
diff --git a/runtime/interpreter/interpreter.cc b/runtime/interpreter/interpreter.cc
index 57e9dbf9b8..d649d2abf2 100644
--- a/runtime/interpreter/interpreter.cc
+++ b/runtime/interpreter/interpreter.cc
@@ -74,7 +74,7 @@ static void UnstartedRuntimeInvoke(Thread* self, MethodHelper& mh,
std::string name(PrettyMethod(shadow_frame->GetMethod()));
if (name == "java.lang.Class java.lang.Class.forName(java.lang.String)") {
std::string descriptor(DotToDescriptor(shadow_frame->GetVRegReference(arg_offset)->AsString()->ToModifiedUtf8().c_str()));
- ClassLoader* class_loader = NULL; // shadow_frame.GetMethod()->GetDeclaringClass()->GetClassLoader();
+ ClassLoader* class_loader = NULL; // shadow_frame.GetMethod()->GetDeclaringClass()->GetClassLoader();
Class* found = Runtime::Current()->GetClassLinker()->FindClass(descriptor.c_str(),
class_loader);
CHECK(found != NULL) << "Class.forName failed in un-started runtime for class: "
@@ -659,7 +659,7 @@ static inline void DoIGetQuick(Thread* self, ShadowFrame& shadow_frame,
return;
}
MemberOffset field_offset(inst->VRegC_22c());
- const bool is_volatile = false; // iget-x-quick only on non volatile fields.
+ const bool is_volatile = false; // iget-x-quick only on non volatile fields.
const uint32_t vregA = inst->VRegA_22c();
switch (field_type) {
case Primitive::kPrimInt:
@@ -752,7 +752,7 @@ static inline void DoIPutQuick(Thread* self, ShadowFrame& shadow_frame,
return;
}
MemberOffset field_offset(inst->VRegC_22c());
- const bool is_volatile = false; // iput-x-quick only on non volatile fields.
+ const bool is_volatile = false; // iput-x-quick only on non volatile fields.
const uint32_t vregA = inst->VRegA_22c();
switch (field_type) {
case Primitive::kPrimInt:
diff --git a/runtime/invoke_type.h b/runtime/invoke_type.h
index cdf9be87d9..de07c72ef0 100644
--- a/runtime/invoke_type.h
+++ b/runtime/invoke_type.h
@@ -22,11 +22,11 @@
namespace art {
enum InvokeType {
- kStatic, // <<static>>
- kDirect, // <<direct>>
- kVirtual, // <<virtual>>
- kSuper, // <<super>>
- kInterface, // <<interface>>
+ kStatic, // <<static>>
+ kDirect, // <<direct>>
+ kVirtual, // <<virtual>>
+ kSuper, // <<super>>
+ kInterface, // <<interface>>
kMaxInvokeType = kInterface
};
diff --git a/runtime/jdwp/jdwp.h b/runtime/jdwp/jdwp.h
index ca118a2dab..010a2079b4 100644
--- a/runtime/jdwp/jdwp.h
+++ b/runtime/jdwp/jdwp.h
@@ -152,7 +152,7 @@ struct JdwpState {
* events at the same time, so we grab a mutex in the "set" call, and
* release it in the "clear" call.
*/
- //ObjectId GetWaitForEventThread();
+ // ObjectId GetWaitForEventThread();
void SetWaitForEventThread(ObjectId threadId);
void ClearWaitForEventThread();
@@ -291,7 +291,7 @@ struct JdwpState {
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
void SendBufferedRequest(uint32_t type, const std::vector<iovec>& iov);
- public: // TODO: fix privacy
+ public: // TODO: fix privacy
const JdwpOptions* options_;
private:
@@ -308,7 +308,7 @@ struct JdwpState {
private:
bool run;
- public: // TODO: fix privacy
+ public: // TODO: fix privacy
JdwpNetStateBase* netState;
private:
@@ -326,7 +326,7 @@ struct JdwpState {
// Linked list of events requested by the debugger (breakpoints, class prep, etc).
Mutex event_list_lock_;
JdwpEvent* event_list_ GUARDED_BY(event_list_lock_);
- int event_list_size_ GUARDED_BY(event_list_lock_); // Number of elements in event_list_.
+ int event_list_size_ GUARDED_BY(event_list_lock_); // Number of elements in event_list_.
// Used to synchronize suspension of the event thread (to avoid receiving "resume"
// events before the thread has finished suspending itself).
diff --git a/runtime/jdwp/jdwp_constants.h b/runtime/jdwp/jdwp_constants.h
index a8db325c66..9fc896d8eb 100644
--- a/runtime/jdwp/jdwp_constants.h
+++ b/runtime/jdwp/jdwp_constants.h
@@ -111,7 +111,7 @@ enum JdwpEventKind {
EK_EXCEPTION = 4,
EK_USER_DEFINED = 5,
EK_THREAD_START = 6,
- EK_THREAD_DEATH = 7, // Formerly known as THREAD_END.
+ EK_THREAD_DEATH = 7, // Formerly known as THREAD_END.
EK_CLASS_PREPARE = 8,
EK_CLASS_UNLOAD = 9,
EK_CLASS_LOAD = 10,
@@ -125,9 +125,9 @@ enum JdwpEventKind {
EK_MONITOR_CONTENDED_ENTERED = 44,
EK_MONITOR_WAIT = 45,
EK_MONITOR_WAITED = 46,
- EK_VM_START = 90, // Formerly known as VM_INIT.
+ EK_VM_START = 90, // Formerly known as VM_INIT.
EK_VM_DEATH = 99,
- EK_VM_DISCONNECTED = 100, // "Never sent across JDWP".
+ EK_VM_DISCONNECTED = 100, // "Never sent across JDWP".
};
std::ostream& operator<<(std::ostream& os, const JdwpEventKind& value);
@@ -146,7 +146,7 @@ enum JdwpModKind {
MK_FIELD_ONLY = 9,
MK_STEP = 10,
MK_INSTANCE_ONLY = 11,
- MK_SOURCE_NAME_MATCH = 12, // Since Java 6.
+ MK_SOURCE_NAME_MATCH = 12, // Since Java 6.
};
std::ostream& operator<<(std::ostream& os, const JdwpModKind& value);
diff --git a/runtime/jdwp/jdwp_event.cc b/runtime/jdwp/jdwp_event.cc
index ef5a7d3822..345549d1a0 100644
--- a/runtime/jdwp/jdwp_event.cc
+++ b/runtime/jdwp/jdwp_event.cc
@@ -248,7 +248,7 @@ void JdwpState::UnregisterEventById(uint32_t requestId) {
pEvent = pEvent->next;
}
- //LOGD("Odd: no match when removing event reqId=0x%04x", requestId);
+ // ALOGD("Odd: no match when removing event reqId=0x%04x", requestId);
}
/*
@@ -679,7 +679,7 @@ bool JdwpState::PostVMStart() {
ExpandBuf* pReq = eventPrep();
{
- MutexLock mu(Thread::Current(), event_list_lock_); // probably don't need this here
+ MutexLock mu(Thread::Current(), event_list_lock_); // probably don't need this here
VLOG(jdwp) << "EVENT: " << EK_VM_START;
VLOG(jdwp) << " suspend_policy=" << suspend_policy;
@@ -773,7 +773,7 @@ bool JdwpState::PostLocationEvent(const JdwpLocation* pLoc, ObjectId thisPtr, in
FindMatchingEvents(EK_METHOD_EXIT, &basket, match_list, &match_count);
// TODO: match EK_METHOD_EXIT_WITH_RETURN_VALUE too; we need to include the 'value', though.
- //FindMatchingEvents(EK_METHOD_EXIT_WITH_RETURN_VALUE, &basket, match_list, &match_count);
+ // FindMatchingEvents(EK_METHOD_EXIT_WITH_RETURN_VALUE, &basket, match_list, &match_count);
}
if (match_count != 0) {
VLOG(jdwp) << "EVENT: " << match_list[0]->eventKind << "(" << match_count << " total) "
diff --git a/runtime/jdwp/jdwp_handler.cc b/runtime/jdwp/jdwp_handler.cc
index 9af2f833bc..a2efc48c84 100644
--- a/runtime/jdwp/jdwp_handler.cc
+++ b/runtime/jdwp/jdwp_handler.cc
@@ -1030,7 +1030,7 @@ static JdwpError TR_Frames(JdwpState*, Request& request, ExpandBuf* pReply)
}
if (actual_frame_count <= 0) {
- return ERR_THREAD_NOT_SUSPENDED; // 0 means no managed frames (which means "in native").
+ return ERR_THREAD_NOT_SUSPENDED; // 0 means no managed frames (which means "in native").
}
if (start_frame > actual_frame_count) {
@@ -1315,7 +1315,7 @@ static JdwpError ER_Set(JdwpState* state, Request& request, ExpandBuf* pReply)
case MK_EXCEPTION_ONLY:
{
// Modifies EK_EXCEPTION events,
- mod.exceptionOnly.refTypeId = request.ReadRefTypeId(); // null => all exceptions.
+ mod.exceptionOnly.refTypeId = request.ReadRefTypeId(); // null => all exceptions.
mod.exceptionOnly.caught = request.ReadEnum1<uint8_t>("caught");
mod.exceptionOnly.uncaught = request.ReadEnum1<uint8_t>("uncaught");
}
@@ -1622,7 +1622,7 @@ static const JdwpHandlerMap gHandlers[] = {
{ 17, 1, COR_ReflectedType, "ClassObjectReference.ReflectedType" },
/* Event command set (64) */
- { 64, 100, NULL, "Event.Composite" }, // sent from VM to debugger, never received by VM
+ { 64, 100, NULL, "Event.Composite" }, // sent from VM to debugger, never received by VM
{ 199, 1, DDM_Chunk, "DDM.Chunk" },
};
diff --git a/runtime/jdwp/jdwp_priv.h b/runtime/jdwp/jdwp_priv.h
index f919f97699..4e6aadac1a 100644
--- a/runtime/jdwp/jdwp_priv.h
+++ b/runtime/jdwp/jdwp_priv.h
@@ -72,9 +72,9 @@ class JdwpNetStateBase {
ssize_t WritePacket(ExpandBuf* pReply);
ssize_t WriteBufferedPacket(const std::vector<iovec>& iov);
- int clientSock; // Active connection to debugger.
+ int clientSock; // Active connection to debugger.
- int wake_pipe_[2]; // Used to break out of select.
+ int wake_pipe_[2]; // Used to break out of select.
uint8_t input_buffer_[8192];
size_t input_count_;
diff --git a/runtime/jdwp/jdwp_request.cc b/runtime/jdwp/jdwp_request.cc
index 440b51b6e3..a9dd1e1790 100644
--- a/runtime/jdwp/jdwp_request.cc
+++ b/runtime/jdwp/jdwp_request.cc
@@ -140,7 +140,7 @@ JdwpTypeTag Request::ReadTypeTag() {
JdwpLocation Request::ReadLocation() {
JdwpLocation location;
- memset(&location, 0, sizeof(location)); // Allows memcmp(3) later.
+ memset(&location, 0, sizeof(location)); // Allows memcmp(3) later.
location.type_tag = ReadTypeTag();
location.class_id = ReadObjectId("class");
location.method_id = ReadMethodId();
diff --git a/runtime/jdwp/object_registry.cc b/runtime/jdwp/object_registry.cc
index 54e7a8e486..be2219c311 100644
--- a/runtime/jdwp/object_registry.cc
+++ b/runtime/jdwp/object_registry.cc
@@ -173,15 +173,15 @@ bool ObjectRegistry::IsCollected(JDWP::ObjectId id) {
MutexLock mu(self, lock_);
id_iterator it = id_to_entry_.find(id);
if (it == id_to_entry_.end()) {
- return true; // TODO: can we report that this was an invalid id?
+ return true; // TODO: can we report that this was an invalid id?
}
ObjectRegistryEntry& entry = *(it->second);
if (entry.jni_reference_type == JNIWeakGlobalRefType) {
JNIEnv* env = self->GetJniEnv();
- return env->IsSameObject(entry.jni_reference, NULL); // Has the jweak been collected?
+ return env->IsSameObject(entry.jni_reference, NULL); // Has the jweak been collected?
} else {
- return false; // We hold a strong reference, so we know this is live.
+ return false; // We hold a strong reference, so we know this is live.
}
}
diff --git a/runtime/jni_internal.cc b/runtime/jni_internal.cc
index 72d9aea2f9..858ac34134 100644
--- a/runtime/jni_internal.cc
+++ b/runtime/jni_internal.cc
@@ -69,20 +69,20 @@ using ::art::mirror::Throwable;
namespace art {
-static const size_t kMonitorsInitial = 32; // Arbitrary.
-static const size_t kMonitorsMax = 4096; // Arbitrary sanity check.
+static const size_t kMonitorsInitial = 32; // Arbitrary.
+static const size_t kMonitorsMax = 4096; // Arbitrary sanity check.
-static const size_t kLocalsInitial = 64; // Arbitrary.
-static const size_t kLocalsMax = 512; // Arbitrary sanity check.
+static const size_t kLocalsInitial = 64; // Arbitrary.
+static const size_t kLocalsMax = 512; // Arbitrary sanity check.
-static const size_t kPinTableInitial = 16; // Arbitrary.
-static const size_t kPinTableMax = 1024; // Arbitrary sanity check.
+static const size_t kPinTableInitial = 16; // Arbitrary.
+static const size_t kPinTableMax = 1024; // Arbitrary sanity check.
-static size_t gGlobalsInitial = 512; // Arbitrary.
-static size_t gGlobalsMax = 51200; // Arbitrary sanity check. (Must fit in 16 bits.)
+static size_t gGlobalsInitial = 512; // Arbitrary.
+static size_t gGlobalsMax = 51200; // Arbitrary sanity check. (Must fit in 16 bits.)
-static const size_t kWeakGlobalsInitial = 16; // Arbitrary.
-static const size_t kWeakGlobalsMax = 51200; // Arbitrary sanity check. (Must fit in 16 bits.)
+static const size_t kWeakGlobalsInitial = 16; // Arbitrary.
+static const size_t kWeakGlobalsMax = 51200; // Arbitrary sanity check. (Must fit in 16 bits.)
static jweak AddWeakGlobalReference(ScopedObjectAccess& soa, Object* obj)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
@@ -591,7 +591,7 @@ class Libraries {
}
private:
- typedef SafeMap<std::string, SharedLibrary*>::const_iterator It; // TODO: C++0x auto
+ typedef SafeMap<std::string, SharedLibrary*>::const_iterator It; // TODO: C++0x auto
SafeMap<std::string, SharedLibrary*> libraries_;
};
@@ -1796,7 +1796,7 @@ class JNI {
String* s = soa.Decode<String*>(java_string);
size_t byte_count = s->GetUtfLength();
char* bytes = new char[byte_count + 1];
- CHECK(bytes != NULL); // bionic aborts anyway.
+ CHECK(bytes != NULL); // bionic aborts anyway.
const uint16_t* chars = s->GetCharArray()->GetData() + s->GetOffset();
ConvertUtf16ToModifiedUtf8(bytes, chars, s->GetLength());
bytes[byte_count] = '\0';
@@ -2705,7 +2705,7 @@ JavaVMExt::JavaVMExt(Runtime* runtime, Runtime::ParsedOptions* options)
check_jni_abort_hook(NULL),
check_jni_abort_hook_data(NULL),
check_jni(false),
- force_copy(false), // TODO: add a way to enable this
+ force_copy(false), // TODO: add a way to enable this
trace(options->jni_trace_),
work_around_app_jni_bugs(false),
pins_lock("JNI pin table lock", kPinTableLock),
diff --git a/runtime/jvalue.h b/runtime/jvalue.h
index 0c1aadb462..b39567b297 100644
--- a/runtime/jvalue.h
+++ b/runtime/jvalue.h
@@ -32,7 +32,7 @@ union PACKED(4) JValue {
int8_t GetB() const { return b; }
void SetB(int8_t new_b) {
- i = ((static_cast<int32_t>(new_b) << 24) >> 24); // Sign-extend.
+ i = ((static_cast<int32_t>(new_b) << 24) >> 24); // Sign-extend.
}
uint16_t GetC() const { return c; }
@@ -55,7 +55,7 @@ union PACKED(4) JValue {
int16_t GetS() const { return s; }
void SetS(int16_t new_s) {
- i = ((static_cast<int32_t>(new_s) << 16) >> 16); // Sign-extend.
+ i = ((static_cast<int32_t>(new_s) << 16) >> 16); // Sign-extend.
}
uint8_t GetZ() const { return z; }
diff --git a/runtime/locks.h b/runtime/locks.h
index df3f27b4bc..88d05db0cb 100644
--- a/runtime/locks.h
+++ b/runtime/locks.h
@@ -57,7 +57,7 @@ enum LockLevel {
kMutatorLock,
kZygoteCreationLock,
- kLockLevelCount // Must come last.
+ kLockLevelCount // Must come last.
};
std::ostream& operator<<(std::ostream& os, const LockLevel& rhs);
diff --git a/runtime/log_severity.h b/runtime/log_severity.h
index bb7679d218..31682dfeee 100644
--- a/runtime/log_severity.h
+++ b/runtime/log_severity.h
@@ -20,6 +20,6 @@
typedef int LogSeverity;
const int VERBOSE = 0, DEBUG = 1, INFO = 2, WARNING = 3, ERROR = 4, FATAL = 5;
-const int INTERNAL_FATAL = 6; // For Runtime::Abort.
+const int INTERNAL_FATAL = 6; // For Runtime::Abort.
#endif // ART_RUNTIME_LOG_SEVERITY_H_
diff --git a/runtime/mem_map.cc b/runtime/mem_map.cc
index a0f389cb1e..619b73cf8a 100644
--- a/runtime/mem_map.cc
+++ b/runtime/mem_map.cc
@@ -52,9 +52,9 @@ static void CheckMapRequest(byte* addr, size_t byte_count) {
map_info_t* map_info_list = load_map_info_list(getpid());
for (map_info_t* m = map_info_list; m != NULL; m = m->next) {
- CHECK(!(base >= m->start && base < m->end) // start of new within old
- && !(limit > m->start && limit < m->end) // end of new within old
- && !(base <= m->start && limit > m->end)) // start/end of new includes all of old
+ CHECK(!(base >= m->start && base < m->end) // start of new within old
+ && !(limit > m->start && limit < m->end) // end of new within old
+ && !(base <= m->start && limit > m->end)) // start/end of new includes all of old
<< StringPrintf("Requested region 0x%08x-0x%08x overlaps with existing map 0x%08x-0x%08x (%s)\n",
base, limit,
static_cast<uint32_t>(m->start), static_cast<uint32_t>(m->end), m->name)
diff --git a/runtime/mirror/dex_cache.h b/runtime/mirror/dex_cache.h
index fd3f5f44b8..9c0f09ba21 100644
--- a/runtime/mirror/dex_cache.h
+++ b/runtime/mirror/dex_cache.h
@@ -172,7 +172,7 @@ class MANAGED DexCache : public Object {
ObjectArray<String>* strings_;
uint32_t dex_file_;
- friend struct art::DexCacheOffsets; // for verifying offset information
+ friend struct art::DexCacheOffsets; // for verifying offset information
DISALLOW_IMPLICIT_CONSTRUCTORS(DexCache);
};
diff --git a/runtime/mirror/field.cc b/runtime/mirror/field.cc
index a96e8c8d54..12f395f6b6 100644
--- a/runtime/mirror/field.cc
+++ b/runtime/mirror/field.cc
@@ -42,7 +42,7 @@ void Field::ResetClass() {
void Field::SetOffset(MemberOffset num_bytes) {
DCHECK(GetDeclaringClass()->IsLoaded() || GetDeclaringClass()->IsErroneous());
-#if 0 // TODO enable later in boot and under !NDEBUG
+#if 0 // TODO enable later in boot and under !NDEBUG
FieldHelper fh(this);
Primitive::Type type = fh.GetTypeAsPrimitiveType();
if (type == Primitive::kPrimDouble || type == Primitive::kPrimLong) {
diff --git a/runtime/mirror/throwable.h b/runtime/mirror/throwable.h
index 909228e4d9..27f6e1289a 100644
--- a/runtime/mirror/throwable.h
+++ b/runtime/mirror/throwable.h
@@ -59,7 +59,7 @@ class MANAGED Throwable : public Object {
// Field order required by test "ValidateFieldOrderOfJavaCppUnionClasses".
Throwable* cause_;
String* detail_message_;
- Object* stack_state_; // Note this is Java volatile:
+ Object* stack_state_; // Note this is Java volatile:
Object* stack_trace_;
Object* suppressed_exceptions_;
diff --git a/runtime/monitor.cc b/runtime/monitor.cc
index 11790e5c9e..09a952b3cf 100644
--- a/runtime/monitor.cc
+++ b/runtime/monitor.cc
@@ -698,7 +698,7 @@ bool Monitor::MonitorExit(Thread* self, mirror::Object* obj) {
volatile int32_t* thinp = obj->GetRawLockWordAddress();
DCHECK(self != NULL);
- //DCHECK_EQ(self->GetState(), kRunnable);
+ // DCHECK_EQ(self->GetState(), kRunnable);
DCHECK(obj != NULL);
/*
@@ -918,7 +918,7 @@ void Monitor::VisitLocks(StackVisitor* stack_visitor, void (*callback)(mirror::O
const DexFile::CodeItem* code_item = mh.GetCodeItem();
CHECK(code_item != NULL) << PrettyMethod(m);
if (code_item->tries_size_ == 0) {
- return; // No "tries" implies no synchronization, so no held locks to report.
+ return; // No "tries" implies no synchronization, so no held locks to report.
}
// Ask the verifier for the dex pcs of all the monitor-enter instructions corresponding to
@@ -979,7 +979,7 @@ void MonitorList::Add(Monitor* m) {
void MonitorList::SweepMonitorList(IsMarkedTester is_marked, void* arg) {
MutexLock mu(Thread::Current(), monitor_list_lock_);
- typedef std::list<Monitor*>::iterator It; // TODO: C++0x auto
+ typedef std::list<Monitor*>::iterator It; // TODO: C++0x auto
It it = list_.begin();
while (it != list_.end()) {
Monitor* m = *it;
diff --git a/runtime/native/dalvik_system_VMDebug.cc b/runtime/native/dalvik_system_VMDebug.cc
index 1cc42dfd57..e3ec3bcbb0 100644
--- a/runtime/native/dalvik_system_VMDebug.cc
+++ b/runtime/native/dalvik_system_VMDebug.cc
@@ -104,12 +104,12 @@ static void VMDebug_stopMethodTracing(JNIEnv*, jclass) {
static void VMDebug_startEmulatorTracing(JNIEnv*, jclass) {
UNIMPLEMENTED(WARNING);
- //dvmEmulatorTraceStart();
+ // dvmEmulatorTraceStart();
}
static void VMDebug_stopEmulatorTracing(JNIEnv*, jclass) {
UNIMPLEMENTED(WARNING);
- //dvmEmulatorTraceStop();
+ // dvmEmulatorTraceStop();
}
static jboolean VMDebug_isDebuggerConnected(JNIEnv*, jclass) {
diff --git a/runtime/native/dalvik_system_Zygote.cc b/runtime/native/dalvik_system_Zygote.cc
index 12dafe074a..4108559238 100644
--- a/runtime/native/dalvik_system_Zygote.cc
+++ b/runtime/native/dalvik_system_Zygote.cc
@@ -492,7 +492,7 @@ static pid_t ForkAndSpecializeCommon(JNIEnv* env, uid_t uid, gid_t gid, jintArra
SetSchedulerPolicy();
#if defined(HAVE_ANDROID_OS)
- { // NOLINT(whitespace/braces)
+ { // NOLINT(whitespace/braces)
const char* se_info_c_str = NULL;
UniquePtr<ScopedUtfChars> se_info;
if (java_se_info != NULL) {
diff --git a/runtime/native/java_lang_Thread.cc b/runtime/native/java_lang_Thread.cc
index 8ef190aa3f..e85ef09a13 100644
--- a/runtime/native/java_lang_Thread.cc
+++ b/runtime/native/java_lang_Thread.cc
@@ -85,7 +85,7 @@ static jint Thread_nativeGetStatus(JNIEnv* env, jobject java_thread, jboolean ha
case kSuspended: return kJavaRunnable;
// Don't add a 'default' here so the compiler can spot incompatible enum changes.
}
- return -1; // Unreachable.
+ return -1; // Unreachable.
}
static jboolean Thread_nativeHoldsLock(JNIEnv* env, jobject java_thread, jobject java_object) {
diff --git a/runtime/oat/runtime/arm/context_arm.cc b/runtime/oat/runtime/arm/context_arm.cc
index 4e42e94e60..6b9538e801 100644
--- a/runtime/oat/runtime/arm/context_arm.cc
+++ b/runtime/oat/runtime/arm/context_arm.cc
@@ -71,7 +71,7 @@ void ArmContext::FillCalleeSaves(const StackVisitor& fr) {
void ArmContext::SetGPR(uint32_t reg, uintptr_t value) {
DCHECK_LT(reg, static_cast<uint32_t>(kNumberOfCoreRegisters));
- DCHECK_NE(gprs_[reg], &gZero); // Can't overwrite this static value since they are never reset.
+ DCHECK_NE(gprs_[reg], &gZero); // Can't overwrite this static value since they are never reset.
DCHECK(gprs_[reg] != NULL);
*gprs_[reg] = value;
}
diff --git a/runtime/oat/runtime/mips/context_mips.cc b/runtime/oat/runtime/mips/context_mips.cc
index cbd63d806e..a78e5ee80d 100644
--- a/runtime/oat/runtime/mips/context_mips.cc
+++ b/runtime/oat/runtime/mips/context_mips.cc
@@ -70,7 +70,7 @@ void MipsContext::FillCalleeSaves(const StackVisitor& fr) {
void MipsContext::SetGPR(uint32_t reg, uintptr_t value) {
CHECK_LT(reg, static_cast<uint32_t>(kNumberOfCoreRegisters));
- CHECK_NE(gprs_[reg], &gZero); // Can't overwrite this static value since they are never reset.
+ CHECK_NE(gprs_[reg], &gZero); // Can't overwrite this static value since they are never reset.
CHECK(gprs_[reg] != NULL);
*gprs_[reg] = value;
}
diff --git a/runtime/oat/runtime/support_interpreter.cc b/runtime/oat/runtime/support_interpreter.cc
index fc59e2b77f..78b7e10b2a 100644
--- a/runtime/oat/runtime/support_interpreter.cc
+++ b/runtime/oat/runtime/support_interpreter.cc
@@ -83,7 +83,7 @@ extern "C" uint64_t artInterpreterEntry(mirror::AbstractMethod* method, Thread*
const DexFile::CodeItem* code_item = mh.GetCodeItem();
uint16_t num_regs = code_item->registers_size_;
void* memory = alloca(ShadowFrame::ComputeSize(num_regs));
- ShadowFrame* shadow_frame(ShadowFrame::Create(num_regs, NULL, // No last shadow coming from quick.
+ ShadowFrame* shadow_frame(ShadowFrame::Create(num_regs, NULL, // No last shadow coming from quick.
method, 0, memory));
size_t first_arg_reg = code_item->registers_size_ - code_item->ins_size_;
BuildShadowFrameVisitor shadow_frame_builder(mh, sp, *shadow_frame, first_arg_reg);
diff --git a/runtime/oat/runtime/support_jni.cc b/runtime/oat/runtime/support_jni.cc
index 25f6930dd0..2d31160a4b 100644
--- a/runtime/oat/runtime/support_jni.cc
+++ b/runtime/oat/runtime/support_jni.cc
@@ -148,7 +148,7 @@ extern "C" const void* artWorkAroundAppJniBugs(Thread* self, intptr_t* sp)
}
} else {
if (reg_num == 2) {
- arg_ptr++; // move through register arguments
+ arg_ptr++; // move through register arguments
reg_num++;
} else if (reg_num == 3) {
arg_ptr = sp + 8; // skip to outgoing stack arguments
diff --git a/runtime/oat/runtime/support_stubs.cc b/runtime/oat/runtime/support_stubs.cc
index 096cb9c622..f2af6d28dc 100644
--- a/runtime/oat/runtime/support_stubs.cc
+++ b/runtime/oat/runtime/support_stubs.cc
@@ -116,7 +116,7 @@ extern "C" const void* artPortableResolutionTrampoline(mirror::AbstractMethod* c
if (LIKELY(called_class->IsInitialized())) {
code = called->GetEntryPointFromCompiledCode();
// TODO: remove this after we solve the link issue.
- { // for lazy link.
+ { // for lazy link.
if (code == NULL) {
code = linker->GetOatCodeFor(called);
}
@@ -130,7 +130,7 @@ extern "C" const void* artPortableResolutionTrampoline(mirror::AbstractMethod* c
// No trampoline for non-static methods.
code = called->GetEntryPointFromCompiledCode();
// TODO: remove this after we solve the link issue.
- { // for lazy link.
+ { // for lazy link.
if (code == NULL) {
code = linker->GetOatCodeFor(called);
}
diff --git a/runtime/oat/runtime/x86/oat_support_entrypoints_x86.cc b/runtime/oat/runtime/x86/oat_support_entrypoints_x86.cc
index a90a583e9f..7dfb07c21e 100644
--- a/runtime/oat/runtime/x86/oat_support_entrypoints_x86.cc
+++ b/runtime/oat/runtime/x86/oat_support_entrypoints_x86.cc
@@ -165,16 +165,16 @@ void InitEntryPoints(EntryPoints* points) {
points->pUnlockObjectFromCode = art_quick_unlock_object_from_code;
// Math
- //points->pCmpgDouble = NULL; // Not needed on x86.
- //points->pCmpgFloat = NULL; // Not needed on x86.
- //points->pCmplDouble = NULL; // Not needed on x86.
- //points->pCmplFloat = NULL; // Not needed on x86.
+ // points->pCmpgDouble = NULL; // Not needed on x86.
+ // points->pCmpgFloat = NULL; // Not needed on x86.
+ // points->pCmplDouble = NULL; // Not needed on x86.
+ // points->pCmplFloat = NULL; // Not needed on x86.
points->pFmod = art_quick_fmod_from_code;
points->pL2d = art_quick_l2d_from_code;
points->pFmodf = art_quick_fmodf_from_code;
points->pL2f = art_quick_l2f_from_code;
- //points->pD2iz = NULL; // Not needed on x86.
- //points->pF2iz = NULL; // Not needed on x86.
+ // points->pD2iz = NULL; // Not needed on x86.
+ // points->pF2iz = NULL; // Not needed on x86.
points->pIdivmod = art_quick_idivmod_from_code;
points->pD2l = art_quick_d2l_from_code;
points->pF2l = art_quick_f2l_from_code;
diff --git a/runtime/oat_test.cc b/runtime/oat_test.cc
index 217e2d8743..9fb26380c3 100644
--- a/runtime/oat_test.cc
+++ b/runtime/oat_test.cc
@@ -160,7 +160,7 @@ TEST_F(OatTest, OatHeaderIsValid) {
char* magic = const_cast<char*>(oat_header.GetMagic());
strcpy(magic, ""); // bad magic
ASSERT_FALSE(oat_header.IsValid());
- strcpy(magic, "oat\n000"); // bad version
+ strcpy(magic, "oat\n000"); // bad version
ASSERT_FALSE(oat_header.IsValid());
}
diff --git a/runtime/reference_table.cc b/runtime/reference_table.cc
index 192535ab02..de64c26155 100644
--- a/runtime/reference_table.cc
+++ b/runtime/reference_table.cc
@@ -232,7 +232,7 @@ void ReferenceTable::Dump(std::ostream& os, const Table& entries) {
}
void ReferenceTable::VisitRoots(RootVisitor* visitor, void* arg) {
- typedef Table::const_iterator It; // TODO: C++0x auto
+ typedef Table::const_iterator It; // TODO: C++0x auto
for (It it = entries_.begin(), end = entries_.end(); it != end; ++it) {
visitor(*it, arg);
}
diff --git a/runtime/reference_table.h b/runtime/reference_table.h
index 4b6b50e183..e369fd0de5 100644
--- a/runtime/reference_table.h
+++ b/runtime/reference_table.h
@@ -53,7 +53,7 @@ class ReferenceTable {
typedef std::vector<const mirror::Object*> Table;
static void Dump(std::ostream& os, const Table& entries)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
- friend class IndirectReferenceTable; // For Dump.
+ friend class IndirectReferenceTable; // For Dump.
std::string name_;
Table entries_;
diff --git a/runtime/reflection.cc b/runtime/reflection.cc
index 359b539fff..8e478ff969 100644
--- a/runtime/reflection.cc
+++ b/runtime/reflection.cc
@@ -270,7 +270,7 @@ mirror::Object* BoxPrimitive(Primitive::Type src_class, const JValue& value) {
static std::string UnboxingFailureKind(mirror::AbstractMethod* m, int index, mirror::Field* f)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
if (m != NULL && index != -1) {
- ++index; // Humans count from 1.
+ ++index; // Humans count from 1.
return StringPrintf("method %s argument %d", PrettyMethod(m, false).c_str(), index);
}
if (f != NULL) {
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index 48ee127d21..35667e7d06 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -63,7 +63,7 @@
#include "verifier/method_verifier.h"
#include "well_known_classes.h"
-#include "JniConstants.h" // Last to avoid LOG redefinition in ics-mr1-plus-art.
+#include "JniConstants.h" // Last to avoid LOG redefinition in ics-mr1-plus-art.
namespace art {
@@ -340,7 +340,7 @@ Runtime::ParsedOptions* Runtime::ParsedOptions::Create(const Options& options, b
parsed->heap_growth_limit_ = 0; // 0 means no growth limit.
// Default to number of processors minus one since the main GC thread also does work.
parsed->heap_gc_threads_ = sysconf(_SC_NPROCESSORS_CONF) - 1;
- parsed->stack_size_ = 0; // 0 means default.
+ parsed->stack_size_ = 0; // 0 means default.
parsed->is_compiler_ = false;
parsed->is_zygote_ = false;
@@ -352,23 +352,23 @@ Runtime::ParsedOptions* Runtime::ParsedOptions::Create(const Options& options, b
parsed->hook_vfprintf_ = vfprintf;
parsed->hook_exit_ = exit;
- parsed->hook_abort_ = NULL; // We don't call abort(3) by default; see Runtime::Abort.
+ parsed->hook_abort_ = NULL; // We don't call abort(3) by default; see Runtime::Abort.
parsed->small_mode_ = false;
parsed->small_mode_method_threshold_ = Runtime::kDefaultSmallModeMethodThreshold;
parsed->small_mode_method_dex_size_limit_ = Runtime::kDefaultSmallModeMethodDexSizeLimit;
parsed->sea_ir_mode_ = false;
-// gLogVerbosity.class_linker = true; // TODO: don't check this in!
-// gLogVerbosity.compiler = true; // TODO: don't check this in!
-// gLogVerbosity.heap = true; // TODO: don't check this in!
-// gLogVerbosity.gc = true; // TODO: don't check this in!
-// gLogVerbosity.jdwp = true; // TODO: don't check this in!
-// gLogVerbosity.jni = true; // TODO: don't check this in!
-// gLogVerbosity.monitor = true; // TODO: don't check this in!
-// gLogVerbosity.startup = true; // TODO: don't check this in!
-// gLogVerbosity.third_party_jni = true; // TODO: don't check this in!
-// gLogVerbosity.threads = true; // TODO: don't check this in!
+// gLogVerbosity.class_linker = true; // TODO: don't check this in!
+// gLogVerbosity.compiler = true; // TODO: don't check this in!
+// gLogVerbosity.heap = true; // TODO: don't check this in!
+// gLogVerbosity.gc = true; // TODO: don't check this in!
+// gLogVerbosity.jdwp = true; // TODO: don't check this in!
+// gLogVerbosity.jni = true; // TODO: don't check this in!
+// gLogVerbosity.monitor = true; // TODO: don't check this in!
+// gLogVerbosity.startup = true; // TODO: don't check this in!
+// gLogVerbosity.third_party_jni = true; // TODO: don't check this in!
+// gLogVerbosity.threads = true; // TODO: don't check this in!
parsed->method_trace_ = false;
parsed->method_trace_file_ = "/data/method-trace-file.bin";
@@ -582,7 +582,7 @@ Runtime::ParsedOptions* Runtime::ParsedOptions::Create(const Options& options, b
// TODO: print usage via vfprintf
LOG(ERROR) << "Unrecognized option " << option;
// TODO: this should exit, but for now tolerate unknown options
- //return NULL;
+ // return NULL;
}
}
}
@@ -613,7 +613,7 @@ bool Runtime::Create(const Options& options, bool ignore_unrecognized) {
if (Runtime::instance_ != NULL) {
return false;
}
- InitLogging(NULL); // Calls Locks::Init() as a side effect.
+ InitLogging(NULL); // Calls Locks::Init() as a side effect.
instance_ = new Runtime;
if (!instance_->Init(options, ignore_unrecognized)) {
delete instance_;
@@ -1036,7 +1036,7 @@ int32_t Runtime::GetStat(int kind) {
return 0; // backward compatibility
default:
LOG(FATAL) << "Unknown statistic " << kind;
- return -1; // unreachable
+ return -1; // unreachable
}
}
diff --git a/runtime/runtime_linux.cc b/runtime/runtime_linux.cc
index a4fc3af606..47b72e9b17 100644
--- a/runtime/runtime_linux.cc
+++ b/runtime/runtime_linux.cc
@@ -245,7 +245,7 @@ void HandleUnexpectedSignal(int signal_number, siginfo_t* info, void* raw_contex
OsInfo os_info;
const char* cmd_line = GetCmdLine();
if (cmd_line == NULL) {
- cmd_line = "<unset>"; // Because no-one called InitLogging.
+ cmd_line = "<unset>"; // Because no-one called InitLogging.
}
pid_t tid = GetTid();
std::string thread_name(GetThreadName(tid));
diff --git a/runtime/runtime_support.cc b/runtime/runtime_support.cc
index c933621981..d28aad1e8f 100644
--- a/runtime/runtime_support.cc
+++ b/runtime/runtime_support.cc
@@ -49,7 +49,7 @@ int64_t art_d2l(double d) {
return static_cast<int64_t>(0x7fffffffffffffffULL);
} else if (d <= kMinLong) {
return static_cast<int64_t>(0x8000000000000000ULL);
- } else if (d != d) { // NaN case
+ } else if (d != d) { // NaN case
return 0;
} else {
return static_cast<int64_t>(d);
@@ -63,7 +63,7 @@ int64_t art_f2l(float f) {
return static_cast<int64_t>(0x7fffffffffffffffULL);
} else if (f <= kMinLong) {
return static_cast<int64_t>(0x8000000000000000ULL);
- } else if (f != f) { // NaN case
+ } else if (f != f) { // NaN case
return 0;
} else {
return static_cast<int64_t>(f);
@@ -77,7 +77,7 @@ int32_t art_d2i(double d) {
return static_cast<int32_t>(0x7fffffffUL);
} else if (d <= kMinInt) {
return static_cast<int32_t>(0x80000000UL);
- } else if (d != d) { // NaN case
+ } else if (d != d) { // NaN case
return 0;
} else {
return static_cast<int32_t>(d);
@@ -91,7 +91,7 @@ int32_t art_f2i(float f) {
return static_cast<int32_t>(0x7fffffffUL);
} else if (f <= kMinInt) {
return static_cast<int32_t>(0x80000000UL);
- } else if (f != f) { // NaN case
+ } else if (f != f) { // NaN case
return 0;
} else {
return static_cast<int32_t>(f);
diff --git a/runtime/runtime_support_llvm_func_list.h b/runtime/runtime_support_llvm_func_list.h
index d371421a16..8b635cbd2c 100644
--- a/runtime/runtime_support_llvm_func_list.h
+++ b/runtime/runtime_support_llvm_func_list.h
@@ -79,4 +79,4 @@
V(JniMethodEndWithReferenceSynchronized, art_portable_jni_method_end_with_reference_synchronized)
#endif // ART_RUNTIME_RUNTIME_SUPPORT_LLVM_FUNC_LIST_H_
-#undef ART_RUNTIME_RUNTIME_SUPPORT_LLVM_FUNC_LIST_H_ // the guard in this file is just for cpplint
+#undef ART_RUNTIME_RUNTIME_SUPPORT_LLVM_FUNC_LIST_H_ // the guard in this file is just for cpplint
diff --git a/runtime/safe_map.h b/runtime/safe_map.h
index 4b5202ab5c..89da927cc2 100644
--- a/runtime/safe_map.h
+++ b/runtime/safe_map.h
@@ -70,7 +70,7 @@ class SafeMap {
// Used to insert a new mapping.
void Put(const K& k, const V& v) {
std::pair<iterator, bool> result = map_.insert(std::make_pair(k, v));
- DCHECK(result.second); // Check we didn't accidentally overwrite an existing value.
+ DCHECK(result.second); // Check we didn't accidentally overwrite an existing value.
}
// Used to insert a new mapping or overwrite an existing mapping. Note that if the value type
diff --git a/runtime/scoped_thread_state_change.h b/runtime/scoped_thread_state_change.h
index 2643f66c42..853d684bed 100644
--- a/runtime/scoped_thread_state_change.h
+++ b/runtime/scoped_thread_state_change.h
@@ -179,7 +179,7 @@ class ScopedObjectAccessUnchecked : public ScopedThreadStateChange {
uint32_t cookie = Env()->local_ref_cookie;
IndirectRef ref = locals.Add(cookie, obj);
-#if 0 // TODO: fix this to understand PushLocalFrame, so we can turn it on.
+#if 0 // TODO: fix this to understand PushLocalFrame, so we can turn it on.
if (Env()->check_jni) {
size_t entry_count = locals.Capacity();
if (entry_count > 16) {
diff --git a/runtime/signal_catcher.cc b/runtime/signal_catcher.cc
index a630db810a..15eb27deb2 100644
--- a/runtime/signal_catcher.cc
+++ b/runtime/signal_catcher.cc
@@ -44,7 +44,7 @@ static void DumpCmdLine(std::ostream& os) {
// On Android, /proc/self/cmdline will have been rewritten to something like "system_server".
std::string current_cmd_line;
if (ReadFileToString("/proc/self/cmdline", &current_cmd_line)) {
- current_cmd_line.resize(current_cmd_line.size() - 1); // Lose the trailing '\0'.
+ current_cmd_line.resize(current_cmd_line.size() - 1); // Lose the trailing '\0'.
std::replace(current_cmd_line.begin(), current_cmd_line.end(), '\0', ' ');
os << "Cmdline: " << current_cmd_line;
diff --git a/runtime/stack.cc b/runtime/stack.cc
index 9ce65daee6..286a2a6a5e 100644
--- a/runtime/stack.cc
+++ b/runtime/stack.cc
@@ -134,7 +134,7 @@ size_t StackVisitor::GetNativePcOffset() const {
uint32_t StackVisitor::GetVReg(mirror::AbstractMethod* m, uint16_t vreg, VRegKind kind) const {
if (cur_quick_frame_ != NULL) {
- DCHECK(context_ != NULL); // You can't reliably read registers without a context.
+ DCHECK(context_ != NULL); // You can't reliably read registers without a context.
DCHECK(m == GetMethod());
const VmapTable vmap_table(m->GetVmapTableRaw());
uint32_t vmap_offset;
@@ -146,7 +146,7 @@ uint32_t StackVisitor::GetVReg(mirror::AbstractMethod* m, uint16_t vreg, VRegKin
return GetGPR(vmap_table.ComputeRegister(spill_mask, vmap_offset, kind));
} else {
const DexFile::CodeItem* code_item = MethodHelper(m).GetCodeItem();
- DCHECK(code_item != NULL) << PrettyMethod(m); // Can't be NULL or how would we compile its instructions?
+ DCHECK(code_item != NULL) << PrettyMethod(m); // Can't be NULL or how would we compile its instructions?
size_t frame_size = m->GetFrameSizeInBytes();
return GetVReg(cur_quick_frame_, code_item, m->GetCoreSpillMask(), m->GetFpSpillMask(),
frame_size, vreg);
@@ -159,7 +159,7 @@ uint32_t StackVisitor::GetVReg(mirror::AbstractMethod* m, uint16_t vreg, VRegKin
void StackVisitor::SetVReg(mirror::AbstractMethod* m, uint16_t vreg, uint32_t new_value,
VRegKind kind) {
if (cur_quick_frame_ != NULL) {
- DCHECK(context_ != NULL); // You can't reliably write registers without a context.
+ DCHECK(context_ != NULL); // You can't reliably write registers without a context.
DCHECK(m == GetMethod());
const VmapTable vmap_table(m->GetVmapTableRaw());
uint32_t vmap_offset;
@@ -171,7 +171,7 @@ void StackVisitor::SetVReg(mirror::AbstractMethod* m, uint16_t vreg, uint32_t ne
SetGPR(reg, new_value);
} else {
const DexFile::CodeItem* code_item = MethodHelper(m).GetCodeItem();
- DCHECK(code_item != NULL) << PrettyMethod(m); // Can't be NULL or how would we compile its instructions?
+ DCHECK(code_item != NULL) << PrettyMethod(m); // Can't be NULL or how would we compile its instructions?
uint32_t core_spills = m->GetCoreSpillMask();
uint32_t fp_spills = m->GetFpSpillMask();
size_t frame_size = m->GetFrameSizeInBytes();
diff --git a/runtime/stack.h b/runtime/stack.h
index 99ba898362..0b94f27c4b 100644
--- a/runtime/stack.h
+++ b/runtime/stack.h
@@ -514,7 +514,7 @@ class StackVisitor {
uint32_t core_spills, uint32_t fp_spills,
size_t frame_size, int reg) {
DCHECK_EQ(frame_size & (kStackAlignment - 1), 0U);
- int num_spills = __builtin_popcount(core_spills) + __builtin_popcount(fp_spills) + 1; // Filler.
+ int num_spills = __builtin_popcount(core_spills) + __builtin_popcount(fp_spills) + 1; // Filler.
int num_ins = code_item->ins_size_;
int num_regs = code_item->registers_size_ - num_ins;
int locals_start = frame_size - ((num_spills + num_regs) * sizeof(uint32_t));
@@ -525,7 +525,7 @@ class StackVisitor {
} else if (reg < num_regs) {
return locals_start + (reg * sizeof(uint32_t)); // Dalvik local reg.
} else {
- return frame_size + ((reg - num_regs) * sizeof(uint32_t)) + sizeof(uint32_t); // Dalvik in.
+ return frame_size + ((reg - num_regs) * sizeof(uint32_t)) + sizeof(uint32_t); // Dalvik in.
}
}
@@ -543,7 +543,7 @@ class StackVisitor {
StackIndirectReferenceTable* GetCurrentSirt() const {
mirror::AbstractMethod** sp = GetCurrentQuickFrame();
- ++sp; // Skip Method*; SIRT comes next;
+ ++sp; // Skip Method*; SIRT comes next;
return reinterpret_cast<StackIndirectReferenceTable*>(sp);
}
diff --git a/runtime/thread.cc b/runtime/thread.cc
index 9b7d194b8a..0b3a5b4959 100644
--- a/runtime/thread.cc
+++ b/runtime/thread.cc
@@ -87,7 +87,7 @@ static void UnimplementedEntryPoint() {
#endif
void Thread::InitFunctionPointers() {
-#if !defined(__APPLE__) // The Mac GCC is too old to accept this code.
+#if !defined(__APPLE__) // The Mac GCC is too old to accept this code.
// Insert a placeholder so we can easily tell if we call an unimplemented entry point.
uintptr_t* begin = reinterpret_cast<uintptr_t*>(&entrypoints_);
uintptr_t* end = reinterpret_cast<uintptr_t*>(reinterpret_cast<uint8_t*>(begin) + sizeof(entrypoints_));
@@ -572,7 +572,7 @@ void Thread::FullSuspendCheck() {
}
Thread* Thread::SuspendForDebugger(jobject peer, bool request_suspension, bool* timed_out) {
- static const useconds_t kTimeoutUs = 30 * 1000000; // 30s.
+ static const useconds_t kTimeoutUs = 30 * 1000000; // 30s.
useconds_t total_delay_us = 0;
useconds_t delay_us = 0;
bool did_suspend_request = false;
@@ -725,7 +725,7 @@ void Thread::DumpState(std::ostream& os, const Thread* thread, pid_t tid) {
// Grab the scheduler stats for this thread.
std::string scheduler_stats;
if (ReadFileToString(StringPrintf("/proc/self/task/%d/schedstat", tid), &scheduler_stats)) {
- scheduler_stats.resize(scheduler_stats.size() - 1); // Lose the trailing '\n'.
+ scheduler_stats.resize(scheduler_stats.size() - 1); // Lose the trailing '\n'.
} else {
scheduler_stats = "0 0 0";
}
@@ -1297,7 +1297,7 @@ class BuildInternalStackTraceVisitor : public StackVisitor {
bool VisitFrame() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
if (method_trace_ == NULL || dex_pc_trace_ == NULL) {
- return true; // We're probably trying to fillInStackTrace for an OutOfMemoryError.
+ return true; // We're probably trying to fillInStackTrace for an OutOfMemoryError.
}
if (skip_depth_ > 0) {
skip_depth_--;
@@ -1452,7 +1452,7 @@ void Thread::ThrowNewExceptionV(const ThrowLocation& throw_location,
void Thread::ThrowNewException(const ThrowLocation& throw_location, const char* exception_class_descriptor,
const char* msg) {
- AssertNoPendingException(); // Callers should either clear or call ThrowNewWrappedException.
+ AssertNoPendingException(); // Callers should either clear or call ThrowNewWrappedException.
ThrowNewWrappedException(throw_location, exception_class_descriptor, msg);
}
@@ -1557,7 +1557,7 @@ void Thread::ThrowOutOfMemoryError(const char* msg) {
ThrowNewException(throw_location, "Ljava/lang/OutOfMemoryError;", msg);
throwing_OutOfMemoryError_ = false;
} else {
- Dump(LOG(ERROR)); // The pre-allocated OOME has no stack, so help out and log one.
+ Dump(LOG(ERROR)); // The pre-allocated OOME has no stack, so help out and log one.
SetException(throw_location, Runtime::Current()->GetPreAllocatedOutOfMemoryError());
}
}
@@ -1664,7 +1664,7 @@ static const EntryPointInfo gThreadEntryPointInfo[] = {
#undef ENTRY_POINT_INFO
void Thread::DumpThreadOffset(std::ostream& os, uint32_t offset, size_t size_of_pointers) {
- CHECK_EQ(size_of_pointers, 4U); // TODO: support 64-bit targets.
+ CHECK_EQ(size_of_pointers, 4U); // TODO: support 64-bit targets.
#define DO_THREAD_OFFSET(x) \
if (offset == static_cast<uint32_t>(OFFSETOF_VOLATILE_MEMBER(Thread, x))) { \
@@ -1680,8 +1680,8 @@ void Thread::DumpThreadOffset(std::ostream& os, uint32_t offset, size_t size_of_
DO_THREAD_OFFSET(stack_end_);
DO_THREAD_OFFSET(suspend_count_);
DO_THREAD_OFFSET(thin_lock_id_);
- //DO_THREAD_OFFSET(top_of_managed_stack_);
- //DO_THREAD_OFFSET(top_of_managed_stack_pc_);
+ // DO_THREAD_OFFSET(top_of_managed_stack_);
+ // DO_THREAD_OFFSET(top_of_managed_stack_pc_);
DO_THREAD_OFFSET(top_sirt_);
#undef DO_THREAD_OFFSET
@@ -2012,7 +2012,7 @@ class ReferenceMapVisitor : public StackVisitor {
CHECK(native_gc_map != NULL) << PrettyMethod(m);
mh_.ChangeMethod(m);
const DexFile::CodeItem* code_item = mh_.GetCodeItem();
- DCHECK(code_item != NULL) << PrettyMethod(m); // Can't be NULL or how would we compile its instructions?
+ DCHECK(code_item != NULL) << PrettyMethod(m); // Can't be NULL or how would we compile its instructions?
NativePcOffsetToReferenceMap map(native_gc_map);
size_t num_regs = std::min(map.RegWidth() * 8,
static_cast<size_t>(code_item->registers_size_));
diff --git a/runtime/thread.h b/runtime/thread.h
index 388178fe39..b9393a3052 100644
--- a/runtime/thread.h
+++ b/runtime/thread.h
@@ -580,7 +580,7 @@ class PACKED(4) Thread {
friend class ThreadList; // For ~Thread and Destroy.
void CreatePeer(const char* name, bool as_daemon, jobject thread_group);
- friend class Runtime; // For CreatePeer.
+ friend class Runtime; // For CreatePeer.
// Avoid use, callers should use SetState. Used only by SignalCatcher::HandleSigQuit, ~Thread and
// Dbg::Disconnected.
@@ -590,7 +590,7 @@ class PACKED(4) Thread {
return old_state;
}
friend class SignalCatcher; // For SetStateUnsafe.
- friend class Dbg; // For SetStateUnsafe.
+ friend class Dbg; // F or SetStateUnsafe.
void VerifyStackImpl() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
@@ -600,7 +600,7 @@ class PACKED(4) Thread {
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
// Out-of-line conveniences for debugging in gdb.
- static Thread* CurrentFromGdb(); // Like Thread::Current.
+ static Thread* CurrentFromGdb(); // Like Thread::Current.
// Like Thread::Dump(std::cerr).
void DumpFromGdb() const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
diff --git a/runtime/thread_linux.cc b/runtime/thread_linux.cc
index 1bd708ae45..ee66ccc29a 100644
--- a/runtime/thread_linux.cc
+++ b/runtime/thread_linux.cc
@@ -56,7 +56,7 @@ void Thread::TearDownAlternateSignalStack() {
// Tell the kernel to stop using it.
ss.ss_sp = NULL;
ss.ss_flags = SS_DISABLE;
- ss.ss_size = SIGSTKSZ; // Avoid ENOMEM failure with Mac OS' buggy libc.
+ ss.ss_size = SIGSTKSZ; // Avoid ENOMEM failure with Mac OS' buggy libc.
SigAltStack(&ss, NULL);
// Free it.
diff --git a/runtime/thread_list.cc b/runtime/thread_list.cc
index 7aa835a387..9c28c87b84 100644
--- a/runtime/thread_list.cc
+++ b/runtime/thread_list.cc
@@ -474,7 +474,7 @@ void ThreadList::WaitForOtherNonDaemonThreadsToExit() {
void ThreadList::SuspendAllDaemonThreads() {
Thread* self = Thread::Current();
MutexLock mu(self, *Locks::thread_list_lock_);
- { // Tell all the daemons it's time to suspend.
+ { // Tell all the daemons it's time to suspend.
MutexLock mu2(self, *Locks::thread_suspend_count_lock_);
for (It it = list_.begin(), end = list_.end(); it != end; ++it) {
Thread* thread = *it;
@@ -591,7 +591,7 @@ uint32_t ThreadList::AllocThreadId(Thread* self) {
for (size_t i = 0; i < allocated_ids_.size(); ++i) {
if (!allocated_ids_[i]) {
allocated_ids_.set(i);
- return i + 1; // Zero is reserved to mean "invalid".
+ return i + 1; // Zero is reserved to mean "invalid".
}
}
LOG(FATAL) << "Out of internal thread ids";
@@ -600,7 +600,7 @@ uint32_t ThreadList::AllocThreadId(Thread* self) {
void ThreadList::ReleaseThreadId(Thread* self, uint32_t id) {
MutexLock mu(self, allocated_ids_lock_);
- --id; // Zero is reserved to mean "invalid".
+ --id; // Zero is reserved to mean "invalid".
DCHECK(allocated_ids_[id]) << id;
allocated_ids_.reset(id);
}
diff --git a/runtime/thread_list.h b/runtime/thread_list.h
index 87abbda479..d95f191553 100644
--- a/runtime/thread_list.h
+++ b/runtime/thread_list.h
@@ -43,7 +43,7 @@ class ThreadList {
void DumpLocked(std::ostream& os) // For thread suspend timeout dumps.
EXCLUSIVE_LOCKS_REQUIRED(Locks::thread_list_lock_)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
- pid_t GetLockOwner(); // For SignalCatcher.
+ pid_t GetLockOwner(); // For SignalCatcher.
// Thread suspension support.
void ResumeAll()
@@ -102,7 +102,7 @@ class ThreadList {
Thread* FindThreadByThinLockId(uint32_t thin_lock_id);
private:
- typedef std::list<Thread*>::const_iterator It; // TODO: C++0x auto
+ typedef std::list<Thread*>::const_iterator It; // TODO: C++0x auto
uint32_t AllocThreadId(Thread* self);
void ReleaseThreadId(Thread* self, uint32_t id) LOCKS_EXCLUDED(allocated_ids_lock_);
diff --git a/runtime/thread_state.h b/runtime/thread_state.h
index fc4812a427..4d4bfb751e 100644
--- a/runtime/thread_state.h
+++ b/runtime/thread_state.h
@@ -20,26 +20,26 @@
namespace art {
enum ThreadState {
- // Thread.State JDWP state
- kTerminated, // TERMINATED TS_ZOMBIE Thread.run has returned, but Thread* still around
- kRunnable, // RUNNABLE TS_RUNNING runnable
- kTimedWaiting, // TIMED_WAITING TS_WAIT in Object.wait() with a timeout
- kSleeping, // TIMED_WAITING TS_SLEEPING in Thread.sleep()
- kBlocked, // BLOCKED TS_MONITOR blocked on a monitor
- kWaiting, // WAITING TS_WAIT in Object.wait()
- kWaitingForGcToComplete, // WAITING TS_WAIT blocked waiting for GC
- kWaitingForCheckPointsToRun, // WAITING TS_WAIT GC waiting for checkpoints to run
- kWaitingPerformingGc, // WAITING TS_WAIT performing GC
- kWaitingForDebuggerSend, // WAITING TS_WAIT blocked waiting for events to be sent
- kWaitingForDebuggerToAttach, // WAITING TS_WAIT blocked waiting for debugger to attach
- kWaitingInMainDebuggerLoop, // WAITING TS_WAIT blocking/reading/processing debugger events
- kWaitingForDebuggerSuspension, // WAITING TS_WAIT waiting for debugger suspend all
- kWaitingForJniOnLoad, // WAITING TS_WAIT waiting for execution of dlopen and JNI on load code
- kWaitingForSignalCatcherOutput, // WAITING TS_WAIT waiting for signal catcher IO to complete
- kWaitingInMainSignalCatcherLoop, // WAITING TS_WAIT blocking/reading/processing signals
- kStarting, // NEW TS_WAIT native thread started, not yet ready to run managed code
- kNative, // RUNNABLE TS_RUNNING running in a JNI native method
- kSuspended, // RUNNABLE TS_RUNNING suspended by GC or debugger
+ // Thread.State JDWP state
+ kTerminated, // TERMINATED TS_ZOMBIE Thread.run has returned, but Thread* still around
+ kRunnable, // RUNNABLE TS_RUNNING runnable
+ kTimedWaiting, // TIMED_WAITING TS_WAIT in Object.wait() with a timeout
+ kSleeping, // TIMED_WAITING TS_SLEEPING in Thread.sleep()
+ kBlocked, // BLOCKED TS_MONITOR blocked on a monitor
+ kWaiting, // WAITING TS_WAIT in Object.wait()
+ kWaitingForGcToComplete, // WAITING TS_WAIT blocked waiting for GC
+ kWaitingForCheckPointsToRun, // WAITING TS_WAIT GC waiting for checkpoints to run
+ kWaitingPerformingGc, // WAITING TS_WAIT performing GC
+ kWaitingForDebuggerSend, // WAITING TS_WAIT blocked waiting for events to be sent
+ kWaitingForDebuggerToAttach, // WAITING TS_WAIT blocked waiting for debugger to attach
+ kWaitingInMainDebuggerLoop, // WAITING TS_WAIT blocking/reading/processing debugger events
+ kWaitingForDebuggerSuspension, // WAITING TS_WAIT waiting for debugger suspend all
+ kWaitingForJniOnLoad, // WAITING TS_WAIT waiting for execution of dlopen and JNI on load code
+ kWaitingForSignalCatcherOutput, // WAITING TS_WAIT waiting for signal catcher IO to complete
+ kWaitingInMainSignalCatcherLoop, // WAITING TS_WAIT blocking/reading/processing signals
+ kStarting, // NEW TS_WAIT native thread started, not yet ready to run managed code
+ kNative, // RUNNABLE TS_RUNNING running in a JNI native method
+ kSuspended, // RUNNABLE TS_RUNNING suspended by GC or debugger
};
} // namespace art
diff --git a/runtime/trace.cc b/runtime/trace.cc
index 2227b8dde7..177fd48f7d 100644
--- a/runtime/trace.cc
+++ b/runtime/trace.cc
@@ -75,11 +75,11 @@ namespace art {
// All values are stored in little-endian order.
enum TraceAction {
- kTraceMethodEnter = 0x00, // method entry
- kTraceMethodExit = 0x01, // method exit
- kTraceUnroll = 0x02, // method exited by exception unrolling
+ kTraceMethodEnter = 0x00, // method entry
+ kTraceMethodExit = 0x01, // method exit
+ kTraceUnroll = 0x02, // method exited by exception unrolling
// 0x03 currently unused
- kTraceMethodActionMask = 0x03, // two bits
+ kTraceMethodActionMask = 0x03, // two bits
};
static const char kTraceTokenChar = '*';
@@ -87,8 +87,8 @@ static const uint16_t kTraceHeaderLength = 32;
static const uint32_t kTraceMagicValue = 0x574f4c53;
static const uint16_t kTraceVersionSingleClock = 2;
static const uint16_t kTraceVersionDualClock = 3;
-static const uint16_t kTraceRecordSizeSingleClock = 10; // using v2
-static const uint16_t kTraceRecordSizeDualClock = 14; // using v3 with two timestamps
+static const uint16_t kTraceRecordSizeSingleClock = 10; // using v2
+static const uint16_t kTraceRecordSizeDualClock = 14; // using v3 with two timestamps
#if defined(HAVE_POSIX_CLOCKS)
ProfilerClockSource Trace::default_clock_source_ = kProfilerClockSourceDual;
@@ -487,7 +487,7 @@ void Trace::GetVisitedMethods(size_t buf_size,
void Trace::DumpMethodList(std::ostream& os,
const std::set<mirror::AbstractMethod*>& visited_methods) {
- typedef std::set<mirror::AbstractMethod*>::const_iterator It; // TODO: C++0x auto
+ typedef std::set<mirror::AbstractMethod*>::const_iterator It; // TODO: C++0x auto
MethodHelper mh;
for (It it = visited_methods.begin(); it != visited_methods.end(); ++it) {
mirror::AbstractMethod* method = *it;
diff --git a/runtime/utils.cc b/runtime/utils.cc
index 723be92d8a..71e502df29 100644
--- a/runtime/utils.cc
+++ b/runtime/utils.cc
@@ -46,12 +46,12 @@
#endif
#if defined(__APPLE__)
-#include "AvailabilityMacros.h" // For MAC_OS_X_VERSION_MAX_ALLOWED
+#include "AvailabilityMacros.h" // For MAC_OS_X_VERSION_MAX_ALLOWED
#include <sys/syscall.h>
#endif
-#include <corkscrew/backtrace.h> // For DumpNativeStack.
-#include <corkscrew/demangle.h> // For DumpNativeStack.
+#include <corkscrew/backtrace.h> // For DumpNativeStack.
+#include <corkscrew/demangle.h> // For DumpNativeStack.
#if defined(__linux__)
#include <linux/unistd.h>
@@ -73,7 +73,7 @@ pid_t GetTid() {
std::string GetThreadName(pid_t tid) {
std::string result;
if (ReadFileToString(StringPrintf("/proc/self/task/%d/comm", tid), &result)) {
- result.resize(result.size() - 1); // Lose the trailing '\n'.
+ result.resize(result.size() - 1); // Lose the trailing '\n'.
} else {
result = "<unknown>";
}
@@ -253,7 +253,7 @@ std::string PrettyDescriptor(const std::string& descriptor) {
// Reference or primitive?
if (*c == 'L') {
// "[[La/b/C;" -> "a.b.C[][]".
- c++; // Skip the 'L'.
+ c++; // Skip the 'L'.
} else {
// "[[B" -> "byte[][]".
// To make life easier, we make primitives look like unqualified
@@ -267,7 +267,7 @@ std::string PrettyDescriptor(const std::string& descriptor) {
case 'J': c = "long;"; break;
case 'S': c = "short;"; break;
case 'Z': c = "boolean;"; break;
- case 'V': c = "void;"; break; // Used when decoding return types.
+ case 'V': c = "void;"; break; // Used when decoding return types.
default: return descriptor;
}
}
@@ -339,7 +339,7 @@ std::string PrettyArguments(const char* signature) {
std::string result;
result += '(';
CHECK_EQ(*signature, '(');
- ++signature; // Skip the '('.
+ ++signature; // Skip the '('.
while (*signature != ')') {
size_t argument_length = 0;
while (signature[argument_length] == '[') {
@@ -358,7 +358,7 @@ std::string PrettyArguments(const char* signature) {
signature += argument_length;
}
CHECK_EQ(*signature, ')');
- ++signature; // Skip the ')'.
+ ++signature; // Skip the ')'.
result += ')';
return result;
}
@@ -366,7 +366,7 @@ std::string PrettyArguments(const char* signature) {
std::string PrettyReturnType(const char* signature) {
const char* return_type = strchr(signature, ')');
CHECK(return_type != NULL);
- ++return_type; // Skip ')'.
+ ++return_type; // Skip ')'.
return PrettyDescriptor(return_type);
}
@@ -664,10 +664,10 @@ std::string JniLongName(const mirror::AbstractMethod* m) {
// Helper for IsValidPartOfMemberNameUtf8(), a bit vector indicating valid low ascii.
uint32_t DEX_MEMBER_VALID_LOW_ASCII[4] = {
- 0x00000000, // 00..1f low control characters; nothing valid
- 0x03ff2010, // 20..3f digits and symbols; valid: '0'..'9', '$', '-'
- 0x87fffffe, // 40..5f uppercase etc.; valid: 'A'..'Z', '_'
- 0x07fffffe // 60..7f lowercase etc.; valid: 'a'..'z'
+ 0x00000000, // 00..1f low control characters; nothing valid
+ 0x03ff2010, // 20..3f digits and symbols; valid: '0'..'9', '$', '-'
+ 0x87fffffe, // 40..5f uppercase etc.; valid: 'A'..'Z', '_'
+ 0x07fffffe // 60..7f lowercase etc.; valid: 'a'..'z'
};
// Helper for IsValidPartOfMemberNameUtf8(); do not call directly.
@@ -826,7 +826,7 @@ bool IsValidClassName(const char* s, ClassNameType type, char separator) {
* name.
*/
- bool sepOrFirst = true; // first character or just encountered a separator.
+ bool sepOrFirst = true; // first character or just encountered a separator.
for (;;) {
uint8_t c = (uint8_t) *s;
switch (c) {
@@ -1002,7 +1002,7 @@ std::string GetSchedulerGroupName(pid_t tid) {
Split(cgroup_fields[1], ',', cgroups);
for (size_t i = 0; i < cgroups.size(); ++i) {
if (cgroups[i] == "cpu") {
- return cgroup_fields[2].substr(1); // Skip the leading slash.
+ return cgroup_fields[2].substr(1); // Skip the leading slash.
}
}
}
@@ -1060,7 +1060,7 @@ void DumpNativeStack(std::ostream& os, pid_t tid, const char* prefix, bool inclu
const size_t MAX_DEPTH = 32;
UniquePtr<backtrace_frame_t[]> frames(new backtrace_frame_t[MAX_DEPTH]);
- size_t ignore_count = 2; // Don't include unwind_backtrace_thread or DumpNativeStack.
+ size_t ignore_count = 2; // Don't include unwind_backtrace_thread or DumpNativeStack.
ssize_t frame_count = unwind_backtrace_thread(tid, frames.get(), ignore_count, MAX_DEPTH);
if (frame_count == -1) {
os << prefix << "(unwind_backtrace_thread failed for thread " << tid << ")\n";
@@ -1207,7 +1207,7 @@ std::string GetDalvikCacheFilenameOrDie(const std::string& location) {
if (location[0] != '/') {
LOG(FATAL) << "Expected path in location to be absolute: "<< location;
}
- std::string cache_file(location, 1); // skip leading slash
+ std::string cache_file(location, 1); // skip leading slash
if (!IsValidDexFilename(location)) {
cache_file += "/";
cache_file += DexFile::kClassesDex;
diff --git a/runtime/verifier/dex_gc_map.h b/runtime/verifier/dex_gc_map.h
index be7415e1d6..2a95ba2284 100644
--- a/runtime/verifier/dex_gc_map.h
+++ b/runtime/verifier/dex_gc_map.h
@@ -30,9 +30,9 @@ namespace verifier {
*/
enum RegisterMapFormat {
kRegMapFormatUnknown = 0,
- kRegMapFormatNone = 1, // Indicates no map data follows.
- kRegMapFormatCompact8 = 2, // Compact layout, 8-bit addresses.
- kRegMapFormatCompact16 = 3, // Compact layout, 16-bit addresses.
+ kRegMapFormatNone = 1, // Indicates no map data follows.
+ kRegMapFormatCompact8 = 2, // Compact layout, 8-bit addresses.
+ kRegMapFormatCompact16 = 3, // Compact layout, 16-bit addresses.
};
// Lightweight wrapper for Dex PC to reference bit maps.
diff --git a/runtime/verifier/method_verifier.cc b/runtime/verifier/method_verifier.cc
index 9948e00acc..1481ad925f 100644
--- a/runtime/verifier/method_verifier.cc
+++ b/runtime/verifier/method_verifier.cc
@@ -318,7 +318,7 @@ void MethodVerifier::FindLocksAtDexPc(mirror::AbstractMethod* m, uint32_t dex_pc
void MethodVerifier::FindLocksAtDexPc() {
CHECK(monitor_enter_dex_pcs_ != NULL);
- CHECK(code_item_ != NULL); // This only makes sense for methods with code.
+ CHECK(code_item_ != NULL); // This only makes sense for methods with code.
// Strictly speaking, we ought to be able to get away with doing a subset of the full method
// verification. In practice, the phase we want relies on data structures set up by all the
@@ -337,7 +337,7 @@ mirror::Field* MethodVerifier::FindAccessedFieldAtDexPc(mirror::AbstractMethod*
}
mirror::Field* MethodVerifier::FindAccessedFieldAtDexPc(uint32_t dex_pc) {
- CHECK(code_item_ != NULL); // This only makes sense for methods with code.
+ CHECK(code_item_ != NULL); // This only makes sense for methods with code.
// Strictly speaking, we ought to be able to get away with doing a subset of the full method
// verification. In practice, the phase we want relies on data structures set up by all the
@@ -365,7 +365,7 @@ mirror::AbstractMethod* MethodVerifier::FindInvokedMethodAtDexPc(mirror::Abstrac
}
mirror::AbstractMethod* MethodVerifier::FindInvokedMethodAtDexPc(uint32_t dex_pc) {
- CHECK(code_item_ != NULL); // This only makes sense for methods with code.
+ CHECK(code_item_ != NULL); // This only makes sense for methods with code.
// Strictly speaking, we ought to be able to get away with doing a subset of the full method
// verification. In practice, the phase we want relies on data structures set up by all the
@@ -1149,7 +1149,7 @@ bool MethodVerifier::SetTypesFromSignature() {
size_t expected_args = code_item_->ins_size_; /* long/double count as two */
DCHECK_GE(arg_start, 0); /* should have been verified earlier */
- //Include the "this" pointer.
+ // Include the "this" pointer.
size_t cur_arg = 0;
if (!IsStatic()) {
// If this is a constructor for a class other than java.lang.Object, mark the first ("this")
@@ -1235,7 +1235,7 @@ bool MethodVerifier::SetTypesFromSignature() {
bool result;
if (IsPrimitiveDescriptor(descriptor[0]) || descriptor[0] == 'V') {
result = descriptor[1] == '\0';
- } else if (descriptor[0] == '[') { // single/multi-dimensional array of object/primitive
+ } else if (descriptor[0] == '[') { // single/multi-dimensional array of object/primitive
size_t i = 0;
do {
i++;
@@ -1384,7 +1384,7 @@ bool MethodVerifier::CodeFlowVerifyInstruction(uint32_t* start_guess) {
// interested in is itself a monitor-enter instruction (which is a likely place
// for a thread to be suspended).
if (monitor_enter_dex_pcs_ != NULL && work_insn_idx_ == interesting_dex_pc_) {
- monitor_enter_dex_pcs_->clear(); // The new work line is more accurate than the previous one.
+ monitor_enter_dex_pcs_->clear(); // The new work line is more accurate than the previous one.
for (size_t i = 0; i < work_line_->GetMonitorEnterCount(); ++i) {
monitor_enter_dex_pcs_->push_back(work_line_->GetMonitorEnterDexPc(i));
}
@@ -2806,7 +2806,7 @@ bool MethodVerifier::CodeFlowVerifyInstruction(uint32_t* start_guess) {
DCHECK(insn_flags_[*start_guess].IsOpcode());
return true;
-} // NOLINT(readability/fn_size)
+} // NOLINT(readability/fn_size)
const RegType& MethodVerifier::ResolveClassAndCheckAccess(uint32_t class_idx) {
const char* descriptor = dex_file_->StringByTypeIdx(class_idx);
@@ -3344,7 +3344,7 @@ mirror::Field* MethodVerifier::GetStaticField(int field_idx) {
const DexFile::FieldId& field_id = dex_file_->GetFieldId(field_idx);
// Check access to class
const RegType& klass_type = ResolveClassAndCheckAccess(field_id.class_idx_);
- if (klass_type.IsConflict()) { // bad class
+ if (klass_type.IsConflict()) { // bad class
AppendToLastFailMessage(StringPrintf(" in attempt to access static field %d (%s) in %s",
field_idx, dex_file_->GetFieldName(field_id),
dex_file_->GetFieldDeclaringClassDescriptor(field_id)));
diff --git a/runtime/verifier/method_verifier.h b/runtime/verifier/method_verifier.h
index fdd90cc767..3f98a00adc 100644
--- a/runtime/verifier/method_verifier.h
+++ b/runtime/verifier/method_verifier.h
@@ -70,17 +70,17 @@ std::ostream& operator<<(std::ostream& os, const MethodType& rhs);
* to be rewritten to fail at runtime.
*/
enum VerifyError {
- VERIFY_ERROR_BAD_CLASS_HARD, // VerifyError; hard error that skips compilation.
- VERIFY_ERROR_BAD_CLASS_SOFT, // VerifyError; soft error that verifies again at runtime.
-
- VERIFY_ERROR_NO_CLASS, // NoClassDefFoundError.
- VERIFY_ERROR_NO_FIELD, // NoSuchFieldError.
- VERIFY_ERROR_NO_METHOD, // NoSuchMethodError.
- VERIFY_ERROR_ACCESS_CLASS, // IllegalAccessError.
- VERIFY_ERROR_ACCESS_FIELD, // IllegalAccessError.
- VERIFY_ERROR_ACCESS_METHOD, // IllegalAccessError.
- VERIFY_ERROR_CLASS_CHANGE, // IncompatibleClassChangeError.
- VERIFY_ERROR_INSTANTIATION, // InstantiationError.
+ VERIFY_ERROR_BAD_CLASS_HARD, // VerifyError; hard error that skips compilation.
+ VERIFY_ERROR_BAD_CLASS_SOFT, // VerifyError; soft error that verifies again at runtime.
+
+ VERIFY_ERROR_NO_CLASS, // NoClassDefFoundError.
+ VERIFY_ERROR_NO_FIELD, // NoSuchFieldError.
+ VERIFY_ERROR_NO_METHOD, // NoSuchMethodError.
+ VERIFY_ERROR_ACCESS_CLASS, // IllegalAccessError.
+ VERIFY_ERROR_ACCESS_FIELD, // IllegalAccessError.
+ VERIFY_ERROR_ACCESS_METHOD, // IllegalAccessError.
+ VERIFY_ERROR_CLASS_CHANGE, // IncompatibleClassChangeError.
+ VERIFY_ERROR_INSTANTIATION, // InstantiationError.
};
std::ostream& operator<<(std::ostream& os, const VerifyError& rhs);
diff --git a/runtime/verifier/reg_type_cache.cc b/runtime/verifier/reg_type_cache.cc
index 2cc3d5915a..2c18132c0b 100644
--- a/runtime/verifier/reg_type_cache.cc
+++ b/runtime/verifier/reg_type_cache.cc
@@ -171,7 +171,7 @@ const RegType& RegTypeCache::From(mirror::ClassLoader* loader, const char* descr
if (klass != NULL) {
// Class resolved, first look for the class in the list of entries
// Class was not found, must create new type.
- //To pass the verification, the type should be imprecise,
+ // To pass the verification, the type should be imprecise,
// instantiable or an interface with the precise type set to false.
DCHECK(!precise || klass->IsInstantiable());
// Create a precise type if:
diff --git a/runtime/verifier/reg_type_test.cc b/runtime/verifier/reg_type_test.cc
index a24c3c9120..dc320be379 100644
--- a/runtime/verifier/reg_type_test.cc
+++ b/runtime/verifier/reg_type_test.cc
@@ -58,7 +58,7 @@ TEST_F(RegTypeTest, Pairs) {
const RegType& precise_const = cache.FromCat1Const(static_cast<int32_t>(val >> 32), true);
const RegType& long_lo = cache.LongLo();
const RegType& long_hi = cache.LongHi();
- //Check sanity of types.
+ // Check sanity of types.
EXPECT_TRUE(precise_lo.IsLowHalf());
EXPECT_FALSE(precise_hi.IsLowHalf());
EXPECT_FALSE(precise_lo.IsHighHalf());
diff --git a/runtime/zip_archive.cc b/runtime/zip_archive.cc
index 9cf7a09155..2a48dc6d77 100644
--- a/runtime/zip_archive.cc
+++ b/runtime/zip_archive.cc
@@ -228,7 +228,7 @@ static bool InflateToMemory(uint8_t* begin, size_t size,
}
} while (zerr == Z_OK);
- DCHECK_EQ(zerr, Z_STREAM_END); // other errors should've been caught
+ DCHECK_EQ(zerr, Z_STREAM_END); // other errors should've been caught
// paranoia
if (zstream->Get().total_out != uncompressed_length) {