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

Unified Diff: src/bootstrapper.cc

Issue 398053002: Introduce FLAG_vector_ics. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE. 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
« no previous file with comments | « src/ast.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « src/ast.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698