diff options
author | 2020-07-22 21:51:00 +0100 | |
---|---|---|
committer | 2020-07-23 13:18:06 +0000 | |
commit | aacf977a3b3af644a7e2eb58d8e56a23d1f3d215 (patch) | |
tree | 6a595bf88f3124e61c826bcd72520dd406664f1e | |
parent | 4ef451aecd4008ccee2ebf6136a70ed6a5c14717 (diff) |
Reword some comments to be more inclusive
Also corrects a typo s/He/We/.
Bug: 161336379
Bug: 161850439
Bug: 161896447
Test: m
Change-Id: Ie8e37310eb777b7ee41a13f8894e99795c29a98a
-rw-r--r-- | compiler/optimizing/reference_type_propagation.cc | 2 | ||||
-rw-r--r-- | openjdkjvmti/events-inl.h | 8 | ||||
-rw-r--r-- | openjdkjvmti/ti_redefine.cc | 6 | ||||
-rw-r--r-- | runtime/arch/x86/asm_support_x86.S | 2 | ||||
-rw-r--r-- | runtime/arch/x86_64/asm_support_x86_64.S | 2 | ||||
-rw-r--r-- | runtime/base/timing_logger_test.cc | 2 | ||||
-rw-r--r-- | runtime/gc/accounting/mod_union_table_test.cc | 2 | ||||
-rw-r--r-- | runtime/gc/heap.h | 2 | ||||
-rw-r--r-- | runtime/interpreter/interpreter_common.cc | 2 | ||||
-rw-r--r-- | runtime/mirror/array-inl.h | 2 | ||||
-rw-r--r-- | runtime/reference_table_test.cc | 2 | ||||
-rw-r--r-- | runtime/verifier/method_verifier.cc | 2 | ||||
-rw-r--r-- | test/004-ThreadStress/src-art/Main.java | 4 | ||||
-rw-r--r-- | test/1003-metadata-section-strings/src-art/Main.java | 2 | ||||
-rw-r--r-- | test/knownfailures.json | 2 | ||||
-rw-r--r-- | tools/libcore_failures.txt | 2 |
16 files changed, 22 insertions, 22 deletions
diff --git a/compiler/optimizing/reference_type_propagation.cc b/compiler/optimizing/reference_type_propagation.cc index 85769437ba..c7ed61aa91 100644 --- a/compiler/optimizing/reference_type_propagation.cc +++ b/compiler/optimizing/reference_type_propagation.cc @@ -481,7 +481,7 @@ void ReferenceTypePropagation::RTPVisitor::BoundTypeForIfInstanceOf(HBasicBlock* ReferenceTypeInfo class_rti = instanceOf->GetTargetClassRTI(); if (!class_rti.IsValid()) { - // He have loaded an unresolved class. Don't bother bounding the type. + // We have loaded an unresolved class. Don't bother bounding the type. return; } diff --git a/openjdkjvmti/events-inl.h b/openjdkjvmti/events-inl.h index 883a4ccfd8..92cfbc9c41 100644 --- a/openjdkjvmti/events-inl.h +++ b/openjdkjvmti/events-inl.h @@ -49,10 +49,10 @@ static inline ArtJvmtiEvent GetArtJvmtiEvent(ArtJvmTiEnv* env, jvmtiEvent e) { namespace impl { -// Helper for ensuring that the dispatch environment is sane. Events with JNIEnvs need to stash -// pending exceptions since they can cause new ones to be thrown. In accordance with the JVMTI -// specification we allow exceptions originating from events to overwrite the current exception, -// including exceptions originating from earlier events. +// Helper for ensuring that the dispatch environment is suitably provisioned. Events with JNIEnvs +// need to stash pending exceptions since they can cause new ones to be thrown. In accordance with +// the JVMTI specification we allow exceptions originating from events to overwrite the current +// exception, including exceptions originating from earlier events. class ScopedEventDispatchEnvironment final : public art::ValueObject { public: ScopedEventDispatchEnvironment() : env_(nullptr), throw_(nullptr, nullptr) { diff --git a/openjdkjvmti/ti_redefine.cc b/openjdkjvmti/ti_redefine.cc index deba134cac..d442799379 100644 --- a/openjdkjvmti/ti_redefine.cc +++ b/openjdkjvmti/ti_redefine.cc @@ -186,7 +186,7 @@ class ObsoleteMap { DCHECK(obsolete_dex_caches_->Get(next_free_slot_) != nullptr); next_free_slot_++; } - // Sanity check that the same slot in obsolete_dex_caches_ is free. + // Check that the same slot in obsolete_dex_caches_ is free. DCHECK(obsolete_dex_caches_->Get(next_free_slot_) == nullptr); } @@ -260,7 +260,7 @@ class ObsoleteMap { }; // This visitor walks thread stacks and allocates and sets up the obsolete methods. It also does -// some basic sanity checks that the obsolete method is sane. +// some basic soundness checks that the obsolete method is valid. class ObsoleteMethodStackVisitor : public art::StackVisitor { protected: ObsoleteMethodStackVisitor( @@ -1173,7 +1173,7 @@ bool Redefiner::ClassRedefinition::CheckRedefinitionIsValid() { class RedefinitionDataIter; // A wrapper that lets us hold onto the arbitrary sized data needed for redefinitions in a -// reasonably sane way. This adds no fields to the normal ObjectArray. By doing this we can avoid +// reasonable way. This adds no fields to the normal ObjectArray. By doing this we can avoid // having to deal with the fact that we need to hold an arbitrary number of references live. class RedefinitionDataHolder { public: diff --git a/runtime/arch/x86/asm_support_x86.S b/runtime/arch/x86/asm_support_x86.S index 1a75cbc9d4..370eea14c7 100644 --- a/runtime/arch/x86/asm_support_x86.S +++ b/runtime/arch/x86/asm_support_x86.S @@ -156,7 +156,7 @@ MACRO2(DEFINE_FUNCTION_CUSTOM_CFA, c_name, cfa_offset) ALIGN_FUNCTION_ENTRY CALLVAR(c_name): CFI_STARTPROC - // Ensure we get a sane starting CFA. + // Ensure we get an appropriate starting CFA. CFI_DEF_CFA(esp, RAW_VAR(cfa_offset)) END_MACRO diff --git a/runtime/arch/x86_64/asm_support_x86_64.S b/runtime/arch/x86_64/asm_support_x86_64.S index be9f59ae1e..b87c70717c 100644 --- a/runtime/arch/x86_64/asm_support_x86_64.S +++ b/runtime/arch/x86_64/asm_support_x86_64.S @@ -165,7 +165,7 @@ MACRO2(DEFINE_FUNCTION_CUSTOM_CFA, c_name, cfa_offset) ALIGN_FUNCTION_ENTRY CALLVAR(c_name): CFI_STARTPROC - // Ensure we get a sane starting CFA. + // Ensure we get an appropriate starting CFA. CFI_DEF_CFA(rsp, RAW_VAR(cfa_offset)) END_MACRO diff --git a/runtime/base/timing_logger_test.cc b/runtime/base/timing_logger_test.cc index 770d2c0edd..6f8d8cdf72 100644 --- a/runtime/base/timing_logger_test.cc +++ b/runtime/base/timing_logger_test.cc @@ -46,7 +46,7 @@ TEST_F(TimingLoggerTest, StartNewEnd) { logger.NewTiming(split2name); logger.NewTiming(split3name); logger.EndTiming(); - // Get the timings and verify that they are sane. + // Get the timings and verify that they are appropriate. const auto& timings = logger.GetTimings(); // 6 timings in the timing logger at this point. EXPECT_EQ(6U, timings.size()); diff --git a/runtime/gc/accounting/mod_union_table_test.cc b/runtime/gc/accounting/mod_union_table_test.cc index 2fc9ee800d..1cd719d460 100644 --- a/runtime/gc/accounting/mod_union_table_test.cc +++ b/runtime/gc/accounting/mod_union_table_test.cc @@ -248,7 +248,7 @@ void ModUnionTableTest::RunTest(ModUnionTableFactory::TableType type) { ptr += CardTable::kCardSize) { ASSERT_TRUE(table->ContainsCardFor(reinterpret_cast<uintptr_t>(ptr))); } - // Visit again and make sure the cards got cleared back to their sane state. + // Visit again and make sure the cards got cleared back to their expected state. std::set<mirror::Object*> visited_after; CollectVisitedVisitor collector_after(&visited_after); table->UpdateAndMarkReferences(&collector_after); diff --git a/runtime/gc/heap.h b/runtime/gc/heap.h index 7dcd5e36a8..57ae7c9ec9 100644 --- a/runtime/gc/heap.h +++ b/runtime/gc/heap.h @@ -510,7 +510,7 @@ class Heap { verify_object_mode_ = kVerifyObjectModeDisabled; } - // Other checks may be performed if we know the heap should be in a sane state. + // Other checks may be performed if we know the heap should be in a healthy state. bool IsObjectValidationEnabled() const { return verify_object_mode_ > kVerifyObjectModeDisabled; } diff --git a/runtime/interpreter/interpreter_common.cc b/runtime/interpreter/interpreter_common.cc index 726de6ec11..00e79b309f 100644 --- a/runtime/interpreter/interpreter_common.cc +++ b/runtime/interpreter/interpreter_common.cc @@ -342,7 +342,7 @@ static bool DoMethodHandleInvokeCommon(Thread* self, // Initialize |result| to 0 as this is the default return value for // polymorphic invocations of method handle types with void return - // and provides sane return result in error cases. + // and provides a sensible return result in error cases. result->SetJ(0); // The invoke_method_idx here is the name of the signature polymorphic method that diff --git a/runtime/mirror/array-inl.h b/runtime/mirror/array-inl.h index 6d52d44192..b0e77b45a6 100644 --- a/runtime/mirror/array-inl.h +++ b/runtime/mirror/array-inl.h @@ -45,7 +45,7 @@ inline size_t Array::SizeOf() { // Don't need to check this since we already check this in GetClass. int32_t component_count = GetLength<static_cast<VerifyObjectFlags>(kVerifyFlags & ~kVerifyThis)>(); - // This is safe from overflow because the array was already allocated, so we know it's sane. + // This is safe from overflow because the array was already allocated. size_t header_size = DataOffset(1U << component_size_shift).SizeValue(); size_t data_size = component_count << component_size_shift; return header_size + data_size; diff --git a/runtime/reference_table_test.cc b/runtime/reference_table_test.cc index e5c1e6aaae..7a1e6682fa 100644 --- a/runtime/reference_table_test.cc +++ b/runtime/reference_table_test.cc @@ -109,7 +109,7 @@ TEST_F(ReferenceTableTest, Basics) { EXPECT_EQ(oss.str().find("short[]"), std::string::npos) << oss.str(); } - // Add a second object 10 times and check dumping is sane. + // Add a second object 10 times so we can then check dumping works as expected. Handle<mirror::ShortArray> o2 = hs.NewHandle(mirror::ShortArray::Alloc(soa.Self(), 0)); for (size_t i = 0; i < 10; ++i) { rt.Add(o2.Get()); diff --git a/runtime/verifier/method_verifier.cc b/runtime/verifier/method_verifier.cc index 59ade97aba..84f0a7f63c 100644 --- a/runtime/verifier/method_verifier.cc +++ b/runtime/verifier/method_verifier.cc @@ -257,7 +257,7 @@ class MethodVerifier final : public ::art::verifier::MethodVerifier { * Call this after widths have been set in "insn_flags". * * Returns "false" if something in the exception table looks fishy, but we're expecting the - * exception table to be somewhat sane. + * exception table to be valid. */ bool ScanTryCatchBlocks() REQUIRES_SHARED(Locks::mutator_lock_); diff --git a/test/004-ThreadStress/src-art/Main.java b/test/004-ThreadStress/src-art/Main.java index e7178523d3..d59574956e 100644 --- a/test/004-ThreadStress/src-art/Main.java +++ b/test/004-ThreadStress/src-art/Main.java @@ -638,8 +638,8 @@ public class Main implements Runnable { : new Daemon(lock, t, operations, mainThread, startBarrier); } - // Enable to dump operation counts per thread to make sure its - // sane compared to frequencyMap. + // Enable to dump operation counts per thread to see that it is + // commensurate with the frequencyMap. if (DEBUG) { for (int t = 0; t < threadStresses.length; t++) { Operation[] operations = threadStresses[t].operations; diff --git a/test/1003-metadata-section-strings/src-art/Main.java b/test/1003-metadata-section-strings/src-art/Main.java index 99e1fbd286..339d6d6662 100644 --- a/test/1003-metadata-section-strings/src-art/Main.java +++ b/test/1003-metadata-section-strings/src-art/Main.java @@ -29,7 +29,7 @@ class Main { } private static void runTest() { - // Test that reference equality is sane regarding the cache. + // Test that reference equality works regarding the cache. System.out.println(Other.getString(1) == "string1"); System.out.println(Other.getString(2000) == "string2000"); System.out.println(Other.getString(3000) == "string3000"); diff --git a/test/knownfailures.json b/test/knownfailures.json index 35d567698e..d8436fdf06 100644 --- a/test/knownfailures.json +++ b/test/knownfailures.json @@ -167,7 +167,7 @@ "137-cfi", "138-duplicate-classes-check2"], "variant": "no-image", - "description": ["All these tests check that we have sane behavior if we", + "description": ["All these tests check that we have appropriate behavior if we", "don't have a dex2oat. Therefore we", "shouldn't run them in situations where we actually", "don't have these since they explicitly test for them.", diff --git a/tools/libcore_failures.txt b/tools/libcore_failures.txt index 4fe2f0e65d..f121c58166 100644 --- a/tools/libcore_failures.txt +++ b/tools/libcore_failures.txt @@ -143,7 +143,7 @@ names: ["org.apache.harmony.tests.java.lang.ClassTest#test_forNameLjava_lang_String"] }, { - description: "Lack of IPv6 on some buildbot slaves", + description: "Lack of IPv6 on some buildbot workers", result: EXEC_FAILED, names: ["libcore.libcore.io.OsTest#test_byteBufferPositions_sendto_recvfrom_af_inet6", "libcore.libcore.io.OsTest#test_sendtoSocketAddress_af_inet6", |