Revision: 8193
Author: [email protected]
Date: Tue Jun 7 00:17:46 2011
Log: Fix presubmit errors catched by a more recent version of
cpplint.py.
Mainly, there were errors concerning blank lines before and after class
access
control sections [whitespace/blank_line].
BEFORE an access control section (e.g. public:, private:) there should be a
blank line (except for the section right after the class declaration).
AFTER an access control section there should be no blank line.
[email protected]
http://code.google.com/p/v8/source/detail?r=8193
Modified:
/branches/bleeding_edge/include/v8.h
/branches/bleeding_edge/preparser/preparser-process.cc
/branches/bleeding_edge/src/api.h
/branches/bleeding_edge/src/arm/assembler-arm.h
/branches/bleeding_edge/src/arm/code-stubs-arm.h
/branches/bleeding_edge/src/ast.h
/branches/bleeding_edge/src/code-stubs.h
/branches/bleeding_edge/src/d8.h
/branches/bleeding_edge/src/full-codegen.h
/branches/bleeding_edge/src/gdb-jit.cc
/branches/bleeding_edge/src/heap.h
/branches/bleeding_edge/src/hydrogen.h
/branches/bleeding_edge/src/ia32/code-stubs-ia32.cc
/branches/bleeding_edge/src/ic.h
/branches/bleeding_edge/src/jsregexp.cc
/branches/bleeding_edge/src/liveedit.h
/branches/bleeding_edge/src/liveobjectlist.cc
/branches/bleeding_edge/src/mark-compact.cc
/branches/bleeding_edge/src/mips/assembler-mips.h
/branches/bleeding_edge/src/mips/code-stubs-mips.h
/branches/bleeding_edge/src/mips/constants-mips.h
/branches/bleeding_edge/src/objects.cc
/branches/bleeding_edge/src/objects.h
/branches/bleeding_edge/src/platform-linux.cc
/branches/bleeding_edge/src/platform-openbsd.cc
/branches/bleeding_edge/src/platform-win32.cc
/branches/bleeding_edge/src/preparser.h
/branches/bleeding_edge/src/runtime.cc
/branches/bleeding_edge/src/runtime.h
/branches/bleeding_edge/test/cctest/test-api.cc
=======================================
--- /branches/bleeding_edge/include/v8.h Mon Jun 6 13:58:25 2011
+++ /branches/bleeding_edge/include/v8.h Tue Jun 7 00:17:46 2011
@@ -165,7 +165,6 @@
*/
template <class T> class Handle {
public:
-
/**
* Creates an empty handle.
*/
@@ -312,7 +311,6 @@
*/
template <class T> class Persistent : public Handle<T> {
public:
-
/**
* Creates an empty persistent handle that doesn't point to any
* storage cell.
@@ -586,7 +584,6 @@
*/
class V8EXPORT Script {
public:
-
/**
* Compiles the specified script (context-independent).
*
@@ -858,7 +855,6 @@
*/
class Value : public Data {
public:
-
/**
* Returns true if this value is the undefined value. See ECMA-262
* 4.3.10.
@@ -990,7 +986,6 @@
*/
class String : public Primitive {
public:
-
/**
* Returns the number of characters in this string.
*/
@@ -1640,6 +1635,7 @@
V8EXPORT static Local<Object> New();
static inline Object* Cast(Value* obj);
+
private:
V8EXPORT Object();
V8EXPORT static void CheckCast(Value* obj);
@@ -2682,7 +2678,6 @@
void* GetData();
private:
-
Isolate();
Isolate(const Isolate&);
~Isolate();
@@ -3173,7 +3168,6 @@
*/
class V8EXPORT TryCatch {
public:
-
/**
* Creates a new try/catch block and registers it with v8.
*/
@@ -3719,7 +3713,6 @@
*/
class Internals {
public:
-
// These values match non-compiler-dependent values defined within
// the implementation of v8.
static const int kHeapObjectMapOffset = 0;
=======================================
--- /branches/bleeding_edge/preparser/preparser-process.cc Tue May 24
07:02:59 2011
+++ /branches/bleeding_edge/preparser/preparser-process.cc Tue Jun 7
00:17:46 2011
@@ -290,12 +290,12 @@
arg_index++;
} while (argc > arg_index && IsFlag(argv[arg_index]));
if (argc > arg_index) {
- expects.beg_pos = atoi(argv[arg_index]);
+ expects.beg_pos = atoi(argv[arg_index]); // NOLINT
do {
arg_index++;
} while (argc > arg_index && IsFlag(argv[arg_index]));
if (argc > arg_index) {
- expects.end_pos = atoi(argv[arg_index]);
+ expects.end_pos = atoi(argv[arg_index]); // NOLINT
}
}
}
=======================================
--- /branches/bleeding_edge/src/api.h Mon May 23 05:59:02 2011
+++ /branches/bleeding_edge/src/api.h Tue Jun 7 00:17:46 2011
@@ -398,7 +398,6 @@
// data.
class HandleScopeImplementer {
public:
-
explicit HandleScopeImplementer(Isolate* isolate)
: isolate_(isolate),
blocks_(0),
=======================================
--- /branches/bleeding_edge/src/arm/assembler-arm.h Mon May 23 05:48:17 2011
+++ /branches/bleeding_edge/src/arm/assembler-arm.h Tue Jun 7 00:17:46 2011
@@ -500,6 +500,7 @@
// Enable a specified feature within a scope.
class Scope BASE_EMBEDDED {
#ifdef DEBUG
+
public:
explicit Scope(CpuFeature f) {
unsigned mask = 1u << f;
@@ -519,10 +520,12 @@
isolate_->set_enabled_cpu_features(old_enabled_);
}
}
+
private:
Isolate* isolate_;
unsigned old_enabled_;
#else
+
public:
explicit Scope(CpuFeature f) {}
#endif
=======================================
--- /branches/bleeding_edge/src/arm/code-stubs-arm.h Tue May 31 08:21:25
2011
+++ /branches/bleeding_edge/src/arm/code-stubs-arm.h Tue Jun 7 00:17:46
2011
@@ -471,7 +471,6 @@
class FloatingPointHelper : public AllStatic {
public:
-
enum Destination {
kVFPRegisters,
kCoreRegisters
=======================================
--- /branches/bleeding_edge/src/ast.h Tue May 31 02:34:37 2011
+++ /branches/bleeding_edge/src/ast.h Tue Jun 7 00:17:46 2011
@@ -1947,6 +1947,7 @@
uc16 standard_type() { return set_.standard_set_type(); }
ZoneList<CharacterRange>* ranges() { return set_.ranges(); }
bool is_negated() { return is_negated_; }
+
private:
CharacterSet set_;
bool is_negated_;
@@ -2031,6 +2032,7 @@
bool is_non_greedy() { return type_ == NON_GREEDY; }
bool is_greedy() { return type_ == GREEDY; }
RegExpTree* body() { return body_; }
+
private:
RegExpTree* body_;
int min_;
@@ -2063,6 +2065,7 @@
int index() { return index_; }
static int StartRegister(int index) { return index * 2; }
static int EndRegister(int index) { return index * 2 + 1; }
+
private:
RegExpTree* body_;
int index_;
@@ -2093,6 +2096,7 @@
bool is_positive() { return is_positive_; }
int capture_count() { return capture_count_; }
int capture_from() { return capture_from_; }
+
private:
RegExpTree* body_;
bool is_positive_;
=======================================
--- /branches/bleeding_edge/src/code-stubs.h Tue May 31 08:21:25 2011
+++ /branches/bleeding_edge/src/code-stubs.h Tue Jun 7 00:17:46 2011
@@ -274,7 +274,6 @@
void Generate(MacroAssembler* masm);
private:
-
const char* GetName() { return "StackCheckStub"; }
Major MajorKey() { return StackCheck; }
=======================================
--- /branches/bleeding_edge/src/d8.h Tue May 31 02:42:17 2011
+++ /branches/bleeding_edge/src/d8.h Tue Jun 7 00:17:46 2011
@@ -108,6 +108,7 @@
i::HashMap* map_;
i::HashMap::Entry* entry_;
};
+
private:
static int Hash(const char* name);
static bool Match(void* key1, void* key2);
@@ -204,6 +205,7 @@
static const char* kHistoryFileName;
static const char* kPrompt;
+
private:
static Persistent<Context> utility_context_;
static Persistent<Context> evaluation_context_;
=======================================
--- /branches/bleeding_edge/src/full-codegen.h Tue May 31 07:37:34 2011
+++ /branches/bleeding_edge/src/full-codegen.h Tue Jun 7 00:17:46 2011
@@ -151,9 +151,11 @@
return stack_depth;
}
NestedStatement* outer() { return previous_; }
- protected:
+
+ protected:
MacroAssembler* masm() { return codegen_->masm(); }
- private:
+
+ private:
FullCodeGenerator* codegen_;
NestedStatement* previous_;
DISALLOW_COPY_AND_ASSIGN(NestedStatement);
=======================================
--- /branches/bleeding_edge/src/gdb-jit.cc Thu Jun 2 10:50:02 2011
+++ /branches/bleeding_edge/src/gdb-jit.cc Tue Jun 7 00:17:46 2011
@@ -644,7 +644,6 @@
class CodeDescription BASE_EMBEDDED {
public:
-
#ifdef V8_TARGET_ARCH_X64
enum StackState {
POST_RBP_PUSH,
=======================================
--- /branches/bleeding_edge/src/heap.h Mon Jun 6 08:23:04 2011
+++ /branches/bleeding_edge/src/heap.h Tue Jun 7 00:17:46 2011
@@ -1905,6 +1905,7 @@
void Clear();
static const int kAbsent = -2;
+
private:
DescriptorLookupCache() {
for (int i = 0; i < kLength; ++i) {
=======================================
--- /branches/bleeding_edge/src/hydrogen.h Mon Jun 6 07:57:25 2011
+++ /branches/bleeding_edge/src/hydrogen.h Tue Jun 7 00:17:46 2011
@@ -1048,7 +1048,6 @@
}
private:
-
HStatistics()
: timing_(5),
names_(5),
=======================================
--- /branches/bleeding_edge/src/ia32/code-stubs-ia32.cc Tue May 31 09:38:40
2011
+++ /branches/bleeding_edge/src/ia32/code-stubs-ia32.cc Tue Jun 7 00:17:46
2011
@@ -309,7 +309,6 @@
class FloatingPointHelper : public AllStatic {
public:
-
enum ArgLocation {
ARGS_ON_STACK,
ARGS_IN_REGISTERS
=======================================
--- /branches/bleeding_edge/src/ic.h Tue May 24 07:01:36 2011
+++ /branches/bleeding_edge/src/ic.h Tue Jun 7 00:17:46 2011
@@ -66,7 +66,6 @@
//
class IC {
public:
-
// The ids for utility called from the generated code.
enum UtilityId {
#define CONST_NAME(name) k##name,
@@ -635,7 +634,6 @@
class UnaryOpIC: public IC {
public:
-
// sorted: increasingly more unspecific (ignoring UNINITIALIZED)
// TODO(svenpanne) Using enums+switch is an antipattern, use a class
instead.
enum TypeInfo {
@@ -662,7 +660,6 @@
// Type Recording BinaryOpIC, that records the types of the inputs and
outputs.
class BinaryOpIC: public IC {
public:
-
enum TypeInfo {
UNINITIALIZED,
SMI,
=======================================
--- /branches/bleeding_edge/src/jsregexp.cc Mon Jun 6 08:43:08 2011
+++ /branches/bleeding_edge/src/jsregexp.cc Tue Jun 7 00:17:46 2011
@@ -811,6 +811,7 @@
inline bool ascii() { return ascii_; }
static const int kNoRegister = -1;
+
private:
EndNode* accept_;
int next_register_;
@@ -2767,6 +2768,7 @@
AlternativeGeneration* at(int i) {
return alt_gens_[i];
}
+
private:
static const int kAFew = 10;
ZoneList<AlternativeGeneration*> alt_gens_;
@@ -3326,6 +3328,7 @@
}
stream()->Add("}}");
}
+
private:
bool first_;
StringStream* stream() { return stream_; }
=======================================
--- /branches/bleeding_edge/src/liveedit.h Wed Jun 1 16:11:10 2011
+++ /branches/bleeding_edge/src/liveedit.h Tue Jun 7 00:17:46 2011
@@ -143,7 +143,6 @@
// A general-purpose comparator between 2 arrays.
class Comparator {
public:
-
// Holds 2 arrays of some elements allowing to compare any pair of
// element from the first array and element from the second array.
class Input {
=======================================
--- /branches/bleeding_edge/src/liveobjectlist.cc Thu May 19 04:47:34 2011
+++ /branches/bleeding_edge/src/liveobjectlist.cc Tue Jun 7 00:17:46 2011
@@ -1649,7 +1649,6 @@
// Helper class for copying HeapObjects.
class LolVisitor: public ObjectVisitor {
public:
-
LolVisitor(HeapObject* target, Handle<HeapObject> handle_to_skip)
: target_(target), handle_to_skip_(handle_to_skip), found_(false) {}
=======================================
--- /branches/bleeding_edge/src/mark-compact.cc Fri Jun 3 07:48:09 2011
+++ /branches/bleeding_edge/src/mark-compact.cc Tue Jun 7 00:17:46 2011
@@ -1030,6 +1030,7 @@
int PointersRemoved() {
return pointers_removed_;
}
+
private:
Heap* heap_;
int pointers_removed_;
@@ -1935,6 +1936,7 @@
VisitPointer(&target);
rinfo->set_call_address(Code::cast(target)->instruction_start());
}
+
private:
Heap* heap_;
};
=======================================
--- /branches/bleeding_edge/src/mips/assembler-mips.h Thu May 26 00:46:18
2011
+++ /branches/bleeding_edge/src/mips/assembler-mips.h Tue Jun 7 00:17:46
2011
@@ -328,7 +328,6 @@
// Class MemOperand represents a memory operand in load and store
instructions.
class MemOperand : public Operand {
public:
-
explicit MemOperand(Register rn, int32_t offset = 0);
private:
@@ -372,6 +371,7 @@
// Enable a specified feature within a scope.
class Scope BASE_EMBEDDED {
#ifdef DEBUG
+
public:
explicit Scope(CpuFeature f) {
unsigned mask = 1u << f;
@@ -391,11 +391,13 @@
isolate_->set_enabled_cpu_features(old_enabled_);
}
}
- private:
+
+ private:
Isolate* isolate_;
unsigned old_enabled_;
#else
- public:
+
+ public:
explicit Scope(CpuFeature f) {}
#endif
};
@@ -1090,6 +1092,7 @@
next_label_ += kInstrSize;
return label_pos;
}
+
private:
int start_;
int end_;
=======================================
--- /branches/bleeding_edge/src/mips/code-stubs-mips.h Tue May 24 05:20:16
2011
+++ /branches/bleeding_edge/src/mips/code-stubs-mips.h Tue Jun 7 00:17:46
2011
@@ -480,7 +480,6 @@
class FloatingPointHelper : public AllStatic {
public:
-
enum Destination {
kFPURegisters,
kCoreRegisters
=======================================
--- /branches/bleeding_edge/src/mips/constants-mips.h Mon Jun 6 01:43:15
2011
+++ /branches/bleeding_edge/src/mips/constants-mips.h Tue Jun 7 00:17:46
2011
@@ -133,7 +133,6 @@
static const int32_t kMinValue = 0x80000000;
private:
-
static const char* names_[kNumSimuRegisters];
static const RegisterAlias aliases_[];
};
@@ -153,7 +152,6 @@
};
private:
-
static const char* names_[kNumFPURegisters];
static const RegisterAlias aliases_[];
};
=======================================
--- /branches/bleeding_edge/src/objects.cc Mon Jun 6 06:15:11 2011
+++ /branches/bleeding_edge/src/objects.cc Tue Jun 7 00:17:46 2011
@@ -9955,6 +9955,7 @@
UNREACHABLE();
return NULL;
}
+
private:
uint32_t c1_;
uint32_t c2_;
=======================================
--- /branches/bleeding_edge/src/objects.h Mon Jun 6 06:15:11 2011
+++ /branches/bleeding_edge/src/objects.h Tue Jun 7 00:17:46 2011
@@ -136,7 +136,6 @@
// They are used both in property dictionaries and instance descriptors.
class PropertyDetails BASE_EMBEDDED {
public:
-
PropertyDetails(PropertyAttributes attributes,
PropertyType type,
int index = 0) {
@@ -216,6 +215,7 @@
class StorageField: public BitField<uint32_t, 8, 32-8> {};
static const int kInitialIndex = 1;
+
private:
uint32_t value_;
};
@@ -2423,7 +2423,6 @@
int FindEntry(Isolate* isolate, Key key);
protected:
-
// Find the entry at which to insert element with the given key that
// has the given hash value.
uint32_t FindInsertionEntry(uint32_t hash);
@@ -2590,7 +2589,6 @@
template <typename Shape, typename Key>
class Dictionary: public HashTable<Shape, Key> {
public:
-
static inline Dictionary<Shape, Key>* cast(Object* obj) {
return reinterpret_cast<Dictionary<Shape, Key>*>(obj);
}
@@ -4879,6 +4877,7 @@
// Layout of the literals array.
static const int kLiteralsPrefixSize = 1;
static const int kLiteralGlobalContextIndex = 0;
+
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(JSFunction);
};
@@ -4917,7 +4916,6 @@
static const int kSize = kContextOffset + kPointerSize;
private:
-
DISALLOW_IMPLICIT_CONSTRUCTORS(JSGlobalProxy);
};
@@ -4973,7 +4971,6 @@
// JavaScript global object.
class JSGlobalObject: public GlobalObject {
public:
-
// Casting.
static inline JSGlobalObject* cast(Object* obj);
@@ -5468,7 +5465,6 @@
static uint32_t MakeArrayIndexHash(uint32_t value, int length);
private:
-
uint32_t array_index() {
ASSERT(is_array_index());
return array_index_;
@@ -5525,6 +5521,7 @@
#else
inline void invalidate() { }
#endif
+
private:
uint32_t type_;
#ifdef DEBUG
@@ -5862,7 +5859,6 @@
// The SeqString abstract class captures sequential string values.
class SeqString: public String {
public:
-
// Casting.
static inline SeqString* cast(Object* obj);
=======================================
--- /branches/bleeding_edge/src/platform-linux.cc Thu Jun 2 04:22:26 2011
+++ /branches/bleeding_edge/src/platform-linux.cc Tue Jun 7 00:17:46 2011
@@ -750,7 +750,6 @@
class LinuxMutex : public Mutex {
public:
-
LinuxMutex() {
pthread_mutexattr_t attrs;
int result = pthread_mutexattr_init(&attrs);
=======================================
--- /branches/bleeding_edge/src/platform-openbsd.cc Wed Jun 1 04:09:32 2011
+++ /branches/bleeding_edge/src/platform-openbsd.cc Tue Jun 7 00:17:46 2011
@@ -490,7 +490,6 @@
class OpenBSDMutex : public Mutex {
public:
-
OpenBSDMutex() {
pthread_mutexattr_t attrs;
int result = pthread_mutexattr_init(&attrs);
=======================================
--- /branches/bleeding_edge/src/platform-win32.cc Wed Jun 1 01:49:18 2011
+++ /branches/bleeding_edge/src/platform-win32.cc Tue Jun 7 00:17:46 2011
@@ -1590,7 +1590,6 @@
class Win32Mutex : public Mutex {
public:
-
Win32Mutex() { InitializeCriticalSection(&cs_); }
virtual ~Win32Mutex() { DeleteCriticalSection(&cs_); }
=======================================
--- /branches/bleeding_edge/src/preparser.h Tue May 24 07:02:59 2011
+++ /branches/bleeding_edge/src/preparser.h Tue Jun 7 00:17:46 2011
@@ -98,6 +98,7 @@
bool IsEvalOrArguments() { return type_ >= kEvalIdentifier; }
bool IsFutureReserved() { return type_ == kFutureReservedIdentifier; }
bool IsValidStrictVariable() { return type_ == kUnknownIdentifier; }
+
private:
enum Type {
kUnknownIdentifier,
=======================================
--- /branches/bleeding_edge/src/runtime.cc Mon Jun 6 08:43:08 2011
+++ /branches/bleeding_edge/src/runtime.cc Tue Jun 7 00:17:46 2011
@@ -2365,6 +2365,7 @@
int parts() {
return parts_.length();
}
+
private:
enum PartType {
SUBJECT_PREFIX = 1,
=======================================
--- /branches/bleeding_edge/src/runtime.h Fri Jun 3 03:15:49 2011
+++ /branches/bleeding_edge/src/runtime.h Tue Jun 7 00:17:46 2011
@@ -498,7 +498,6 @@
class RuntimeState {
public:
-
StaticResource<StringInputBuffer>* string_input_buffer() {
return &string_input_buffer_;
}
=======================================
--- /branches/bleeding_edge/test/cctest/test-api.cc Mon Jun 6 07:57:25 2011
+++ /branches/bleeding_edge/test/cctest/test-api.cc Tue Jun 7 00:17:46 2011
@@ -10472,6 +10472,7 @@
CHECK(regexp_success_);
CHECK(gc_success_);
}
+
private:
// Number of garbage collections required.
static const int kRequiredGCs = 5;
@@ -10594,6 +10595,7 @@
CHECK(apply_success_);
CHECK(gc_success_);
}
+
private:
// Number of garbage collections required.
static const int kRequiredGCs = 2;
@@ -10887,8 +10889,8 @@
CHECK(regexp_success_);
CHECK(morph_success_);
}
- private:
-
+
+ private:
// Number of string modifications required.
static const int kRequiredModifications = 5;
static const int kMaxModifications = 100;
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev