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

Unified Diff: src/parser.h

Issue 443903003: Rewind additional parser state when reinterpreting arrow arguments (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove extra line Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/preparser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.h
diff --git a/src/parser.h b/src/parser.h
index fd24e8d4e952b4d33408f3fc03c0fcb83ec3bf43..e3cee84097346b881e8b1e9f744af1cb4a150a02 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -355,6 +355,21 @@ class ParserTraits {
typedef Variable GeneratorVariable;
typedef v8::internal::Zone Zone;
+ class Checkpoint BASE_EMBEDDED {
+ public:
+ template <typename Parser>
+ explicit Checkpoint(Parser* parser) {
+ isolate_ = parser->zone()->isolate();
+ saved_ast_node_id_ = isolate_->ast_node_id();
+ }
+
+ void Restore() { isolate_->set_ast_node_id(saved_ast_node_id_); }
+
+ private:
+ Isolate* isolate_;
+ int saved_ast_node_id_;
+ };
+
typedef v8::internal::AstProperties AstProperties;
typedef Vector<VariableProxy*> ParameterIdentifierVector;
« no previous file with comments | « no previous file | src/preparser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698