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

Side by Side Diff: src/ast-numbering.cc

Issue 758543002: Make use of post-scoping information to compute feedback vector requirements. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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 unified diff | Download patch
« no previous file with comments | « src/ast.cc ('k') | src/typing.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/ast.h" 7 #include "src/ast.h"
8 #include "src/ast-numbering.h" 8 #include "src/ast-numbering.h"
9 #include "src/compiler.h" 9 #include "src/compiler.h"
10 #include "src/scopes.h" 10 #include "src/scopes.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 properties_.flags()->Add(kDontSelfOptimize); 59 properties_.flags()->Add(kDontSelfOptimize);
60 } 60 }
61 void DisableCaching(BailoutReason reason) { 61 void DisableCaching(BailoutReason reason) {
62 dont_crankshaft_reason_ = reason; 62 dont_crankshaft_reason_ = reason;
63 DisableSelfOptimization(); 63 DisableSelfOptimization();
64 properties_.flags()->Add(kDontCache); 64 properties_.flags()->Add(kDontCache);
65 } 65 }
66 66
67 template <typename Node> 67 template <typename Node>
68 void ReserveFeedbackSlots(Node* node) { 68 void ReserveFeedbackSlots(Node* node) {
69 FeedbackVectorRequirements reqs = node->ComputeFeedbackRequirements(); 69 FeedbackVectorRequirements reqs =
70 node->ComputeFeedbackRequirements(isolate());
70 if (reqs.slots() > 0) { 71 if (reqs.slots() > 0) {
71 node->SetFirstFeedbackSlot( 72 node->SetFirstFeedbackSlot(
72 FeedbackVectorSlot(properties_.feedback_slots())); 73 FeedbackVectorSlot(properties_.feedback_slots()));
73 properties_.increase_feedback_slots(reqs.slots()); 74 properties_.increase_feedback_slots(reqs.slots());
74 } 75 }
75 if (reqs.ic_slots() > 0) { 76 if (reqs.ic_slots() > 0) {
76 node->SetFirstFeedbackICSlot( 77 node->SetFirstFeedbackICSlot(
77 FeedbackVectorICSlot(properties_.ic_feedback_slots())); 78 FeedbackVectorICSlot(properties_.ic_feedback_slots()));
78 properties_.increase_ic_feedback_slots(reqs.ic_slots()); 79 properties_.increase_ic_feedback_slots(reqs.ic_slots());
79 } 80 }
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 } 551 }
551 552
552 553
553 bool AstNumbering::Renumber(FunctionLiteral* function, Zone* zone) { 554 bool AstNumbering::Renumber(FunctionLiteral* function, Zone* zone) {
554 AstNumberingVisitor visitor(zone); 555 AstNumberingVisitor visitor(zone);
555 visitor.Renumber(function); 556 visitor.Renumber(function);
556 return !visitor.HasStackOverflow(); 557 return !visitor.HasStackOverflow();
557 } 558 }
558 } 559 }
559 } // namespace v8::internal 560 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.cc ('k') | src/typing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698