Index: runtime/vm/precompiler.cc |
diff --git a/runtime/vm/precompiler.cc b/runtime/vm/precompiler.cc |
index b4d0326a081c850d8d4634fe84807839955fd162..0f9d8d9883254f634d25fbb6c5e4a9231ee2ce41 100644 |
--- a/runtime/vm/precompiler.cc |
+++ b/runtime/vm/precompiler.cc |
@@ -980,7 +980,7 @@ void Precompiler::AddCalleesOf(const Function& function) { |
void Precompiler::AddTypesOf(const Class& cls) { |
if (cls.IsNull()) return; |
- if (classes_to_retain_.Lookup(&cls) != NULL) return; |
+ if (classes_to_retain_.HasKey(&cls)) return; |
classes_to_retain_.Insert(&Class::ZoneHandle(Z, cls.raw())); |
Array& interfaces = Array::Handle(Z, cls.interfaces()); |
@@ -1008,7 +1008,7 @@ void Precompiler::AddTypesOf(const Function& function) { |
if (function.IsNull()) return; |
// We don't expect to see a reference to a redicting factory. |
ASSERT(!function.IsRedirectingFactory()); |
- if (functions_to_retain_.Lookup(&function) != NULL) return; |
+ if (functions_to_retain_.HasKey(&function)) return; |
functions_to_retain_.Insert(&Function::ZoneHandle(Z, function.raw())); |
AbstractType& type = AbstractType::Handle(Z); |
@@ -1050,7 +1050,7 @@ void Precompiler::AddTypesOf(const Function& function) { |
void Precompiler::AddType(const AbstractType& abstype) { |
if (abstype.IsNull()) return; |
- if (types_to_retain_.Lookup(&abstype) != NULL) return; |
+ if (types_to_retain_.HasKey(&abstype)) return; |
types_to_retain_.Insert(&AbstractType::ZoneHandle(Z, abstype.raw())); |
if (abstype.IsType()) { |
@@ -1087,7 +1087,7 @@ void Precompiler::AddType(const AbstractType& abstype) { |
void Precompiler::AddTypeArguments(const TypeArguments& args) { |
if (args.IsNull()) return; |
- if (typeargs_to_retain_.Lookup(&args) != NULL) return; |
+ if (typeargs_to_retain_.HasKey(&args)) return; |
typeargs_to_retain_.Insert(&TypeArguments::ZoneHandle(Z, args.raw())); |
AbstractType& arg = AbstractType::Handle(Z); |
@@ -1121,7 +1121,7 @@ void Precompiler::AddConstObject(const Instance& instance) { |
if (!instance.IsCanonical()) return; |
// Constants are canonicalized and we avoid repeated processing of them. |
- if (consts_to_retain_.Lookup(&instance) != NULL) return; |
+ if (consts_to_retain_.HasKey(&instance)) return; |
consts_to_retain_.Insert(&Instance::ZoneHandle(Z, instance.raw())); |
@@ -1168,7 +1168,7 @@ void Precompiler::AddClosureCall(const Array& arguments_descriptor) { |
void Precompiler::AddField(const Field& field) { |
- if (fields_to_retain_.Lookup(&field) != NULL) return; |
+ if (fields_to_retain_.HasKey(&field)) return; |
fields_to_retain_.Insert(&Field::ZoneHandle(Z, field.raw())); |
@@ -1341,7 +1341,7 @@ RawObject* Precompiler::ExecuteOnce(SequenceNode* fragment) { |
void Precompiler::AddFunction(const Function& function) { |
- if (enqueued_functions_.Lookup(&function) != NULL) return; |
+ if (enqueued_functions_.HasKey(&function)) return; |
enqueued_functions_.Insert(&Function::ZoneHandle(Z, function.raw())); |
pending_functions_.Add(function); |
@@ -1353,7 +1353,7 @@ bool Precompiler::IsSent(const String& selector) { |
if (selector.IsNull()) { |
return false; |
} |
- return sent_selectors_.Lookup(&selector) != NULL; |
+ return sent_selectors_.HasKey(&selector); |
} |
@@ -1661,7 +1661,7 @@ void Precompiler::TraceForRetainedFunctions() { |
functions = cls.functions(); |
for (intptr_t j = 0; j < functions.Length(); j++) { |
function ^= functions.At(j); |
- bool retain = enqueued_functions_.Lookup(&function) != NULL; |
+ bool retain = enqueued_functions_.HasKey(&function); |
if (!retain && function.HasImplicitClosureFunction()) { |
// It can happen that all uses of an implicit closure inline their |
// target function, leaving the target function uncompiled. Keep |
@@ -1681,7 +1681,7 @@ void Precompiler::TraceForRetainedFunctions() { |
closures = isolate()->object_store()->closure_functions(); |
for (intptr_t j = 0; j < closures.Length(); j++) { |
function ^= closures.At(j); |
- bool retain = enqueued_functions_.Lookup(&function) != NULL; |
+ bool retain = enqueued_functions_.HasKey(&function); |
if (retain) { |
AddTypesOf(function); |
@@ -1723,7 +1723,7 @@ void Precompiler::DropFunctions() { |
retained_functions = GrowableObjectArray::New(); |
for (intptr_t j = 0; j < functions.Length(); j++) { |
function ^= functions.At(j); |
- bool retain = functions_to_retain_.Lookup(&function) != NULL; |
+ bool retain = functions_to_retain_.HasKey(&function); |
function.DropUncompiledImplicitClosureFunction(); |
if (retain) { |
retained_functions.Add(function); |
@@ -1758,7 +1758,7 @@ void Precompiler::DropFunctions() { |
retained_functions = GrowableObjectArray::New(); |
for (intptr_t j = 0; j < closures.Length(); j++) { |
function ^= closures.At(j); |
- bool retain = functions_to_retain_.Lookup(&function) != NULL; |
+ bool retain = functions_to_retain_.HasKey(&function); |
if (retain) { |
retained_functions.Add(function); |
} else { |
@@ -1795,7 +1795,7 @@ void Precompiler::DropFields() { |
retained_fields = GrowableObjectArray::New(); |
for (intptr_t j = 0; j < fields.Length(); j++) { |
field ^= fields.At(j); |
- bool retain = fields_to_retain_.Lookup(&field) != NULL; |
+ bool retain = fields_to_retain_.HasKey(&field); |
if (retain) { |
retained_fields.Add(field); |
type = field.type(); |
@@ -1836,7 +1836,7 @@ void Precompiler::DropTypes() { |
types_array = HashTables::ToArray(types_table, false); |
for (intptr_t i = 0; i < (types_array.Length() - 1); i++) { |
type ^= types_array.At(i); |
- bool retain = types_to_retain_.Lookup(&type) != NULL; |
+ bool retain = types_to_retain_.HasKey(&type); |
if (retain) { |
retained_types.Add(type); |
} else { |
@@ -1874,7 +1874,7 @@ void Precompiler::DropTypeArguments() { |
typeargs_array = HashTables::ToArray(typeargs_table, false); |
for (intptr_t i = 0; i < (typeargs_array.Length() - 1); i++) { |
typeargs ^= typeargs_array.At(i); |
- bool retain = typeargs_to_retain_.Lookup(&typeargs) != NULL; |
+ bool retain = typeargs_to_retain_.HasKey(&typeargs); |
if (retain) { |
retained_typeargs.Add(typeargs); |
} else { |
@@ -1960,7 +1960,7 @@ void Precompiler::TraceTypesFromRetainedClasses() { |
retained_constants = GrowableObjectArray::New(); |
for (intptr_t j = 0; j < constants.Length(); j++) { |
constant ^= constants.At(j); |
- bool retain = consts_to_retain_.Lookup(&constant) != NULL; |
+ bool retain = consts_to_retain_.HasKey(&constant); |
if (retain) { |
retained_constants.Add(constant); |
} |
@@ -2025,7 +2025,7 @@ void Precompiler::DropClasses() { |
continue; |
} |
- bool retain = classes_to_retain_.Lookup(&cls) != NULL; |
+ bool retain = classes_to_retain_.HasKey(&cls); |
if (retain) { |
continue; |
} |
@@ -2092,7 +2092,7 @@ void Precompiler::DropLibraries() { |
// A type for a top-level class may be referenced from an object pool as |
// part of an error message. |
const Class& top = Class::Handle(Z, lib.toplevel_class()); |
- if (classes_to_retain_.Lookup(&top) != NULL) { |
+ if (classes_to_retain_.HasKey(&top)) { |
retain = true; |
} |
} |