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

Unified Diff: src/crankshaft/typing.cc

Issue 2287173002: Replace CollectVariables with locals(), update callsites to walk locals instead (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: restore undefined handling Created 4 years, 4 months 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.cc ('k') | src/debug/liveedit.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/typing.cc
diff --git a/src/crankshaft/typing.cc b/src/crankshaft/typing.cc
index d4854acd42053685a58c9bc7e31c5fb94dce499c..db59c4d5adc07029558dbd7c4cee01a7465d1b20 100644
--- a/src/crankshaft/typing.cc
+++ b/src/crankshaft/typing.cc
@@ -84,14 +84,16 @@ void AstTyper::ObserveTypesAtOsrEntry(IterationStatement* stmt) {
store_.LookupBounds(parameter_index(i)).lower);
}
- ZoneList<Variable*> local_vars(locals, zone());
- ZoneList<Variable*> context_vars(scope_->ContextLocalCount(), zone());
- ZoneList<Variable*> global_vars(scope_->ContextGlobalCount(), zone());
- scope_->CollectVariables(&local_vars, &context_vars, &global_vars);
- for (int i = 0; i < locals; i++) {
- PrintObserved(local_vars.at(i),
- frame->GetExpression(i),
- store_.LookupBounds(stack_local_index(i)).lower);
+ ZoneList<Variable*>* local_vars = scope_->locals();
+ int local_index = 0;
+ for (int i = 0; i < local_vars->length(); i++) {
+ Variable* var = local_vars->at(i);
+ if (var->IsStackLocal()) {
+ PrintObserved(
+ var, frame->GetExpression(local_index),
+ store_.LookupBounds(stack_local_index(local_index)).lower);
+ local_index++;
+ }
}
}
#endif // OBJECT_PRINT
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | src/debug/liveedit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698