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

Unified Diff: src/objects-inl.h

Issue 1778493005: Inline calling into the interceptor into the IC callbacks rather than going through the LookupItera… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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
« src/objects.h ('K') | « src/objects.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index cd47b5e62b0944d7fa7c12591de6b429721322a5..cac5cf746c1aaf6ce1198c516faabc6873587cdb 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -1883,12 +1883,27 @@ void JSObject::initialize_elements() {
InterceptorInfo* JSObject::GetIndexedInterceptor() {
- DCHECK(map()->has_indexed_interceptor());
- JSFunction* constructor = JSFunction::cast(map()->GetConstructor());
+ return map()->GetIndexedInterceptor();
+}
+
+InterceptorInfo* JSObject::GetNamedInterceptor() {
+ return map()->GetNamedInterceptor();
+}
+
+InterceptorInfo* Map::GetNamedInterceptor() {
+ DCHECK(has_named_interceptor());
+ JSFunction* constructor = JSFunction::cast(GetConstructor());
+ DCHECK(constructor->shared()->IsApiFunction());
+ return InterceptorInfo::cast(
+ constructor->shared()->get_api_func_data()->named_property_handler());
+}
+
+InterceptorInfo* Map::GetIndexedInterceptor() {
+ DCHECK(has_indexed_interceptor());
+ JSFunction* constructor = JSFunction::cast(GetConstructor());
DCHECK(constructor->shared()->IsApiFunction());
- Object* result =
- constructor->shared()->get_api_func_data()->indexed_property_handler();
- return InterceptorInfo::cast(result);
+ return InterceptorInfo::cast(
+ constructor->shared()->get_api_func_data()->indexed_property_handler());
}
« src/objects.h ('K') | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698