Index: src/bootstrapper.cc |
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc |
index aaa0f3f7e521d4bf63263d48e658a8649ce7e429..0344ee1d9c9c4508bfb83cf102dd00667d264ee7 100644 |
--- a/src/bootstrapper.cc |
+++ b/src/bootstrapper.cc |
@@ -1910,6 +1910,12 @@ bool Genesis::InstallNatives() { |
Handle<JSFunction> apply = |
InstallFunction(proto, "apply", JS_OBJECT_TYPE, JSObject::kHeaderSize, |
MaybeHandle<JSObject>(), Builtins::kFunctionApply); |
+ if (FLAG_vector_ics) { |
+ // Apply embeds an IC, so we need a type vector of size 1 in the shared |
+ // function info. |
+ Handle<FixedArray> feedback_vector = factory()->NewTypeFeedbackVector(1); |
+ apply->shared()->set_feedback_vector(*feedback_vector); |
+ } |
// Make sure that Function.prototype.call appears to be compiled. |
// The code will never be called, but inline caching for call will |