| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 v8::Extension* extension() const { return extension_; } | 92 v8::Extension* extension() const { return extension_; } |
| 93 void set_extension(v8::Extension* extension) { extension_ = extension; } | 93 void set_extension(v8::Extension* extension) { extension_ = extension; } |
| 94 | 94 |
| 95 ScriptData** cached_data() const { return cached_data_; } | 95 ScriptData** cached_data() const { return cached_data_; } |
| 96 void set_cached_data(ScriptData** cached_data) { cached_data_ = cached_data; } | 96 void set_cached_data(ScriptData** cached_data) { cached_data_ = cached_data; } |
| 97 | 97 |
| 98 ScriptCompiler::CompileOptions compile_options() const { | 98 ScriptCompiler::CompileOptions compile_options() const { |
| 99 return compile_options_; | 99 return compile_options_; |
| 100 } | 100 } |
| 101 void set_compile_options(ScriptCompiler::CompileOptions compile_options) { | 101 void set_compile_options(ScriptCompiler::CompileOptions compile_options) { |
| 102 if (compile_options == ScriptCompiler::kConsumeParserCache) { |
| 103 set_allow_lazy_parsing(); |
| 104 } |
| 102 compile_options_ = compile_options; | 105 compile_options_ = compile_options; |
| 103 } | 106 } |
| 104 | 107 |
| 105 DeclarationScope* script_scope() const { return script_scope_; } | 108 DeclarationScope* script_scope() const { return script_scope_; } |
| 106 void set_script_scope(DeclarationScope* script_scope) { | 109 void set_script_scope(DeclarationScope* script_scope) { |
| 107 script_scope_ = script_scope; | 110 script_scope_ = script_scope; |
| 108 } | 111 } |
| 109 | 112 |
| 110 AstValueFactory* ast_value_factory() const { return ast_value_factory_; } | 113 AstValueFactory* ast_value_factory() const { return ast_value_factory_; } |
| 111 void set_ast_value_factory(AstValueFactory* ast_value_factory) { | 114 void set_ast_value_factory(AstValueFactory* ast_value_factory) { |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 | 246 |
| 244 void SetFlag(Flag f) { flags_ |= f; } | 247 void SetFlag(Flag f) { flags_ |= f; } |
| 245 void SetFlag(Flag f, bool v) { flags_ = v ? flags_ | f : flags_ & ~f; } | 248 void SetFlag(Flag f, bool v) { flags_ = v ? flags_ | f : flags_ & ~f; } |
| 246 bool GetFlag(Flag f) const { return (flags_ & f) != 0; } | 249 bool GetFlag(Flag f) const { return (flags_ & f) != 0; } |
| 247 }; | 250 }; |
| 248 | 251 |
| 249 } // namespace internal | 252 } // namespace internal |
| 250 } // namespace v8 | 253 } // namespace v8 |
| 251 | 254 |
| 252 #endif // V8_PARSING_PARSE_INFO_H_ | 255 #endif // V8_PARSING_PARSE_INFO_H_ |
| OLD | NEW |