OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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_PARSE_INFO_H_ | 5 #ifndef V8_PARSING_PARSE_INFO_H_ |
6 #define V8_PARSING_PARSE_INFO_H_ | 6 #define V8_PARSING_PARSE_INFO_H_ |
7 | 7 |
8 #include "include/v8.h" | 8 #include "include/v8.h" |
9 #include "src/globals.h" | 9 #include "src/globals.h" |
10 #include "src/handles.h" | 10 #include "src/handles.h" |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 } | 98 } |
99 void set_compile_options(ScriptCompiler::CompileOptions compile_options) { | 99 void set_compile_options(ScriptCompiler::CompileOptions compile_options) { |
100 compile_options_ = compile_options; | 100 compile_options_ = compile_options; |
101 } | 101 } |
102 | 102 |
103 DeclarationScope* script_scope() const { return script_scope_; } | 103 DeclarationScope* script_scope() const { return script_scope_; } |
104 void set_script_scope(DeclarationScope* script_scope) { | 104 void set_script_scope(DeclarationScope* script_scope) { |
105 script_scope_ = script_scope; | 105 script_scope_ = script_scope; |
106 } | 106 } |
107 | 107 |
| 108 DeclarationScope* asm_function_scope() const { return asm_function_scope_; } |
| 109 void set_asm_function_scope(DeclarationScope* scope) { |
| 110 asm_function_scope_ = scope; |
| 111 } |
| 112 |
108 AstValueFactory* ast_value_factory() const { return ast_value_factory_; } | 113 AstValueFactory* ast_value_factory() const { return ast_value_factory_; } |
109 void set_ast_value_factory(AstValueFactory* ast_value_factory) { | 114 void set_ast_value_factory(AstValueFactory* ast_value_factory) { |
110 ast_value_factory_ = ast_value_factory; | 115 ast_value_factory_ = ast_value_factory; |
111 } | 116 } |
112 | 117 |
113 const AstRawString* function_name() const { return function_name_; } | 118 const AstRawString* function_name() const { return function_name_; } |
114 void set_function_name(const AstRawString* function_name) { | 119 void set_function_name(const AstRawString* function_name) { |
115 function_name_ = function_name; | 120 function_name_ = function_name; |
116 } | 121 } |
117 | 122 |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 | 216 |
212 //------------- Inputs to parsing and scope analysis ----------------------- | 217 //------------- Inputs to parsing and scope analysis ----------------------- |
213 Zone* zone_; | 218 Zone* zone_; |
214 unsigned flags_; | 219 unsigned flags_; |
215 ScriptCompiler::ExternalSourceStream* source_stream_; | 220 ScriptCompiler::ExternalSourceStream* source_stream_; |
216 ScriptCompiler::StreamedSource::Encoding source_stream_encoding_; | 221 ScriptCompiler::StreamedSource::Encoding source_stream_encoding_; |
217 Utf16CharacterStream* character_stream_; | 222 Utf16CharacterStream* character_stream_; |
218 v8::Extension* extension_; | 223 v8::Extension* extension_; |
219 ScriptCompiler::CompileOptions compile_options_; | 224 ScriptCompiler::CompileOptions compile_options_; |
220 DeclarationScope* script_scope_; | 225 DeclarationScope* script_scope_; |
| 226 DeclarationScope* asm_function_scope_; |
221 UnicodeCache* unicode_cache_; | 227 UnicodeCache* unicode_cache_; |
222 uintptr_t stack_limit_; | 228 uintptr_t stack_limit_; |
223 uint32_t hash_seed_; | 229 uint32_t hash_seed_; |
224 int compiler_hints_; | 230 int compiler_hints_; |
225 int start_position_; | 231 int start_position_; |
226 int end_position_; | 232 int end_position_; |
227 | 233 |
228 // TODO(titzer): Move handles and isolate out of ParseInfo. | 234 // TODO(titzer): Move handles and isolate out of ParseInfo. |
229 Isolate* isolate_; | 235 Isolate* isolate_; |
230 Handle<SharedFunctionInfo> shared_; | 236 Handle<SharedFunctionInfo> shared_; |
(...skipping 10 matching lines...) Expand all Loading... |
241 | 247 |
242 void SetFlag(Flag f) { flags_ |= f; } | 248 void SetFlag(Flag f) { flags_ |= f; } |
243 void SetFlag(Flag f, bool v) { flags_ = v ? flags_ | f : flags_ & ~f; } | 249 void SetFlag(Flag f, bool v) { flags_ = v ? flags_ | f : flags_ & ~f; } |
244 bool GetFlag(Flag f) const { return (flags_ & f) != 0; } | 250 bool GetFlag(Flag f) const { return (flags_ & f) != 0; } |
245 }; | 251 }; |
246 | 252 |
247 } // namespace internal | 253 } // namespace internal |
248 } // namespace v8 | 254 } // namespace v8 |
249 | 255 |
250 #endif // V8_PARSING_PARSE_INFO_H_ | 256 #endif // V8_PARSING_PARSE_INFO_H_ |
OLD | NEW |