Index: src/type-feedback-vector.cc |
diff --git a/src/type-feedback-vector.cc b/src/type-feedback-vector.cc |
index 3cf81f8c5f16228f2fece4935adcfe77e722b446..9b03e0fc1b513f4ed79a83324eaa878751658101 100644 |
--- a/src/type-feedback-vector.cc |
+++ b/src/type-feedback-vector.cc |
@@ -4,6 +4,7 @@ |
#include "src/v8.h" |
+#include "src/code-stubs.h" |
#include "src/ic/ic.h" |
#include "src/ic/ic-state.h" |
#include "src/objects.h" |
@@ -312,7 +313,9 @@ InlineCacheState CallICNexus::StateFromFeedback() const { |
Isolate* isolate = GetIsolate(); |
Object* feedback = GetFeedback(); |
DCHECK(!FLAG_vector_ics || |
- GetFeedbackExtra() == *vector()->UninitializedSentinel(isolate)); |
+ GetFeedbackExtra() == *vector()->UninitializedSentinel(isolate) || |
+ GetFeedbackExtra() == |
+ Smi::FromInt(CallICStub::kHasReturnedMinusZeroSentinel)); |
if (feedback == *vector()->MegamorphicSentinel(isolate)) { |
return GENERIC; |
@@ -343,6 +346,14 @@ void CallICNexus::ConfigureMonomorphicArray() { |
} |
+void CallICNexus::ConfigureMonomorphicMathFunction( |
+ Handle<JSFunction> function) { |
+ Handle<WeakCell> new_cell = GetIsolate()->factory()->NewWeakCell(function); |
+ SetFeedback(*new_cell); |
+ SetFeedbackExtra(*vector()->UninitializedSentinel(GetIsolate())); |
+} |
+ |
+ |
void CallICNexus::ConfigureUninitialized() { |
SetFeedback(*vector()->UninitializedSentinel(GetIsolate()), |
SKIP_WRITE_BARRIER); |