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

Unified Diff: src/preparser.h

Issue 1216013002: Parse eagerly inside block scopes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: simplified a lot Created 5 years, 6 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 | « src/parser.cc ('k') | src/scopes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/preparser.h
diff --git a/src/preparser.h b/src/preparser.h
index 26c3065e7c059daa71fd89b5617024992b31360e..92712ff0d892cb0c035148cb50dd8955a63cf7db 100644
--- a/src/preparser.h
+++ b/src/preparser.h
@@ -152,15 +152,14 @@ class ParserBase : public Traits {
class BlockState BASE_EMBEDDED {
public:
BlockState(Scope** scope_stack, Scope* scope)
- : scope_stack_(scope_stack), outer_scope_(*scope_stack), scope_(scope) {
- *scope_stack_ = scope_;
+ : scope_stack_(scope_stack), outer_scope_(*scope_stack) {
+ *scope_stack_ = scope;
}
~BlockState() { *scope_stack_ = outer_scope_; }
private:
Scope** scope_stack_;
Scope* outer_scope_;
- Scope* scope_;
};
class FunctionState BASE_EMBEDDED {
« no previous file with comments | « src/parser.cc ('k') | src/scopes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698