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

Unified Diff: src/compiler/access-info.cc

Issue 2458643002: [turbofan] Handle inlining of API getters/setters. (Closed)
Patch Set: Update. Created 4 years, 1 month 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 | src/compiler/js-native-context-specialization.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/access-info.cc
diff --git a/src/compiler/access-info.cc b/src/compiler/access-info.cc
index c8a45dd7dea29a394bcf2e2073de047f0db59ff3..50ccaaa57132a66f5123eb2104c973824142b5aa 100644
--- a/src/compiler/access-info.cc
+++ b/src/compiler/access-info.cc
@@ -10,6 +10,7 @@
#include "src/compiler/type-cache.h"
#include "src/field-index-inl.h"
#include "src/field-type.h"
+#include "src/ic/call-optimization.h"
#include "src/objects-inl.h"
namespace v8 {
@@ -343,8 +344,13 @@ bool AccessInfoFactory::ComputePropertyAccessInfo(
: Handle<AccessorPair>::cast(accessors)->setter(),
isolate());
if (!accessor->IsJSFunction()) {
- // TODO(turbofan): Add support for API accessors.
- return false;
+ CallOptimization optimization(accessor);
+ if (!optimization.is_simple_api_call()) {
+ return false;
+ }
+ if (optimization.api_call_info()->fast_handler()->IsCode()) {
+ return false;
+ }
}
*access_info = PropertyAccessInfo::AccessorConstant(
MapList{receiver_map}, accessor, holder);
« no previous file with comments | « no previous file | src/compiler/js-native-context-specialization.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698