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

Unified Diff: src/ast.h

Issue 670953003: Move feedback slot allocation to post-pass (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased patch Created 6 years, 1 month 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 | « no previous file | src/ast.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.h
diff --git a/src/ast.h b/src/ast.h
index 360fc939fecb2bd8cfcceb15c31b8bea3541a611..badd6833c4e4ed8cd36685e8310f7e24ab7cfe87 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -1705,6 +1705,7 @@ class VariableProxy FINAL : public Expression {
}
FeedbackVectorICSlot VariableFeedbackSlot() {
+ DCHECK(!FLAG_vector_ics || !variable_feedback_slot_.IsInvalid());
return variable_feedback_slot_;
}
@@ -1790,6 +1791,7 @@ class Property FINAL : public Expression {
}
FeedbackVectorICSlot PropertyFeedbackSlot() const {
+ DCHECK(!FLAG_vector_ics || !property_feedback_slot_.IsInvalid());
return property_feedback_slot_;
}
@@ -1834,7 +1836,10 @@ class Call FINAL : public Expression {
}
bool HasCallFeedbackSlot() const { return !call_feedback_slot_.IsInvalid(); }
- FeedbackVectorICSlot CallFeedbackSlot() const { return call_feedback_slot_; }
+ FeedbackVectorICSlot CallFeedbackSlot() const {
+ DCHECK(!call_feedback_slot_.IsInvalid());
+ return call_feedback_slot_;
+ }
virtual SmallMapList* GetReceiverTypes() OVERRIDE {
if (expression()->IsProperty()) {
@@ -1933,7 +1938,10 @@ class CallNew FINAL : public Expression {
callnew_feedback_slot_ = slot;
}
- FeedbackVectorSlot CallNewFeedbackSlot() { return callnew_feedback_slot_; }
+ FeedbackVectorSlot CallNewFeedbackSlot() {
+ DCHECK(!callnew_feedback_slot_.IsInvalid());
+ return callnew_feedback_slot_;
+ }
FeedbackVectorSlot AllocationSiteFeedbackSlot() {
DCHECK(FLAG_pretenuring_call_new);
return CallNewFeedbackSlot().next();
@@ -1997,6 +2005,8 @@ class CallRuntime FINAL : public Expression {
}
FeedbackVectorICSlot CallRuntimeFeedbackSlot() {
+ DCHECK(!(FLAG_vector_ics && is_jsruntime()) ||
+ !callruntime_feedback_slot_.IsInvalid());
return callruntime_feedback_slot_;
}
@@ -2383,6 +2393,7 @@ class Yield FINAL : public Expression {
}
FeedbackVectorICSlot KeyedLoadFeedbackSlot() {
+ DCHECK(!FLAG_vector_ics || !yield_first_feedback_slot_.IsInvalid());
return yield_first_feedback_slot_;
}
@@ -3162,8 +3173,6 @@ class AstConstructionVisitor BASE_EMBEDDED {
public:
AstConstructionVisitor() {}
- AstProperties* ast_properties() { return &properties_; }
-
private:
template<class> friend class AstNodeFactory;
@@ -3172,22 +3181,6 @@ class AstConstructionVisitor BASE_EMBEDDED {
void Visit##type(type* node);
AST_NODE_LIST(DEF_VISIT)
#undef DEF_VISIT
-
- void add_slot_node(AstNode* slot_node) {
- FeedbackVectorRequirements reqs = slot_node->ComputeFeedbackRequirements();
- if (reqs.slots() > 0) {
- slot_node->SetFirstFeedbackSlot(
- FeedbackVectorSlot(properties_.feedback_slots()));
- properties_.increase_feedback_slots(reqs.slots());
- }
- if (reqs.ic_slots() > 0) {
- slot_node->SetFirstFeedbackICSlot(
- FeedbackVectorICSlot(properties_.ic_feedback_slots()));
- properties_.increase_ic_feedback_slots(reqs.ic_slots());
- }
- }
-
- AstProperties properties_;
};
« no previous file with comments | « no previous file | src/ast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698