Index: src/crankshaft/hydrogen.cc |
diff --git a/src/crankshaft/hydrogen.cc b/src/crankshaft/hydrogen.cc |
index 922ce7a1daa7a9f8d9743475fb28aa7e1ac53928..11cbcecc5290a4ac82f236b9f0d94394301c1e54 100644 |
--- a/src/crankshaft/hydrogen.cc |
+++ b/src/crankshaft/hydrogen.cc |
@@ -8077,11 +8077,10 @@ bool HOptimizedGraphBuilder::TryInline(Handle<JSFunction> target, |
} |
// All declarations must be inlineable. |
- ZoneList<Declaration*>* decls = target_info.scope()->declarations(); |
- int decl_count = decls->length(); |
- for (int i = 0; i < decl_count; ++i) { |
- if (decls->at(i)->IsFunctionDeclaration() || |
- !decls->at(i)->proxy()->var()->IsStackAllocated()) { |
+ Declaration::List* decls = target_info.scope()->declarations(); |
+ for (Declaration* decl : *decls) { |
+ if (decl->IsFunctionDeclaration() || |
+ !decl->proxy()->var()->IsStackAllocated()) { |
TraceInline(target, caller, "target has non-trivial declaration"); |
return false; |
} |
@@ -11781,9 +11780,8 @@ void HOptimizedGraphBuilder::VisitSuperCallReference(SuperCallReference* expr) { |
return Bailout(kSuperReference); |
} |
- |
void HOptimizedGraphBuilder::VisitDeclarations( |
- ZoneList<Declaration*>* declarations) { |
+ Declaration::List* declarations) { |
DCHECK(globals_.is_empty()); |
AstVisitor<HOptimizedGraphBuilder>::VisitDeclarations(declarations); |
if (!globals_.is_empty()) { |