Chromium Code Reviews| Index: src/ast/ast.h |
| diff --git a/src/ast/ast.h b/src/ast/ast.h |
| index 898927d57acf0a3ad9b2f44a218841b1a2a513a5..091ae1725ed0b5f665c379c1b9f0fdd5b62fac29 100644 |
| --- a/src/ast/ast.h |
| +++ b/src/ast/ast.h |
| @@ -314,10 +314,7 @@ class Expression : public AstNode { |
| // Symbols that cannot be parsed as array indices are considered property |
| // names. We do not treat symbols that can be array indexes as property |
| // names because [] for string objects is handled only by keyed ICs. |
| - // Produces the same result whether |deref_mode| is kAllowed or kDisallowed, |
| - // although may be faster with kAllowed. |
| - bool IsPropertyName( |
| - HandleDereferenceMode deref_mode = HandleDereferenceMode::kAllowed) const; |
| + bool IsPropertyName() const; |
| // True iff the expression is a class or function expression without |
| // a syntactic name. |
| @@ -1198,13 +1195,10 @@ class Literal final : public Expression { |
| // Returns true if literal represents a property name (i.e. cannot be parsed |
| // as array indices). Produces the same result whether |deref_mode| is |
| // kAllowed or kDisallowed, although may be faster with kAllowed. |
|
rmcilroy
2016/08/10 11:12:57
Could you update the comment here please.
|
| - bool IsPropertyName(HandleDereferenceMode deref_mode = |
| - HandleDereferenceMode::kAllowed) const { |
| - return value_->IsPropertyName(deref_mode); |
| - } |
| + bool IsPropertyName() const { return value_->IsPropertyName(); } |
| Handle<String> AsPropertyName() { |
| - DCHECK(IsPropertyName(HandleDereferenceMode::kDisallowed)); |
| + DCHECK(IsPropertyName()); |
| return Handle<String>::cast(value()); |
| } |
| @@ -1752,7 +1746,7 @@ class Property final : public Expression { |
| HandleDereferenceMode deref_mode = HandleDereferenceMode::kAllowed) { |
| if (property == NULL) return VARIABLE; |
| bool super_access = property->IsSuperAccess(); |
| - return (property->key()->IsPropertyName(deref_mode)) |
| + return (property->key()->IsPropertyName()) |
| ? (super_access ? NAMED_SUPER_PROPERTY : NAMED_PROPERTY) |
| : (super_access ? KEYED_SUPER_PROPERTY : KEYED_PROPERTY); |
| } |