OLD | NEW |
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_PARSING_PARSER_H_ | 5 #ifndef V8_PARSING_PARSER_H_ |
6 #define V8_PARSING_PARSER_H_ | 6 #define V8_PARSING_PARSER_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/ast/ast.h" | 9 #include "src/ast/ast.h" |
10 #include "src/ast/scopes.h" | 10 #include "src/ast/scopes.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 } | 78 } |
79 | 79 |
80 ScriptCompiler::StreamedSource::Encoding source_stream_encoding() { | 80 ScriptCompiler::StreamedSource::Encoding source_stream_encoding() { |
81 return source_stream_encoding_; | 81 return source_stream_encoding_; |
82 } | 82 } |
83 void set_source_stream_encoding( | 83 void set_source_stream_encoding( |
84 ScriptCompiler::StreamedSource::Encoding source_stream_encoding) { | 84 ScriptCompiler::StreamedSource::Encoding source_stream_encoding) { |
85 source_stream_encoding_ = source_stream_encoding; | 85 source_stream_encoding_ = source_stream_encoding; |
86 } | 86 } |
87 | 87 |
| 88 Utf16CharacterStream* character_stream() const { return character_stream_; } |
| 89 void set_character_stream(Utf16CharacterStream* character_stream) { |
| 90 character_stream_ = character_stream; |
| 91 } |
| 92 |
88 v8::Extension* extension() { return extension_; } | 93 v8::Extension* extension() { return extension_; } |
89 void set_extension(v8::Extension* extension) { extension_ = extension; } | 94 void set_extension(v8::Extension* extension) { extension_ = extension; } |
90 | 95 |
91 ScriptData** cached_data() { return cached_data_; } | 96 ScriptData** cached_data() { return cached_data_; } |
92 void set_cached_data(ScriptData** cached_data) { cached_data_ = cached_data; } | 97 void set_cached_data(ScriptData** cached_data) { cached_data_ = cached_data; } |
93 | 98 |
94 ScriptCompiler::CompileOptions compile_options() { return compile_options_; } | 99 ScriptCompiler::CompileOptions compile_options() { return compile_options_; } |
95 void set_compile_options(ScriptCompiler::CompileOptions compile_options) { | 100 void set_compile_options(ScriptCompiler::CompileOptions compile_options) { |
96 compile_options_ = compile_options; | 101 compile_options_ = compile_options; |
97 } | 102 } |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 kAllowLazyParsing = 1 << 8, | 173 kAllowLazyParsing = 1 << 8, |
169 // ---------- Output flags -------------------------- | 174 // ---------- Output flags -------------------------- |
170 kAstValueFactoryOwned = 1 << 9 | 175 kAstValueFactoryOwned = 1 << 9 |
171 }; | 176 }; |
172 | 177 |
173 //------------- Inputs to parsing and scope analysis ----------------------- | 178 //------------- Inputs to parsing and scope analysis ----------------------- |
174 Zone* zone_; | 179 Zone* zone_; |
175 unsigned flags_; | 180 unsigned flags_; |
176 ScriptCompiler::ExternalSourceStream* source_stream_; | 181 ScriptCompiler::ExternalSourceStream* source_stream_; |
177 ScriptCompiler::StreamedSource::Encoding source_stream_encoding_; | 182 ScriptCompiler::StreamedSource::Encoding source_stream_encoding_; |
| 183 Utf16CharacterStream* character_stream_; |
178 v8::Extension* extension_; | 184 v8::Extension* extension_; |
179 ScriptCompiler::CompileOptions compile_options_; | 185 ScriptCompiler::CompileOptions compile_options_; |
180 Scope* script_scope_; | 186 Scope* script_scope_; |
181 UnicodeCache* unicode_cache_; | 187 UnicodeCache* unicode_cache_; |
182 uintptr_t stack_limit_; | 188 uintptr_t stack_limit_; |
183 uint32_t hash_seed_; | 189 uint32_t hash_seed_; |
184 | 190 |
185 // TODO(titzer): Move handles and isolate out of ParseInfo. | 191 // TODO(titzer): Move handles and isolate out of ParseInfo. |
186 Isolate* isolate_; | 192 Isolate* isolate_; |
187 Handle<SharedFunctionInfo> shared_; | 193 Handle<SharedFunctionInfo> shared_; |
(...skipping 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1319 | 1325 |
1320 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { | 1326 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { |
1321 return parser_->ParseDoExpression(ok); | 1327 return parser_->ParseDoExpression(ok); |
1322 } | 1328 } |
1323 | 1329 |
1324 | 1330 |
1325 } // namespace internal | 1331 } // namespace internal |
1326 } // namespace v8 | 1332 } // namespace v8 |
1327 | 1333 |
1328 #endif // V8_PARSING_PARSER_H_ | 1334 #endif // V8_PARSING_PARSER_H_ |
OLD | NEW |