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

Unified Diff: src/factory.cc

Issue 650073002: vector-based ICs did not update type feedback counts correctly. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Removed problematic field TypeFeedbackInfo::feedback_vector(). Created 6 years, 2 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/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index 60ea691d916ff071dfec04459bdccd7c34c7b0fd..38af8804cf2436ff283dbdeae78e978198122dfc 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -1940,20 +1940,9 @@ void Factory::BecomeJSFunction(Handle<JSProxy> proxy) {
}
-Handle<TypeFeedbackVector> Factory::NewTypeFeedbackVector(int slot_count) {
- // Ensure we can skip the write barrier
- DCHECK_EQ(isolate()->heap()->uninitialized_symbol(),
- *TypeFeedbackVector::UninitializedSentinel(isolate()));
-
- if (slot_count == 0) {
- return Handle<TypeFeedbackVector>::cast(empty_fixed_array());
- }
-
- CALL_HEAP_FUNCTION(isolate(),
- isolate()->heap()->AllocateFixedArrayWithFiller(
- slot_count, TENURED,
- *TypeFeedbackVector::UninitializedSentinel(isolate())),
- TypeFeedbackVector);
+Handle<TypeFeedbackVector> Factory::NewTypeFeedbackVector(int slot_count,
+ int ic_slot_count) {
+ return TypeFeedbackVector::Allocate(isolate(), slot_count, ic_slot_count);
}
@@ -2028,7 +2017,7 @@ Handle<SharedFunctionInfo> Factory::NewSharedFunctionInfo(
share->set_script(*undefined_value(), SKIP_WRITE_BARRIER);
share->set_debug_info(*undefined_value(), SKIP_WRITE_BARRIER);
share->set_inferred_name(*empty_string(), SKIP_WRITE_BARRIER);
- Handle<TypeFeedbackVector> feedback_vector = NewTypeFeedbackVector(0);
+ Handle<TypeFeedbackVector> feedback_vector = NewTypeFeedbackVector(0, 0);
share->set_feedback_vector(*feedback_vector, SKIP_WRITE_BARRIER);
share->set_profiler_ticks(0);
share->set_ast_node_count(0);
« no previous file with comments | « src/factory.h ('k') | src/full-codegen.h » ('j') | src/type-feedback-vector-inl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698