Chromium Code Reviews| Index: src/ast/scopes.cc |
| diff --git a/src/ast/scopes.cc b/src/ast/scopes.cc |
| index d45b02091cd805d1b0e5ec8fad07f651cac2ca7b..b53382598ab1815abf6810c356bbf467fdcee570 100644 |
| --- a/src/ast/scopes.cc |
| +++ b/src/ast/scopes.cc |
| @@ -36,9 +36,8 @@ Variable* VariableMap::Declare(Zone* zone, Scope* scope, |
| // AstRawStrings are unambiguous, i.e., the same string is always represented |
| // by the same AstRawString*. |
| // FIXME(marja): fix the type of Lookup. |
| - Entry* p = |
| - ZoneHashMap::LookupOrInsert(const_cast<AstRawString*>(name), name->hash(), |
| - ZoneAllocationPolicy(zone)); |
| + Entry* p = ZoneHashMap::LookupOrInsert(const_cast<AstRawString*>(name), |
| + name->hash()); |
| if (added) *added = p->value == nullptr; |
| if (p->value == nullptr) { |
| // The variable has not been declared yet -> insert it. |
| @@ -56,9 +55,8 @@ void VariableMap::Remove(Variable* var) { |
| void VariableMap::Add(Zone* zone, Variable* var) { |
|
marja
2016/09/20 08:34:53
Ditto
Leszek Swirski
2016/09/20 09:19:21
Done.
|
| const AstRawString* name = var->raw_name(); |
| - Entry* p = |
| - ZoneHashMap::LookupOrInsert(const_cast<AstRawString*>(name), name->hash(), |
| - ZoneAllocationPolicy(zone)); |
| + Entry* p = ZoneHashMap::LookupOrInsert(const_cast<AstRawString*>(name), |
| + name->hash()); |
| DCHECK_NULL(p->value); |
| DCHECK_EQ(name, p->key); |
| p->value = var; |
| @@ -81,9 +79,8 @@ void SloppyBlockFunctionMap::Declare(Zone* zone, const AstRawString* name, |
| SloppyBlockFunctionStatement* stmt) { |
| // AstRawStrings are unambiguous, i.e., the same string is always represented |
| // by the same AstRawString*. |
| - Entry* p = |
| - ZoneHashMap::LookupOrInsert(const_cast<AstRawString*>(name), name->hash(), |
| - ZoneAllocationPolicy(zone)); |
| + Entry* p = ZoneHashMap::LookupOrInsert(const_cast<AstRawString*>(name), |
| + name->hash()); |
| stmt->set_next(static_cast<SloppyBlockFunctionStatement*>(p->value)); |
| p->value = stmt; |
| } |