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

Unified Diff: src/ast-numbering.cc

Issue 754303003: Flesh out vector ic state query and set mechanisms. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. 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 | « src/ast.h ('k') | src/bootstrapper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast-numbering.cc
diff --git a/src/ast-numbering.cc b/src/ast-numbering.cc
index fbe40cac44f1b98a7edb6d0d5f78fda6c190d25c..e9b9050ae7d0caec6cb018e0e11b54e94fbd1b1b 100644
--- a/src/ast-numbering.cc
+++ b/src/ast-numbering.cc
@@ -69,14 +69,18 @@ class AstNumberingVisitor FINAL : public AstVisitor {
FeedbackVectorRequirements reqs =
node->ComputeFeedbackRequirements(isolate());
if (reqs.slots() > 0) {
- node->SetFirstFeedbackSlot(
- FeedbackVectorSlot(properties_.feedback_slots()));
- properties_.increase_feedback_slots(reqs.slots());
+ node->SetFirstFeedbackSlot(FeedbackVectorSlot(properties_.slots()));
+ properties_.increase_slots(reqs.slots());
}
if (reqs.ic_slots() > 0) {
- node->SetFirstFeedbackICSlot(
- FeedbackVectorICSlot(properties_.ic_feedback_slots()));
- properties_.increase_ic_feedback_slots(reqs.ic_slots());
+ int ic_slots = properties_.ic_slots();
+ node->SetFirstFeedbackICSlot(FeedbackVectorICSlot(ic_slots));
+ properties_.increase_ic_slots(reqs.ic_slots());
+ if (FLAG_vector_ics) {
+ for (int i = 0; i < reqs.ic_slots(); i++) {
+ properties_.SetKind(ic_slots + i, node->FeedbackICSlotKind(i));
+ }
+ }
}
}
@@ -285,6 +289,7 @@ void AstNumberingVisitor::VisitModuleLiteral(ModuleLiteral* node) {
void AstNumberingVisitor::VisitCallRuntime(CallRuntime* node) {
IncrementNodeCount();
+ ReserveFeedbackSlots(node);
if (node->is_jsruntime()) {
// Don't try to optimize JS runtime calls because we bailout on them.
DisableCrankshaft(kCallToAJavaScriptRuntimeFunction);
@@ -535,6 +540,7 @@ void AstNumberingVisitor::VisitFunctionLiteral(FunctionLiteral* node) {
void AstNumberingVisitor::Renumber(FunctionLiteral* node) {
if (node->scope()->HasIllegalRedeclaration()) {
node->scope()->VisitIllegalRedeclaration(this);
+ node->set_ast_properties(&properties_);
return;
}
« no previous file with comments | « src/ast.h ('k') | src/bootstrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698