| Index: src/ast/scopes.h
|
| diff --git a/src/ast/scopes.h b/src/ast/scopes.h
|
| index 3ef40ecf91d4e646be78d63065beda1f73578d6d..3287a446b2731d4f4e4142c7e333411656c605ee 100644
|
| --- a/src/ast/scopes.h
|
| +++ b/src/ast/scopes.h
|
| @@ -15,7 +15,7 @@ namespace internal {
|
| class ParseInfo;
|
|
|
| // A hash map to support fast variable declaration and lookup.
|
| -class VariableMap: public ZoneHashMap {
|
| +class VariableMap : public ZoneHashMap {
|
| public:
|
| explicit VariableMap(Zone* zone);
|
|
|
| @@ -43,7 +43,7 @@ class DynamicScopePart : public ZoneObject {
|
| public:
|
| explicit DynamicScopePart(Zone* zone) {
|
| for (int i = 0; i < 3; i++)
|
| - maps_[i] = new(zone->New(sizeof(VariableMap))) VariableMap(zone);
|
| + maps_[i] = new (zone->New(sizeof(VariableMap))) VariableMap(zone);
|
| }
|
|
|
| VariableMap* GetMap(VariableMode mode) {
|
| @@ -53,7 +53,7 @@ class DynamicScopePart : public ZoneObject {
|
| }
|
|
|
| private:
|
| - VariableMap *maps_[3];
|
| + VariableMap* maps_[3];
|
| };
|
|
|
|
|
| @@ -83,7 +83,7 @@ class SloppyBlockFunctionMap : public ZoneHashMap {
|
| // a location. Note that many VariableProxy nodes may refer to the same Java-
|
| // Script variable.
|
|
|
| -class Scope: public ZoneObject {
|
| +class Scope : public ZoneObject {
|
| public:
|
| // ---------------------------------------------------------------------------
|
| // Construction
|
| @@ -154,9 +154,9 @@ class Scope: public ZoneObject {
|
| // Declare a parameter in this scope. When there are duplicated
|
| // parameters the rightmost one 'wins'. However, the implementation
|
| // expects all parameters to be declared and from left to right.
|
| - Variable* DeclareParameter(
|
| - const AstRawString* name, VariableMode mode,
|
| - bool is_optional, bool is_rest, bool* is_duplicate);
|
| + Variable* DeclareParameter(const AstRawString* name, VariableMode mode,
|
| + bool is_optional, bool is_rest,
|
| + bool* is_duplicate);
|
|
|
| // Declare a local variable in this scope. If the variable has been
|
| // declared before, the previously declared variable is returned.
|
| @@ -299,9 +299,7 @@ class Scope: public ZoneObject {
|
| start_position_ = statement_pos;
|
| }
|
| int end_position() const { return end_position_; }
|
| - void set_end_position(int statement_pos) {
|
| - end_position_ = statement_pos;
|
| - }
|
| + void set_end_position(int statement_pos) { end_position_ = statement_pos; }
|
|
|
| // In some cases we want to force context allocation for a whole scope.
|
| void ForceContextAllocation() {
|
| @@ -427,13 +425,9 @@ class Scope: public ZoneObject {
|
| return rest_parameter_;
|
| }
|
|
|
| - bool has_rest_parameter() const {
|
| - return rest_index_ >= 0;
|
| - }
|
| + bool has_rest_parameter() const { return rest_index_ >= 0; }
|
|
|
| - bool has_simple_parameters() const {
|
| - return has_simple_parameters_;
|
| - }
|
| + bool has_simple_parameters() const { return has_simple_parameters_; }
|
|
|
| // TODO(caitp): manage this state in a better way. PreParser must be able to
|
| // communicate that the scope is non-simple, without allocating any parameters
|
| @@ -517,7 +511,7 @@ class Scope: public ZoneObject {
|
| Variable* module_var() const { return module_var_; }
|
|
|
| // Make sure this scope and all outer scopes are eagerly compiled.
|
| - void ForceEagerCompilation() { force_eager_compilation_ = true; }
|
| + void ForceEagerCompilation() { force_eager_compilation_ = true; }
|
|
|
| // Determine if we can parse a function literal in this scope lazily.
|
| bool AllowsLazyParsing() const;
|
| @@ -589,8 +583,8 @@ class Scope: public ZoneObject {
|
| MessageTemplate::Template message,
|
| const AstRawString* arg);
|
|
|
| - // ---------------------------------------------------------------------------
|
| - // Debugging.
|
| +// ---------------------------------------------------------------------------
|
| +// Debugging.
|
|
|
| #ifdef DEBUG
|
| void Print(int n = 0); // n = indentation; n < 0 => don't print recursively
|
|
|