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

Unified Diff: src/objects-inl.h

Issue 118118: Store fast property index in stubs generated for interceptor loads (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 7 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/objects.cc ('k') | src/stub-cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
===================================================================
--- src/objects-inl.h (revision 2089)
+++ src/objects-inl.h (working copy)
@@ -2554,6 +2554,24 @@
}
+Smi* JSObject::InterceptorPropertyLookupHint(String* name) {
+ // TODO(antonm): do we want to do any shortcuts for global object?
Kasper Lund 2009/06/02 18:27:16 do -> Do
+ if (HasFastProperties()) {
+ LookupResult lookup;
+ LocalLookupRealNamedProperty(name, &lookup);
+ if (lookup.IsValid()) {
+ if (lookup.type() == FIELD && lookup.IsCacheable()) {
+ return Smi::FromInt(lookup.GetFieldIndex());
+ }
+ } else {
+ return Smi::FromInt(kLookupInPrototype);
+ }
+ }
+
+ return Smi::FromInt(kLookupInHolder);
+}
+
+
bool AccessorInfo::all_can_read() {
return BooleanBit::get(flag(), kAllCanReadBit);
}
« no previous file with comments | « src/objects.cc ('k') | src/stub-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698