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

Unified Diff: src/code-stub-assembler.cc

Issue 2479373006: [ic] Support Api getters by data handlers. (Closed)
Patch Set: 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/counters.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stub-assembler.cc
diff --git a/src/code-stub-assembler.cc b/src/code-stub-assembler.cc
index 5fc710df1184a76ab0f86081896a899a3ab5bc13..e523e11cd44c882b2170bf3def93b9f74556c26d 100644
--- a/src/code-stub-assembler.cc
+++ b/src/code-stub-assembler.cc
@@ -5600,8 +5600,17 @@ void CodeStubAssembler::HandleLoadICHandlerCase(
CSA_ASSERT(UintPtrLessThan(
descriptor, LoadAndUntagFixedArrayBaseLength(descriptors)));
#endif
- Return(
- LoadFixedArrayElement(descriptors, descriptor, 0, INTPTR_PARAMETERS));
+ Node* value =
+ LoadFixedArrayElement(descriptors, descriptor, 0, INTPTR_PARAMETERS);
+
+ Label if_accessor_info(this);
+ GotoIf(IsSetWord<LoadHandler::IsAccessorInfoBits>(handler_word),
+ &if_accessor_info);
+ Return(value);
+
+ Bind(&if_accessor_info);
+ Callable callable = CodeFactory::ApiGetter(isolate());
+ TailCallStub(callable, p->context, p->receiver, holder, value);
}
}
« no previous file with comments | « no previous file | src/counters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698