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

Side by Side Diff: src/parsing/parser.cc

Issue 2225373002: Read zone() directly from parser_ in ParserTraits (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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 | « no previous file | no next file » | 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/parsing/parser.h" 5 #include "src/parsing/parser.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "src/api.h" 9 #include "src/api.h"
10 #include "src/ast/ast.h" 10 #include "src/ast/ast.h"
(...skipping 5841 matching lines...) Expand 10 before | Expand all | Expand 10 after
5852 ZoneList<Expression*>* ParserTraits::GetNonPatternList() const { 5852 ZoneList<Expression*>* ParserTraits::GetNonPatternList() const {
5853 return parser_->function_state_->non_patterns_to_rewrite(); 5853 return parser_->function_state_->non_patterns_to_rewrite();
5854 } 5854 }
5855 5855
5856 5856
5857 ZoneList<typename ParserTraits::Type::ExpressionClassifier::Error>* 5857 ZoneList<typename ParserTraits::Type::ExpressionClassifier::Error>*
5858 ParserTraits::GetReportedErrorList() const { 5858 ParserTraits::GetReportedErrorList() const {
5859 return parser_->function_state_->GetReportedErrorList(); 5859 return parser_->function_state_->GetReportedErrorList();
5860 } 5860 }
5861 5861
5862 5862 Zone* ParserTraits::zone() const { return parser_->zone(); }
5863 Zone* ParserTraits::zone() const {
5864 return parser_->function_state_->scope()->zone();
5865 }
5866
5867 5863
5868 class NonPatternRewriter : public AstExpressionRewriter { 5864 class NonPatternRewriter : public AstExpressionRewriter {
5869 public: 5865 public:
5870 NonPatternRewriter(uintptr_t stack_limit, Parser* parser) 5866 NonPatternRewriter(uintptr_t stack_limit, Parser* parser)
5871 : AstExpressionRewriter(stack_limit), parser_(parser) {} 5867 : AstExpressionRewriter(stack_limit), parser_(parser) {}
5872 ~NonPatternRewriter() override {} 5868 ~NonPatternRewriter() override {}
5873 5869
5874 private: 5870 private:
5875 bool RewriteExpression(Expression* expr) override { 5871 bool RewriteExpression(Expression* expr) override {
5876 if (expr->IsRewritableExpression()) return true; 5872 if (expr->IsRewritableExpression()) return true;
(...skipping 1226 matching lines...) Expand 10 before | Expand all | Expand 10 after
7103 node->Print(Isolate::Current()); 7099 node->Print(Isolate::Current());
7104 } 7100 }
7105 #endif // DEBUG 7101 #endif // DEBUG
7106 7102
7107 #undef CHECK_OK 7103 #undef CHECK_OK
7108 #undef CHECK_OK_VOID 7104 #undef CHECK_OK_VOID
7109 #undef CHECK_FAILED 7105 #undef CHECK_FAILED
7110 7106
7111 } // namespace internal 7107 } // namespace internal
7112 } // namespace v8 7108 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698