Commit 4f40326f authored by verwaest@chromium.org's avatar verwaest@chromium.org

Fast path for searching through simple transitions

Review URL: https://chromiumcodereview.appspot.com/11189089

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12778 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 06f7d1c9
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment