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

Side by Side Diff: src/parser.h

Issue 888613002: Initial switch to Chromium-style CHECK_* and DCHECK_* macros. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix slow dchecks. Created 5 years, 10 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
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 #ifndef V8_PARSER_H_ 5 #ifndef V8_PARSER_H_
6 #define V8_PARSER_H_ 6 #define V8_PARSER_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/ast.h" 9 #include "src/ast.h"
10 #include "src/compiler.h" // For CachedDataMode 10 #include "src/compiler.h" // For CachedDataMode
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 public: 597 public:
598 TemplateLiteral(Zone* zone, int pos) 598 TemplateLiteral(Zone* zone, int pos)
599 : cooked_(8, zone), raw_(8, zone), expressions_(8, zone), pos_(pos) {} 599 : cooked_(8, zone), raw_(8, zone), expressions_(8, zone), pos_(pos) {}
600 600
601 const ZoneList<Expression*>* cooked() const { return &cooked_; } 601 const ZoneList<Expression*>* cooked() const { return &cooked_; }
602 const ZoneList<Expression*>* raw() const { return &raw_; } 602 const ZoneList<Expression*>* raw() const { return &raw_; }
603 const ZoneList<Expression*>* expressions() const { return &expressions_; } 603 const ZoneList<Expression*>* expressions() const { return &expressions_; }
604 int position() const { return pos_; } 604 int position() const { return pos_; }
605 605
606 void AddTemplateSpan(Literal* cooked, Literal* raw, int end, Zone* zone) { 606 void AddTemplateSpan(Literal* cooked, Literal* raw, int end, Zone* zone) {
607 DCHECK_NOT_NULL(cooked); 607 DCHECK(cooked);
608 DCHECK_NOT_NULL(raw); 608 DCHECK(raw);
609 cooked_.Add(cooked, zone); 609 cooked_.Add(cooked, zone);
610 raw_.Add(raw, zone); 610 raw_.Add(raw, zone);
611 } 611 }
612 612
613 void AddExpression(Expression* expression, Zone* zone) { 613 void AddExpression(Expression* expression, Zone* zone) {
614 DCHECK_NOT_NULL(expression); 614 DCHECK(expression);
615 expressions_.Add(expression, zone); 615 expressions_.Add(expression, zone);
616 } 616 }
617 617
618 private: 618 private:
619 ZoneList<Expression*> cooked_; 619 ZoneList<Expression*> cooked_;
620 ZoneList<Expression*> raw_; 620 ZoneList<Expression*> raw_;
621 ZoneList<Expression*> expressions_; 621 ZoneList<Expression*> expressions_;
622 int pos_; 622 int pos_;
623 }; 623 };
624 624
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
994 } 994 }
995 995
996 996
997 Expression* ParserTraits::CloseTemplateLiteral(TemplateLiteralState* state, 997 Expression* ParserTraits::CloseTemplateLiteral(TemplateLiteralState* state,
998 int start, Expression* tag) { 998 int start, Expression* tag) {
999 return parser_->CloseTemplateLiteral(state, start, tag); 999 return parser_->CloseTemplateLiteral(state, start, tag);
1000 } 1000 }
1001 } } // namespace v8::internal 1001 } } // namespace v8::internal
1002 1002
1003 #endif // V8_PARSER_H_ 1003 #endif // V8_PARSER_H_
OLDNEW
« src/jsregexp.cc ('K') | « src/ostreams.cc ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698