Split nested namespaces declaration in two lines in accordance with C++ Style Guide.

This issue was raised by Brett Wilson while reviewing my changelist for readability. Craig Silverstein (one of C++ SG maintainers) confirmed that we should declare one namespace per line. Our way of namespaces closing seems not violating style guides (there is no clear agreement on it), so I left it intact.

Review URL: http://codereview.chromium.org/115756


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2038 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
mikhail.naganov@gmail.com 2009-05-25 10:05:56 +00:00
parent 6d71da11fd
commit 30a0a7de43
223 changed files with 452 additions and 226 deletions

View File

@ -34,7 +34,8 @@
#include "top.h"
#include "zone-inl.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
template <class C>

View File

@ -28,7 +28,8 @@
#ifndef V8_ACCESSORS_H_
#define V8_ACCESSORS_H_
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// The list of accessor descriptors. This is a second-order macro
// taking a macro to be applied to all accessor descriptor names.

View File

@ -29,7 +29,8 @@
#include "v8.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
void* Malloced::New(size_t size) {

View File

@ -28,7 +28,8 @@
#ifndef V8_ALLOCATION_H_
#define V8_ALLOCATION_H_
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// A class that controls whether allocation is allowed. This is for

View File

@ -28,7 +28,8 @@
#ifndef V8_ARGUMENTS_H_
#define V8_ARGUMENTS_H_
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// Arguments provides access to runtime call parameters.
//

View File

@ -41,7 +41,8 @@
#include "cpu.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
Condition NegateCondition(Condition cc) {
ASSERT(cc != al);

View File

@ -39,7 +39,8 @@
#include "arm/assembler-arm-inl.h"
#include "serialize.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// -----------------------------------------------------------------------------
// Implementation of Register and CRegister

View File

@ -42,7 +42,8 @@
#include "assembler.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// CPU Registers.
//

View File

@ -31,7 +31,8 @@
#include "debug.h"
#include "runtime.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
#define __ ACCESS_MASM(masm)

View File

@ -36,7 +36,8 @@
#include "scopes.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
#define __ ACCESS_MASM(masm_)

View File

@ -28,7 +28,8 @@
#ifndef V8_ARM_CODEGEN_ARM_H_
#define V8_ARM_CODEGEN_ARM_H_
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// Forward declarations
class DeferredCode;

View File

@ -28,7 +28,8 @@
#ifndef V8_ARM_CONSTANTS_ARM_H_
#define V8_ARM_CONSTANTS_ARM_H_
namespace assembler { namespace arm {
namespace assembler {
namespace arm {
// Defines constants and accessor classes to assemble, disassemble and
// simulate ARM instructions.

View File

@ -34,7 +34,8 @@
#include "cpu.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
void CPU::Setup() {
// Nothing to do.

View File

@ -30,7 +30,8 @@
#include "codegen-inl.h"
#include "debug.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
#ifdef ENABLE_DEBUGGER_SUPPORT
// Currently debug break is not supported in frame exit code on ARM.

View File

@ -62,7 +62,8 @@
#include "platform.h"
namespace assembler { namespace arm {
namespace assembler {
namespace arm {
namespace v8i = v8::internal;

View File

@ -31,7 +31,8 @@
#include "arm/assembler-arm-inl.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
StackFrame::Type StackFrame::ComputeType(State* state) {

View File

@ -28,7 +28,8 @@
#ifndef V8_ARM_FRAMES_ARM_H_
#define V8_ARM_FRAMES_ARM_H_
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// The ARM ABI does not specify the usage of register r9, which may be reserved

View File

@ -32,7 +32,8 @@
#include "runtime.h"
#include "stub-cache.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// ----------------------------------------------------------------------------

View File

@ -31,7 +31,8 @@
#include "jump-target-inl.h"
#include "register-allocator-inl.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// -------------------------------------------------------------------------
// JumpTarget implementation.

View File

@ -32,7 +32,8 @@
#include "debug.h"
#include "runtime.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// Give alias names to registers
Register cp = { 8 }; // JavaScript context pointer

View File

@ -30,7 +30,8 @@
#include "assembler.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// Give alias names to registers

View File

@ -30,7 +30,8 @@
#include "regexp-macro-assembler.h"
#include "arm/regexp-macro-assembler-arm.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
RegExpMacroAssemblerARM::RegExpMacroAssemblerARM() {
UNIMPLEMENTED();

View File

@ -28,7 +28,8 @@
#ifndef V8_ARM_REGEXP_MACRO_ASSEMBLER_ARM_H_
#define V8_ARM_REGEXP_MACRO_ASSEMBLER_ARM_H_
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
class RegExpMacroAssemblerARM: public RegExpMacroAssembler {
public:

View File

@ -30,7 +30,8 @@
#include "codegen-inl.h"
#include "register-allocator-inl.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// -------------------------------------------------------------------------
// Result implementation.

View File

@ -36,7 +36,8 @@
#if !defined(__arm__)
// Only build the simulator if not compiling for real ARM hardware.
namespace assembler { namespace arm {
namespace assembler {
namespace arm {
using ::v8::internal::Object;
using ::v8::internal::PrintF;

View File

@ -66,7 +66,8 @@
#include "constants-arm.h"
namespace assembler { namespace arm {
namespace assembler {
namespace arm {
class Simulator {
public:

View File

@ -31,7 +31,8 @@
#include "codegen-inl.h"
#include "stub-cache.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
#define __ ACCESS_MASM(masm)

View File

@ -31,7 +31,8 @@
#include "register-allocator-inl.h"
#include "scopes.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// -------------------------------------------------------------------------
// VirtualFrame implementation.

View File

@ -31,7 +31,8 @@
#include "register-allocator.h"
#include "scopes.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// -------------------------------------------------------------------------
// Virtual frames

View File

@ -43,7 +43,8 @@
#include "stub-cache.h"
#include "regexp-stack.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// -----------------------------------------------------------------------------

View File

@ -40,7 +40,8 @@
#include "zone-inl.h"
#include "token.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// -----------------------------------------------------------------------------

View File

@ -31,7 +31,8 @@
#include "scopes.h"
#include "string-stream.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
VariableProxySentinel VariableProxySentinel::this_proxy_(true);

View File

@ -37,7 +37,8 @@
#include "jsregexp.h"
#include "jump-target.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// The abstract syntax tree is an intermediate, light-weight
// representation of the parsed JavaScript code suitable for

View File

@ -37,7 +37,8 @@
#include "macro-assembler.h"
#include "natives.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// A SourceCodeCache uses a FixedArray to store pairs of
// (AsciiString*, JSFunction*), mapping names of native code files

View File

@ -29,7 +29,8 @@
#ifndef V8_BOOTSTRAPPER_H_
#define V8_BOOTSTRAPPER_H_
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// The Boostrapper is the public interface for creating a JavaScript global
// context.

View File

@ -32,7 +32,8 @@
#include "builtins.h"
#include "ic-inl.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// ----------------------------------------------------------------------------
// Support macros for defining builtins in C.

View File

@ -28,7 +28,8 @@
#ifndef V8_BUILTINS_H_
#define V8_BUILTINS_H_
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// Define list of builtins implemented in C.
#define BUILTIN_LIST_C(V) \

View File

@ -29,7 +29,8 @@
#ifndef V8_BYTECODES_IRREGEXP_H_
#define V8_BYTECODES_IRREGEXP_H_
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
static const int BYTECODE_MASK = 0xff;

View File

@ -30,7 +30,8 @@
#include "char-predicates.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
inline bool IsCarriageReturn(uc32 c) {

View File

@ -28,7 +28,8 @@
#ifndef V8_CHAR_PREDICATES_H_
#define V8_CHAR_PREDICATES_H_
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// Unicode character predicates as defined by ECMA-262, 3rd,
// used for lexical analysis.

View File

@ -32,7 +32,8 @@
#include "factory.h"
#include "macro-assembler.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
Handle<Code> CodeStub::GetCode() {
uint32_t key = GetKey();

View File

@ -28,7 +28,8 @@
#ifndef V8_CODE_STUBS_H_
#define V8_CODE_STUBS_H_
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// Stub is base classes of all stubs.

View File

@ -28,7 +28,8 @@
#ifndef V8_CODE_H_
#define V8_CODE_H_
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// Wrapper class for passing expected and actual parameter counts as

View File

@ -32,7 +32,8 @@
#include "codegen.h"
#include "register-allocator-inl.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
void DeferredCode::SetEntryFrame(Result* arg) {

View File

@ -38,7 +38,8 @@
#include "scopeinfo.h"
#include "stub-cache.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
CodeGenerator* CodeGeneratorScope::top_ = NULL;

View File

@ -88,7 +88,8 @@ enum OverwriteMode { NO_OVERWRITE, OVERWRITE_LEFT, OVERWRITE_RIGHT };
#include "register-allocator.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// Code generation can be nested. Code generation scopes form a stack

View File

@ -29,7 +29,8 @@
#include "compilation-cache.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
enum {
// The number of script generations tell how many GCs a script can

View File

@ -28,7 +28,8 @@
#ifndef V8_COMPILATION_CACHE_H_
#define V8_COMPILATION_CACHE_H_
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// The compilation cache keeps function boilerplates for compiled

View File

@ -37,7 +37,8 @@
#include "scopes.h"
#include "usage-analyzer.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
static Handle<Code> MakeCode(FunctionLiteral* literal,
Handle<Script> script,

View File

@ -32,7 +32,8 @@
#include "parser.h"
#include "zone.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// The V8 compiler
//

View File

@ -31,7 +31,8 @@
#include "debug.h"
#include "scopeinfo.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
JSBuiltinsObject* Context::builtins() {
GlobalObject* object = global();

View File

@ -28,7 +28,8 @@
#ifndef V8_CONTEXTS_H_
#define V8_CONTEXTS_H_
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
enum ContextLookupFlags {

View File

@ -38,7 +38,8 @@
#include "conversions.h"
#include "platform.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// The fast double-to-int conversion routine does not guarantee
// rounding towards zero.

View File

@ -33,7 +33,8 @@
#include "factory.h"
#include "scanner.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
int HexValue(uc32 c) {
if ('0' <= c && c <= '9')

View File

@ -28,7 +28,8 @@
#ifndef V8_CONVERSIONS_H_
#define V8_CONVERSIONS_H_
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// The fast double-to-int conversion routine does not guarantee
// rounding towards zero.

View File

@ -30,7 +30,8 @@
#include "counters.h"
#include "platform.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
CounterLookupCallback StatsTable::lookup_function_ = NULL;
CreateHistogramCallback StatsTable::create_histogram_function_ = NULL;

View File

@ -28,7 +28,8 @@
#ifndef V8_COUNTERS_H_
#define V8_COUNTERS_H_
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// StatsCounters is an interface for plugging into external
// counters for monitoring. Counters can be looked up and

View File

@ -36,7 +36,8 @@
#ifndef V8_CPU_H_
#define V8_CPU_H_
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// ----------------------------------------------------------------------------
// CPU

View File

@ -28,7 +28,8 @@
#ifndef V8_DATEPARSER_INL_H_
#define V8_DATEPARSER_INL_H_
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
template <typename Char>
bool DateParser::Parse(Vector<Char> str, FixedArray* out) {

View File

@ -29,7 +29,8 @@
#include "dateparser.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
bool DateParser::DayComposer::Write(FixedArray* output) {
int year = 0; // Default year is 0 (=> 2000) for KJS compatibility.

View File

@ -30,7 +30,8 @@
#include "scanner.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
class DateParser : public AllStatic {
public:

View File

@ -30,7 +30,8 @@
#include "debug-agent.h"
#ifdef ENABLE_DEBUGGER_SUPPORT
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// Public V8 debugger API message handler function. This function just delegates
// to the debugger agent through it's data parameter.

View File

@ -32,7 +32,8 @@
#include "../include/v8-debug.h"
#include "platform.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// Forward decelrations.
class DebuggerAgentSession;

View File

@ -44,7 +44,8 @@
#include "../include/v8-debug.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
#ifdef ENABLE_DEBUGGER_SUPPORT
static void PrintLn(v8::Local<v8::Value> value) {

View File

@ -41,7 +41,8 @@
#ifdef ENABLE_DEBUGGER_SUPPORT
#include "../include/v8-debug.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// Forward declarations.

View File

@ -36,7 +36,8 @@
#include "serialize.h"
#include "string-stream.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
#ifdef ENABLE_DISASSEMBLER

View File

@ -28,7 +28,8 @@
#ifndef V8_DISASSEMBLER_H_
#define V8_DISASSEMBLER_H_
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
class Disassembler : public AllStatic {
public:

View File

@ -43,7 +43,8 @@
#include "debug.h"
#include "v8threads.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
static Handle<Object> Invoke(bool construct,

View File

@ -28,7 +28,8 @@
#ifndef V8_EXECUTION_H_
#define V8_EXECUTION_H_
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// Flag used to set the interrupt causes.

View File

@ -33,7 +33,8 @@
#include "factory.h"
#include "macro-assembler.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
Handle<FixedArray> Factory::NewFixedArray(int size, PretenureFlag pretenure) {

View File

@ -31,7 +31,8 @@
#include "heap.h"
#include "zone-inl.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// Interface for handle based allocation.

View File

@ -35,7 +35,8 @@
#include "string-stream.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// Define all of our flags.
#define FLAG_MODE_DEFINE

View File

@ -29,7 +29,8 @@
#include "checks.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// Declare all of our flags.
#define FLAG_MODE_DECLARE

View File

@ -30,7 +30,8 @@
#include "register-allocator-inl.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// -------------------------------------------------------------------------
// Virtual frame elements

View File

@ -38,7 +38,8 @@
#include "arm/frames-arm.h"
#endif
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
inline Address StackHandler::address() const {

View File

@ -34,7 +34,8 @@
#include "top.h"
#include "zone-inl.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// Iterator that supports traversing the stack handlers of a
// particular frame. Needs to know the top of the handler chain.

View File

@ -28,7 +28,8 @@
#ifndef V8_FRAMES_H_
#define V8_FRAMES_H_
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
typedef uint32_t RegList;

View File

@ -30,7 +30,8 @@
#include "ast.h"
#include "func-name-inferrer.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
void FuncNameInferrer::PushEnclosingName(Handle<String> name) {

View File

@ -28,7 +28,8 @@
#ifndef V8_FUNC_NAME_INFERRER_H_
#define V8_FUNC_NAME_INFERRER_H_
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// FuncNameInferrer is a stateful class that is used to perform name
// inference for anonymous functions during static analysis of source code.

View File

@ -30,7 +30,8 @@
#include "api.h"
#include "global-handles.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
class GlobalHandles::Node : public Malloced {
public:

View File

@ -30,7 +30,8 @@
#include "list-inl.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// Structure for tracking global handles.
// A single list keeps all the allocated global handles.

View File

@ -28,7 +28,8 @@
#ifndef V8_GLOBALS_H_
#define V8_GLOBALS_H_
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// Processor architecture detection. For more info on what's defined, see:
// http://msdn.microsoft.com/en-us/library/b0084kay.aspx

View File

@ -33,7 +33,8 @@
#include "handles.h"
#include "api.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
template<class T>
Handle<T>::Handle(T* obj) {

View File

@ -37,7 +37,8 @@
#include "natives.h"
#include "runtime.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
v8::ImplementationUtilities::HandleScopeData HandleScope::current_ =

View File

@ -30,7 +30,8 @@
#include "apiutils.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// ----------------------------------------------------------------------------
// A Handle provides a reference to an object that survives relocation by

View File

@ -29,7 +29,8 @@
#include "hashmap.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
Allocator HashMap::DefaultAllocator;

View File

@ -28,7 +28,8 @@
#ifndef V8_HASHMAP_H_
#define V8_HASHMAP_H_
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// Allocator defines the memory allocator interface

View File

@ -31,7 +31,8 @@
#include "log.h"
#include "v8-counters.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
int Heap::MaxHeapObjectSize() {
return Page::kMaxHeapObjectSize;

View File

@ -40,7 +40,8 @@
#include "scopeinfo.h"
#include "v8threads.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
#define ROOT_ALLOCATION(type, name) type* Heap::name##_;
ROOT_LIST(ROOT_ALLOCATION)

View File

@ -30,7 +30,8 @@
#include "zone-inl.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// Defines all the roots in Heap.
#define STRONG_ROOT_LIST(V) \

View File

@ -39,7 +39,8 @@
#include "cpu.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
Condition NegateCondition(Condition cc) {
return static_cast<Condition>(cc ^ 1);

View File

@ -40,7 +40,8 @@
#include "macro-assembler.h"
#include "serialize.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// -----------------------------------------------------------------------------
// Implementation of Register

View File

@ -37,7 +37,8 @@
#ifndef V8_IA32_ASSEMBLER_IA32_H_
#define V8_IA32_ASSEMBLER_IA32_H_
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// CPU Registers.
//

View File

@ -29,7 +29,8 @@
#include "codegen-inl.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
#define __ ACCESS_MASM(masm)

View File

@ -36,7 +36,8 @@
#include "runtime.h"
#include "scopes.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
#define __ ACCESS_MASM(masm_)

View File

@ -28,7 +28,8 @@
#ifndef V8_IA32_CODEGEN_IA32_H_
#define V8_IA32_CODEGEN_IA32_H_
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// Forward declarations
class DeferredCode;

View File

@ -32,7 +32,8 @@
#include "cpu.h"
#include "macro-assembler.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
void CPU::Setup() {
CpuFeatures::Probe();

View File

@ -31,7 +31,8 @@
#include "debug.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
#ifdef ENABLE_DEBUGGER_SUPPORT

View File

@ -29,7 +29,8 @@
#include "frames-inl.h"
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
StackFrame::Type StackFrame::ComputeType(State* state) {

View File

@ -28,7 +28,8 @@
#ifndef V8_IA32_FRAMES_IA32_H_
#define V8_IA32_FRAMES_IA32_H_
namespace v8 { namespace internal {
namespace v8 {
namespace internal {
// Register lists

Some files were not shown because too many files have changed in this diff Show More