summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Carlstrom <bdc@google.com>2013-07-18 13:28:37 -0700
committerBrian Carlstrom <bdc@google.com>2013-07-18 14:38:27 -0700
commit1895ea386ca78573302483f589ebabd8ce1480e7 (patch)
treed8c2d27ac746f29c8248fe17fd6b8e9872556fc4
parent3e3d591f781b771de89f3b989830da2b6ac6fac8 (diff)
downloadart-1895ea386ca78573302483f589ebabd8ce1480e7.zip
art-1895ea386ca78573302483f589ebabd8ce1480e7.tar.gz
art-1895ea386ca78573302483f589ebabd8ce1480e7.tar.bz2
Fix cpplint readability/fn_size issues
Change-Id: I1efdb07a948a2af49db1a9d21ccab16dacc03a54
-rw-r--r--Android.mk2
-rw-r--r--compiler/dex/portable/mir_to_gbc.cc2
-rw-r--r--compiler/dex/quick/mir_to_lir.cc2
-rw-r--r--compiler/llvm/gbc_expander.cc2
-rw-r--r--runtime/disassembler_arm.cc2
-rw-r--r--runtime/disassembler_x86.cc5
-rw-r--r--runtime/interpreter/interpreter.cc2
-rw-r--r--runtime/verifier/method_verifier.cc2
-rwxr-xr-xtools/cpplint.py5
9 files changed, 14 insertions, 10 deletions
diff --git a/Android.mk b/Android.mk
index 66eb095..ff08dca 100644
--- a/Android.mk
+++ b/Android.mk
@@ -334,7 +334,7 @@ endif
.PHONY: cpplint-art
cpplint-art:
./art/tools/cpplint.py \
- --filter=-,+build/header_guard,+whitespace/braces,+whitespace/comma,+runtime/explicit,+whitespace/newline,+whitespace/parens,+build/namespaces \
+ --filter=-,+build/header_guard,+whitespace/braces,+whitespace/comma,+runtime/explicit,+whitespace/newline,+whitespace/parens,+build/namespaces,+readability/fn_size \
$(shell find art -name *.h -o -name *$(ART_CPP_EXTENSION) | grep -v art/compiler/llvm/generated/)
# "mm cpplint-art-aspirational" to see warnings we would like to fix
diff --git a/compiler/dex/portable/mir_to_gbc.cc b/compiler/dex/portable/mir_to_gbc.cc
index 85ffec5..ad7a6a8 100644
--- a/compiler/dex/portable/mir_to_gbc.cc
+++ b/compiler/dex/portable/mir_to_gbc.cc
@@ -1500,7 +1500,7 @@ bool MirConverter::ConvertMIRNode(MIR* mir, BasicBlock* bb,
res = true;
}
return res;
-}
+} // NOLINT(readability/fn_size)
void MirConverter::SetDexOffset(int32_t offset) {
current_dalvik_offset_ = offset;
diff --git a/compiler/dex/quick/mir_to_lir.cc b/compiler/dex/quick/mir_to_lir.cc
index b758fb5..74eaa66 100644
--- a/compiler/dex/quick/mir_to_lir.cc
+++ b/compiler/dex/quick/mir_to_lir.cc
@@ -655,7 +655,7 @@ void Mir2Lir::CompileDalvikInstruction(MIR* mir, BasicBlock* bb, LIR* label_list
default:
LOG(FATAL) << "Unexpected opcode: " << opcode;
}
-}
+} // NOLINT(readability/fn_size)
// Process extended MIR instructions
void Mir2Lir::HandleExtendedMethodMIR(BasicBlock* bb, MIR* mir) {
diff --git a/compiler/llvm/gbc_expander.cc b/compiler/llvm/gbc_expander.cc
index a2c6998..a7793ae 100644
--- a/compiler/llvm/gbc_expander.cc
+++ b/compiler/llvm/gbc_expander.cc
@@ -3791,7 +3791,7 @@ GBCExpanderPass::ExpandIntrinsic(IntrinsicHelper::IntrinsicId intr_id,
}
UNIMPLEMENTED(FATAL) << "Unexpected GBC intrinsic: " << static_cast<int>(intr_id);
return NULL;
-}
+} // NOLINT(readability/fn_size)
} // anonymous namespace
diff --git a/runtime/disassembler_arm.cc b/runtime/disassembler_arm.cc
index 3c9cb6e..a7319a5 100644
--- a/runtime/disassembler_arm.cc
+++ b/runtime/disassembler_arm.cc
@@ -1034,7 +1034,7 @@ size_t DisassemblerArm::DumpThumb32(std::ostream& os, const uint8_t* instr_ptr)
os << StringPrintf("%p: %08x\t%-7s ", instr_ptr, instr, opcode.str().c_str()) << args.str() << '\n';
return 4;
-}
+} // NOLINT(readability/fn_size)
size_t DisassemblerArm::DumpThumb16(std::ostream& os, const uint8_t* instr_ptr) {
uint16_t instr = ReadU16(instr_ptr);
diff --git a/runtime/disassembler_x86.cc b/runtime/disassembler_x86.cc
index bda162a..48f7b6b 100644
--- a/runtime/disassembler_x86.cc
+++ b/runtime/disassembler_x86.cc
@@ -25,8 +25,7 @@
namespace art {
namespace x86 {
-DisassemblerX86::DisassemblerX86() {
-}
+DisassemblerX86::DisassemblerX86() {}
size_t DisassemblerX86::Dump(std::ostream& os, const uint8_t* begin) {
return DumpInstruction(os, begin);
@@ -745,7 +744,7 @@ DISASSEMBLER_ENTRY(cmp,
prefixed_opcode.str().c_str())
<< args.str() << '\n';
return instr - begin_instr;
-}
+} // NOLINT(readability/fn_size)
} // namespace x86
} // namespace art
diff --git a/runtime/interpreter/interpreter.cc b/runtime/interpreter/interpreter.cc
index f624aa4..09a0fc7 100644
--- a/runtime/interpreter/interpreter.cc
+++ b/runtime/interpreter/interpreter.cc
@@ -2964,7 +2964,7 @@ static JValue ExecuteImpl(Thread* self, MethodHelper& mh, const DexFile::CodeIte
UnexpectedOpcode(inst, mh);
}
}
-}
+} // NOLINT(readability/fn_size)
static JValue Execute(Thread* self, MethodHelper& mh, const DexFile::CodeItem* code_item,
ShadowFrame& shadow_frame, JValue result_register)
diff --git a/runtime/verifier/method_verifier.cc b/runtime/verifier/method_verifier.cc
index 59de9b3..f414b79 100644
--- a/runtime/verifier/method_verifier.cc
+++ b/runtime/verifier/method_verifier.cc
@@ -2696,7 +2696,7 @@ bool MethodVerifier::CodeFlowVerifyInstruction(uint32_t* start_guess) {
DCHECK(insn_flags_[*start_guess].IsOpcode());
return true;
-}
+} // NOLINT(readability/fn_size)
const RegType& MethodVerifier::ResolveClassAndCheckAccess(uint32_t class_idx) {
const char* descriptor = dex_file_->StringByTypeIdx(class_idx);
diff --git a/tools/cpplint.py b/tools/cpplint.py
index da5a938..4f069b7 100755
--- a/tools/cpplint.py
+++ b/tools/cpplint.py
@@ -645,6 +645,11 @@ class _FunctionState(object):
filename: The name of the current file.
linenum: The number of the line to check.
"""
+ # BEGIN android-added
+ if not self.in_a_function:
+ return
+ # END android-added
+
if Match(r'T(EST|est)', self.current_function):
base_trigger = self._TEST_TRIGGER
else: