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

Unified Diff: src/crankshaft/hydrogen.cc

Issue 2457393003: Thread decls-list through Declaration (Closed)
Patch Set: rebase 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
« no previous file with comments | « src/crankshaft/hydrogen.h ('k') | src/crankshaft/typing.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/hydrogen.cc
diff --git a/src/crankshaft/hydrogen.cc b/src/crankshaft/hydrogen.cc
index d97461b1a9582d103736bd6902b6d6f9d82d7c0b..07d718c1e104bc931e206cb403d8540fc3335c4d 100644
--- a/src/crankshaft/hydrogen.cc
+++ b/src/crankshaft/hydrogen.cc
@@ -8117,11 +8117,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;
}
@@ -11821,9 +11820,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()) {
« no previous file with comments | « src/crankshaft/hydrogen.h ('k') | src/crankshaft/typing.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698