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

Unified Diff: src/transitions-inl.h

Issue 11189089: Fast path for searching through simple transitions (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: u Created 8 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/transitions-inl.h
diff --git a/src/transitions-inl.h b/src/transitions-inl.h
index 2df30028317e0c64e71c7f8edfc39e706cbd4339..cfaa99d737ac411cb92fc01b9a94e106e8dcaad1 100644
--- a/src/transitions-inl.h
+++ b/src/transitions-inl.h
@@ -191,6 +191,11 @@ PropertyDetails TransitionArray::GetTargetDetails(int transition_number) {
int TransitionArray::Search(String* name) {
+ if (IsSimpleTransition()) {
+ String* key = GetKey(kSimpleTransitionIndex);
+ if (key->Equals(name)) return kSimpleTransitionIndex;
+ return kNotFound;
+ }
return internal::Search<ALL_ENTRIES>(this, name);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698