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

Unified Diff: src/full-codegen/full-codegen.h

Issue 1364373003: Full code shouldn't embed the type feedback vector. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Ports. Created 5 years, 3 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/full-codegen/full-codegen.h
diff --git a/src/full-codegen/full-codegen.h b/src/full-codegen/full-codegen.h
index 61d8a8efe3c23e3fe93796f50f238efe05265efa..20490e671f1b97961e51d803c6df2746cbde8495 100644
--- a/src/full-codegen/full-codegen.h
+++ b/src/full-codegen/full-codegen.h
@@ -420,22 +420,16 @@ class FullCodeGenerator: public AstVisitor {
void PrepareForBailout(Expression* node, State state);
void PrepareForBailoutForId(BailoutId id, State state);
- // Feedback slot support. The feedback vector will be cleared during gc and
- // collected by the type-feedback oracle.
- 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(FeedbackVector()->GetIndex(slot));
+ return Smi::FromInt(TypeFeedbackVector::GetIndexFromSpec(
+ literal()->feedback_vector_spec(), slot));
}
Smi* SmiFromSlot(FeedbackVectorICSlot slot) const {
- return Smi::FromInt(FeedbackVector()->GetIndex(slot));
+ return Smi::FromInt(TypeFeedbackVector::GetIndexFromSpec(
+ literal()->feedback_vector_spec(), slot));
}
// Record a call's return site offset, used to rebuild the frame if the
@@ -702,7 +696,7 @@ class FullCodeGenerator: public AstVisitor {
bool is_native() { return info_->is_native(); }
LanguageMode language_mode() { return literal()->language_mode(); }
bool has_simple_parameters() { return info_->has_simple_parameters(); }
- FunctionLiteral* literal() { return info_->literal(); }
+ FunctionLiteral* literal() const { return info_->literal(); }
Scope* scope() { return scope_; }
static Register result_register();

Powered by Google App Engine
This is Rietveld 408576698