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

Unified Diff: src/ic/ic.cc

Issue 898013003: CallIC MISS handler doesn't need receiver. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Created 5 years, 10 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/ic/ic.h ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/ic.cc
diff --git a/src/ic/ic.cc b/src/ic/ic.cc
index 537b18324d6868e29b5a494090f0b4cad59e4e26..5efbfdcebb355db966706017c01e99d85104c253 100644
--- a/src/ic/ic.cc
+++ b/src/ic/ic.cc
@@ -2138,7 +2138,7 @@ MaybeHandle<Object> KeyedStoreIC::Store(Handle<Object> object,
}
-bool CallIC::DoCustomHandler(Handle<Object> receiver, Handle<Object> function,
+bool CallIC::DoCustomHandler(Handle<Object> function,
const CallICState& callic_state) {
DCHECK(FLAG_use_ic && function->IsJSFunction());
@@ -2203,7 +2203,7 @@ void CallIC::PatchMegamorphic(Handle<Object> function) {
}
-void CallIC::HandleMiss(Handle<Object> receiver, Handle<Object> function) {
+void CallIC::HandleMiss(Handle<Object> function) {
CallICState callic_state(target()->extra_ic_state());
Handle<Object> name = isolate()->factory()->empty_string();
CallICNexus* nexus = casted_nexus<CallICNexus>();
@@ -2226,7 +2226,7 @@ void CallIC::HandleMiss(Handle<Object> receiver, Handle<Object> function) {
feedback->IsAllocationSite());
// Do we want to install a custom handler?
- if (FLAG_use_ic && DoCustomHandler(receiver, function, callic_state)) {
+ if (FLAG_use_ic && DoCustomHandler(function, callic_state)) {
return;
}
@@ -2255,15 +2255,14 @@ void CallIC::HandleMiss(Handle<Object> receiver, Handle<Object> function) {
RUNTIME_FUNCTION(CallIC_Miss) {
TimerEventScope<TimerEventIcMiss> timer(isolate);
HandleScope scope(isolate);
- DCHECK(args.length() == 4);
- Handle<Object> receiver = args.at<Object>(0);
- Handle<Object> function = args.at<Object>(1);
- Handle<TypeFeedbackVector> vector = args.at<TypeFeedbackVector>(2);
- Handle<Smi> slot = args.at<Smi>(3);
+ DCHECK(args.length() == 3);
+ Handle<Object> function = args.at<Object>(0);
+ Handle<TypeFeedbackVector> vector = args.at<TypeFeedbackVector>(1);
+ Handle<Smi> slot = args.at<Smi>(2);
FeedbackVectorICSlot vector_slot = vector->ToICSlot(slot->value());
CallICNexus nexus(vector, vector_slot);
CallIC ic(isolate, &nexus);
- ic.HandleMiss(receiver, function);
+ ic.HandleMiss(function);
return *function;
}
@@ -2271,10 +2270,10 @@ RUNTIME_FUNCTION(CallIC_Miss) {
RUNTIME_FUNCTION(CallIC_Customization_Miss) {
TimerEventScope<TimerEventIcMiss> timer(isolate);
HandleScope scope(isolate);
- DCHECK(args.length() == 4);
- Handle<Object> function = args.at<Object>(1);
- Handle<TypeFeedbackVector> vector = args.at<TypeFeedbackVector>(2);
- Handle<Smi> slot = args.at<Smi>(3);
+ DCHECK(args.length() == 3);
+ Handle<Object> function = args.at<Object>(0);
+ Handle<TypeFeedbackVector> vector = args.at<TypeFeedbackVector>(1);
+ Handle<Smi> slot = args.at<Smi>(2);
FeedbackVectorICSlot vector_slot = vector->ToICSlot(slot->value());
CallICNexus nexus(vector, vector_slot);
// A miss on a custom call ic always results in going megamorphic.
« no previous file with comments | « src/ic/ic.h ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698