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

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

Issue 2301423002: includes: Make ast.h not need isolate.h any more. (Closed)
Patch Set: rebased Created 4 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 unified diff | Download patch
« no previous file with comments | « src/ast/ast-expression-rewriter.h ('k') | src/ast/ast-traversal-visitor.h » ('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/ast/ast-numbering.h" 5 #include "src/ast/ast-numbering.h"
6 6
7 #include "src/ast/ast.h" 7 #include "src/ast/ast.h"
8 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 #include "src/execution.h"
10 #include "src/isolate.h"
9 11
10 namespace v8 { 12 namespace v8 {
11 namespace internal { 13 namespace internal {
12 14
13 class AstNumberingVisitor final : public AstVisitor<AstNumberingVisitor> { 15 class AstNumberingVisitor final : public AstVisitor<AstNumberingVisitor> {
14 public: 16 public:
15 AstNumberingVisitor(Isolate* isolate, Zone* zone) 17 AstNumberingVisitor(Isolate* isolate, Zone* zone)
16 : isolate_(isolate), 18 : isolate_(isolate),
17 zone_(zone), 19 zone_(zone),
18 next_id_(BailoutId::FirstUsable().ToInt()), 20 next_id_(BailoutId::FirstUsable().ToInt()),
19 yield_count_(0), 21 yield_count_(0),
20 properties_(zone), 22 properties_(zone),
21 slot_cache_(zone), 23 slot_cache_(zone),
22 dont_optimize_reason_(kNoReason), 24 dont_optimize_reason_(kNoReason),
23 catch_prediction_(HandlerTable::UNCAUGHT) { 25 catch_prediction_(HandlerTable::UNCAUGHT) {
24 InitializeAstVisitor(isolate); 26 InitializeAstVisitor(isolate->stack_guard()->real_climit());
25 } 27 }
26 28
27 bool Renumber(FunctionLiteral* node); 29 bool Renumber(FunctionLiteral* node);
28 30
29 private: 31 private:
30 // AST node visitor interface. 32 // AST node visitor interface.
31 #define DEFINE_VISIT(type) void Visit##type(type* node); 33 #define DEFINE_VISIT(type) void Visit##type(type* node);
32 AST_NODE_LIST(DEFINE_VISIT) 34 AST_NODE_LIST(DEFINE_VISIT)
33 #undef DEFINE_VISIT 35 #undef DEFINE_VISIT
34 36
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 } 592 }
591 593
592 594
593 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, 595 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone,
594 FunctionLiteral* function) { 596 FunctionLiteral* function) {
595 AstNumberingVisitor visitor(isolate, zone); 597 AstNumberingVisitor visitor(isolate, zone);
596 return visitor.Renumber(function); 598 return visitor.Renumber(function);
597 } 599 }
598 } // namespace internal 600 } // namespace internal
599 } // namespace v8 601 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast/ast-expression-rewriter.h ('k') | src/ast/ast-traversal-visitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698