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

Unified Diff: runtime/vm/scopes.cc

Issue 11893002: Improve compilation speed on a pathological case > 2x (7 sec -> 2.7 sec) by improving local lookups. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 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 | « runtime/vm/object_test.cc ('k') | runtime/vm/scopes_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/scopes.cc
===================================================================
--- runtime/vm/scopes.cc (revision 17040)
+++ runtime/vm/scopes.cc (working copy)
@@ -294,9 +294,11 @@
LocalVariable* LocalScope::LocalLookupVariable(const String& name) const {
+ ASSERT(name.IsSymbol());
for (intptr_t i = 0; i < variables_.length(); i++) {
LocalVariable* var = variables_[i];
- if (var->name().Equals(name) && !var->is_invisible_) {
+ ASSERT(var->name().IsSymbol());
+ if ((var->name().raw() == name.raw()) && !var->is_invisible_) {
return var;
}
}
« no previous file with comments | « runtime/vm/object_test.cc ('k') | runtime/vm/scopes_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698