Index: src/scopes.cc |
diff --git a/src/scopes.cc b/src/scopes.cc |
index 3d46d158ac877ad88ad4724d5184e4c6c275166b..512834bdfee4040b4f910b1a8b78d15c21ae905d 100644 |
--- a/src/scopes.cc |
+++ b/src/scopes.cc |
@@ -36,8 +36,9 @@ Variable* VariableMap::Declare(Scope* scope, const AstRawString* name, |
// 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::Lookup(const_cast<AstRawString*>(name), name->hash(), |
- true, ZoneAllocationPolicy(zone())); |
+ Entry* p = |
+ ZoneHashMap::LookupOrInsert(const_cast<AstRawString*>(name), name->hash(), |
+ ZoneAllocationPolicy(zone())); |
if (p->value == NULL) { |
// The variable has not been declared yet -> insert it. |
DCHECK(p->key == name); |
@@ -49,8 +50,7 @@ Variable* VariableMap::Declare(Scope* scope, const AstRawString* name, |
Variable* VariableMap::Lookup(const AstRawString* name) { |
- Entry* p = ZoneHashMap::Lookup(const_cast<AstRawString*>(name), name->hash(), |
- false, ZoneAllocationPolicy(NULL)); |
+ Entry* p = ZoneHashMap::Lookup(const_cast<AstRawString*>(name), name->hash()); |
if (p != NULL) { |
DCHECK(reinterpret_cast<const AstRawString*>(p->key) == name); |
DCHECK(p->value != NULL); |