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

Unified Diff: src/parsing/parser.cc

Issue 2417703003: parser fuzzer and parser shell should also work in component builds (Closed)
Patch Set: updates Created 4 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
Index: src/parsing/parser.cc
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc
index c0cfb65594216a694b2323ebeb207ab1bef9df20..d93ad845dc3e1317fa6111298bad8611ae6e5ed1 100644
--- a/src/parsing/parser.cc
+++ b/src/parsing/parser.cc
@@ -292,49 +292,6 @@ FunctionLiteral* Parser::DefaultConstructor(const AstRawString* name,
return function_literal;
}
-
-// ----------------------------------------------------------------------------
-// Target is a support class to facilitate manipulation of the
-// Parser's target_stack_ (the stack of potential 'break' and
-// 'continue' statement targets). Upon construction, a new target is
-// added; it is removed upon destruction.
-
-class ParserTarget BASE_EMBEDDED {
- public:
- ParserTarget(ParserBase<Parser>* parser, BreakableStatement* statement)
- : variable_(&parser->impl()->target_stack_),
- statement_(statement),
- previous_(parser->impl()->target_stack_) {
- parser->impl()->target_stack_ = this;
- }
-
- ~ParserTarget() { *variable_ = previous_; }
-
- ParserTarget* previous() { return previous_; }
- BreakableStatement* statement() { return statement_; }
-
- private:
- ParserTarget** variable_;
- BreakableStatement* statement_;
- ParserTarget* previous_;
-};
-
-class ParserTargetScope BASE_EMBEDDED {
- public:
- explicit ParserTargetScope(ParserBase<Parser>* parser)
- : variable_(&parser->impl()->target_stack_),
- previous_(parser->impl()->target_stack_) {
- parser->impl()->target_stack_ = nullptr;
- }
-
- ~ParserTargetScope() { *variable_ = previous_; }
-
- private:
- ParserTarget** variable_;
- ParserTarget* previous_;
-};
-
-
// ----------------------------------------------------------------------------
// The CHECK_OK macro is a convenient macro to enforce error
// handling for functions that may fail (by returning !*ok).
« src/parsing/parser.h ('K') | « src/parsing/parser.h ('k') | test/fuzzer/fuzzer.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698