Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Unified Diff: src/crankshaft/hydrogen.cc

Issue 2457393003: Thread decls-list through Declaration (Closed)
Patch Set: rename Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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()) {

Powered by Google App Engine
This is Rietveld 408576698