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

Unified Diff: src/bootstrapper.cc

Issue 398053002: Introduce FLAG_vector_ics. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Register passed in hydrogen, fixed some test failures. Created 6 years, 5 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
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index a2d1388d403b2eecfd18f0e2901b38f0bf4e2454..305ae8f60480a15c7b3cf7f8a482739971e18751 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1944,6 +1944,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

Powered by Google App Engine
This is Rietveld 408576698