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

Side by Side Diff: src/parser.h

Issue 1028973002: Move this_has_uses from ParseInfo back into CompilationInfo and renumber CompilationInfo flags. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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 | « src/hydrogen.cc ('k') | src/parser.cc » ('j') | 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 #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" // TODO(titzer): remove this include dependency 10 #include "src/compiler.h" // TODO(titzer): remove this include dependency
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 FLAG_ACCESSOR(kToplevel, is_toplevel, set_toplevel) 50 FLAG_ACCESSOR(kToplevel, is_toplevel, set_toplevel)
51 FLAG_ACCESSOR(kLazy, is_lazy, set_lazy) 51 FLAG_ACCESSOR(kLazy, is_lazy, set_lazy)
52 FLAG_ACCESSOR(kEval, is_eval, set_eval) 52 FLAG_ACCESSOR(kEval, is_eval, set_eval)
53 FLAG_ACCESSOR(kGlobal, is_global, set_global) 53 FLAG_ACCESSOR(kGlobal, is_global, set_global)
54 FLAG_ACCESSOR(kStrictMode, is_strict_mode, set_strict_mode) 54 FLAG_ACCESSOR(kStrictMode, is_strict_mode, set_strict_mode)
55 FLAG_ACCESSOR(kStrongMode, is_strong_mode, set_strong_mode) 55 FLAG_ACCESSOR(kStrongMode, is_strong_mode, set_strong_mode)
56 FLAG_ACCESSOR(kNative, is_native, set_native) 56 FLAG_ACCESSOR(kNative, is_native, set_native)
57 FLAG_ACCESSOR(kModule, is_module, set_module) 57 FLAG_ACCESSOR(kModule, is_module, set_module)
58 FLAG_ACCESSOR(kAllowLazyParsing, allow_lazy_parsing, set_allow_lazy_parsing) 58 FLAG_ACCESSOR(kAllowLazyParsing, allow_lazy_parsing, set_allow_lazy_parsing)
59 FLAG_ACCESSOR(kThisHasUses, this_has_uses, set_this_has_uses)
60 FLAG_ACCESSOR(kAstValueFactoryOwned, ast_value_factory_owned, 59 FLAG_ACCESSOR(kAstValueFactoryOwned, ast_value_factory_owned,
61 set_ast_value_factory_owned) 60 set_ast_value_factory_owned)
62 61
63 #undef FLAG_ACCESSOR 62 #undef FLAG_ACCESSOR
64 63
65 void set_parse_restriction(ParseRestriction restriction) { 64 void set_parse_restriction(ParseRestriction restriction) {
66 SetFlag(kParseRestriction, restriction != NO_PARSE_RESTRICTION); 65 SetFlag(kParseRestriction, restriction != NO_PARSE_RESTRICTION);
67 } 66 }
68 67
69 ParseRestriction parse_restriction() const { 68 ParseRestriction parse_restriction() const {
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 kLazy = 1 << 1, 162 kLazy = 1 << 1,
164 kEval = 1 << 2, 163 kEval = 1 << 2,
165 kGlobal = 1 << 3, 164 kGlobal = 1 << 3,
166 kStrictMode = 1 << 4, 165 kStrictMode = 1 << 4,
167 kStrongMode = 1 << 5, 166 kStrongMode = 1 << 5,
168 kNative = 1 << 6, 167 kNative = 1 << 6,
169 kParseRestriction = 1 << 7, 168 kParseRestriction = 1 << 7,
170 kModule = 1 << 8, 169 kModule = 1 << 8,
171 kAllowLazyParsing = 1 << 9, 170 kAllowLazyParsing = 1 << 9,
172 // ---------- Output flags -------------------------- 171 // ---------- Output flags --------------------------
173 kThisHasUses = 1 << 10, 172 kAstValueFactoryOwned = 1 << 10
174 kAstValueFactoryOwned = 1 << 11
175 }; 173 };
176 174
177 //------------- Inputs to parsing and scope analysis ----------------------- 175 //------------- Inputs to parsing and scope analysis -----------------------
178 Zone* zone_; 176 Zone* zone_;
179 unsigned flags_; 177 unsigned flags_;
180 ScriptCompiler::ExternalSourceStream* source_stream_; 178 ScriptCompiler::ExternalSourceStream* source_stream_;
181 ScriptCompiler::StreamedSource::Encoding source_stream_encoding_; 179 ScriptCompiler::StreamedSource::Encoding source_stream_encoding_;
182 v8::Extension* extension_; 180 v8::Extension* extension_;
183 ScriptCompiler::CompileOptions compile_options_; 181 ScriptCompiler::CompileOptions compile_options_;
184 Scope* script_scope_; 182 Scope* script_scope_;
(...skipping 939 matching lines...) Expand 10 before | Expand all | Expand 10 after
1124 } 1122 }
1125 1123
1126 1124
1127 Expression* ParserTraits::CloseTemplateLiteral(TemplateLiteralState* state, 1125 Expression* ParserTraits::CloseTemplateLiteral(TemplateLiteralState* state,
1128 int start, Expression* tag) { 1126 int start, Expression* tag) {
1129 return parser_->CloseTemplateLiteral(state, start, tag); 1127 return parser_->CloseTemplateLiteral(state, start, tag);
1130 } 1128 }
1131 } } // namespace v8::internal 1129 } } // namespace v8::internal
1132 1130
1133 #endif // V8_PARSER_H_ 1131 #endif // V8_PARSER_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698