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

Unified Diff: src/full-codegen.h

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: Ports. 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
« no previous file with comments | « src/factory.cc ('k') | src/full-codegen.cc » ('j') | src/ic/ic.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen.h
diff --git a/src/full-codegen.h b/src/full-codegen.h
index 57283bbaae7783d92206c67a76ea37c1101eb07f..3ed16c355037a3ea11f177366c46f5a518b14ff2 100644
--- a/src/full-codegen.h
+++ b/src/full-codegen.h
@@ -429,12 +429,20 @@ class FullCodeGenerator: public AstVisitor {
// Feedback slot support. The feedback vector will be cleared during gc and
// collected by the type-feedback oracle.
- Handle<FixedArray> FeedbackVector() {
+ Handle<TypeFeedbackVector> FeedbackVector() const {
return info_->feedback_vector();
}
void EnsureSlotContainsAllocationSite(FeedbackVectorSlot slot);
+ void EnsureSlotContainsAllocationSite(FeedbackVectorICSlot slot);
+
+ // Returns a smi for the index into the FixedArray that backs the feedback
+ // vector
Smi* SmiFromSlot(FeedbackVectorSlot slot) const {
- return Smi::FromInt(slot.ToInt());
+ return Smi::FromInt(FeedbackVector()->GetIndex(slot));
+ }
+
+ Smi* SmiFromSlot(FeedbackVectorICSlot slot) const {
+ return Smi::FromInt(FeedbackVector()->GetIndex(slot));
}
// Record a call's return site offset, used to rebuild the frame if the
@@ -667,7 +675,8 @@ class FullCodeGenerator: public AstVisitor {
void Generate();
void PopulateDeoptimizationData(Handle<Code> code);
- void PopulateTypeFeedbackInfo(Handle<Code> code);
+ void PopulateTypeFeedbackInfo(Handle<Code> code,
+ Handle<TypeFeedbackVector> vector);
Handle<FixedArray> handler_table() { return handler_table_; }
« no previous file with comments | « src/factory.cc ('k') | src/full-codegen.cc » ('j') | src/ic/ic.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698