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

Unified Diff: src/ast-numbering.cc

Issue 1387383005: Eagerly extract stack limit from Isolate in InitializeAstVisitor() (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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/ast.h ('k') | src/compiler/ast-graph-builder.h » ('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 95059aa3174394fff15c52fd2c416f0a9a514c3a..034dc02bb84917c7019e1d325442e85026ce386b 100644
--- a/src/ast-numbering.cc
+++ b/src/ast-numbering.cc
@@ -14,6 +14,7 @@ class AstNumberingVisitor final : public AstVisitor {
public:
AstNumberingVisitor(Isolate* isolate, Zone* zone)
: AstVisitor(),
+ isolate_(isolate),
next_id_(BailoutId::FirstUsable().ToInt()),
properties_(zone),
slot_cache_(zone),
@@ -65,12 +66,13 @@ class AstNumberingVisitor final : public AstVisitor {
template <typename Node>
void ReserveFeedbackSlots(Node* node) {
- node->AssignFeedbackVectorSlots(isolate(), properties_.get_spec(),
+ node->AssignFeedbackVectorSlots(isolate_, properties_.get_spec(),
&slot_cache_);
}
BailoutReason dont_optimize_reason() const { return dont_optimize_reason_; }
+ Isolate* isolate_;
int next_id_;
AstProperties properties_;
// The slot cache allows us to reuse certain feedback vector slots.
@@ -466,7 +468,7 @@ void AstNumberingVisitor::VisitObjectLiteral(ObjectLiteral* node) {
for (int i = 0; i < node->properties()->length(); i++) {
VisitObjectLiteralProperty(node->properties()->at(i));
}
- node->BuildConstantProperties(isolate());
+ node->BuildConstantProperties(isolate_);
// Mark all computed expressions that are bound to a key that
// is shadowed by a later occurrence of the same key. For the
// marked expressions, no store code will be is emitted.
@@ -489,7 +491,7 @@ void AstNumberingVisitor::VisitArrayLiteral(ArrayLiteral* node) {
for (int i = 0; i < node->values()->length(); i++) {
Visit(node->values()->at(i));
}
- node->BuildConstantElements(isolate());
+ node->BuildConstantElements(isolate_);
ReserveFeedbackSlots(node);
}
« no previous file with comments | « src/ast.h ('k') | src/compiler/ast-graph-builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698